FreeRDP
secondary.h
1 
20 #ifndef FREERDP_UPDATE_SECONDARY_H
21 #define FREERDP_UPDATE_SECONDARY_H
22 
23 #include <freerdp/types.h>
24 #include <freerdp/primary.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 #define GLYPH_FRAGMENT_NOP 0x00
32 #define GLYPH_FRAGMENT_USE 0xFE
33 #define GLYPH_FRAGMENT_ADD 0xFF
34 
35 #define CBR2_HEIGHT_SAME_AS_WIDTH 0x01
36 #define CBR2_PERSISTENT_KEY_PRESENT 0x02
37 #define CBR2_NO_BITMAP_COMPRESSION_HDR 0x08
38 #define CBR2_DO_NOT_CACHE 0x10
39 
40 #define SCREEN_BITMAP_SURFACE 0xFFFF
41 #define BITMAP_CACHE_WAITING_LIST_INDEX 0x7FFF
42 
43 #define CACHED_BRUSH 0x80
44 
45 #define BMF_1BPP 0x1
46 #define BMF_8BPP 0x3
47 #define BMF_16BPP 0x4
48 #define BMF_24BPP 0x5
49 #define BMF_32BPP 0x6
50 
51 #ifndef _WIN32
52 #define BS_SOLID 0x00
53 #define BS_NULL 0x01
54 #define BS_HATCHED 0x02
55 #define BS_PATTERN 0x03
56 #endif
57 
58 #ifndef _WIN32
59 #define HS_HORIZONTAL 0x00
60 #define HS_VERTICAL 0x01
61 #define HS_FDIAGONAL 0x02
62 #define HS_BDIAGONAL 0x03
63 #define HS_CROSS 0x04
64 #define HS_DIAGCROSS 0x05
65 #endif
66 
67 #define SO_FLAG_DEFAULT_PLACEMENT 0x01
68 #define SO_HORIZONTAL 0x02
69 #define SO_VERTICAL 0x04
70 #define SO_REVERSED 0x08
71 #define SO_ZERO_BEARINGS 0x10
72 #define SO_CHAR_INC_EQUAL_BM_BASE 0x20
73 #define SO_MAXEXT_EQUAL_BM_SIDE 0x40
74 
75 typedef struct
76 {
77  UINT32 cacheId;
78  UINT32 bitmapBpp;
79  UINT32 bitmapWidth;
80  UINT32 bitmapHeight;
81  UINT32 bitmapLength;
82  UINT32 cacheIndex;
83  BOOL compressed;
84  BYTE bitmapComprHdr[8];
85  BYTE* bitmapDataStream;
87 
88 typedef struct
89 {
90  UINT32 cacheId;
91  UINT32 flags;
92  UINT32 key1;
93  UINT32 key2;
94  UINT32 bitmapBpp;
95  UINT32 bitmapWidth;
96  UINT32 bitmapHeight;
97  UINT32 bitmapLength;
98  UINT32 cacheIndex;
99  BOOL compressed;
100  UINT32 cbCompFirstRowSize;
101  UINT32 cbCompMainBodySize;
102  UINT32 cbScanWidth;
103  UINT32 cbUncompressedSize;
104  BYTE* bitmapDataStream;
106 
107 typedef struct
108 {
109  UINT32 bpp;
110  UINT32 codecID;
111  UINT32 width;
112  UINT32 height;
113  UINT32 length;
114  BYTE* data;
116 
117 typedef struct
118 {
119  UINT32 cacheId;
120  UINT32 bpp;
121  UINT32 flags;
122  UINT32 cacheIndex;
123  UINT32 key1;
124  UINT32 key2;
125  BITMAP_DATA_EX bitmapData;
127 
128 typedef struct
129 {
130  UINT32 cacheIndex;
131  UINT32 numberColors;
132  UINT32 colorTable[256];
134 
135 typedef struct
136 {
137  UINT32 cacheId;
138  UINT32 cGlyphs;
139  GLYPH_DATA glyphData[256];
140  WCHAR* unicodeCharacters;
142 
143 typedef struct
144 {
145  UINT32 cacheId;
146  UINT32 flags;
147  UINT32 cGlyphs;
148  GLYPH_DATA_V2 glyphData[256];
149  WCHAR* unicodeCharacters;
151 
152 typedef struct
153 {
154  UINT32 index;
155  UINT32 bpp;
156  UINT32 cx;
157  UINT32 cy;
158  UINT32 style;
159  UINT32 length;
160  BYTE data[256];
162 
163 typedef BOOL (*pCacheBitmap)(rdpContext* context, const CACHE_BITMAP_ORDER* cache_bitmap_order);
164 typedef BOOL (*pCacheBitmapV2)(rdpContext* context, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order);
165 typedef BOOL (*pCacheBitmapV3)(rdpContext* context, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order);
166 typedef BOOL (*pCacheColorTable)(rdpContext* context,
167  const CACHE_COLOR_TABLE_ORDER* cache_color_table_order);
168 typedef BOOL (*pCacheGlyph)(rdpContext* context, const CACHE_GLYPH_ORDER* cache_glyph_order);
169 typedef BOOL (*pCacheGlyphV2)(rdpContext* context,
170  const CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order);
171 typedef BOOL (*pCacheBrush)(rdpContext* context, const CACHE_BRUSH_ORDER* cache_brush_order);
172 typedef BOOL (*pCacheOrderInfo)(rdpContext* context, INT16 orderLength, UINT16 extraFlags,
173  UINT8 orderType, const char* orderName);
174 
176 {
177  rdpContext* context; /* 0 */
178  UINT32 paddingA[16 - 1]; /* 1 */
179 
180  pCacheBitmap CacheBitmap; /* 16 */
181  pCacheBitmapV2 CacheBitmapV2; /* 17 */
182  pCacheBitmapV3 CacheBitmapV3; /* 18 */
183  pCacheColorTable CacheColorTable; /* 19 */
184  pCacheGlyph CacheGlyph; /* 20 */
185  pCacheGlyphV2 CacheGlyphV2; /* 21 */
186  pCacheBrush CacheBrush; /* 22 */
187  /* Statistics callback */
188  pCacheOrderInfo CacheOrderInfo; /* 23 */
189  UINT32 paddingE[32 - 24]; /* 24 */
190 };
191 typedef struct rdp_secondary_update rdpSecondaryUpdate;
192 
193 #ifdef __cplusplus
194 }
195 #endif
196 
197 #endif /* FREERDP_UPDATE_SECONDARY_H */