altsec.h (7130B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Alternate Secondary Drawing Orders Interface API 4 * 5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> 6 * 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 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 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. 18 */ 19 20#ifndef FREERDP_UPDATE_ALTSEC_H 21#define FREERDP_UPDATE_ALTSEC_H 22 23#include <freerdp/types.h> 24 25#define DSDNG_STRETCH 0x00000001 26#define DSDNG_TILE 0x00000002 27#define DSDNG_PERPIXELALPHA 0x00000004 28#define DSDNG_TRANSPARENT 0x00000008 29#define DSDNG_MUSTFLIP 0x00000010 30#define DSDNG_TRUESIZE 0x00000020 31 32#define FRAME_START 0x00000000 33#define FRAME_END 0x00000001 34 35#define STREAM_BITMAP_END 0x01 36#define STREAM_BITMAP_COMPRESSED 0x02 37#define STREAM_BITMAP_V2 0x04 38 39struct _OFFSCREEN_DELETE_LIST 40{ 41 UINT32 sIndices; 42 UINT32 cIndices; 43 UINT16* indices; 44}; 45typedef struct _OFFSCREEN_DELETE_LIST OFFSCREEN_DELETE_LIST; 46 47struct _CREATE_OFFSCREEN_BITMAP_ORDER 48{ 49 UINT32 id; 50 UINT32 cx; 51 UINT32 cy; 52 OFFSCREEN_DELETE_LIST deleteList; 53}; 54typedef struct _CREATE_OFFSCREEN_BITMAP_ORDER CREATE_OFFSCREEN_BITMAP_ORDER; 55 56struct _SWITCH_SURFACE_ORDER 57{ 58 UINT32 bitmapId; 59}; 60typedef struct _SWITCH_SURFACE_ORDER SWITCH_SURFACE_ORDER; 61 62struct _NINE_GRID_BITMAP_INFO 63{ 64 UINT32 flFlags; 65 UINT32 ulLeftWidth; 66 UINT32 ulRightWidth; 67 UINT32 ulTopHeight; 68 UINT32 ulBottomHeight; 69 UINT32 crTransparent; 70}; 71typedef struct _NINE_GRID_BITMAP_INFO NINE_GRID_BITMAP_INFO; 72 73struct _CREATE_NINE_GRID_BITMAP_ORDER 74{ 75 UINT32 bitmapBpp; 76 UINT32 bitmapId; 77 UINT32 cx; 78 UINT32 cy; 79 NINE_GRID_BITMAP_INFO nineGridInfo; 80}; 81typedef struct _CREATE_NINE_GRID_BITMAP_ORDER CREATE_NINE_GRID_BITMAP_ORDER; 82 83struct _FRAME_MARKER_ORDER 84{ 85 UINT32 action; 86}; 87typedef struct _FRAME_MARKER_ORDER FRAME_MARKER_ORDER; 88 89struct _STREAM_BITMAP_FIRST_ORDER 90{ 91 UINT32 bitmapFlags; 92 UINT32 bitmapBpp; 93 UINT32 bitmapType; 94 UINT32 bitmapWidth; 95 UINT32 bitmapHeight; 96 UINT32 bitmapSize; 97 UINT32 bitmapBlockSize; 98 BYTE* bitmapBlock; 99}; 100typedef struct _STREAM_BITMAP_FIRST_ORDER STREAM_BITMAP_FIRST_ORDER; 101 102struct _STREAM_BITMAP_NEXT_ORDER 103{ 104 UINT32 bitmapFlags; 105 UINT32 bitmapType; 106 UINT32 bitmapBlockSize; 107 BYTE* bitmapBlock; 108}; 109typedef struct _STREAM_BITMAP_NEXT_ORDER STREAM_BITMAP_NEXT_ORDER; 110 111struct _DRAW_GDIPLUS_FIRST_ORDER 112{ 113 UINT32 cbSize; 114 UINT32 cbTotalSize; 115 UINT32 cbTotalEmfSize; 116 BYTE* emfRecords; 117}; 118typedef struct _DRAW_GDIPLUS_FIRST_ORDER DRAW_GDIPLUS_FIRST_ORDER; 119 120struct _DRAW_GDIPLUS_NEXT_ORDER 121{ 122 UINT32 cbSize; 123 BYTE* emfRecords; 124}; 125typedef struct _DRAW_GDIPLUS_NEXT_ORDER DRAW_GDIPLUS_NEXT_ORDER; 126 127struct _DRAW_GDIPLUS_END_ORDER 128{ 129 UINT32 cbSize; 130 UINT32 cbTotalSize; 131 UINT32 cbTotalEmfSize; 132 BYTE* emfRecords; 133}; 134typedef struct _DRAW_GDIPLUS_END_ORDER DRAW_GDIPLUS_END_ORDER; 135 136struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER 137{ 138 UINT32 flags; 139 UINT32 cacheType; 140 UINT32 cacheIndex; 141 UINT32 cbSize; 142 UINT32 cbTotalSize; 143 BYTE* emfRecords; 144}; 145typedef struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER DRAW_GDIPLUS_CACHE_FIRST_ORDER; 146 147struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER 148{ 149 UINT32 flags; 150 UINT32 cacheType; 151 UINT32 cacheIndex; 152 UINT32 cbSize; 153 BYTE* emfRecords; 154}; 155typedef struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER DRAW_GDIPLUS_CACHE_NEXT_ORDER; 156 157struct _DRAW_GDIPLUS_CACHE_END_ORDER 158{ 159 UINT32 flags; 160 UINT32 cacheType; 161 UINT32 cacheIndex; 162 UINT32 cbSize; 163 UINT32 cbTotalSize; 164 BYTE* emfRecords; 165}; 166typedef struct _DRAW_GDIPLUS_CACHE_END_ORDER DRAW_GDIPLUS_CACHE_END_ORDER; 167 168typedef BOOL (*pCreateOffscreenBitmap)( 169 rdpContext* context, const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap); 170typedef BOOL (*pSwitchSurface)(rdpContext* context, const SWITCH_SURFACE_ORDER* switch_surface); 171typedef BOOL (*pCreateNineGridBitmap)(rdpContext* context, 172 const CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap); 173typedef BOOL (*pFrameMarker)(rdpContext* context, const FRAME_MARKER_ORDER* frame_marker); 174typedef BOOL (*pStreamBitmapFirst)(rdpContext* context, 175 const STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first); 176typedef BOOL (*pStreamBitmapNext)(rdpContext* context, 177 const STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next); 178typedef BOOL (*pDrawGdiPlusFirst)(rdpContext* context, 179 const DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first); 180typedef BOOL (*pDrawGdiPlusNext)(rdpContext* context, 181 const DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next); 182typedef BOOL (*pDrawGdiPlusEnd)(rdpContext* context, 183 const DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end); 184typedef BOOL (*pDrawGdiPlusCacheFirst)( 185 rdpContext* context, const DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first); 186typedef BOOL (*pDrawGdiPlusCacheNext)(rdpContext* context, 187 const DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next); 188typedef BOOL (*pDrawGdiPlusCacheEnd)(rdpContext* context, 189 const DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end); 190typedef BOOL (*pDrawOrderInfo)(rdpContext* context, UINT8 orderType, const char* orderName); 191 192struct rdp_altsec_update 193{ 194 rdpContext* context; /* 0 */ 195 UINT32 paddingA[16 - 1]; /* 1 */ 196 197 pCreateOffscreenBitmap CreateOffscreenBitmap; /* 16 */ 198 pSwitchSurface SwitchSurface; /* 17 */ 199 pCreateNineGridBitmap CreateNineGridBitmap; /* 18 */ 200 pFrameMarker FrameMarker; /* 19 */ 201 pStreamBitmapFirst StreamBitmapFirst; /* 20 */ 202 pStreamBitmapNext StreamBitmapNext; /* 21 */ 203 pDrawGdiPlusFirst DrawGdiPlusFirst; /* 22 */ 204 pDrawGdiPlusNext DrawGdiPlusNext; /* 23 */ 205 pDrawGdiPlusEnd DrawGdiPlusEnd; /* 24 */ 206 pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst; /* 25 */ 207 pDrawGdiPlusCacheNext DrawGdiPlusCacheNext; /* 26 */ 208 pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd; /* 27 */ 209 /* Statistics callback */ 210 pDrawOrderInfo DrawOrderInfo; /* 28 */ 211 UINT32 paddingB[32 - 29]; /* 29 */ 212 213 /* internal */ 214 215 CREATE_OFFSCREEN_BITMAP_ORDER create_offscreen_bitmap; 216 SWITCH_SURFACE_ORDER switch_surface; 217 CREATE_NINE_GRID_BITMAP_ORDER create_nine_grid_bitmap; 218 FRAME_MARKER_ORDER frame_marker; 219 STREAM_BITMAP_FIRST_ORDER stream_bitmap_first; 220 STREAM_BITMAP_NEXT_ORDER stream_bitmap_next; 221 DRAW_GDIPLUS_CACHE_FIRST_ORDER draw_gdiplus_cache_first; 222 DRAW_GDIPLUS_CACHE_NEXT_ORDER draw_gdiplus_cache_next; 223 DRAW_GDIPLUS_CACHE_END_ORDER draw_gdiplus_cache_end; 224 DRAW_GDIPLUS_FIRST_ORDER draw_gdiplus_first; 225 DRAW_GDIPLUS_NEXT_ORDER draw_gdiplus_next; 226 DRAW_GDIPLUS_END_ORDER draw_gdiplus_end; 227}; 228typedef struct rdp_altsec_update rdpAltSecUpdate; 229 230#endif /* FREERDP_UPDATE_ALTSEC_H */