2 * FreeRDP: A Remote Desktop Protocol Client
3 * Secondary Drawing Orders Interface API
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #ifndef __UPDATE_SECONDARY_H
21 #define __UPDATE_SECONDARY_H
23 #include <freerdp/types.h>
25 #define GLYPH_FRAGMENT_NOP 0x00
26 #define GLYPH_FRAGMENT_USE 0xFE
27 #define GLYPH_FRAGMENT_ADD 0xFF
29 #define CBR2_HEIGHT_SAME_AS_WIDTH 0x01
30 #define CBR2_PERSISTENT_KEY_PRESENT 0x02
31 #define CBR2_NO_BITMAP_COMPRESSION_HDR 0x08
32 #define CBR2_DO_NOT_CACHE 0x10
34 #define SCREEN_BITMAP_SURFACE 0xFFFF
35 #define BITMAP_CACHE_WAITING_LIST_INDEX 0x7FFF
37 #define CACHED_BRUSH 0x80
48 #define BS_HATCHED 0x02
49 #define BS_PATTERN 0x03
53 #define HS_HORIZONTAL 0x00
54 #define HS_VERTICAL 0x01
55 #define HS_FDIAGONAL 0x02
56 #define HS_BDIAGONAL 0x03
58 #define HS_DIAGCROSS 0x05
61 #define SO_FLAG_DEFAULT_PLACEMENT 0x01
62 #define SO_HORIZONTAL 0x02
63 #define SO_VERTICAL 0x04
64 #define SO_REVERSED 0x08
65 #define SO_ZERO_BEARINGS 0x10
66 #define SO_CHAR_INC_EQUAL_BM_BASE 0x20
67 #define SO_MAXEXT_EQUAL_BM_SIDE 0x40
69 struct _CACHE_BITMAP_ORDER
78 uint8 bitmapComprHdr[8];
79 uint8* bitmapDataStream;
81 typedef struct _CACHE_BITMAP_ORDER CACHE_BITMAP_ORDER;
83 struct _CACHE_BITMAP_V2_ORDER
95 uint32 cbCompFirstRowSize;
96 uint32 cbCompMainBodySize;
98 uint32 cbUncompressedSize;
99 uint8* bitmapDataStream;
101 typedef struct _CACHE_BITMAP_V2_ORDER CACHE_BITMAP_V2_ORDER;
103 struct _BITMAP_DATA_EX
112 typedef struct _BITMAP_DATA_EX BITMAP_DATA_EX;
114 struct _CACHE_BITMAP_V3_ORDER
122 BITMAP_DATA_EX bitmapData;
124 typedef struct _CACHE_BITMAP_V3_ORDER CACHE_BITMAP_V3_ORDER;
126 struct _CACHE_COLOR_TABLE_ORDER
132 typedef struct _CACHE_COLOR_TABLE_ORDER CACHE_COLOR_TABLE_ORDER;
144 typedef struct _GLYPH_DATA GLYPH_DATA;
146 struct _CACHE_GLYPH_ORDER
150 GLYPH_DATA* glyphData[255];
151 uint8* unicodeCharacters;
153 typedef struct _CACHE_GLYPH_ORDER CACHE_GLYPH_ORDER;
155 struct _GLYPH_DATA_V2
165 typedef struct _GLYPH_DATA_V2 GLYPH_DATA_V2;
167 struct _CACHE_GLYPH_V2_ORDER
172 GLYPH_DATA_V2* glyphData[255];
173 uint8* unicodeCharacters;
175 typedef struct _CACHE_GLYPH_V2_ORDER CACHE_GLYPH_V2_ORDER;
177 struct _CACHE_BRUSH_ORDER
187 typedef struct _CACHE_BRUSH_ORDER CACHE_BRUSH_ORDER;
189 typedef void (*pCacheBitmap)(rdpContext* context, CACHE_BITMAP_ORDER* cache_bitmap_order);
190 typedef void (*pCacheBitmapV2)(rdpContext* context, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order);
191 typedef void (*pCacheBitmapV3)(rdpContext* context, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order);
192 typedef void (*pCacheColorTable)(rdpContext* context, CACHE_COLOR_TABLE_ORDER* cache_color_table_order);
193 typedef void (*pCacheGlyph)(rdpContext* context, CACHE_GLYPH_ORDER* cache_glyph_order);
194 typedef void (*pCacheGlyphV2)(rdpContext* context, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order);
195 typedef void (*pCacheBrush)(rdpContext* context, CACHE_BRUSH_ORDER* cache_brush_order);
197 struct rdp_secondary_update
199 rdpContext* context; /* 0 */
200 uint32 paddingA[16 - 1]; /* 1 */
202 pCacheBitmap CacheBitmap; /* 16 */
203 pCacheBitmapV2 CacheBitmapV2; /* 17 */
204 pCacheBitmapV3 CacheBitmapV3; /* 18 */
205 pCacheColorTable CacheColorTable; /* 19 */
206 pCacheGlyph CacheGlyph; /* 20 */
207 pCacheGlyphV2 CacheGlyphV2; /* 21 */
208 pCacheBrush CacheBrush; /* 22 */
209 uint32 paddingE[32 - 23]; /* 23 */
214 CACHE_BITMAP_ORDER cache_bitmap_order;
215 CACHE_BITMAP_V2_ORDER cache_bitmap_v2_order;
216 CACHE_BITMAP_V3_ORDER cache_bitmap_v3_order;
217 CACHE_COLOR_TABLE_ORDER cache_color_table_order;
218 CACHE_GLYPH_ORDER cache_glyph_order;
219 CACHE_GLYPH_V2_ORDER cache_glyph_v2_order;
220 CACHE_BRUSH_ORDER cache_brush_order;
222 typedef struct rdp_secondary_update rdpSecondaryUpdate;
224 #endif /* __UPDATE_SECONDARY_H */