mirror of https://github.com/FreeRDP/FreeRDP
Merge branch 'master' into svc
Conflicts: client/DirectFB/dfreerdp.c
This commit is contained in:
commit
d0c0bca997
|
@ -223,8 +223,6 @@ int dfreerdp_run(freerdp* instance)
|
|||
memset(rfds, 0, sizeof(rfds));
|
||||
memset(wfds, 0, sizeof(wfds));
|
||||
|
||||
printf("DirectFB Run\n");
|
||||
|
||||
chanman = GET_CHANMAN(instance);
|
||||
|
||||
instance->Connect(instance);
|
||||
|
|
|
@ -64,6 +64,8 @@ typedef struct
|
|||
|
||||
/* Orders Updates */
|
||||
|
||||
/* Primary Drawing Orders */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 orderType;
|
||||
|
@ -115,40 +117,6 @@ typedef struct
|
|||
sint16 nYSrc;
|
||||
} SCRBLT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 srcLeft;
|
||||
sint16 srcTop;
|
||||
sint16 srcRight;
|
||||
sint16 srcBottom;
|
||||
uint16 bitmapId;
|
||||
} DRAW_NINE_GRID_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 srcLeft;
|
||||
sint16 srcTop;
|
||||
sint16 srcRight;
|
||||
sint16 srcBottom;
|
||||
uint16 bitmapId;
|
||||
uint8 nDeltaEntries;
|
||||
uint8* codeDeltaList;
|
||||
} MULTI_DRAW_NINE_GRID_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 backMode;
|
||||
sint16 nXStart;
|
||||
sint16 nYStart;
|
||||
sint16 nXEnd;
|
||||
sint16 nYEnd;
|
||||
uint32 backColor;
|
||||
uint8 bRop2;
|
||||
uint8 penStyle;
|
||||
uint8 penWidth;
|
||||
uint32 penColor;
|
||||
} LINE_TO_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 nLeftRect;
|
||||
|
@ -160,46 +128,12 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
uint32 savedBitmapPosition;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nRightRect;
|
||||
sint16 nBottomRect;
|
||||
uint8 operation;
|
||||
} SAVE_BITMAP_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cacheId;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nWidth;
|
||||
sint16 nHeight;
|
||||
uint8 bRop;
|
||||
sint16 nXSrc;
|
||||
sint16 nYSrc;
|
||||
uint16 cacheIndex;
|
||||
} MEMBLT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cacheId;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nWidth;
|
||||
sint16 nHeight;
|
||||
uint8 bRop;
|
||||
sint16 nXSrc;
|
||||
sint16 nYSrc;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
uint8 brushOrgX;
|
||||
uint8 brushOrgY;
|
||||
uint8 brushStyle;
|
||||
uint8 brushHatch;
|
||||
uint8 brushExtra[7];
|
||||
uint16 cacheIndex;
|
||||
} MEM3BLT_ORDER;
|
||||
sint16 srcLeft;
|
||||
sint16 srcTop;
|
||||
sint16 srcRight;
|
||||
sint16 srcBottom;
|
||||
uint16 bitmapId;
|
||||
} DRAW_NINE_GRID_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -254,6 +188,84 @@ typedef struct
|
|||
uint8* codeDeltaList;
|
||||
} MULTI_OPAQUE_RECT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 srcLeft;
|
||||
sint16 srcTop;
|
||||
sint16 srcRight;
|
||||
sint16 srcBottom;
|
||||
uint16 bitmapId;
|
||||
uint8 nDeltaEntries;
|
||||
uint8* codeDeltaList;
|
||||
} MULTI_DRAW_NINE_GRID_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 backMode;
|
||||
sint16 nXStart;
|
||||
sint16 nYStart;
|
||||
sint16 nXEnd;
|
||||
sint16 nYEnd;
|
||||
uint32 backColor;
|
||||
uint8 bRop2;
|
||||
uint8 penStyle;
|
||||
uint8 penWidth;
|
||||
uint32 penColor;
|
||||
} LINE_TO_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 xStart;
|
||||
sint16 yStart;
|
||||
uint8 bRop2;
|
||||
uint32 penColor;
|
||||
uint8 nDeltaEntries;
|
||||
uint8* codeDeltaList;
|
||||
} POLYLINE_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cacheId;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nWidth;
|
||||
sint16 nHeight;
|
||||
uint8 bRop;
|
||||
sint16 nXSrc;
|
||||
sint16 nYSrc;
|
||||
uint16 cacheIndex;
|
||||
} MEMBLT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cacheId;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nWidth;
|
||||
sint16 nHeight;
|
||||
uint8 bRop;
|
||||
sint16 nXSrc;
|
||||
sint16 nYSrc;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
uint8 brushOrgX;
|
||||
uint8 brushOrgY;
|
||||
uint8 brushStyle;
|
||||
uint8 brushHatch;
|
||||
uint8 brushExtra[7];
|
||||
uint16 cacheIndex;
|
||||
} MEM3BLT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 savedBitmapPosition;
|
||||
sint16 nLeftRect;
|
||||
sint16 nTopRect;
|
||||
sint16 nRightRect;
|
||||
sint16 nBottomRect;
|
||||
uint8 operation;
|
||||
} SAVE_BITMAP_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
|
@ -273,6 +285,51 @@ typedef struct
|
|||
uint8* data;
|
||||
} FAST_INDEX_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint16 fDrawing;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
sint16 bkLeft;
|
||||
sint16 bkTop;
|
||||
sint16 bkRight;
|
||||
sint16 bkBottom;
|
||||
sint16 opLeft;
|
||||
sint16 opTop;
|
||||
sint16 opRight;
|
||||
sint16 opBottom;
|
||||
uint16 x;
|
||||
uint16 y;
|
||||
uint8* data;
|
||||
} FAST_GLYPH_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint8 flAccel;
|
||||
uint8 ulCharInc;
|
||||
uint8 fOpRedundant;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
sint16 bkLeft;
|
||||
sint16 bkTop;
|
||||
sint16 bkRight;
|
||||
sint16 bkBottom;
|
||||
sint16 opLeft;
|
||||
sint16 opTop;
|
||||
sint16 opRight;
|
||||
sint16 opBottom;
|
||||
uint8 brushOrgX;
|
||||
uint8 brushOrgY;
|
||||
uint8 brushStyle;
|
||||
uint8 brushHatch;
|
||||
uint8 brushExtra[7];
|
||||
sint16 x;
|
||||
sint16 y;
|
||||
uint8* data;
|
||||
} GLYPH_INDEX_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 xStart;
|
||||
|
@ -301,35 +358,6 @@ typedef struct
|
|||
uint8* codeDeltaList;
|
||||
} POLYGON_CB_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 xStart;
|
||||
sint16 yStart;
|
||||
uint8 bRop2;
|
||||
uint32 penColor;
|
||||
uint8 nDeltaEntries;
|
||||
uint8* codeDeltaList;
|
||||
} POLYLINE_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint16 fDrawing;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
sint16 bkLeft;
|
||||
sint16 bkTop;
|
||||
sint16 bkRight;
|
||||
sint16 bkBottom;
|
||||
sint16 opLeft;
|
||||
sint16 opTop;
|
||||
sint16 opRight;
|
||||
sint16 opBottom;
|
||||
uint16 x;
|
||||
uint16 y;
|
||||
uint8* data;
|
||||
} FAST_GLYPH_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sint16 leftRect;
|
||||
|
@ -358,31 +386,252 @@ typedef struct
|
|||
uint8 brushExtra[7];
|
||||
} ELLIPSE_CB_ORDER;
|
||||
|
||||
/* Secondary Drawing Orders */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint8 flAccel;
|
||||
uint8 ulCharInc;
|
||||
uint8 fOpRedundant;
|
||||
uint32 backColor;
|
||||
uint32 foreColor;
|
||||
sint16 bkLeft;
|
||||
sint16 bkTop;
|
||||
sint16 bkRight;
|
||||
sint16 bkBottom;
|
||||
sint16 opLeft;
|
||||
sint16 opTop;
|
||||
sint16 opRight;
|
||||
sint16 opBottom;
|
||||
uint8 brushOrgX;
|
||||
uint8 brushOrgY;
|
||||
uint8 brushStyle;
|
||||
uint8 brushHatch;
|
||||
uint8 brushExtra[7];
|
||||
uint8 bitmapBpp;
|
||||
uint8 bitmapWidth;
|
||||
uint8 bitmapHeight;
|
||||
uint16 bitmapLength;
|
||||
uint16 cacheIndex;
|
||||
uint8 bitmapComprHdr[8];
|
||||
uint8* bitmapDataStream;
|
||||
} CACHE_BITMAP_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint16 flags;
|
||||
uint32 key1;
|
||||
uint32 key2;
|
||||
uint8 bitmapBpp;
|
||||
uint8 bitmapWidth;
|
||||
uint8 bitmapHeight;
|
||||
uint16 bitmapLength;
|
||||
uint16 cacheIndex;
|
||||
uint8 bitmapComprHdr[8];
|
||||
uint8* bitmapDataStream;
|
||||
} CACHE_BITMAP_V2_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint8 bpp;
|
||||
uint16 flags;
|
||||
uint16 cacheIndex;
|
||||
uint32 key1;
|
||||
uint32 key2;
|
||||
uint8* bitmapData;
|
||||
} CACHE_BITMAP_V3_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheIndex;
|
||||
uint16 numberColors;
|
||||
uint32* colorTable;
|
||||
} CACHE_COLOR_TABLE_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cacheIndex;
|
||||
uint16 x;
|
||||
uint16 y;
|
||||
uint16 cx;
|
||||
uint16 cy;
|
||||
uint8* aj;
|
||||
} GLYPH_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint8 cGlyphs;
|
||||
GLYPH_DATA* glyphData;
|
||||
uint8* unicodeCharacters;
|
||||
} CACHE_GLYPH_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheIndex;
|
||||
sint16 x;
|
||||
sint16 y;
|
||||
uint8* data;
|
||||
} GLYPH_INDEX_ORDER;
|
||||
uint16 cx;
|
||||
uint16 cy;
|
||||
uint8* aj;
|
||||
} GLYPH_DATA_V2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheId;
|
||||
uint8 flags;
|
||||
uint8 cGlyphs;
|
||||
GLYPH_DATA_V2* glyphData;
|
||||
uint8* unicodeCharacters;
|
||||
} CACHE_GLYPH_V2_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 cacheEntry;
|
||||
uint8 iBitmapFormat;
|
||||
uint8 cx;
|
||||
uint8 cy;
|
||||
uint8 style;
|
||||
uint8 iBytes;
|
||||
uint8* brushData;
|
||||
} CACHE_BRUSH_ORDER;
|
||||
|
||||
/* Alternate Secondary Drawing Orders */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cIndices;
|
||||
uint16* indices;
|
||||
} OFFSCREEN_DELETE_LIST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 offscreenBitmapId;
|
||||
uint16 cx;
|
||||
uint16 cy;
|
||||
OFFSCREEN_DELETE_LIST deleteList;
|
||||
} CREATE_OFFSCREEN_BITMAP_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 bitmapId;
|
||||
} SWITCH_SURFACE_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 flFlags;
|
||||
uint16 ulLeftWidth;
|
||||
uint16 ulRightWidth;
|
||||
uint16 ulTopHeight;
|
||||
uint16 ulBottomHeight;
|
||||
uint32 crTransparent;
|
||||
} NINE_GRID_BITMAP_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 bitmapBpp;
|
||||
uint16 bitmapId;
|
||||
uint16 cx;
|
||||
uint16 cy;
|
||||
NINE_GRID_BITMAP_INFO nineGridInfo;
|
||||
} CREATE_NINE_GRID_BITMAP_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 action;
|
||||
} FRAME_MARKER_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 bitmapFlags;
|
||||
uint8 bitmapBpp;
|
||||
uint16 bitmapType;
|
||||
uint16 bitmapWidth;
|
||||
uint16 bitmapHeight;
|
||||
uint32 bitmapSize;
|
||||
uint16 bitmapBlockSize;
|
||||
uint8* bitmapBlock;
|
||||
} STREAM_BITMAP_FIRST_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 bitmapFlags;
|
||||
uint16 bitmapType;
|
||||
uint16 bitmapBlockSize;
|
||||
uint8* bitmapBlock;
|
||||
} STREAM_BITMAP_NEXT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cbSize;
|
||||
uint32 cbTotalSize;
|
||||
uint32 cbTotalEmfSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_FIRST_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cbSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_NEXT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 cbSize;
|
||||
uint32 cbTotalSize;
|
||||
uint32 cbTotalEmfSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_END_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 flags;
|
||||
uint16 cacheType;
|
||||
uint16 cacheIndex;
|
||||
uint16 cbSize;
|
||||
uint32 cbTotalSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_CACHE_FIRST_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 flags;
|
||||
uint16 cacheType;
|
||||
uint16 cacheIndex;
|
||||
uint16 cbSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_CACHE_NEXT_ORDER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 flags;
|
||||
uint16 cacheType;
|
||||
uint16 cacheIndex;
|
||||
uint16 cbSize;
|
||||
uint32 cbTotalSize;
|
||||
uint8* emfRecords;
|
||||
} DRAW_GDIPLUS_CACHE_END_ORDER;
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define CACHED_BRUSH 0x80
|
||||
|
||||
#define BMF_1BPP 0x1
|
||||
#define BMF_8BPP 0x3
|
||||
#define BMF_16BPP 0x4
|
||||
#define BMF_24BPP 0x5
|
||||
#define BMF_32BPP 0x6
|
||||
|
||||
#define BS_SOLID 0x00
|
||||
#define BS_NULL 0x01
|
||||
#define BS_HATCHED 0x02
|
||||
#define BS_PATTERN 0x03
|
||||
|
||||
#define HS_HORIZONTAL 0x00
|
||||
#define HS_VERTICAL 0x01
|
||||
#define HS_FDIAGONAL 0x02
|
||||
#define HS_BDIAGONAL 0x03
|
||||
#define HS_CROSS 0x04
|
||||
#define HS_DIAGCROSS 0x05
|
||||
|
||||
#define DSDNG_STRETCH 0x00000001
|
||||
#define DSDNG_TILE 0x00000002
|
||||
#define DSDNG_PERPIXELALPHA 0x00000004
|
||||
#define DSDNG_TRANSPARENT 0x00000008
|
||||
#define DSDNG_MUSTFLIP 0x00000010
|
||||
#define DSDNG_TRUESIZE 0x00000020
|
||||
|
||||
#define FRAME_START 0x00000000
|
||||
#define FRAME_END 0x00000001
|
||||
|
||||
#define STREAM_BITMAP_END 0x01
|
||||
#define STREAM_BITMAP_COMPRESSED 0x02
|
||||
#define STREAM_BITMAP_V2 0x04
|
||||
|
||||
/* Update Interface */
|
||||
|
||||
|
@ -394,28 +643,50 @@ typedef void (*pcSetBounds)(rdpUpdate* update, BOUNDS* bounds);
|
|||
typedef void (*pcSynchronize)(rdpUpdate* update);
|
||||
typedef void (*pcBitmap)(rdpUpdate* update, BITMAP_UPDATE* bitmap);
|
||||
typedef void (*pcPalette)(rdpUpdate* update, PALETTE_UPDATE* palette);
|
||||
|
||||
typedef void (*pcDstBlt)(rdpUpdate* update, DSTBLT_ORDER* dstblt);
|
||||
typedef void (*pcPatBlt)(rdpUpdate* update, PATBLT_ORDER* patblt);
|
||||
typedef void (*pcScrBlt)(rdpUpdate* update, SCRBLT_ORDER* scrblt);
|
||||
typedef void (*pcDrawNineGrid)(rdpUpdate* update, DRAW_NINE_GRID_ORDER* draw_nine_grid);
|
||||
typedef void (*pcMultiDrawNineGrid)(rdpUpdate* update, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
|
||||
typedef void (*pcLineTo)(rdpUpdate* update, LINE_TO_ORDER* line_to);
|
||||
typedef void (*pcOpaqueRect)(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect);
|
||||
typedef void (*pcSaveBitmap)(rdpUpdate* update, SAVE_BITMAP_ORDER* save_bitmap);
|
||||
typedef void (*pcMemBlt)(rdpUpdate* update, MEMBLT_ORDER* memblt);
|
||||
typedef void (*pcMem3Blt)(rdpUpdate* update, MEM3BLT_ORDER* memblt);
|
||||
typedef void (*pcDrawNineGrid)(rdpUpdate* update, DRAW_NINE_GRID_ORDER* draw_nine_grid);
|
||||
typedef void (*pcMultiDstBlt)(rdpUpdate* update, MULTI_DSTBLT_ORDER* multi_dstblt);
|
||||
typedef void (*pcMultiPatBlt)(rdpUpdate* update, MULTI_PATBLT_ORDER* multi_patblt);
|
||||
typedef void (*pcMultiScrBlt)(rdpUpdate* update, MULTI_SCRBLT_ORDER* multi_scrblt);
|
||||
typedef void (*pcMultiOpaqueRect)(rdpUpdate* update, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
|
||||
typedef void (*pcMultiDrawNineGrid)(rdpUpdate* update, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
|
||||
typedef void (*pcLineTo)(rdpUpdate* update, LINE_TO_ORDER* line_to);
|
||||
typedef void (*pcPolyline)(rdpUpdate* update, POLYLINE_ORDER* polyline);
|
||||
typedef void (*pcMemBlt)(rdpUpdate* update, MEMBLT_ORDER* memblt);
|
||||
typedef void (*pcMem3Blt)(rdpUpdate* update, MEM3BLT_ORDER* memblt);
|
||||
typedef void (*pcSaveBitmap)(rdpUpdate* update, SAVE_BITMAP_ORDER* save_bitmap);
|
||||
typedef void (*pcFastIndex)(rdpUpdate* update, FAST_INDEX_ORDER* fast_index);
|
||||
typedef void (*pcFastGlyph)(rdpUpdate* update, FAST_GLYPH_ORDER* fast_glyph);
|
||||
typedef void (*pcGlyphIndex)(rdpUpdate* update, GLYPH_INDEX_ORDER* glyph_index);
|
||||
typedef void (*pcPolygonSC)(rdpUpdate* update, POLYGON_SC_ORDER* polygon_sc);
|
||||
typedef void (*pcPolygonCB)(rdpUpdate* update, POLYGON_CB_ORDER* polygon_cb);
|
||||
typedef void (*pcPolyline)(rdpUpdate* update, POLYLINE_ORDER* polyline);
|
||||
typedef void (*pcFastGlyph)(rdpUpdate* update, FAST_GLYPH_ORDER* fast_glyph);
|
||||
typedef void (*pcEllipseSC)(rdpUpdate* update, ELLIPSE_SC_ORDER* ellipse_sc);
|
||||
typedef void (*pcEllipseCB)(rdpUpdate* update, ELLIPSE_CB_ORDER* ellipse_cb);
|
||||
typedef void (*pcGlyphIndex)(rdpUpdate* update, GLYPH_INDEX_ORDER* glyph_index);
|
||||
|
||||
typedef void (*pcCacheBitmap)(rdpUpdate* update, CACHE_BITMAP_ORDER* cache_bitmap_order);
|
||||
typedef void (*pcCacheBitmapV2)(rdpUpdate* update, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order);
|
||||
typedef void (*pcCacheBitmapV3)(rdpUpdate* update, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order);
|
||||
typedef void (*pcCacheColorTable)(rdpUpdate* update, CACHE_COLOR_TABLE_ORDER* cache_color_table_order);
|
||||
typedef void (*pcCacheGlyph)(rdpUpdate* update, CACHE_GLYPH_ORDER* cache_glyph_order);
|
||||
typedef void (*pcCacheGlyphV2)(rdpUpdate* update, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order);
|
||||
typedef void (*pcCacheBrush)(rdpUpdate* update, CACHE_BRUSH_ORDER* cache_brush_order);
|
||||
|
||||
typedef void (*pcCreateOffscreenBitmap)(rdpUpdate* update, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
|
||||
typedef void (*pcSwitchSurface)(rdpUpdate* update, SWITCH_SURFACE_ORDER* switch_surface);
|
||||
typedef void (*pcCreateNineGridBitmap)(rdpUpdate* update, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap);
|
||||
typedef void (*pcFrameMarker)(rdpUpdate* update, FRAME_MARKER_ORDER* frame_marker);
|
||||
typedef void (*pcStreamBitmapFirst)(rdpUpdate* update, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first);
|
||||
typedef void (*pcStreamBitmapNext)(rdpUpdate* update, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_next);
|
||||
typedef void (*pcDrawGdiPlusFirst)(rdpUpdate* update, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first);
|
||||
typedef void (*pcDrawGdiPlusNext)(rdpUpdate* update, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next);
|
||||
typedef void (*pcDrawGdiPlusEnd)(rdpUpdate* update, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end);
|
||||
typedef void (*pcDrawGdiPlusCacheFirst)(rdpUpdate* update, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first);
|
||||
typedef void (*pcDrawGdiPlusCacheNext)(rdpUpdate* update, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next);
|
||||
typedef void (*pcDrawGdiPlusCacheEnd)(rdpUpdate* update, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end);
|
||||
|
||||
struct rdp_update
|
||||
{
|
||||
|
@ -430,54 +701,99 @@ struct rdp_update
|
|||
pcSynchronize Synchronize;
|
||||
pcBitmap Bitmap;
|
||||
pcPalette Palette;
|
||||
|
||||
pcDstBlt DstBlt;
|
||||
pcPatBlt PatBlt;
|
||||
pcScrBlt ScrBlt;
|
||||
pcDrawNineGrid DrawNineGrid;
|
||||
pcMultiDrawNineGrid MultiDrawNineGrid;
|
||||
pcLineTo LineTo;
|
||||
pcOpaqueRect OpaqueRect;
|
||||
pcSaveBitmap SaveBitmap;
|
||||
pcMemBlt MemBlt;
|
||||
pcMem3Blt Mem3Blt;
|
||||
pcDrawNineGrid DrawNineGrid;
|
||||
pcMultiDstBlt MultiDstBlt;
|
||||
pcMultiPatBlt MultiPatBlt;
|
||||
pcMultiScrBlt MultiScrBlt;
|
||||
pcMultiOpaqueRect MultiOpaqueRect;
|
||||
pcMultiDrawNineGrid MultiDrawNineGrid;
|
||||
pcLineTo LineTo;
|
||||
pcPolyline Polyline;
|
||||
pcMemBlt MemBlt;
|
||||
pcMem3Blt Mem3Blt;
|
||||
pcSaveBitmap SaveBitmap;
|
||||
pcFastIndex FastIndex;
|
||||
pcFastGlyph FastGlyph;
|
||||
pcGlyphIndex GlyphIndex;
|
||||
pcPolygonSC PolygonSC;
|
||||
pcPolygonCB PolygonCB;
|
||||
pcPolyline Polyline;
|
||||
pcFastGlyph FastGlyph;
|
||||
pcEllipseSC EllipseSC;
|
||||
pcEllipseCB EllipseCB;
|
||||
pcGlyphIndex GlyphIndex;
|
||||
|
||||
boolean glyph_v2;
|
||||
pcCacheBitmap CacheBitmap;
|
||||
pcCacheBitmapV2 CacheBitmapV2;
|
||||
pcCacheBitmapV3 CacheBitmapV3;
|
||||
pcCacheColorTable CacheColorTable;
|
||||
pcCacheGlyph CacheGlyph;
|
||||
pcCacheGlyphV2 CacheGlyphV2;
|
||||
pcCacheBrush CacheBrush;
|
||||
|
||||
pcCreateOffscreenBitmap CreateOffscreenBitmap;
|
||||
pcSwitchSurface SwitchSurface;
|
||||
pcCreateNineGridBitmap CreateNineGridBitmap;
|
||||
pcFrameMarker FrameMarker;
|
||||
pcStreamBitmapFirst StreamBitmapFirst;
|
||||
pcStreamBitmapNext StreamBitmapNext;
|
||||
pcDrawGdiPlusFirst DrawGdiPlusFirst;
|
||||
pcDrawGdiPlusNext DrawGdiPlusNext;
|
||||
pcDrawGdiPlusEnd DrawGdiPlusEnd;
|
||||
pcDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst;
|
||||
pcDrawGdiPlusCacheNext DrawGdiPlusCacheNext;
|
||||
pcDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd;
|
||||
|
||||
BITMAP_UPDATE bitmap_update;
|
||||
PALETTE_UPDATE palette_update;
|
||||
ORDER_INFO order_info;
|
||||
|
||||
DSTBLT_ORDER dstblt;
|
||||
PATBLT_ORDER patblt;
|
||||
SCRBLT_ORDER scrblt;
|
||||
DRAW_NINE_GRID_ORDER draw_nine_grid;
|
||||
MULTI_DRAW_NINE_GRID_ORDER multi_draw_nine_grid;
|
||||
LINE_TO_ORDER line_to;
|
||||
OPAQUE_RECT_ORDER opaque_rect;
|
||||
SAVE_BITMAP_ORDER save_bitmap;
|
||||
MEMBLT_ORDER memblt;
|
||||
MEM3BLT_ORDER mem3blt;
|
||||
DRAW_NINE_GRID_ORDER draw_nine_grid;
|
||||
MULTI_DSTBLT_ORDER multi_dstblt;
|
||||
MULTI_PATBLT_ORDER multi_patblt;
|
||||
MULTI_SCRBLT_ORDER multi_scrblt;
|
||||
MULTI_OPAQUE_RECT_ORDER multi_opaque_rect;
|
||||
MULTI_DRAW_NINE_GRID_ORDER multi_draw_nine_grid;
|
||||
LINE_TO_ORDER line_to;
|
||||
POLYLINE_ORDER polyline;
|
||||
MEMBLT_ORDER memblt;
|
||||
MEM3BLT_ORDER mem3blt;
|
||||
SAVE_BITMAP_ORDER save_bitmap;
|
||||
FAST_INDEX_ORDER fast_index;
|
||||
FAST_GLYPH_ORDER fast_glyph;
|
||||
GLYPH_INDEX_ORDER glyph_index;
|
||||
POLYGON_SC_ORDER polygon_sc;
|
||||
POLYGON_CB_ORDER polygon_cb;
|
||||
POLYLINE_ORDER polyline;
|
||||
FAST_GLYPH_ORDER fast_glyph;
|
||||
ELLIPSE_SC_ORDER ellipse_sc;
|
||||
ELLIPSE_CB_ORDER ellipse_cb;
|
||||
GLYPH_INDEX_ORDER glyph_index;
|
||||
|
||||
CACHE_BITMAP_ORDER cache_bitmap_order;
|
||||
CACHE_BITMAP_V2_ORDER cache_bitmap_v2_order;
|
||||
CACHE_BITMAP_V3_ORDER cache_bitmap_v3_order;
|
||||
CACHE_COLOR_TABLE_ORDER cache_color_table_order;
|
||||
CACHE_GLYPH_ORDER cache_glyph_order;
|
||||
CACHE_GLYPH_V2_ORDER cache_glyph_v2_order;
|
||||
CACHE_BRUSH_ORDER cache_brush_order;
|
||||
|
||||
CREATE_OFFSCREEN_BITMAP_ORDER create_offscreen_bitmap;
|
||||
SWITCH_SURFACE_ORDER switch_surface;
|
||||
CREATE_NINE_GRID_BITMAP_ORDER create_nine_grid_bitmap;
|
||||
FRAME_MARKER_ORDER frame_marker;
|
||||
STREAM_BITMAP_FIRST_ORDER stream_bitmap_first;
|
||||
STREAM_BITMAP_FIRST_ORDER stream_bitmap_next;
|
||||
DRAW_GDIPLUS_CACHE_FIRST_ORDER draw_gdiplus_cache_first;
|
||||
DRAW_GDIPLUS_CACHE_NEXT_ORDER draw_gdiplus_cache_next;
|
||||
DRAW_GDIPLUS_CACHE_END_ORDER draw_gdiplus_cache_end;
|
||||
DRAW_GDIPLUS_FIRST_ORDER draw_gdiplus_first;
|
||||
DRAW_GDIPLUS_NEXT_ORDER draw_gdiplus_next;
|
||||
DRAW_GDIPLUS_END_ORDER draw_gdiplus_end;
|
||||
};
|
||||
|
||||
#endif /* __UPDATE_API_H */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -70,6 +70,25 @@
|
|||
#define ORDER_FIELD_22 0x200000
|
||||
#define ORDER_FIELD_23 0x400000
|
||||
|
||||
/* Bitmap Cache Flags */
|
||||
#define CBR2_8BPP 0x3
|
||||
#define CBR2_16BPP 0x4
|
||||
#define CBR2_24BPP 0x5
|
||||
#define CBR2_32BPP 0x6
|
||||
|
||||
#define CBR2_HEIGHT_SAME_AS_WIDTH 0x01
|
||||
#define CBR2_PERSISTENT_KEY_PRESENT 0x02
|
||||
#define CBR2_NO_BITMAP_COMPRESSION_HDR 0x08
|
||||
#define CBR2_DO_NOT_CACHE 0x10
|
||||
|
||||
#define CBR23_8BPP 0x3
|
||||
#define CBR23_16BPP 0x4
|
||||
#define CBR23_24BPP 0x5
|
||||
#define CBR23_32BPP 0x6
|
||||
|
||||
#define CBR3_IGNORABLE_FLAG 0x08
|
||||
#define CBR3_DO_NOT_CACHE 0x10
|
||||
|
||||
/* Order Classes */
|
||||
#define ORDER_PRIMARY_CLASS 0x01
|
||||
#define ORDER_SECONDARY_CLASS 0x03
|
||||
|
@ -160,7 +179,7 @@
|
|||
|
||||
/* Alternate Secondary Drawing Orders */
|
||||
#define ORDER_TYPE_SWITCH_SURFACE 0x00
|
||||
#define ORDER_TYPE_CREATE_OFFSCR_BITMAP 0x01
|
||||
#define ORDER_TYPE_CREATE_OFFSCREEN_BITMAP 0x01
|
||||
#define ORDER_TYPE_STREAM_BITMAP_FIRST 0x02
|
||||
#define ORDER_TYPE_STREAM_BITMAP_NEXT 0x03
|
||||
#define ORDER_TYPE_CREATE_NINE_GRID_BITMAP 0x04
|
||||
|
|
|
@ -92,7 +92,7 @@ void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data)
|
|||
bitmap_data->length, bitmap_data->bpp, bitmap_data->bpp);
|
||||
|
||||
if (status != True)
|
||||
printf("bitmap decompression failed\n");
|
||||
printf("bitmap decompression failed, bpp:%d\n", bitmap_data->bpp);
|
||||
}
|
||||
|
||||
void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_update)
|
||||
|
@ -151,7 +151,8 @@ void update_recv(rdpUpdate* update, STREAM* s)
|
|||
|
||||
stream_read_uint16(s, updateType); /* updateType (2 bytes) */
|
||||
|
||||
//printf("%s Update Data PDU\n", UPDATE_TYPE_STRINGS[updateType]);
|
||||
if (updateType != UPDATE_TYPE_BITMAP)
|
||||
printf("%s Update Data PDU\n", UPDATE_TYPE_STRINGS[updateType]);
|
||||
|
||||
IFCALL(update->BeginPaint, update);
|
||||
|
||||
|
|
|
@ -1101,6 +1101,72 @@ void gdi_set_bounds(rdpUpdate* update, BOUNDS* bounds)
|
|||
}
|
||||
}
|
||||
|
||||
void gdi_dstblt(rdpUpdate* update, DSTBLT_ORDER* dstblt)
|
||||
{
|
||||
GDI* gdi = GET_GDI(update);
|
||||
|
||||
gdi_BitBlt(gdi->drawing->hdc, dstblt->nLeftRect, dstblt->nTopRect,
|
||||
dstblt->nWidth, dstblt->nHeight, NULL, 0, 0, gdi_rop3_code(dstblt->bRop));
|
||||
}
|
||||
|
||||
void gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
|
||||
{
|
||||
HGDI_BRUSH originalBrush;
|
||||
GDI* gdi = GET_GDI(update);
|
||||
|
||||
if (patblt->brushStyle & CACHED_BRUSH)
|
||||
{
|
||||
/* obtain brush from cache */
|
||||
}
|
||||
|
||||
patblt->brushStyle &= 0x7F;
|
||||
|
||||
if (patblt->brushStyle == BS_SOLID)
|
||||
{
|
||||
uint32 color;
|
||||
originalBrush = gdi->drawing->hdc->brush;
|
||||
|
||||
color = gdi_color_convert(patblt->foreColor, gdi->srcBpp, 32, gdi->clrconv);
|
||||
gdi->drawing->hdc->brush = gdi_CreateSolidBrush(color);
|
||||
|
||||
gdi_PatBlt(gdi->drawing->hdc, patblt->nLeftRect, patblt->nTopRect,
|
||||
patblt->nWidth, patblt->nHeight, gdi_rop3_code(patblt->bRop));
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) gdi->drawing->hdc->brush);
|
||||
gdi->drawing->hdc->brush = originalBrush;
|
||||
}
|
||||
else if (patblt->brushStyle == BS_PATTERN)
|
||||
{
|
||||
uint8* data;
|
||||
HGDI_BITMAP hBmp;
|
||||
|
||||
data = (uint8*) &patblt->brushHatch;
|
||||
|
||||
data = gdi_mono_image_convert(data, 8, 8, gdi->srcBpp, gdi->dstBpp,
|
||||
patblt->backColor, patblt->foreColor, gdi->clrconv);
|
||||
|
||||
hBmp = gdi_CreateBitmap(8, 8, gdi->drawing->hdc->bitsPerPixel, data);
|
||||
|
||||
originalBrush = gdi->drawing->hdc->brush;
|
||||
gdi->drawing->hdc->brush = gdi_CreatePatternBrush(hBmp);
|
||||
|
||||
gdi_PatBlt(gdi->drawing->hdc, patblt->nLeftRect, patblt->nTopRect,
|
||||
patblt->nWidth, patblt->nHeight, gdi_rop3_code(patblt->bRop));
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) gdi->drawing->hdc->brush);
|
||||
gdi->drawing->hdc->brush = originalBrush;
|
||||
}
|
||||
}
|
||||
|
||||
void gdi_scrblt(rdpUpdate* update, SCRBLT_ORDER* scrblt)
|
||||
{
|
||||
GDI* gdi = GET_GDI(update);
|
||||
|
||||
gdi_BitBlt(gdi->drawing->hdc, scrblt->nLeftRect, scrblt->nTopRect,
|
||||
scrblt->nWidth, scrblt->nHeight, gdi->primary->hdc,
|
||||
scrblt->nXSrc, scrblt->nYSrc, gdi_rop3_code(scrblt->bRop));
|
||||
}
|
||||
|
||||
void gdi_opaque_rect(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect)
|
||||
{
|
||||
GDI_RECT rect;
|
||||
|
@ -1119,6 +1185,11 @@ void gdi_opaque_rect(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect)
|
|||
gdi_DeleteObject((HGDIOBJECT) hBrush);
|
||||
}
|
||||
|
||||
void gdi_multi_opaque_rect(rdpUpdate* update, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register GDI callbacks with libfreerdp.
|
||||
* @param inst current instance
|
||||
|
@ -1130,28 +1201,28 @@ void gdi_register_update_callbacks(rdpUpdate* update)
|
|||
update->Bitmap = gdi_bitmap_update;
|
||||
update->Palette = gdi_palette_update;
|
||||
update->SetBounds = gdi_set_bounds;
|
||||
update->DstBlt = NULL;
|
||||
update->PatBlt = NULL;
|
||||
update->ScrBlt = NULL;
|
||||
update->DrawNineGrid = NULL;
|
||||
update->MultiDrawNineGrid = NULL;
|
||||
update->LineTo = NULL;
|
||||
update->DstBlt = gdi_dstblt;
|
||||
update->PatBlt = gdi_patblt;
|
||||
update->ScrBlt = gdi_scrblt;
|
||||
update->OpaqueRect = gdi_opaque_rect;
|
||||
update->SaveBitmap = NULL;
|
||||
update->MemBlt = NULL;
|
||||
update->Mem3Blt = NULL;
|
||||
update->DrawNineGrid = NULL;
|
||||
update->MultiDstBlt = NULL;
|
||||
update->MultiPatBlt = NULL;
|
||||
update->MultiScrBlt = NULL;
|
||||
update->MultiOpaqueRect = NULL;
|
||||
update->MultiOpaqueRect = gdi_multi_opaque_rect;
|
||||
update->MultiDrawNineGrid = NULL;
|
||||
update->LineTo = NULL;
|
||||
update->Polyline = NULL;
|
||||
update->MemBlt = NULL;
|
||||
update->Mem3Blt = NULL;
|
||||
update->SaveBitmap = NULL;
|
||||
update->FastIndex = NULL;
|
||||
update->FastGlyph = NULL;
|
||||
update->GlyphIndex = NULL;
|
||||
update->PolygonSC = NULL;
|
||||
update->PolygonCB = NULL;
|
||||
update->Polyline = NULL;
|
||||
update->FastGlyph = NULL;
|
||||
update->EllipseSC = NULL;
|
||||
update->EllipseCB = NULL;
|
||||
update->GlyphIndex = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue