xref: /haiku/headers/private/interface/PictureProtocol.h (revision 51978af14a173e7fae0563b562be5603bc652aeb)
1 #ifndef _PICTUREPROTOCOL_H
2 #define _PICTUREPROTOCOL_H
3 
4 // BView dirty bits
5 enum {
6 	B_PEN_SIZE_BIT			= 0x00000001,
7 	B_PEN_LOCATION_BIT		= 0x00000002,
8 	B_HIGH_COLOR_BIT		= 0x00000004,
9 	B_LOW_COLOR_BIT			= 0x00000008,
10 	B_DRAW_MODE_BIT			= 0x00000010,
11 	B_LINE_MODE_BIT			= 0x00000020,
12 	B_ORIGIN_BIT			= 0x00000040,
13 	B_FONT_BIT				= 0x00000080,
14 	B_PATTERN_BIT			= 0x00000100,
15 	B_BLEND_MODE_BIT		= 0x00000200
16 };
17 
18 // AppServer protocol
19 enum {
20 
21 // Picture instructions
22 
23 	B_PIC_MOVE_PEN_BY			= 0x0010,
24 	B_PIC_STROKE_LINE			= 0x0100,
25 	B_PIC_STROKE_RECT			= 0x0101,
26 	B_PIC_FILL_RECT				= 0x0102,
27 	B_PIC_STROKE_ROUND_RECT		= 0x0103,
28 	B_PIC_FILL_ROUND_RECT		= 0x0104,
29 	B_PIC_STROKE_BEZIER			= 0x0105,
30 	B_PIC_FILL_BEZIER			= 0x0106,
31 	B_PIC_STROKE_POLYGON		= 0x010B,
32 	B_PIC_FILL_POLYGON			= 0x010C,
33 	B_PIC_STROKE_SHAPE			= 0x010D,
34 	B_PIC_FILL_SHAPE			= 0x010E,
35 	B_PIC_DRAW_STRING			= 0x010F,
36 	B_PIC_DRAW_PIXELS			= 0x0110,
37 	B_PIC_DRAW_PICTURE			= 0x0112,
38 	B_PIC_STROKE_ARC			= 0x0113,
39 	B_PIC_FILL_ARC				= 0x0114,
40 	B_PIC_STROKE_ELLIPSE		= 0x0115,
41 	B_PIC_FILL_ELLIPSE			= 0x0116,
42 	B_PIC_ENTER_STATE_CHANGE	= 0x0200,
43 	B_PIC_SET_CLIPPING_RECTS	= 0x0201,
44 	B_PIC_CLIP_TO_PICTURE		= 0x0202,
45 	B_PIC_PUSH_STATE			= 0x0203,
46 	B_PIC_POP_STATE				= 0x0204,
47 	B_PIC_CLEAR_CLIPPING_RECTS	= 0x0205,
48 	B_PIC_SET_ORIGIN			= 0x0300,
49 	B_PIC_SET_PEN_LOCATION		= 0x0301,
50 	B_PIC_SET_DRAWING_MODE		= 0x0302,
51 	B_PIC_SET_LINE_MODE			= 0x0303,
52 	B_PIC_SET_PEN_SIZE			= 0x0304,
53 	B_PIC_SET_SCALE				= 0x0305,
54 	B_PIC_SET_FORE_COLOR		= 0x0306,
55 	B_PIC_SET_BACK_COLOR		= 0x0307,
56 	B_PIC_SET_STIPLE_PATTERN	= 0x0308,
57 	B_PIC_ENTER_FONT_STATE		= 0x0309,
58 	B_PIC_SET_BLENDING_MODE		= 0x030A,
59 	B_PIC_SET_FONT_FAMILY		= 0x0380,
60 	B_PIC_SET_FONT_STYLE		= 0x0381,
61 	B_PIC_SET_FONT_SPACING		= 0x0382,
62 	B_PIC_SET_FONT_ENCODING		= 0x0383,
63 	B_PIC_SET_FONT_FLAGS		= 0x0384,
64 	B_PIC_SET_FONT_SIZE			= 0x0385,
65 	B_PIC_SET_FONT_ROTATE		= 0x0386,
66 	B_PIC_SET_FONT_SHEAR		= 0x0387,
67 	B_PIC_SET_FONT_BPP			= 0x0388,
68 	B_PIC_SET_FONT_FACE			= 0x0389,
69 
70 // View instructions
71 
72 	B_VIEW_CREATE				= 0x0500,
73 	B_VIEW_MOVE_BY				= 0x0501,
74 //	B_VIEW_MOVE_TO				= 0x0502,	// ????
75 	B_VIEW_RESIZE_BY			= 0x0503,
76 	B_VIEW_RESIZE_TO			= 0x0504,
77 	B_VIEW_DELETE				= 0x0505,
78 	B_VIEW_FIND					= 0x0506,
79 	B_VIEW_BOUNDS				= 0x0507,	// ????
80 	B_VIEW_SET_FLAGS			= 0x0508,
81 	B_VIEW_SET_EVENT_MASK		= 0x0509,
82 	B_VIEW_SET_MOUSE_EVENT_MASK	= 0x050A,
83 	B_VIEW_MOVE_TO				= 0x050B,	// ????
84 	B_VIEW_SET_VIEW_CURSOR		= 0x050C,
85 
86 // Window instructions
87 
88 //	B_WINDOW_MOVE_BY				= 0x0580,
89 //	B_WINDOW_MOVE_TO				= 0x0581,
90 	B_WINDOW_RESIZE_BY				= 0x0582,
91 	B_WINDOW_RESIZE_TO				= 0x0583,
92 	B_WINDOW_ACTIVATE				= 0x0584,
93 	B_WINDOW_SET_OWNER				= 0x0585,
94 	B_WINDOW_SET_TITLE				= 0x0587,
95 	B_WINDOW_IS_FRONT				= 0x0589,
96 	B_WINDOW_HIDE					= 0x058C,
97 	B_WINDOW_SHOW					= 0x058D,
98 	B_WINDOW_SET_SIZE_LIMITS		= 0x058E,
99 	B_WINDOW_IS_ACTIVE				= 0x058F,
100 //	B_WINDOW_MINIMIZE				= 0x0590,	// ????
101 	B_WINDOW_MINIMIZE				= 0x0591,
102 	B_WINDOW_SET_FLAGS				= 0x0593,
103 	B_WINDOW_SEND_BEHIND			= 0x0594,
104 	B_WINDOW_ADD_TO_SUBSET			= 0x0595,
105 	B_WINDOW_REMOVE_FROM_SUBSET		= 0x0596,
106 	B_WINDOW_SET_WINDOW_ALLIGNMENT	= 0x0597,
107 	B_WINDOW_GET_WINDOW_ALLIGNMENT	= 0x0598,
108 	B_WINDOW_SET_CURRENT_VIEW		= 0x059A,
109 
110 // Drawing instructions
111 
112 	B_MOVE_PEN_TO				= 0x0600,
113 	B_MOVE_PEN_BY				= 0x0601,
114 	B_STROKE_LINE				= 0x0602,
115 	B_STROKE_LINE_TO			= 0x0603,
116 	B_STROKE_RECT				= 0x0604,
117 	B_FILL_RECT					= 0x0605,
118 	B_STROKE_ARC_RECT			= 0x0606,
119 	B_FILL_ARC_RECT				= 0x0607,
120 	B_STROKE_ARC				= 0x0608,
121 	B_FILL_ARC					= 0x0609,
122 	B_STROKE_ROUND_RECT			= 0x060A,
123 	B_FILL_ROUND_RECT			= 0x060B,
124 	B_FILL_REGION				= 0x060D,
125 	B_STROKE_POLYGON			= 0x060E,
126 	B_FILL_POLYGON				= 0x060F,
127 	B_STROKE_BEZIER				= 0x0610,
128 	B_FILL_BEZIER				= 0x0611,
129 	B_STROKE_ELLIPSE_RECT		= 0x0612,
130 	B_FILL_ELLIPSE_RECT			= 0x0613,
131 	B_STROKE_ELLIPSE			= 0x0614,
132 	B_FILL_ELLIPSE				= 0x0615,
133 	B_DRAW_BITMAP				= 0x0616,
134 	B_STRETCH_BITMAP			= 0x0617,
135 	B_STRETCH_BITMAP_SRC		= 0x0618,
136 	B_DRAW_BITMAP_ASYNC			= 0x0619,
137 	B_STRETCH_BITMAP_ASYNC		= 0x061A,
138 	B_STRETCH_BITMAP_SRC_ASYNC	= 0x061B,
139 	B_DRAW_STRING				= 0x061C,	// ????
140 	B_COPY_BITS					= 0x061D,
141 	B_INVERT_RECT				= 0x061E,
142 	B_DRAW_LINES				= 0x061F,
143 	B_DRAW_PICTURE				= 0x0620,
144 	B_STROKE_SHAPE				= 0x0621,
145 	B_FILL_SHAPE				= 0x0622,
146 
147 // Set instructions
148 
149 	B_SET_DRAWING_MODE			= 0x0700,
150 	B_SCROLL_TO					= 0x0701,
151 	B_SET_PEN_SIZE				= 0x0702,
152 	B_SET_VIEW_COLOR			= 0x0703,
153 	B_SET_LINE_MODE				= 0x0704,
154 	B_SET_FONT					= 0x0705,
155 	B_SET_FORE_COLOR			= 0x0706,
156 	B_SET_BACK_COLOR			= 0x0707,
157 	B_CLEAR_CLIPPING_REGION		= 0x0708,
158 	B_SET_CLIPPING_REGION		= 0x0709,
159 	B_SET_SCALE					= 0x070A,
160 	B_SET_ORIGIN				= 0x070B,
161 	B_PUSH_STATE				= 0x070C,
162 	B_POP_STATE					= 0x070D,
163 	B_SET_PATTERN				= 0x070E,
164 	B_SET_VIEW_BITMAP			= 0x070F,	// ????
165 	B_FORCE_FONT_ANTIALIASING	= 0x0710,
166 	B_CLIP_TO_PICTURE			= 0x0711,
167 	B_SET_BLENDING_MODE			= 0x0712,
168 
169 // Get instructions
170 
171 	B_PEN_SIZE					= 0x0780,
172 	B_FORE_COLOR				= 0x0781,
173 	B_BACK_COLOR				= 0x0782,
174 	B_PEN_LOCATION				= 0x0783,
175 //	B_FRAME						= 0x0784,	// ????
176 	B_DRAWING_MODE				= 0x0785,
177 	B_CLIPPING_REGION			= 0x0786,
178 	B_LINE_CAP_MODE				= 0x0787,
179 	B_LINE_JOIN_MODE			= 0x0788,
180 	B_LINE_MITER_LIMIT			= 0x0789,
181 //	B_ORIGIN					= 0x078A,
182 	B_BLENDING_MODE				= 0x078B,
183 	B_FONT						= 0x078C,
184 	B_FRAME						= 0x078D,
185 
186 // Misc instructions
187 
188 	B_CONVERT_TO				= 0x0832,
189 	B_CONVERT_FROM				= 0x0833,
190 	B_INVALIDATE_RECT			= 0x0840,
191 	B_DISABLE_UPDATES			= 0x0841,
192 	B_ENABLES_UPDATES			= 0x0842,
193 	//????						= 0x0845,
194 	B_BEGIN_VIEW_TRANSACTION	= 0x0846,
195 	B_END_VIEW_TRANSACTION		= 0x0847,
196 	B_BEGIN_PICTURE				= 0x0850,
197 	B_APPEND_TO_PICTURE			= 0x0851,
198 	B_END_PICTURE				= 0x0852,
199 	B_GET_WORKSPACES			= 0x0860,
200 	B_SET_WORKSPACES			= 0x0861,
201 
202 	B_SHOW_CURSOR				= 0x0ECD,
203 	B_HIDE_CURSOR				= 0x0ECE,
204 	B_OBSCURE_CURSOR			= 0x0ECF,
205 
206 	B_IS_CURSOR_HIDDEN			= 0x0EDA,
207 
208 	B_SET_CURSOR				= 0x0F10,
209 };
210 
211 #endif
212 
213