2011-07-28 08:38:25 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
* Update 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UPDATE_API_H
|
|
|
|
#define __UPDATE_API_H
|
|
|
|
|
2011-10-16 08:50:10 +04:00
|
|
|
typedef struct rdp_update rdpUpdate;
|
|
|
|
|
2011-08-10 10:24:06 +04:00
|
|
|
#include <freerdp/rail.h>
|
2011-07-28 08:38:25 +04:00
|
|
|
#include <freerdp/types.h>
|
2011-10-16 08:50:10 +04:00
|
|
|
#include <freerdp/freerdp.h>
|
2011-10-21 01:28:59 +04:00
|
|
|
#include <freerdp/graphics.h>
|
2011-08-27 04:26:40 +04:00
|
|
|
#include <freerdp/utils/pcap.h>
|
2011-08-27 05:44:37 +04:00
|
|
|
#include <freerdp/utils/stream.h>
|
2011-07-28 08:38:25 +04:00
|
|
|
|
2011-11-22 01:44:50 +04:00
|
|
|
#include <freerdp/primary.h>
|
|
|
|
#include <freerdp/secondary.h>
|
|
|
|
#include <freerdp/altsec.h>
|
|
|
|
#include <freerdp/window.h>
|
|
|
|
#include <freerdp/pointer.h>
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2011-07-28 08:38:25 +04:00
|
|
|
/* Bitmap Updates */
|
|
|
|
|
2011-10-21 01:28:59 +04:00
|
|
|
struct _BITMAP_DATA
|
2011-07-28 08:38:25 +04:00
|
|
|
{
|
2011-11-22 07:11:31 +04:00
|
|
|
uint32 destLeft;
|
|
|
|
uint32 destTop;
|
|
|
|
uint32 destRight;
|
|
|
|
uint32 destBottom;
|
|
|
|
uint32 width;
|
|
|
|
uint32 height;
|
|
|
|
uint32 bitsPerPixel;
|
|
|
|
uint32 flags;
|
|
|
|
uint32 bitmapLength;
|
2011-10-21 01:28:59 +04:00
|
|
|
uint8 bitmapComprHdr[8];
|
|
|
|
uint8* bitmapDataStream;
|
2011-10-03 07:09:13 +04:00
|
|
|
boolean compressed;
|
2011-08-04 11:23:53 +04:00
|
|
|
};
|
2011-10-21 01:28:59 +04:00
|
|
|
typedef struct _BITMAP_DATA BITMAP_DATA;
|
2011-07-28 08:38:25 +04:00
|
|
|
|
2011-08-04 11:23:53 +04:00
|
|
|
struct _BITMAP_UPDATE
|
2011-07-28 08:38:25 +04:00
|
|
|
{
|
2011-11-22 07:11:31 +04:00
|
|
|
uint32 count;
|
|
|
|
uint32 number;
|
2011-10-21 05:34:55 +04:00
|
|
|
BITMAP_DATA* rectangles;
|
2011-08-04 11:23:53 +04:00
|
|
|
};
|
|
|
|
typedef struct _BITMAP_UPDATE BITMAP_UPDATE;
|
2011-07-28 08:38:25 +04:00
|
|
|
|
|
|
|
/* Palette Updates */
|
|
|
|
|
2011-10-21 20:17:04 +04:00
|
|
|
struct _PALETTE_ENTRY
|
|
|
|
{
|
|
|
|
uint8 red;
|
|
|
|
uint8 green;
|
|
|
|
uint8 blue;
|
|
|
|
};
|
|
|
|
typedef struct _PALETTE_ENTRY PALETTE_ENTRY;
|
|
|
|
|
2011-08-04 11:23:53 +04:00
|
|
|
struct _PALETTE_UPDATE
|
2011-07-28 08:38:25 +04:00
|
|
|
{
|
|
|
|
uint32 number;
|
2011-10-21 20:17:04 +04:00
|
|
|
PALETTE_ENTRY entries[256];
|
2011-08-04 11:23:53 +04:00
|
|
|
};
|
|
|
|
typedef struct _PALETTE_UPDATE PALETTE_UPDATE;
|
2011-07-28 08:38:25 +04:00
|
|
|
|
2011-10-21 20:17:04 +04:00
|
|
|
struct rdp_palette
|
|
|
|
{
|
2011-11-22 07:11:31 +04:00
|
|
|
uint32 count;
|
2011-10-21 20:17:04 +04:00
|
|
|
PALETTE_ENTRY* entries;
|
|
|
|
};
|
|
|
|
typedef struct rdp_palette rdpPalette;
|
|
|
|
|
2011-08-24 10:54:46 +04:00
|
|
|
/* Play Sound (System Beep) Updates */
|
|
|
|
|
|
|
|
struct _PLAY_SOUND_UPDATE
|
|
|
|
{
|
|
|
|
uint32 duration;
|
|
|
|
uint32 frequency;
|
|
|
|
};
|
|
|
|
typedef struct _PLAY_SOUND_UPDATE PLAY_SOUND_UPDATE;
|
|
|
|
|
2011-11-22 01:44:50 +04:00
|
|
|
/* Surface Command Updates */
|
2011-08-09 11:01:40 +04:00
|
|
|
|
2011-08-09 20:38:52 +04:00
|
|
|
struct _SURFACE_BITS_COMMAND
|
|
|
|
{
|
2011-11-22 07:11:31 +04:00
|
|
|
uint32 cmdType;
|
|
|
|
uint32 destLeft;
|
|
|
|
uint32 destTop;
|
|
|
|
uint32 destRight;
|
|
|
|
uint32 destBottom;
|
|
|
|
uint32 bpp;
|
|
|
|
uint32 codecID;
|
|
|
|
uint32 width;
|
|
|
|
uint32 height;
|
2011-08-09 20:38:52 +04:00
|
|
|
uint32 bitmapDataLength;
|
2011-08-10 06:48:17 +04:00
|
|
|
uint8* bitmapData;
|
2011-08-09 20:38:52 +04:00
|
|
|
};
|
|
|
|
typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND;
|
|
|
|
|
2011-11-25 20:30:15 +04:00
|
|
|
struct _SURFACE_FRAME_MARKER
|
|
|
|
{
|
|
|
|
uint32 frameAction;
|
|
|
|
uint32 frameId;
|
|
|
|
};
|
|
|
|
typedef struct _SURFACE_FRAME_MARKER SURFACE_FRAME_MARKER;
|
|
|
|
|
2011-07-28 08:38:25 +04:00
|
|
|
/* Update Interface */
|
|
|
|
|
2011-11-22 04:41:49 +04:00
|
|
|
typedef void (*pBeginPaint)(rdpContext* context);
|
|
|
|
typedef void (*pEndPaint)(rdpContext* context);
|
|
|
|
typedef void (*pSetBounds)(rdpContext* context, rdpBounds* bounds);
|
2011-10-21 07:15:18 +04:00
|
|
|
|
2011-11-22 04:41:49 +04:00
|
|
|
typedef void (*pSynchronize)(rdpContext* context);
|
|
|
|
typedef void (*pDesktopResize)(rdpContext* context);
|
|
|
|
typedef void (*pBitmapUpdate)(rdpContext* context, BITMAP_UPDATE* bitmap);
|
|
|
|
typedef void (*pPalette)(rdpContext* context, PALETTE_UPDATE* palette);
|
|
|
|
typedef void (*pPlaySound)(rdpContext* context, PLAY_SOUND_UPDATE* play_sound);
|
2011-11-11 23:02:59 +04:00
|
|
|
|
2011-11-22 04:41:49 +04:00
|
|
|
typedef void (*pRefreshRect)(rdpContext* context, uint8 count, RECTANGLE_16* areas);
|
|
|
|
typedef void (*pSuppressOutput)(rdpContext* context, uint8 allow, RECTANGLE_16* area);
|
|
|
|
|
|
|
|
typedef void (*pSurfaceCommand)(rdpContext* context, STREAM* s);
|
|
|
|
typedef void (*pSurfaceBits)(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command);
|
2011-11-25 20:30:15 +04:00
|
|
|
typedef void (*pSurfaceFrameMarker)(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker);
|
2011-08-09 20:38:52 +04:00
|
|
|
|
2011-07-28 08:38:25 +04:00
|
|
|
struct rdp_update
|
|
|
|
{
|
2011-11-20 23:25:59 +04:00
|
|
|
rdpContext* context; /* 0 */
|
|
|
|
uint32 paddingA[16 - 1]; /* 1 */
|
|
|
|
|
|
|
|
pBeginPaint BeginPaint; /* 16 */
|
|
|
|
pEndPaint EndPaint; /* 17 */
|
|
|
|
pSetBounds SetBounds; /* 18 */
|
|
|
|
pSynchronize Synchronize; /* 19 */
|
|
|
|
pDesktopResize DesktopResize; /* 20 */
|
|
|
|
pBitmapUpdate BitmapUpdate; /* 21 */
|
|
|
|
pPalette Palette; /* 22 */
|
|
|
|
pPlaySound PlaySound; /* 23 */
|
|
|
|
uint32 paddingB[32 - 24]; /* 24 */
|
|
|
|
|
2011-11-22 02:48:03 +04:00
|
|
|
rdpPointerUpdate* pointer; /* 32 */
|
2011-11-22 04:41:49 +04:00
|
|
|
rdpPrimaryUpdate* primary; /* 33 */
|
|
|
|
rdpSecondaryUpdate* secondary; /* 34 */
|
2011-11-22 04:53:38 +04:00
|
|
|
rdpAltSecUpdate* altsec; /* 35 */
|
2011-11-22 06:07:03 +04:00
|
|
|
rdpWindowUpdate* window; /* 36 */
|
|
|
|
uint32 paddingC[48 - 37]; /* 37 */
|
2011-11-22 04:41:49 +04:00
|
|
|
|
2011-11-22 06:07:03 +04:00
|
|
|
pRefreshRect RefreshRect; /* 48 */
|
|
|
|
pSuppressOutput SuppressOutput; /* 49 */
|
|
|
|
uint32 paddingD[64 - 50]; /* 50 */
|
2011-11-22 04:41:49 +04:00
|
|
|
|
2011-11-22 06:07:03 +04:00
|
|
|
pSurfaceCommand SurfaceCommand; /* 64 */
|
|
|
|
pSurfaceBits SurfaceBits; /* 65 */
|
2011-11-25 14:48:51 +04:00
|
|
|
pSurfaceFrameMarker SurfaceFrameMarker; /* 66 */
|
|
|
|
uint32 paddingE[80 - 67]; /* 67 */
|
2011-11-22 04:41:49 +04:00
|
|
|
|
|
|
|
/* internal */
|
2011-10-17 05:02:28 +04:00
|
|
|
|
|
|
|
boolean dump_rfx;
|
|
|
|
boolean play_rfx;
|
|
|
|
rdpPcap* pcap_rfx;
|
|
|
|
|
2011-07-28 08:38:25 +04:00
|
|
|
BITMAP_UPDATE bitmap_update;
|
|
|
|
PALETTE_UPDATE palette_update;
|
2011-08-24 10:54:46 +04:00
|
|
|
PLAY_SOUND_UPDATE play_sound;
|
2011-11-22 01:44:50 +04:00
|
|
|
|
2011-08-09 20:38:52 +04:00
|
|
|
SURFACE_BITS_COMMAND surface_bits_command;
|
2011-11-25 20:30:15 +04:00
|
|
|
SURFACE_FRAME_MARKER surface_frame_marker;
|
2011-07-28 08:38:25 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __UPDATE_API_H */
|
|
|
|
|