1 #ifndef _APPSERVER_PROTOCOL_ 2 #define _APPSERVER_PROTOCOL_ 3 4 // Server port names. The input port is the port which is used to receive 5 // input messages from the Input Server. The other is the "main" port for 6 // the server and is utilized mostly by BApplication objects. 7 #define SERVER_PORT_NAME "OBappserver" 8 #define SERVER_INPUT_PORT "OBinputport" 9 10 enum 11 { 12 // Used for quick replies from the app_server 13 SERVER_TRUE='_srt', 14 SERVER_FALSE, 15 AS_SERVER_BMESSAGE, 16 AS_SERVER_AREALINK, 17 AS_SERVER_SESSION, 18 AS_SERVER_PORTLINK, 19 AS_CLIENT_DEAD, 20 21 // Application definitions 22 AS_CREATE_APP, 23 AS_DELETE_APP, 24 AS_QUIT_APP, 25 26 AS_SET_SERVER_PORT, 27 28 AS_CREATE_WINDOW, 29 AS_DELETE_WINDOW, 30 AS_CREATE_BITMAP, 31 AS_DELETE_BITMAP, 32 33 // Cursor definitions 34 AS_SET_CURSOR_DATA, 35 AS_SET_CURSOR_BCURSOR, 36 AS_SET_CURSOR_BBITMAP, 37 AS_SET_CURSOR_SYSTEM, 38 39 AS_SET_SYSCURSOR_DATA, 40 AS_SET_SYSCURSOR_BCURSOR, 41 AS_SET_SYSCURSOR_BBITMAP, 42 AS_SET_SYSCURSOR_DEFAULTS, 43 AS_GET_SYSCURSOR, 44 45 AS_SHOW_CURSOR, 46 AS_HIDE_CURSOR, 47 AS_OBSCURE_CURSOR, 48 AS_QUERY_CURSOR_HIDDEN, 49 50 AS_CREATE_BCURSOR, 51 AS_DELETE_BCURSOR, 52 53 AS_BEGIN_RECT_TRACKING, 54 AS_END_RECT_TRACKING, 55 56 // Window definitions 57 AS_SHOW_WINDOW, 58 AS_HIDE_WINDOW, 59 AS_QUIT_WINDOW, 60 AS_SEND_BEHIND, 61 AS_SET_LOOK, 62 AS_SET_FEEL, 63 AS_SET_FLAGS, 64 AS_DISABLE_UPDATES, 65 AS_ENABLE_UPDATES, 66 AS_BEGIN_UPDATE, 67 AS_END_UPDATE, 68 AS_NEEDS_UPDATE, 69 AS_WINDOW_TITLE, 70 AS_ADD_TO_SUBSET, 71 AS_REM_FROM_SUBSET, 72 AS_SET_ALIGNMENT, 73 AS_GET_ALIGNMENT, 74 AS_GET_WORKSPACES, 75 AS_SET_WORKSPACES, 76 AS_WINDOW_RESIZE, 77 AS_WINDOW_MOVE, 78 AS_SET_SIZE_LIMITS, 79 AS_ACTIVATE_WINDOW, 80 AS_WINDOW_MINIMIZE, 81 AS_UPDATE_IF_NEEDED, 82 _ALL_UPDATED_, // this should be moved in place of _UPDATE_IF_NEEDED_ in AppDefs.h 83 84 85 // BPicture definitions 86 AS_CREATE_PICTURE, 87 AS_DELETE_PICTURE, 88 AS_CLONE_PICTURE, 89 AS_DOWNLOAD_PICTURE, 90 91 // Font-related server communications 92 AS_QUERY_FONTS_CHANGED, 93 AS_UPDATED_CLIENT_FONTLIST, 94 AS_GET_FAMILY_ID, 95 AS_GET_STYLE_ID, 96 AS_GET_STYLE_FOR_FACE, 97 98 // This will be modified. Currently a kludge for the input server until 99 // BScreens are implemented by the IK Taeam 100 AS_GET_SCREEN_MODE, 101 102 // Global function call defs 103 AS_SET_UI_COLORS, 104 AS_GET_UI_COLORS, 105 AS_GET_UI_COLOR, 106 AS_SET_DECORATOR, 107 AS_GET_DECORATOR, 108 AS_R5_SET_DECORATOR, 109 110 AS_COUNT_WORKSPACES, 111 AS_SET_WORKSPACE_COUNT, 112 AS_CURRENT_WORKSPACE, 113 AS_ACTIVATE_WORKSPACE, 114 AS_SET_SCREEN_MODE, 115 AS_GET_SCROLLBAR_INFO, 116 AS_SET_SCROLLBAR_INFO, 117 AS_IDLE_TIME, 118 AS_SELECT_PRINTER_PANEL, 119 AS_ADD_PRINTER_PANEL, 120 AS_RUN_BE_ABOUT, 121 AS_SET_FOCUS_FOLLOWS_MOUSE, 122 AS_FOCUS_FOLLOWS_MOUSE, 123 AS_SET_MOUSE_MODE, 124 AS_GET_MOUSE_MODE, 125 126 // Hook function messages 127 AS_WORKSPACE_ACTIVATED, 128 AS_WORKSPACES_CHANGED, 129 AS_WINDOW_ACTIVATED, 130 AS_SCREENMODE_CHANGED, 131 132 // Graphics calls 133 // Are these TRANSACTION codes needed ? 134 AS_BEGIN_TRANSACTION, 135 AS_END_TRANSACTION, 136 AS_SET_HIGH_COLOR, 137 AS_SET_LOW_COLOR, 138 AS_SET_VIEW_COLOR, 139 140 AS_STROKE_ARC, 141 AS_STROKE_BEZIER, 142 AS_STROKE_ELLIPSE, 143 AS_STROKE_LINE, 144 AS_STROKE_LINEARRAY, 145 AS_STROKE_POLYGON, 146 AS_STROKE_RECT, 147 AS_STROKE_ROUNDRECT, 148 AS_STROKE_SHAPE, 149 AS_STROKE_TRIANGLE, 150 151 AS_FILL_ARC, 152 AS_FILL_BEZIER, 153 AS_FILL_ELLIPSE, 154 AS_FILL_POLYGON, 155 AS_FILL_RECT, 156 AS_FILL_REGION, 157 AS_FILL_ROUNDRECT, 158 AS_FILL_SHAPE, 159 AS_FILL_TRIANGLE, 160 161 AS_MOVEPENBY, 162 AS_MOVEPENTO, 163 AS_SETPENSIZE, 164 165 AS_DRAW_STRING, 166 AS_SET_FONT, 167 AS_SET_FONT_SIZE, 168 169 AS_FLUSH, 170 AS_SYNC, 171 172 AS_LAYER_CREATE, 173 AS_LAYER_DELETE, 174 AS_LAYER_CREATE_ROOT, 175 AS_LAYER_DELETE_ROOT, 176 AS_LAYER_ADD_CHILD, 177 AS_LAYER_REMOVE_CHILD, 178 AS_LAYER_REMOVE_SELF, 179 AS_LAYER_SHOW, 180 AS_LAYER_HIDE, 181 AS_LAYER_MOVE, 182 AS_LAYER_RESIZE, 183 AS_LAYER_INVALIDATE, 184 AS_LAYER_DRAW, 185 186 AS_LAYER_GET_TOKEN, 187 AS_LAYER_ADD, 188 AS_LAYER_REMOVE, 189 190 // View/Layer definitions 191 AS_LAYER_GET_COORD, 192 AS_LAYER_SET_FLAGS, 193 AS_LAYER_SET_ORIGIN, 194 AS_LAYER_GET_ORIGIN, 195 AS_LAYER_RESIZE_MODE, 196 AS_LAYER_CURSOR, 197 AS_LAYER_BEGIN_RECT_TRACK, 198 AS_LAYER_END_RECT_TRACK, 199 AS_LAYER_DRAG_RECT, 200 AS_LAYER_DRAG_IMAGE, 201 AS_LAYER_GET_MOUSE_COORDS, 202 AS_LAYER_SCROLL, 203 AS_LAYER_SET_LINE_MODE, 204 AS_LAYER_GET_LINE_MODE, 205 AS_LAYER_PUSH_STATE, 206 AS_LAYER_POP_STATE, 207 AS_LAYER_SET_SCALE, 208 AS_LAYER_GET_SCALE, 209 AS_LAYER_SET_DRAW_MODE, 210 AS_LAYER_GET_DRAW_MODE, 211 AS_LAYER_SET_BLEND_MODE, 212 AS_LAYER_GET_BLEND_MODE, 213 AS_LAYER_SET_PEN_LOC, 214 AS_LAYER_GET_PEN_LOC, 215 AS_LAYER_SET_PEN_SIZE, 216 AS_LAYER_GET_PEN_SIZE, 217 AS_LAYER_SET_HIGH_COLOR, 218 AS_LAYER_SET_LOW_COLOR, 219 AS_LAYER_SET_VIEW_COLOR, 220 AS_LAYER_GET_COLORS, 221 AS_LAYER_PRINT_ALIASING, 222 AS_LAYER_CLIP_TO_PICTURE, 223 AS_LAYER_CLIP_TO_INVERSE_PICTURE, 224 AS_LAYER_GET_CLIP_REGION, 225 AS_LAYER_DRAW_BITMAP_ASYNC_IN_RECT, 226 AS_LAYER_DRAW_BITMAP_ASYNC_AT_POINT, 227 AS_LAYER_DRAW_BITMAP_SYNC_IN_RECT, 228 AS_LAYER_DRAW_BITMAP_SYNC_AT_POINT, 229 230 AS_LAYER_DRAW_STRING, 231 AS_LAYER_SET_CLIP_REGION, 232 AS_LAYER_LINE_ARRAY, 233 AS_LAYER_BEGIN_PICTURE, 234 AS_LAYER_APPEND_TO_PICTURE, 235 AS_LAYER_END_PICTURE, 236 AS_LAYER_COPY_BITS, 237 AS_LAYER_DRAW_PICTURE, 238 AS_LAYER_INVAL_RECT, 239 AS_LAYER_INVAL_REGION, 240 AS_LAYER_INVERT_RECT, 241 AS_LAYER_MOVETO, 242 AS_LAYER_RESIZETO, 243 AS_LAYER_SET_STATE, 244 AS_LAYER_SET_FONT_STATE, 245 AS_LAYER_GET_STATE, 246 AS_LAYER_SET_VIEW_IMAGE, 247 AS_LAYER_SET_PATTERN, 248 AS_SET_CURRENT_LAYER 249 }; 250 251 #define AS_PATTERN_SIZE 8 252 #define AS_SET_COLOR_MSG_SIZE 8+4 253 #define AS_STROKE_ARC_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE 254 #define AS_STROKE_BEZIER_MSG_SIZE 8+8*sizeof(float)+AS_PATTERN_SIZE 255 #define AS_STROKE_ELLIPSE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE 256 #define AS_STROKE_LINE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE 257 #define AS_STROKE_RECT_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE 258 #define AS_STROKE_ROUNDRECT_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE 259 #define AS_STROKE_TRIANGLE_MSG_SIZE 8+10*sizeof(float)+AS_PATTERN_SIZE 260 #define AS_FILL_ARC_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE 261 #define AS_FILL_BEZIER_MSG_SIZE 8+8*sizeof(float)+AS_PATTERN_SIZE 262 #define AS_FILL_ELLIPSE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE 263 #define AS_FILL_RECT_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE 264 #define AS_FILL_ROUNDRECT_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE 265 #define AS_FILL_TRIANGLE_MSG_SIZE 8+10*sizeof(float)+AS_PATTERN_SIZE 266 267 #endif 268