2011-11-22 01:44:50 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-11-22 01:44:50 +04:00
|
|
|
* Secondary Drawing Orders Interface API
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2012-12-14 09:25:48 +04:00
|
|
|
#ifndef FREERDP_UPDATE_SECONDARY_H
|
|
|
|
#define FREERDP_UPDATE_SECONDARY_H
|
2011-11-22 01:44:50 +04:00
|
|
|
|
|
|
|
#include <freerdp/types.h>
|
2013-02-03 21:41:59 +04:00
|
|
|
#include <freerdp/primary.h>
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define GLYPH_FRAGMENT_NOP 0x00
|
|
|
|
#define GLYPH_FRAGMENT_USE 0xFE
|
|
|
|
#define GLYPH_FRAGMENT_ADD 0xFF
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#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
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define SCREEN_BITMAP_SURFACE 0xFFFF
|
|
|
|
#define BITMAP_CACHE_WAITING_LIST_INDEX 0x7FFF
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define CACHED_BRUSH 0x80
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define BMF_1BPP 0x1
|
|
|
|
#define BMF_8BPP 0x3
|
|
|
|
#define BMF_16BPP 0x4
|
|
|
|
#define BMF_24BPP 0x5
|
|
|
|
#define BMF_32BPP 0x6
|
2011-11-22 01:44:50 +04:00
|
|
|
|
|
|
|
#ifndef _WIN32
|
2019-11-06 17:24:51 +03:00
|
|
|
#define BS_SOLID 0x00
|
|
|
|
#define BS_NULL 0x01
|
|
|
|
#define BS_HATCHED 0x02
|
|
|
|
#define BS_PATTERN 0x03
|
2011-11-22 01:44:50 +04:00
|
|
|
#endif
|
|
|
|
|
2011-12-21 04:48:13 +04:00
|
|
|
#ifndef _WIN32
|
2019-11-06 17:24:51 +03:00
|
|
|
#define HS_HORIZONTAL 0x00
|
|
|
|
#define HS_VERTICAL 0x01
|
|
|
|
#define HS_FDIAGONAL 0x02
|
|
|
|
#define HS_BDIAGONAL 0x03
|
|
|
|
#define HS_CROSS 0x04
|
|
|
|
#define HS_DIAGCROSS 0x05
|
2011-12-21 04:48:13 +04:00
|
|
|
#endif
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define SO_FLAG_DEFAULT_PLACEMENT 0x01
|
|
|
|
#define SO_HORIZONTAL 0x02
|
|
|
|
#define SO_VERTICAL 0x04
|
|
|
|
#define SO_REVERSED 0x08
|
|
|
|
#define SO_ZERO_BEARINGS 0x10
|
|
|
|
#define SO_CHAR_INC_EQUAL_BM_BASE 0x20
|
|
|
|
#define SO_MAXEXT_EQUAL_BM_SIDE 0x40
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheId;
|
|
|
|
UINT32 bitmapBpp;
|
|
|
|
UINT32 bitmapWidth;
|
|
|
|
UINT32 bitmapHeight;
|
|
|
|
UINT32 bitmapLength;
|
|
|
|
UINT32 cacheIndex;
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL compressed;
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE bitmapComprHdr[8];
|
|
|
|
BYTE* bitmapDataStream;
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_BITMAP_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheId;
|
|
|
|
UINT32 flags;
|
|
|
|
UINT32 key1;
|
|
|
|
UINT32 key2;
|
|
|
|
UINT32 bitmapBpp;
|
|
|
|
UINT32 bitmapWidth;
|
|
|
|
UINT32 bitmapHeight;
|
|
|
|
UINT32 bitmapLength;
|
|
|
|
UINT32 cacheIndex;
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL compressed;
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cbCompFirstRowSize;
|
|
|
|
UINT32 cbCompMainBodySize;
|
|
|
|
UINT32 cbScanWidth;
|
|
|
|
UINT32 cbUncompressedSize;
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE* bitmapDataStream;
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_BITMAP_V2_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 bpp;
|
|
|
|
UINT32 codecID;
|
|
|
|
UINT32 width;
|
|
|
|
UINT32 height;
|
|
|
|
UINT32 length;
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE* data;
|
2022-02-14 16:59:22 +03:00
|
|
|
} BITMAP_DATA_EX;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheId;
|
|
|
|
UINT32 bpp;
|
|
|
|
UINT32 flags;
|
|
|
|
UINT32 cacheIndex;
|
|
|
|
UINT32 key1;
|
|
|
|
UINT32 key2;
|
2011-11-22 01:44:50 +04:00
|
|
|
BITMAP_DATA_EX bitmapData;
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_BITMAP_V3_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheIndex;
|
|
|
|
UINT32 numberColors;
|
2013-02-04 01:19:25 +04:00
|
|
|
UINT32 colorTable[256];
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_COLOR_TABLE_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheId;
|
|
|
|
UINT32 cGlyphs;
|
2013-02-03 21:41:59 +04:00
|
|
|
GLYPH_DATA glyphData[256];
|
2018-03-30 11:43:20 +03:00
|
|
|
WCHAR* unicodeCharacters;
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_GLYPH_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 cacheId;
|
|
|
|
UINT32 flags;
|
|
|
|
UINT32 cGlyphs;
|
2013-02-03 21:41:59 +04:00
|
|
|
GLYPH_DATA_V2 glyphData[256];
|
2018-03-30 11:43:20 +03:00
|
|
|
WCHAR* unicodeCharacters;
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_GLYPH_V2_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct
|
2011-11-22 01:44:50 +04:00
|
|
|
{
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 index;
|
|
|
|
UINT32 bpp;
|
|
|
|
UINT32 cx;
|
|
|
|
UINT32 cy;
|
|
|
|
UINT32 style;
|
|
|
|
UINT32 length;
|
2013-01-29 03:42:32 +04:00
|
|
|
BYTE data[256];
|
2022-02-14 16:59:22 +03:00
|
|
|
} CACHE_BRUSH_ORDER;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
typedef BOOL (*pCacheBitmap)(rdpContext* context, const CACHE_BITMAP_ORDER* cache_bitmap_order);
|
|
|
|
typedef BOOL (*pCacheBitmapV2)(rdpContext* context, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order);
|
|
|
|
typedef BOOL (*pCacheBitmapV3)(rdpContext* context, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order);
|
2016-04-05 18:07:45 +03:00
|
|
|
typedef BOOL (*pCacheColorTable)(rdpContext* context,
|
2018-03-30 11:43:20 +03:00
|
|
|
const CACHE_COLOR_TABLE_ORDER* cache_color_table_order);
|
2019-11-06 17:24:51 +03:00
|
|
|
typedef BOOL (*pCacheGlyph)(rdpContext* context, const CACHE_GLYPH_ORDER* cache_glyph_order);
|
2016-04-05 18:07:45 +03:00
|
|
|
typedef BOOL (*pCacheGlyphV2)(rdpContext* context,
|
2018-03-30 11:43:20 +03:00
|
|
|
const CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order);
|
2019-11-06 17:24:51 +03:00
|
|
|
typedef BOOL (*pCacheBrush)(rdpContext* context, const CACHE_BRUSH_ORDER* cache_brush_order);
|
2021-08-23 13:08:35 +03:00
|
|
|
typedef BOOL (*pCacheOrderInfo)(rdpContext* context, INT16 orderLength, UINT16 extraFlags,
|
2021-01-26 17:25:06 +03:00
|
|
|
UINT8 orderType, const char* orderName);
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2011-11-22 02:48:03 +04:00
|
|
|
struct rdp_secondary_update
|
|
|
|
{
|
2019-11-06 17:24:51 +03:00
|
|
|
rdpContext* context; /* 0 */
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 paddingA[16 - 1]; /* 1 */
|
2011-11-22 02:48:03 +04:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
pCacheBitmap CacheBitmap; /* 16 */
|
|
|
|
pCacheBitmapV2 CacheBitmapV2; /* 17 */
|
|
|
|
pCacheBitmapV3 CacheBitmapV3; /* 18 */
|
2011-11-22 02:48:03 +04:00
|
|
|
pCacheColorTable CacheColorTable; /* 19 */
|
2019-11-06 17:24:51 +03:00
|
|
|
pCacheGlyph CacheGlyph; /* 20 */
|
|
|
|
pCacheGlyphV2 CacheGlyphV2; /* 21 */
|
|
|
|
pCacheBrush CacheBrush; /* 22 */
|
2021-01-26 17:25:06 +03:00
|
|
|
/* Statistics callback */
|
|
|
|
pCacheOrderInfo CacheOrderInfo; /* 23 */
|
|
|
|
UINT32 paddingE[32 - 24]; /* 24 */
|
2011-11-22 02:48:03 +04:00
|
|
|
};
|
|
|
|
typedef struct rdp_secondary_update rdpSecondaryUpdate;
|
|
|
|
|
2012-12-14 09:25:48 +04:00
|
|
|
#endif /* FREERDP_UPDATE_SECONDARY_H */
|