22 #ifndef FREERDP_GRAPHICS_H
23 #define FREERDP_GRAPHICS_H
26 #include <freerdp/api.h>
27 #include <freerdp/types.h>
39 typedef BOOL (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap);
40 typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap);
41 typedef BOOL (*pBitmap_Paint)(rdpContext* context, rdpBitmap* bitmap);
42 typedef BOOL (*pBitmap_Decompress)(rdpContext* context, rdpBitmap* bitmap,
const BYTE* data,
43 UINT32 width, UINT32 height, UINT32 bpp, UINT32 length,
44 BOOL compressed, UINT32 codec_id);
45 typedef BOOL (*pBitmap_SetSurface)(rdpContext* context, rdpBitmap* bitmap, BOOL primary);
53 pBitmap_Decompress Decompress;
54 pBitmap_SetSurface SetSurface;
55 UINT32 paddingA[16 - 6];
68 UINT32 paddingB[32 - 27];
72 UINT32 paddingC[64 - 34];
75 FREERDP_API rdpBitmap* Bitmap_Alloc(rdpContext* context);
76 FREERDP_API BOOL Bitmap_SetRectangle(rdpBitmap* bitmap, UINT16 left, UINT16 top, UINT16 right,
78 FREERDP_API BOOL Bitmap_SetDimensions(rdpBitmap* bitmap, UINT16 width, UINT16 height);
82 typedef BOOL (*pPointer_New)(rdpContext* context, rdpPointer* pointer);
83 typedef void (*pPointer_Free)(rdpContext* context, rdpPointer* pointer);
84 typedef BOOL (*pPointer_Set)(rdpContext* context, rdpPointer* pointer);
85 typedef BOOL (*pPointer_SetNull)(rdpContext* context);
86 typedef BOOL (*pPointer_SetDefault)(rdpContext* context);
87 typedef BOOL (*pPointer_SetPosition)(rdpContext* context, UINT32 x, UINT32 y);
95 pPointer_SetNull SetNull;
96 pPointer_SetDefault SetDefault;
97 pPointer_SetPosition SetPosition;
98 UINT32 paddingA[16 - 7];
105 UINT32 lengthAndMask;
106 UINT32 lengthXorMask;
109 UINT32 paddingB[32 - 25];
112 FREERDP_API rdpPointer* Pointer_Alloc(rdpContext* context);
115 typedef BOOL (*pGlyph_New)(rdpContext* context, rdpGlyph* glyph);
116 typedef void (*pGlyph_Free)(rdpContext* context, rdpGlyph* glyph);
117 typedef BOOL (*pGlyph_Draw)(rdpContext* context,
const rdpGlyph* glyph, INT32 x, INT32 y,
118 INT32 w, INT32 h, INT32 sx, INT32 sy, BOOL fOpRedundant);
119 typedef BOOL (*pGlyph_BeginDraw)(rdpContext* context, INT32 x, INT32 y, INT32 width,
120 INT32 height, UINT32 bgcolor, UINT32 fgcolor,
122 typedef BOOL (*pGlyph_EndDraw)(rdpContext* context, INT32 x, INT32 y, INT32 width, INT32 height,
123 UINT32 bgcolor, UINT32 fgcolor);
124 typedef BOOL (*pGlyph_SetBounds)(rdpContext* context, INT32 x, INT32 y, INT32 width,
133 pGlyph_BeginDraw BeginDraw;
134 pGlyph_EndDraw EndDraw;
135 pGlyph_SetBounds SetBounds;
136 UINT32 paddingA[16 - 7];
144 UINT32 paddingB[32 - 22];
147 FREERDP_API rdpGlyph* Glyph_Alloc(rdpContext* context, INT32 x, INT32 y, UINT32 cx, UINT32 cy,
148 UINT32 cb,
const BYTE* aj);
155 rdpBitmap* Bitmap_Prototype;
156 rdpPointer* Pointer_Prototype;
157 rdpGlyph* Glyph_Prototype;
158 UINT32 paddingA[16 - 4];
162 FREERDP_API
void graphics_register_bitmap(rdpGraphics* graphics,
const rdpBitmap* bitmap);
163 FREERDP_API
void graphics_register_pointer(rdpGraphics* graphics,
const rdpPointer* pointer);
164 FREERDP_API
void graphics_register_glyph(rdpGraphics* graphics,
const rdpGlyph* glyph);
166 FREERDP_API
void graphics_free(rdpGraphics* graphics);
168 WINPR_ATTR_MALLOC(graphics_free, 1)
169 FREERDP_API rdpGraphics* graphics_new(rdpContext* context);