1 /* 2 * Copyright 2001-2006, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * DarkWyrm <bpmagic@columbus.rr.com> 7 * Jérôme Duval, jerome.duval@free.fr 8 * Axel Dörfler, axeld@pinc-software.de 9 */ 10 #ifndef APP_SERVER_PROTOCOL_H 11 #define APP_SERVER_PROTOCOL_H 12 13 14 #include <SupportDefs.h> 15 16 17 // Server port names. The input port is the port which is used to receive 18 // input messages from the Input Server. The other is the "main" port for 19 // the server and is utilized mostly by BApplication objects. 20 #define SERVER_PORT_NAME "OBappserver" 21 #if TEST_MODE 22 # define SERVER_INPUT_PORT "OBinputport" 23 #endif 24 25 #define AS_REQUEST_COLOR_KEY 0x00010000 26 // additional option for AS_LAYER_SET_VIEW_BITMAP 27 28 enum { 29 // NOTE: all defines have to start with "AS_" to let the "code_to_name" 30 // utility work correctly 31 32 AS_REGISTER_INPUT_SERVER = 1, 33 AS_GET_DESKTOP, 34 35 // Desktop definitions (through the ServerApp, though) 36 AS_GET_WINDOW_LIST, 37 AS_GET_WINDOW_INFO, 38 AS_MINIMIZE_TEAM, 39 AS_BRING_TEAM_TO_FRONT, 40 AS_WINDOW_ACTION, 41 42 // Application definitions 43 AS_CREATE_APP, 44 AS_DELETE_APP, 45 AS_QUIT_APP, 46 AS_ACTIVATE_APP, 47 AS_APP_CRASHED, 48 49 AS_CREATE_WINDOW, 50 AS_CREATE_OFFSCREEN_WINDOW, 51 AS_DELETE_WINDOW, 52 AS_CREATE_BITMAP, 53 AS_DELETE_BITMAP, 54 AS_GET_BITMAP_OVERLAY_RESTRICTIONS, 55 56 // Cursor commands 57 AS_SET_CURSOR, 58 59 AS_SHOW_CURSOR, 60 AS_HIDE_CURSOR, 61 AS_OBSCURE_CURSOR, 62 AS_QUERY_CURSOR_HIDDEN, 63 64 AS_CREATE_CURSOR, 65 AS_DELETE_CURSOR, 66 67 AS_BEGIN_RECT_TRACKING, 68 AS_END_RECT_TRACKING, 69 70 // Window definitions 71 AS_SHOW_WINDOW, 72 AS_HIDE_WINDOW, 73 AS_MINIMIZE_WINDOW, 74 AS_QUIT_WINDOW, 75 AS_SEND_BEHIND, 76 AS_SET_LOOK, 77 AS_SET_FEEL, 78 AS_SET_FLAGS, 79 AS_DISABLE_UPDATES, 80 AS_ENABLE_UPDATES, 81 AS_BEGIN_UPDATE, 82 AS_END_UPDATE, 83 AS_NEEDS_UPDATE, 84 AS_SET_WINDOW_TITLE, 85 AS_ADD_TO_SUBSET, 86 AS_REMOVE_FROM_SUBSET, 87 AS_SET_ALIGNMENT, 88 AS_GET_ALIGNMENT, 89 AS_GET_WORKSPACES, 90 AS_SET_WORKSPACES, 91 AS_WINDOW_RESIZE, 92 AS_WINDOW_MOVE, 93 AS_SET_SIZE_LIMITS, 94 AS_ACTIVATE_WINDOW, 95 AS_UPDATE_IF_NEEDED, 96 97 // BPicture definitions 98 AS_CREATE_PICTURE, 99 AS_DELETE_PICTURE, 100 AS_CLONE_PICTURE, 101 AS_DOWNLOAD_PICTURE, 102 103 // Font-related server communications 104 AS_SET_SYSTEM_FONT, 105 AS_GET_SYSTEM_FONTS, 106 AS_GET_SYSTEM_DEFAULT_FONT, 107 108 AS_GET_FONT_LIST_REVISION, 109 AS_GET_FAMILY_AND_STYLES, 110 111 AS_GET_FAMILY_AND_STYLE, 112 AS_GET_FAMILY_AND_STYLE_IDS, 113 AS_GET_FONT_BOUNDING_BOX, 114 AS_GET_TUNED_COUNT, 115 AS_GET_TUNED_INFO, 116 AS_GET_FONT_HEIGHT, 117 AS_GET_FONT_FILE_FORMAT, 118 AS_GET_EXTRA_FONT_FLAGS, 119 120 AS_GET_STRING_WIDTHS, 121 AS_GET_EDGES, 122 AS_GET_ESCAPEMENTS, 123 AS_GET_ESCAPEMENTS_AS_FLOATS, 124 AS_GET_BOUNDINGBOXES_CHARS, 125 AS_GET_BOUNDINGBOXES_STRINGS, 126 AS_GET_HAS_GLYPHS, 127 AS_GET_GLYPH_SHAPES, 128 AS_GET_TRUNCATED_STRINGS, 129 130 // Screen methods 131 AS_VALID_SCREEN_ID, 132 AS_GET_NEXT_SCREEN_ID, 133 AS_SCREEN_GET_MODE, 134 AS_SCREEN_SET_MODE, 135 AS_PROPOSE_MODE, 136 AS_GET_MODE_LIST, 137 138 AS_GET_PIXEL_CLOCK_LIMITS, 139 AS_GET_TIMING_CONSTRAINTS, 140 141 AS_SCREEN_GET_COLORMAP, 142 AS_GET_DESKTOP_COLOR, 143 AS_SET_DESKTOP_COLOR, 144 AS_GET_SCREEN_ID_FROM_WINDOW, 145 146 AS_READ_BITMAP, 147 148 AS_GET_RETRACE_SEMAPHORE, 149 AS_GET_ACCELERANT_INFO, 150 AS_GET_FRAME_BUFFER_CONFIG, 151 152 AS_SET_DPMS, 153 AS_GET_DPMS_STATE, 154 AS_GET_DPMS_CAPABILITIES, 155 156 // Misc stuff 157 AS_GET_ACCELERANT_PATH, 158 AS_GET_DRIVER_PATH, 159 160 // Global function call defs 161 AS_SET_UI_COLORS, 162 AS_SET_UI_COLOR, 163 AS_SET_DECORATOR, 164 AS_GET_DECORATOR, 165 AS_R5_SET_DECORATOR, 166 AS_COUNT_DECORATORS, 167 AS_GET_DECORATOR_NAME, 168 169 AS_COUNT_WORKSPACES, 170 AS_SET_WORKSPACE_COUNT, 171 AS_CURRENT_WORKSPACE, 172 AS_ACTIVATE_WORKSPACE, 173 AS_GET_SCROLLBAR_INFO, 174 AS_SET_SCROLLBAR_INFO, 175 AS_GET_MENU_INFO, 176 AS_SET_MENU_INFO, 177 AS_IDLE_TIME, 178 AS_SELECT_PRINTER_PANEL, 179 AS_ADD_PRINTER_PANEL, 180 AS_RUN_BE_ABOUT, 181 AS_SET_MOUSE_MODE, 182 AS_GET_MOUSE_MODE, 183 AS_GET_MOUSE, 184 AS_SET_DECORATOR_SETTINGS, 185 AS_GET_DECORATOR_SETTINGS, 186 187 // Graphics calls 188 AS_SET_HIGH_COLOR, 189 AS_SET_LOW_COLOR, 190 AS_SET_VIEW_COLOR, 191 192 AS_STROKE_ARC, 193 AS_STROKE_BEZIER, 194 AS_STROKE_ELLIPSE, 195 AS_STROKE_LINE, 196 AS_STROKE_LINEARRAY, 197 AS_STROKE_POLYGON, 198 AS_STROKE_RECT, 199 AS_STROKE_ROUNDRECT, 200 AS_STROKE_SHAPE, 201 AS_STROKE_TRIANGLE, 202 203 AS_FILL_ARC, 204 AS_FILL_BEZIER, 205 AS_FILL_ELLIPSE, 206 AS_FILL_POLYGON, 207 AS_FILL_RECT, 208 AS_FILL_REGION, 209 AS_FILL_ROUNDRECT, 210 AS_FILL_SHAPE, 211 AS_FILL_TRIANGLE, 212 213 AS_DRAW_STRING, 214 AS_SET_FONT, 215 AS_SET_FONT_SIZE, 216 217 AS_SYNC, 218 219 AS_LAYER_CREATE, 220 AS_LAYER_DELETE, 221 AS_LAYER_CREATE_ROOT, 222 AS_LAYER_SHOW, 223 AS_LAYER_HIDE, 224 AS_LAYER_MOVE, 225 AS_LAYER_RESIZE, 226 AS_LAYER_DRAW, 227 228 // View/Layer definitions 229 AS_LAYER_GET_COORD, 230 AS_LAYER_SET_FLAGS, 231 AS_LAYER_SET_ORIGIN, 232 AS_LAYER_GET_ORIGIN, 233 AS_LAYER_RESIZE_MODE, 234 AS_LAYER_SET_CURSOR, 235 AS_LAYER_BEGIN_RECT_TRACK, 236 AS_LAYER_END_RECT_TRACK, 237 AS_LAYER_DRAG_RECT, 238 AS_LAYER_DRAG_IMAGE, 239 AS_LAYER_SCROLL, 240 AS_LAYER_SET_LINE_MODE, 241 AS_LAYER_GET_LINE_MODE, 242 AS_LAYER_PUSH_STATE, 243 AS_LAYER_POP_STATE, 244 AS_LAYER_SET_SCALE, 245 AS_LAYER_GET_SCALE, 246 AS_LAYER_SET_DRAWING_MODE, 247 AS_LAYER_GET_DRAWING_MODE, 248 AS_LAYER_SET_BLENDING_MODE, 249 AS_LAYER_GET_BLENDING_MODE, 250 AS_LAYER_SET_PEN_LOC, 251 AS_LAYER_GET_PEN_LOC, 252 AS_LAYER_SET_PEN_SIZE, 253 AS_LAYER_GET_PEN_SIZE, 254 AS_LAYER_SET_HIGH_COLOR, 255 AS_LAYER_SET_LOW_COLOR, 256 AS_LAYER_SET_VIEW_COLOR, 257 AS_LAYER_GET_HIGH_COLOR, 258 AS_LAYER_GET_LOW_COLOR, 259 AS_LAYER_GET_VIEW_COLOR, 260 AS_LAYER_PRINT_ALIASING, 261 AS_LAYER_CLIP_TO_PICTURE, 262 AS_LAYER_GET_CLIP_REGION, 263 AS_LAYER_DRAW_BITMAP, 264 AS_LAYER_SET_EVENT_MASK, 265 AS_LAYER_SET_MOUSE_EVENT_MASK, 266 267 AS_LAYER_DRAW_STRING, 268 AS_LAYER_SET_CLIP_REGION, 269 AS_LAYER_LINE_ARRAY, 270 AS_LAYER_BEGIN_PICTURE, 271 AS_LAYER_APPEND_TO_PICTURE, 272 AS_LAYER_END_PICTURE, 273 AS_LAYER_COPY_BITS, 274 AS_LAYER_DRAW_PICTURE, 275 AS_LAYER_INVALIDATE_RECT, 276 AS_LAYER_INVALIDATE_REGION, 277 AS_LAYER_INVERT_RECT, 278 AS_LAYER_MOVE_TO, 279 AS_LAYER_RESIZE_TO, 280 AS_LAYER_SET_STATE, 281 AS_LAYER_SET_FONT_STATE, 282 AS_LAYER_GET_STATE, 283 AS_LAYER_SET_VIEW_BITMAP, 284 AS_LAYER_SET_PATTERN, 285 AS_SET_CURRENT_LAYER, 286 287 // BDirectWindow codes 288 AS_DIRECT_WINDOW_GET_SYNC_DATA, 289 AS_DIRECT_WINDOW_SET_FULLSCREEN, 290 291 AS_LAST_CODE 292 }; 293 294 // Cursor types, currently they are all private besides the first two 295 enum cursor_which { 296 B_CURSOR_DEFAULT = 1, 297 B_CURSOR_TEXT, 298 B_CURSOR_MOVE, 299 B_CURSOR_DRAG, 300 B_CURSOR_RESIZE, 301 B_CURSOR_RESIZE_NWSE, 302 B_CURSOR_RESIZE_NESW, 303 B_CURSOR_RESIZE_NS, 304 B_CURSOR_RESIZE_EW, 305 B_CURSOR_OTHER, 306 B_CURSOR_APP, 307 B_CURSOR_INVALID 308 }; 309 310 // bitmap allocation flags 311 enum { 312 kAllocator = 0x1, 313 kFramebuffer = 0x2, 314 kHeap = 0x4, 315 kNewAllocatorArea = 0x8, 316 }; 317 318 #endif // APP_SERVER_PROTOCOL_H 319