2 * FreeRDP: A Remote Desktop Protocol Client
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_API_H
21 #define __UPDATE_API_H
23 typedef struct rdp_update rdpUpdate;
25 #include <freerdp/rail.h>
26 #include <freerdp/types.h>
27 #include <freerdp/freerdp.h>
28 #include <freerdp/graphics.h>
29 #include <freerdp/utils/pcap.h>
30 #include <freerdp/utils/stream.h>
32 #include <freerdp/primary.h>
33 #include <freerdp/secondary.h>
34 #include <freerdp/altsec.h>
35 #include <freerdp/window.h>
36 #include <freerdp/pointer.h>
51 uint32 cbCompFirstRowSize;
52 uint32 cbCompMainBodySize;
54 uint32 cbUncompressedSize;
55 uint8* bitmapDataStream;
58 typedef struct _BITMAP_DATA BITMAP_DATA;
64 BITMAP_DATA* rectangles;
66 typedef struct _BITMAP_UPDATE BITMAP_UPDATE;
76 typedef struct _PALETTE_ENTRY PALETTE_ENTRY;
78 struct _PALETTE_UPDATE
81 PALETTE_ENTRY entries[256];
83 typedef struct _PALETTE_UPDATE PALETTE_UPDATE;
88 PALETTE_ENTRY* entries;
90 typedef struct rdp_palette rdpPalette;
92 /* Play Sound (System Beep) Updates */
94 struct _PLAY_SOUND_UPDATE
99 typedef struct _PLAY_SOUND_UPDATE PLAY_SOUND_UPDATE;
101 /* Surface Command Updates */
103 struct _SURFACE_BITS_COMMAND
114 uint32 bitmapDataLength;
117 typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND;
119 struct _SURFACE_FRAME_MARKER
124 typedef struct _SURFACE_FRAME_MARKER SURFACE_FRAME_MARKER;
126 /* Update Interface */
128 typedef void (*pBeginPaint)(rdpContext* context);
129 typedef void (*pEndPaint)(rdpContext* context);
130 typedef void (*pSetBounds)(rdpContext* context, rdpBounds* bounds);
132 typedef void (*pSynchronize)(rdpContext* context);
133 typedef void (*pDesktopResize)(rdpContext* context);
134 typedef void (*pBitmapUpdate)(rdpContext* context, BITMAP_UPDATE* bitmap);
135 typedef void (*pPalette)(rdpContext* context, PALETTE_UPDATE* palette);
136 typedef void (*pPlaySound)(rdpContext* context, PLAY_SOUND_UPDATE* play_sound);
138 typedef void (*pRefreshRect)(rdpContext* context, uint8 count, RECTANGLE_16* areas);
139 typedef void (*pSuppressOutput)(rdpContext* context, uint8 allow, RECTANGLE_16* area);
141 typedef void (*pSurfaceCommand)(rdpContext* context, STREAM* s);
142 typedef void (*pSurfaceBits)(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command);
143 typedef void (*pSurfaceFrameMarker)(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker);
147 rdpContext* context; /* 0 */
148 uint32 paddingA[16 - 1]; /* 1 */
150 pBeginPaint BeginPaint; /* 16 */
151 pEndPaint EndPaint; /* 17 */
152 pSetBounds SetBounds; /* 18 */
153 pSynchronize Synchronize; /* 19 */
154 pDesktopResize DesktopResize; /* 20 */
155 pBitmapUpdate BitmapUpdate; /* 21 */
156 pPalette Palette; /* 22 */
157 pPlaySound PlaySound; /* 23 */
158 uint32 paddingB[32 - 24]; /* 24 */
160 rdpPointerUpdate* pointer; /* 32 */
161 rdpPrimaryUpdate* primary; /* 33 */
162 rdpSecondaryUpdate* secondary; /* 34 */
163 rdpAltSecUpdate* altsec; /* 35 */
164 rdpWindowUpdate* window; /* 36 */
165 uint32 paddingC[48 - 37]; /* 37 */
167 pRefreshRect RefreshRect; /* 48 */
168 pSuppressOutput SuppressOutput; /* 49 */
169 uint32 paddingD[64 - 50]; /* 50 */
171 pSurfaceCommand SurfaceCommand; /* 64 */
172 pSurfaceBits SurfaceBits; /* 65 */
173 pSurfaceFrameMarker SurfaceFrameMarker; /* 66 */
174 uint32 paddingE[80 - 67]; /* 67 */
182 BITMAP_UPDATE bitmap_update;
183 PALETTE_UPDATE palette_update;
184 PLAY_SOUND_UPDATE play_sound;
186 SURFACE_BITS_COMMAND surface_bits_command;
187 SURFACE_FRAME_MARKER surface_frame_marker;
190 #endif /* __UPDATE_API_H */