2005-08-24 19:08:32 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
2005-11-01 19:28:01 +03:00
|
|
|
* DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
* Jérôme Duval, jerome.duval@free.fr
|
2005-08-24 19:08:32 +04:00
|
|
|
*/
|
|
|
|
|
2003-06-23 06:56:42 +04:00
|
|
|
#ifndef _APPSERVER_PROTOCOL_
|
|
|
|
#define _APPSERVER_PROTOCOL_
|
|
|
|
|
2005-07-05 21:30:54 +04:00
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
2003-06-23 06:56:42 +04:00
|
|
|
// Server port names. The input port is the port which is used to receive
|
|
|
|
// input messages from the Input Server. The other is the "main" port for
|
|
|
|
// the server and is utilized mostly by BApplication objects.
|
|
|
|
#define SERVER_PORT_NAME "OBappserver"
|
* the new input event dispatcher is now actually used, although it doesn't
distribute any messages to the clients yet.
* removed the working thread from RootLayer - for now, its event handlers are
still called using input filters in the new event dispatcher, though (to
get things started).
* ServerApp is now using a BMessenger to identify its client, and no longer
stores the port/token separately.
* the input_server handshake is a bit simpler now, as it can now just reply
to the app_server message, removed unused code from ServerProtocol.h
* calmed down the MultiLocker (it always printed thread statistics on startup,
because it's compiled in debug mode).
* removed the cursor thread stuff from AppServer.cpp
* the new event dispatcher now uses a cursor thread when supported (only in
native mode, not in the test environment), although it improves cursor
movement under Qemu, the effect is not as good as expected - this might
need some more investigations (might just be a thread priority problem).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 14:30:06 +03:00
|
|
|
#if TEST_MODE
|
|
|
|
# define SERVER_INPUT_PORT "OBinputport"
|
|
|
|
#endif
|
2003-06-23 06:56:42 +04:00
|
|
|
|
2005-06-08 17:24:40 +04:00
|
|
|
enum {
|
|
|
|
// Used for quick replies from the app_server
|
2005-07-05 21:30:54 +04:00
|
|
|
SERVER_TRUE = B_OK,
|
|
|
|
SERVER_FALSE = B_ERROR,
|
|
|
|
|
2005-11-25 17:53:34 +03:00
|
|
|
// NOTE: all defines have to start with "AS_" to let the "code_to_name"
|
|
|
|
// utility work correctly
|
|
|
|
|
2005-11-15 22:59:53 +03:00
|
|
|
AS_REGISTER_INPUT_SERVER = 1,
|
2005-07-26 01:08:34 +04:00
|
|
|
AS_GET_DESKTOP,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
2005-07-05 21:30:54 +04:00
|
|
|
// Desktop definitions
|
|
|
|
AS_GET_WINDOW_LIST,
|
|
|
|
AS_GET_WINDOW_INFO,
|
|
|
|
|
2005-06-08 17:24:40 +04:00
|
|
|
// Application definitions
|
|
|
|
AS_CREATE_APP,
|
|
|
|
AS_DELETE_APP,
|
|
|
|
AS_QUIT_APP,
|
2005-07-25 01:10:33 +04:00
|
|
|
AS_ACTIVATE_APP,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
|
|
|
AS_SET_SERVER_PORT,
|
|
|
|
|
|
|
|
AS_CREATE_WINDOW,
|
MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:30:53 +04:00
|
|
|
AS_CREATE_OFFSCREEN_WINDOW,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_DELETE_WINDOW,
|
|
|
|
AS_CREATE_BITMAP,
|
|
|
|
AS_DELETE_BITMAP,
|
|
|
|
|
|
|
|
AS_ACQUIRE_SERVERMEM,
|
|
|
|
AS_RELEASE_SERVERMEM,
|
|
|
|
AS_AREA_MESSAGE,
|
|
|
|
|
|
|
|
// Cursor definitions
|
|
|
|
AS_SET_CURSOR_DATA,
|
|
|
|
AS_SET_CURSOR_BCURSOR,
|
|
|
|
AS_SET_CURSOR_BBITMAP,
|
|
|
|
AS_SET_CURSOR_SYSTEM,
|
|
|
|
|
|
|
|
AS_SET_SYSCURSOR_DATA,
|
|
|
|
AS_SET_SYSCURSOR_BCURSOR,
|
|
|
|
AS_SET_SYSCURSOR_BBITMAP,
|
|
|
|
AS_SET_SYSCURSOR_DEFAULTS,
|
|
|
|
AS_GET_SYSCURSOR,
|
|
|
|
|
|
|
|
AS_SHOW_CURSOR,
|
|
|
|
AS_HIDE_CURSOR,
|
|
|
|
AS_OBSCURE_CURSOR,
|
|
|
|
AS_QUERY_CURSOR_HIDDEN,
|
|
|
|
|
|
|
|
AS_CREATE_BCURSOR,
|
|
|
|
AS_DELETE_BCURSOR,
|
|
|
|
|
|
|
|
AS_BEGIN_RECT_TRACKING,
|
|
|
|
AS_END_RECT_TRACKING,
|
|
|
|
|
|
|
|
// Window definitions
|
|
|
|
AS_SHOW_WINDOW,
|
|
|
|
AS_HIDE_WINDOW,
|
|
|
|
AS_QUIT_WINDOW,
|
|
|
|
AS_SEND_BEHIND,
|
|
|
|
AS_SET_LOOK,
|
|
|
|
AS_SET_FEEL,
|
|
|
|
AS_SET_FLAGS,
|
|
|
|
AS_DISABLE_UPDATES,
|
|
|
|
AS_ENABLE_UPDATES,
|
|
|
|
AS_BEGIN_UPDATE,
|
|
|
|
AS_END_UPDATE,
|
|
|
|
AS_NEEDS_UPDATE,
|
2005-07-05 23:20:19 +04:00
|
|
|
AS_SET_WINDOW_TITLE,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_ADD_TO_SUBSET,
|
2005-12-02 19:07:02 +03:00
|
|
|
AS_REMOVE_FROM_SUBSET,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_SET_ALIGNMENT,
|
|
|
|
AS_GET_ALIGNMENT,
|
|
|
|
AS_GET_WORKSPACES,
|
|
|
|
AS_SET_WORKSPACES,
|
|
|
|
AS_WINDOW_RESIZE,
|
|
|
|
AS_WINDOW_MOVE,
|
|
|
|
AS_SET_SIZE_LIMITS,
|
|
|
|
AS_ACTIVATE_WINDOW,
|
|
|
|
AS_WINDOW_MINIMIZE,
|
|
|
|
AS_UPDATE_IF_NEEDED,
|
|
|
|
|
|
|
|
// BPicture definitions
|
|
|
|
AS_CREATE_PICTURE,
|
|
|
|
AS_DELETE_PICTURE,
|
|
|
|
AS_CLONE_PICTURE,
|
|
|
|
AS_DOWNLOAD_PICTURE,
|
|
|
|
|
|
|
|
// Font-related server communications
|
2005-06-09 20:11:15 +04:00
|
|
|
AS_SET_SYSTEM_FONT,
|
2005-11-07 14:02:39 +03:00
|
|
|
AS_GET_SYSTEM_FONTS,
|
2005-11-09 21:34:48 +03:00
|
|
|
AS_GET_SYSTEM_DEFAULT_FONT,
|
2005-11-07 14:02:39 +03:00
|
|
|
|
2005-11-07 19:19:40 +03:00
|
|
|
AS_GET_FONT_LIST_REVISION,
|
|
|
|
AS_GET_FAMILY_AND_STYLES,
|
2005-11-07 14:02:39 +03:00
|
|
|
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_GET_FAMILY_AND_STYLE,
|
2005-11-07 14:02:39 +03:00
|
|
|
AS_GET_FAMILY_AND_STYLE_IDS,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_GET_FONT_BOUNDING_BOX,
|
|
|
|
AS_GET_TUNED_COUNT,
|
|
|
|
AS_GET_TUNED_INFO,
|
|
|
|
AS_GET_FONT_HEIGHT,
|
2005-11-01 21:21:04 +03:00
|
|
|
AS_GET_FONT_FILE_FORMAT,
|
2005-11-07 14:02:39 +03:00
|
|
|
AS_GET_EXTRA_FONT_FLAGS,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
|
|
|
AS_GET_STRING_WIDTHS,
|
|
|
|
AS_GET_EDGES,
|
|
|
|
AS_GET_ESCAPEMENTS,
|
|
|
|
AS_GET_ESCAPEMENTS_AS_FLOATS,
|
|
|
|
AS_GET_BOUNDINGBOXES_CHARS,
|
|
|
|
AS_GET_BOUNDINGBOXES_STRINGS,
|
|
|
|
AS_GET_HAS_GLYPHS,
|
|
|
|
AS_GET_GLYPH_SHAPES,
|
|
|
|
AS_GET_TRUNCATED_STRINGS,
|
|
|
|
|
|
|
|
// Screen methods
|
2005-11-14 17:36:12 +03:00
|
|
|
AS_VALID_SCREEN_ID,
|
|
|
|
AS_GET_NEXT_SCREEN_ID,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_SCREEN_GET_MODE,
|
|
|
|
AS_SCREEN_SET_MODE,
|
2005-06-24 22:02:01 +04:00
|
|
|
AS_PROPOSE_MODE,
|
2005-06-18 10:36:23 +04:00
|
|
|
AS_GET_MODE_LIST,
|
2005-11-14 15:08:21 +03:00
|
|
|
|
2005-06-25 10:30:09 +04:00
|
|
|
AS_GET_PIXEL_CLOCK_LIMITS,
|
|
|
|
AS_GET_TIMING_CONSTRAINTS,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
2005-06-25 10:30:09 +04:00
|
|
|
AS_SCREEN_GET_COLORMAP,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_GET_DESKTOP_COLOR,
|
|
|
|
AS_SET_DESKTOP_COLOR,
|
2005-11-14 15:08:21 +03:00
|
|
|
AS_GET_SCREEN_ID_FROM_WINDOW,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
2005-07-14 02:33:52 +04:00
|
|
|
AS_READ_BITMAP,
|
2005-11-14 15:08:21 +03:00
|
|
|
|
2005-06-18 10:36:23 +04:00
|
|
|
AS_GET_RETRACE_SEMAPHORE,
|
2005-06-24 22:02:01 +04:00
|
|
|
AS_GET_ACCELERANT_INFO,
|
2005-11-14 17:36:12 +03:00
|
|
|
AS_GET_FRAME_BUFFER_CONFIG,
|
2005-06-25 17:53:48 +04:00
|
|
|
|
|
|
|
AS_SET_DPMS,
|
|
|
|
AS_GET_DPMS_STATE,
|
|
|
|
AS_GET_DPMS_CAPABILITIES,
|
2005-11-14 15:08:21 +03:00
|
|
|
|
2005-06-08 17:24:40 +04:00
|
|
|
// Global function call defs
|
|
|
|
AS_SET_UI_COLORS,
|
|
|
|
AS_GET_UI_COLORS,
|
|
|
|
AS_GET_UI_COLOR,
|
|
|
|
AS_SET_DECORATOR,
|
|
|
|
AS_GET_DECORATOR,
|
|
|
|
AS_R5_SET_DECORATOR,
|
2005-06-16 04:58:12 +04:00
|
|
|
AS_COUNT_DECORATORS,
|
|
|
|
AS_GET_DECORATOR_NAME,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
|
|
|
AS_COUNT_WORKSPACES,
|
|
|
|
AS_SET_WORKSPACE_COUNT,
|
|
|
|
AS_CURRENT_WORKSPACE,
|
|
|
|
AS_ACTIVATE_WORKSPACE,
|
|
|
|
AS_GET_SCROLLBAR_INFO,
|
|
|
|
AS_SET_SCROLLBAR_INFO,
|
2005-07-17 20:25:48 +04:00
|
|
|
AS_GET_MENU_INFO,
|
|
|
|
AS_SET_MENU_INFO,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_IDLE_TIME,
|
|
|
|
AS_SELECT_PRINTER_PANEL,
|
|
|
|
AS_ADD_PRINTER_PANEL,
|
|
|
|
AS_RUN_BE_ABOUT,
|
|
|
|
AS_SET_MOUSE_MODE,
|
|
|
|
AS_GET_MOUSE_MODE,
|
2005-11-23 18:17:58 +03:00
|
|
|
AS_GET_MOUSE,
|
2005-06-08 17:24:40 +04:00
|
|
|
|
|
|
|
// Hook function messages
|
|
|
|
AS_WORKSPACE_ACTIVATED,
|
|
|
|
AS_WORKSPACES_CHANGED,
|
|
|
|
AS_WINDOW_ACTIVATED,
|
|
|
|
AS_SCREENMODE_CHANGED,
|
|
|
|
|
|
|
|
// Graphics calls
|
|
|
|
AS_BEGIN_TRANSACTION,
|
|
|
|
AS_END_TRANSACTION,
|
|
|
|
AS_SET_HIGH_COLOR,
|
|
|
|
AS_SET_LOW_COLOR,
|
|
|
|
AS_SET_VIEW_COLOR,
|
|
|
|
|
|
|
|
AS_STROKE_ARC,
|
|
|
|
AS_STROKE_BEZIER,
|
|
|
|
AS_STROKE_ELLIPSE,
|
|
|
|
AS_STROKE_LINE,
|
|
|
|
AS_STROKE_LINEARRAY,
|
|
|
|
AS_STROKE_POLYGON,
|
|
|
|
AS_STROKE_RECT,
|
|
|
|
AS_STROKE_ROUNDRECT,
|
|
|
|
AS_STROKE_SHAPE,
|
|
|
|
AS_STROKE_TRIANGLE,
|
|
|
|
|
|
|
|
AS_FILL_ARC,
|
|
|
|
AS_FILL_BEZIER,
|
|
|
|
AS_FILL_ELLIPSE,
|
|
|
|
AS_FILL_POLYGON,
|
|
|
|
AS_FILL_RECT,
|
|
|
|
AS_FILL_REGION,
|
|
|
|
AS_FILL_ROUNDRECT,
|
|
|
|
AS_FILL_SHAPE,
|
|
|
|
AS_FILL_TRIANGLE,
|
|
|
|
|
|
|
|
AS_MOVEPENBY,
|
|
|
|
AS_MOVEPENTO,
|
|
|
|
AS_SETPENSIZE,
|
|
|
|
AS_DRAW_STRING,
|
|
|
|
AS_SET_FONT,
|
|
|
|
AS_SET_FONT_SIZE,
|
|
|
|
|
|
|
|
AS_FLUSH,
|
|
|
|
AS_SYNC,
|
|
|
|
|
|
|
|
AS_LAYER_CREATE,
|
|
|
|
AS_LAYER_DELETE,
|
|
|
|
AS_LAYER_CREATE_ROOT,
|
|
|
|
AS_LAYER_DELETE_ROOT,
|
|
|
|
AS_LAYER_ADD_CHILD,
|
|
|
|
AS_LAYER_REMOVE_CHILD,
|
|
|
|
AS_LAYER_REMOVE_SELF,
|
|
|
|
AS_LAYER_SHOW,
|
|
|
|
AS_LAYER_HIDE,
|
|
|
|
AS_LAYER_MOVE,
|
|
|
|
AS_LAYER_RESIZE,
|
|
|
|
AS_LAYER_INVALIDATE,
|
|
|
|
AS_LAYER_DRAW,
|
|
|
|
|
|
|
|
AS_LAYER_GET_TOKEN,
|
|
|
|
AS_LAYER_ADD,
|
|
|
|
AS_LAYER_REMOVE,
|
|
|
|
|
|
|
|
// View/Layer definitions
|
|
|
|
AS_LAYER_GET_COORD,
|
|
|
|
AS_LAYER_SET_FLAGS,
|
|
|
|
AS_LAYER_SET_ORIGIN,
|
|
|
|
AS_LAYER_GET_ORIGIN,
|
|
|
|
AS_LAYER_RESIZE_MODE,
|
|
|
|
AS_LAYER_CURSOR,
|
|
|
|
AS_LAYER_BEGIN_RECT_TRACK,
|
|
|
|
AS_LAYER_END_RECT_TRACK,
|
|
|
|
AS_LAYER_DRAG_RECT,
|
|
|
|
AS_LAYER_DRAG_IMAGE,
|
|
|
|
AS_LAYER_SCROLL,
|
|
|
|
AS_LAYER_SET_LINE_MODE,
|
|
|
|
AS_LAYER_GET_LINE_MODE,
|
|
|
|
AS_LAYER_PUSH_STATE,
|
|
|
|
AS_LAYER_POP_STATE,
|
|
|
|
AS_LAYER_SET_SCALE,
|
|
|
|
AS_LAYER_GET_SCALE,
|
|
|
|
AS_LAYER_SET_DRAW_MODE,
|
|
|
|
AS_LAYER_GET_DRAW_MODE,
|
|
|
|
AS_LAYER_SET_BLEND_MODE,
|
|
|
|
AS_LAYER_GET_BLEND_MODE,
|
|
|
|
AS_LAYER_SET_PEN_LOC,
|
|
|
|
AS_LAYER_GET_PEN_LOC,
|
|
|
|
AS_LAYER_SET_PEN_SIZE,
|
|
|
|
AS_LAYER_GET_PEN_SIZE,
|
|
|
|
AS_LAYER_SET_HIGH_COLOR,
|
|
|
|
AS_LAYER_SET_LOW_COLOR,
|
|
|
|
AS_LAYER_SET_VIEW_COLOR,
|
2005-06-28 22:56:55 +04:00
|
|
|
AS_LAYER_GET_HIGH_COLOR,
|
|
|
|
AS_LAYER_GET_LOW_COLOR,
|
|
|
|
AS_LAYER_GET_VIEW_COLOR,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_LAYER_PRINT_ALIASING,
|
|
|
|
AS_LAYER_CLIP_TO_PICTURE,
|
|
|
|
AS_LAYER_GET_CLIP_REGION,
|
|
|
|
AS_LAYER_DRAW_BITMAP_ASYNC_IN_RECT,
|
|
|
|
AS_LAYER_DRAW_BITMAP_ASYNC_AT_POINT,
|
|
|
|
AS_LAYER_DRAW_BITMAP_SYNC_IN_RECT,
|
|
|
|
AS_LAYER_DRAW_BITMAP_SYNC_AT_POINT,
|
|
|
|
AS_LAYER_SET_EVENT_MASK,
|
|
|
|
AS_LAYER_SET_MOUSE_EVENT_MASK,
|
|
|
|
|
|
|
|
AS_LAYER_DRAW_STRING,
|
|
|
|
AS_LAYER_SET_CLIP_REGION,
|
|
|
|
AS_LAYER_LINE_ARRAY,
|
|
|
|
AS_LAYER_BEGIN_PICTURE,
|
|
|
|
AS_LAYER_APPEND_TO_PICTURE,
|
|
|
|
AS_LAYER_END_PICTURE,
|
|
|
|
AS_LAYER_COPY_BITS,
|
|
|
|
AS_LAYER_DRAW_PICTURE,
|
|
|
|
AS_LAYER_INVAL_RECT,
|
|
|
|
AS_LAYER_INVAL_REGION,
|
|
|
|
AS_LAYER_INVERT_RECT,
|
2005-06-28 22:56:55 +04:00
|
|
|
AS_LAYER_MOVE_TO,
|
|
|
|
AS_LAYER_RESIZE_TO,
|
2005-06-08 17:24:40 +04:00
|
|
|
AS_LAYER_SET_STATE,
|
|
|
|
AS_LAYER_SET_FONT_STATE,
|
|
|
|
AS_LAYER_GET_STATE,
|
|
|
|
AS_LAYER_SET_VIEW_IMAGE,
|
|
|
|
AS_LAYER_SET_PATTERN,
|
|
|
|
AS_SET_CURRENT_LAYER,
|
|
|
|
|
2005-07-28 20:50:32 +04:00
|
|
|
// BDirectWindow codes
|
|
|
|
AS_DW_GET_SYNC_DATA,
|
|
|
|
AS_DW_SUPPORTS_WINDOW_MODE,
|
|
|
|
AS_DW_SET_FULLSCREEN,
|
2005-11-25 17:53:34 +03:00
|
|
|
|
|
|
|
AS_LAST_CODE
|
2003-06-23 06:56:42 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#define AS_PATTERN_SIZE 8
|
2003-07-05 01:05:36 +04:00
|
|
|
#define AS_SET_COLOR_MSG_SIZE 8+4
|
|
|
|
#define AS_STROKE_ARC_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_BEZIER_MSG_SIZE 8+8*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_ELLIPSE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_LINE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_RECT_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_ROUNDRECT_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_STROKE_TRIANGLE_MSG_SIZE 8+10*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_ARC_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_BEZIER_MSG_SIZE 8+8*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_ELLIPSE_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_RECT_MSG_SIZE 8+4*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_ROUNDRECT_MSG_SIZE 8+6*sizeof(float)+AS_PATTERN_SIZE
|
|
|
|
#define AS_FILL_TRIANGLE_MSG_SIZE 8+10*sizeof(float)+AS_PATTERN_SIZE
|
2003-06-23 06:56:42 +04:00
|
|
|
|
|
|
|
#endif
|