FreeRDP
primary.h
1 
20 #ifndef FREERDP_UPDATE_PRIMARY_H
21 #define FREERDP_UPDATE_PRIMARY_H
22 
23 #include <freerdp/types.h>
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30  typedef struct
31  {
32  UINT32 cacheIndex;
33  INT16 x;
34  INT16 y;
35  UINT32 cx;
36  UINT32 cy;
37  UINT32 cb;
38  BYTE* aj;
39  } GLYPH_DATA;
40 
41  typedef struct
42  {
43  UINT32 cacheIndex;
44  INT32 x;
45  INT32 y;
46  UINT32 cx;
47  UINT32 cy;
48  UINT32 cb;
49  BYTE* aj;
50  } GLYPH_DATA_V2;
51 
52 #define BACKMODE_TRANSPARENT 0x0001
53 #define BACKMODE_OPAQUE 0x0002
54 
55 struct rdp_bounds
56 {
57  INT32 left;
58  INT32 top;
59  INT32 right;
60  INT32 bottom;
61 };
62 typedef struct rdp_bounds rdpBounds;
63 
64 struct rdp_brush
65 {
66  UINT32 x;
67  UINT32 y;
68  UINT32 bpp;
69  UINT32 style;
70  UINT32 hatch;
71  UINT32 index;
72  BYTE* data;
73  BYTE p8x8[8];
74 };
75 typedef struct rdp_brush rdpBrush;
76 
77 typedef struct
78 {
79  UINT32 controlFlags;
80  UINT32 orderType;
81  UINT32 fieldFlags;
82  UINT32 boundsFlags;
83  rdpBounds bounds;
84  BOOL deltaCoordinates;
85 } ORDER_INFO;
86 
87 typedef struct
88 {
89  INT32 nLeftRect;
90  INT32 nTopRect;
91  INT32 nWidth;
92  INT32 nHeight;
93  UINT32 bRop;
94 } DSTBLT_ORDER;
95 
96 typedef struct
97 {
98  INT32 nLeftRect;
99  INT32 nTopRect;
100  INT32 nWidth;
101  INT32 nHeight;
102  UINT32 bRop;
103  UINT32 backColor;
104  UINT32 foreColor;
105  rdpBrush brush;
106 } PATBLT_ORDER;
107 
108 typedef struct
109 {
110  INT32 nLeftRect;
111  INT32 nTopRect;
112  INT32 nWidth;
113  INT32 nHeight;
114  UINT32 bRop;
115  INT32 nXSrc;
116  INT32 nYSrc;
117 } SCRBLT_ORDER;
118 
119 typedef struct
120 {
121  INT32 nLeftRect;
122  INT32 nTopRect;
123  INT32 nWidth;
124  INT32 nHeight;
125  UINT32 color;
127 
128 typedef struct
129 {
130  INT32 srcLeft;
131  INT32 srcTop;
132  INT32 srcRight;
133  INT32 srcBottom;
134  UINT32 bitmapId;
136 
137 typedef struct
138 {
139  INT32 left;
140  INT32 top;
141  INT32 width;
142  INT32 height;
143 } DELTA_RECT;
144 
145 typedef struct
146 {
147  INT32 nLeftRect;
148  INT32 nTopRect;
149  INT32 nWidth;
150  INT32 nHeight;
151  UINT32 bRop;
152  UINT32 numRectangles;
153  UINT32 cbData;
154  DELTA_RECT rectangles[45];
156 
157 typedef struct
158 {
159  INT32 nLeftRect;
160  INT32 nTopRect;
161  INT32 nWidth;
162  INT32 nHeight;
163  UINT32 bRop;
164  UINT32 backColor;
165  UINT32 foreColor;
166  rdpBrush brush;
167  UINT32 numRectangles;
168  UINT32 cbData;
169  DELTA_RECT rectangles[45];
171 
172 typedef struct
173 {
174  INT32 nLeftRect;
175  INT32 nTopRect;
176  INT32 nWidth;
177  INT32 nHeight;
178  UINT32 bRop;
179  INT32 nXSrc;
180  INT32 nYSrc;
181  UINT32 numRectangles;
182  UINT32 cbData;
183  DELTA_RECT rectangles[45];
185 
186 typedef struct
187 {
188  INT32 nLeftRect;
189  INT32 nTopRect;
190  INT32 nWidth;
191  INT32 nHeight;
192  UINT32 color;
193  UINT32 numRectangles;
194  UINT32 cbData;
195  DELTA_RECT rectangles[45];
197 
198 typedef struct
199 {
200  INT32 srcLeft;
201  INT32 srcTop;
202  INT32 srcRight;
203  INT32 srcBottom;
204  UINT32 bitmapId;
205  UINT32 nDeltaEntries;
206  UINT32 cbData;
207  DELTA_RECT rectangles[45];
209 
210 typedef struct
211 {
212  UINT32 backMode;
213  INT32 nXStart;
214  INT32 nYStart;
215  INT32 nXEnd;
216  INT32 nYEnd;
217  UINT32 backColor;
218  UINT32 bRop2;
219  UINT32 penStyle;
220  UINT32 penWidth;
221  UINT32 penColor;
222 } LINE_TO_ORDER;
223 
224 typedef struct
225 {
226  INT32 x;
227  INT32 y;
228 } DELTA_POINT;
229 
230 typedef struct
231 {
232  INT32 xStart;
233  INT32 yStart;
234  UINT32 bRop2;
235  UINT32 penColor;
236  UINT32 numDeltaEntries;
237  UINT32 cbData;
238  DELTA_POINT* points;
240 
241 typedef struct
242 {
243  UINT32 cacheId;
244  UINT32 colorIndex;
245  INT32 nLeftRect;
246  INT32 nTopRect;
247  INT32 nWidth;
248  INT32 nHeight;
249  UINT32 bRop;
250  INT32 nXSrc;
251  INT32 nYSrc;
252  UINT32 cacheIndex;
253  rdpBitmap* bitmap;
254 } MEMBLT_ORDER;
255 
256 typedef struct
257 {
258  UINT32 cacheId;
259  UINT32 colorIndex;
260  INT32 nLeftRect;
261  INT32 nTopRect;
262  INT32 nWidth;
263  INT32 nHeight;
264  UINT32 bRop;
265  INT32 nXSrc;
266  INT32 nYSrc;
267  UINT32 backColor;
268  UINT32 foreColor;
269  rdpBrush brush;
270  UINT32 cacheIndex;
271  rdpBitmap* bitmap;
272 } MEM3BLT_ORDER;
273 
274 typedef struct
275 {
276  UINT32 savedBitmapPosition;
277  INT32 nLeftRect;
278  INT32 nTopRect;
279  INT32 nRightRect;
280  INT32 nBottomRect;
281  UINT32 operation;
283 
284 typedef struct
285 {
286  UINT32 index;
287  UINT32 delta;
289 
290 typedef struct
291 {
292  UINT32 operation;
293  UINT32 index;
294  UINT32 size;
295  UINT32 nindices;
296  GLYPH_FRAGMENT_INDEX* indices;
298 
299 typedef struct
300 {
301  UINT32 cacheId;
302  UINT32 flAccel;
303  UINT32 ulCharInc;
304  UINT32 fOpRedundant;
305  UINT32 backColor;
306  UINT32 foreColor;
307  INT32 bkLeft;
308  INT32 bkTop;
309  INT32 bkRight;
310  INT32 bkBottom;
311  INT32 opLeft;
312  INT32 opTop;
313  INT32 opRight;
314  INT32 opBottom;
315  rdpBrush brush;
316  INT32 x;
317  INT32 y;
318  UINT32 cbData;
319  BYTE data[256];
321 
322 typedef struct
323 {
324  UINT32 cacheId;
325  UINT32 flAccel;
326  UINT32 ulCharInc;
327  UINT32 backColor;
328  UINT32 foreColor;
329  INT32 bkLeft;
330  INT32 bkTop;
331  INT32 bkRight;
332  INT32 bkBottom;
333  INT32 opLeft;
334  INT32 opTop;
335  INT32 opRight;
336  INT32 opBottom;
337  BOOL opaqueRect;
338  INT32 x;
339  INT32 y;
340  UINT32 cbData;
341  BYTE data[256];
343 
344 typedef struct
345 {
346  UINT32 cacheId;
347  UINT32 flAccel;
348  UINT32 ulCharInc;
349  UINT32 backColor;
350  UINT32 foreColor;
351  INT32 bkLeft;
352  INT32 bkTop;
353  INT32 bkRight;
354  INT32 bkBottom;
355  INT32 opLeft;
356  INT32 opTop;
357  INT32 opRight;
358  INT32 opBottom;
359  INT32 x;
360  INT32 y;
361  UINT32 cbData;
362  BYTE data[256];
363  GLYPH_DATA_V2 glyphData;
365 
366 typedef struct
367 {
368  INT32 xStart;
369  INT32 yStart;
370  UINT32 bRop2;
371  UINT32 fillMode;
372  UINT32 brushColor;
373  UINT32 numPoints;
374  UINT32 cbData;
375  DELTA_POINT* points;
377 
378 typedef struct
379 {
380  INT32 xStart;
381  INT32 yStart;
382  UINT32 bRop2;
383  UINT32 backMode;
384  UINT32 fillMode;
385  UINT32 backColor;
386  UINT32 foreColor;
387  rdpBrush brush;
388  UINT32 numPoints;
389  UINT32 cbData;
390  DELTA_POINT* points;
392 
393 typedef struct
394 {
395  INT32 leftRect;
396  INT32 topRect;
397  INT32 rightRect;
398  INT32 bottomRect;
399  UINT32 bRop2;
400  UINT32 fillMode;
401  UINT32 color;
403 
404 typedef struct
405 {
406  INT32 leftRect;
407  INT32 topRect;
408  INT32 rightRect;
409  INT32 bottomRect;
410  UINT32 bRop2;
411  UINT32 fillMode;
412  UINT32 backColor;
413  UINT32 foreColor;
414  rdpBrush brush;
416 
417 typedef BOOL (*pDstBlt)(rdpContext* context, const DSTBLT_ORDER* dstblt);
418 typedef BOOL (*pPatBlt)(rdpContext* context, PATBLT_ORDER* patblt);
419 typedef BOOL (*pScrBlt)(rdpContext* context, const SCRBLT_ORDER* scrblt);
420 typedef BOOL (*pOpaqueRect)(rdpContext* context, const OPAQUE_RECT_ORDER* opaque_rect);
421 typedef BOOL (*pDrawNineGrid)(rdpContext* context, const DRAW_NINE_GRID_ORDER* draw_nine_grid);
422 typedef BOOL (*pMultiDstBlt)(rdpContext* context, const MULTI_DSTBLT_ORDER* multi_dstblt);
423 typedef BOOL (*pMultiPatBlt)(rdpContext* context, const MULTI_PATBLT_ORDER* multi_patblt);
424 typedef BOOL (*pMultiScrBlt)(rdpContext* context, const MULTI_SCRBLT_ORDER* multi_scrblt);
425 typedef BOOL (*pMultiOpaqueRect)(rdpContext* context,
426  const MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
427 typedef BOOL (*pMultiDrawNineGrid)(rdpContext* context,
428  const MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
429 typedef BOOL (*pLineTo)(rdpContext* context, const LINE_TO_ORDER* line_to);
430 typedef BOOL (*pPolyline)(rdpContext* context, const POLYLINE_ORDER* polyline);
431 typedef BOOL (*pMemBlt)(rdpContext* context, MEMBLT_ORDER* memblt);
432 typedef BOOL (*pMem3Blt)(rdpContext* context, MEM3BLT_ORDER* memblt);
433 typedef BOOL (*pSaveBitmap)(rdpContext* context, const SAVE_BITMAP_ORDER* save_bitmap);
434 typedef BOOL (*pGlyphIndex)(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index);
435 typedef BOOL (*pFastIndex)(rdpContext* context, const FAST_INDEX_ORDER* fast_index);
436 typedef BOOL (*pFastGlyph)(rdpContext* context, const FAST_GLYPH_ORDER* fast_glyph);
437 typedef BOOL (*pPolygonSC)(rdpContext* context, const POLYGON_SC_ORDER* polygon_sc);
438 typedef BOOL (*pPolygonCB)(rdpContext* context, POLYGON_CB_ORDER* polygon_cb);
439 typedef BOOL (*pEllipseSC)(rdpContext* context, const ELLIPSE_SC_ORDER* ellipse_sc);
440 typedef BOOL (*pEllipseCB)(rdpContext* context, const ELLIPSE_CB_ORDER* ellipse_cb);
441 typedef BOOL (*pOrderInfo)(rdpContext* context, const ORDER_INFO* order_info,
442  const char* order_name);
443 
445 {
446  rdpContext* context; /* 0 */
447  UINT32 paddingA[16 - 1]; /* 1 */
448 
449  pDstBlt DstBlt; /* 16 */
450  pPatBlt PatBlt; /* 17 */
451  pScrBlt ScrBlt; /* 18 */
452  pOpaqueRect OpaqueRect; /* 19 */
453  pDrawNineGrid DrawNineGrid; /* 20 */
454  pMultiDstBlt MultiDstBlt; /* 21 */
455  pMultiPatBlt MultiPatBlt; /* 22 */
456  pMultiScrBlt MultiScrBlt; /* 23 */
457  pMultiOpaqueRect MultiOpaqueRect; /* 24 */
458  pMultiDrawNineGrid MultiDrawNineGrid; /* 25 */
459  pLineTo LineTo; /* 26 */
460  pPolyline Polyline; /* 27 */
461  pMemBlt MemBlt; /* 28 */
462  pMem3Blt Mem3Blt; /* 29 */
463  pSaveBitmap SaveBitmap; /* 30 */
464  pGlyphIndex GlyphIndex; /* 31 */
465  pFastIndex FastIndex; /* 32 */
466  pFastGlyph FastGlyph; /* 33 */
467  pPolygonSC PolygonSC; /* 34 */
468  pPolygonCB PolygonCB; /* 35 */
469  pEllipseSC EllipseSC; /* 36 */
470  pEllipseCB EllipseCB; /* 37 */
471  /* Statistics callback */
472  pOrderInfo OrderInfo; /* 38 */
473  UINT32 paddingB[48 - 39]; /* 39 */
474 };
475 typedef struct rdp_primary_update rdpPrimaryUpdate;
476 
477 #ifdef __cplusplus
478 }
479 #endif
480 
481 #endif /* FREERDP_UPDATE_PRIMARY_H */