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