libfreerdp-core: add message callback registration
This commit is contained in:
parent
3c8c9aab62
commit
c14cf1e203
@ -83,9 +83,7 @@ struct rdp_context
|
||||
Used to keep this data available and used later on, typically just before connection initialization.
|
||||
@see freerdp_parse_args() */
|
||||
|
||||
void* queue; /**< (offset 18) asynchronous message queue */
|
||||
|
||||
UINT32 paddingB[32 - 19]; /* 19 */
|
||||
UINT32 paddingB[32 - 18]; /* 18 */
|
||||
|
||||
rdpRdp* rdp; /**< (offset 32)
|
||||
Pointer to a rdp_rdp structure used to keep the connection's parameters.
|
||||
@ -99,7 +97,10 @@ struct rdp_context
|
||||
rdpCache* cache; /* 35 */
|
||||
rdpChannels* channels; /* 36 */
|
||||
rdpGraphics* graphics; /* 37 */
|
||||
UINT32 paddingC[64 - 38]; /* 38 */
|
||||
rdpInput* input; /* 38 */
|
||||
rdpUpdate* update; /* 39 */
|
||||
rdpSettings* settings; /* 40 */
|
||||
UINT32 paddingC[64 - 41]; /* 41 */
|
||||
};
|
||||
|
||||
/** Defines the options for a given instance of RDP connection.
|
||||
|
@ -134,6 +134,9 @@ enum SURFCMD_FRAMEACTION
|
||||
SURFACECMD_FRAMEACTION_END = 0x0001
|
||||
};
|
||||
|
||||
/* defined inside libfreerdp-core */
|
||||
typedef struct rdp_message rdpMessage;
|
||||
|
||||
/* Update Interface */
|
||||
|
||||
typedef void (*pBeginPaint)(rdpContext* context);
|
||||
@ -201,6 +204,7 @@ struct rdp_update
|
||||
|
||||
HANDLE thread;
|
||||
BOOL asynchronous;
|
||||
rdpMessage* message;
|
||||
wMessageQueue* queue;
|
||||
};
|
||||
|
||||
|
@ -241,6 +241,10 @@ void freerdp_context_new(freerdp* instance)
|
||||
instance->context->instance = instance;
|
||||
instance->context->rdp = rdp;
|
||||
|
||||
instance->context->input = instance->input;
|
||||
instance->context->update = instance->update;
|
||||
instance->context->settings = instance->settings;
|
||||
|
||||
instance->update->context = instance->context;
|
||||
instance->update->pointer->context = instance->context;
|
||||
instance->update->primary->context = instance->context;
|
||||
|
@ -30,85 +30,85 @@
|
||||
|
||||
void message_BeginPaint(rdpContext* context)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, BeginPaint), NULL, NULL);
|
||||
}
|
||||
|
||||
void message_EndPaint(rdpContext* context)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, EndPaint), NULL, NULL);
|
||||
}
|
||||
|
||||
void message_SetBounds(rdpContext* context, rdpBounds* bounds)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SetBounds), (void*) bounds, NULL);
|
||||
}
|
||||
|
||||
void message_Synchronize(rdpContext* context)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, Synchronize), NULL, NULL);
|
||||
}
|
||||
|
||||
void message_DesktopResize(rdpContext* context)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, DesktopResize), NULL, NULL);
|
||||
}
|
||||
|
||||
void message_BitmapUpdate(rdpContext* context, BITMAP_UPDATE* bitmap)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, BitmapUpdate), (void*) bitmap, NULL);
|
||||
}
|
||||
|
||||
void message_Palette(rdpContext* context, PALETTE_UPDATE* palette)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, Palette), (void*) palette, NULL);
|
||||
}
|
||||
|
||||
void message_PlaySound(rdpContext* context, PLAY_SOUND_UPDATE* playSound)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, PlaySound), (void*) playSound, NULL);
|
||||
}
|
||||
|
||||
void message_RefreshRect(rdpContext* context, BYTE count, RECTANGLE_16* areas)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, RefreshRect), (void*) (size_t) count, (void*) areas);
|
||||
}
|
||||
|
||||
void message_SuppressOutput(rdpContext* context, BYTE allow, RECTANGLE_16* area)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SuppressOutput), (void*) (size_t) allow, (void*) area);
|
||||
}
|
||||
|
||||
void message_SurfaceCommand(rdpContext* context, STREAM* s)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SurfaceCommand), (void*) s, NULL);
|
||||
}
|
||||
|
||||
void message_SurfaceBits(rdpContext* context, SURFACE_BITS_COMMAND* surfaceBitsCommand)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SurfaceBits), (void*) surfaceBitsCommand, NULL);
|
||||
}
|
||||
|
||||
void message_SurfaceFrameMarker(rdpContext* context, SURFACE_FRAME_MARKER* surfaceFrameMarker)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SurfaceFrameMarker), (void*) surfaceFrameMarker, NULL);
|
||||
}
|
||||
|
||||
void message_SurfaceFrameAcknowledge(rdpContext* context, UINT32 frameId)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(Update, SurfaceFrameAcknowledge), (void*) (size_t) frameId, NULL);
|
||||
}
|
||||
|
||||
@ -116,133 +116,133 @@ void message_SurfaceFrameAcknowledge(rdpContext* context, UINT32 frameId)
|
||||
|
||||
void message_DstBlt(rdpContext* context, DSTBLT_ORDER* dstBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, DstBlt), (void*) dstBlt, NULL);
|
||||
}
|
||||
|
||||
void message_PatBlt(rdpContext* context, PATBLT_ORDER* patBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, PatBlt), (void*) patBlt, NULL);
|
||||
}
|
||||
|
||||
void message_ScrBlt(rdpContext* context, SCRBLT_ORDER* scrBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, ScrBlt), (void*) scrBlt, NULL);
|
||||
}
|
||||
|
||||
void message_OpaqueRect(rdpContext* context, OPAQUE_RECT_ORDER* opaqueRect)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, OpaqueRect), (void*) opaqueRect, NULL);
|
||||
}
|
||||
|
||||
void message_DrawNineGrid(rdpContext* context, DRAW_NINE_GRID_ORDER* drawNineGrid)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, DrawNineGrid), (void*) drawNineGrid, NULL);
|
||||
}
|
||||
|
||||
void message_MultiDstBlt(rdpContext* context, MULTI_DSTBLT_ORDER* multiDstBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MultiDstBlt), (void*) multiDstBlt, NULL);
|
||||
}
|
||||
|
||||
void message_MultiPatBlt(rdpContext* context, MULTI_PATBLT_ORDER* multiPatBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MultiPatBlt), (void*) multiPatBlt, NULL);
|
||||
}
|
||||
|
||||
void message_MultiScrBlt(rdpContext* context, MULTI_SCRBLT_ORDER* multiScrBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MultiScrBlt), (void*) multiScrBlt, NULL);
|
||||
}
|
||||
|
||||
void message_MultiOpaqueRect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multiOpaqueRect)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MultiOpaqueRect), (void*) multiOpaqueRect, NULL);
|
||||
}
|
||||
|
||||
void message_MultiDrawNineGrid(rdpContext* context, MULTI_DRAW_NINE_GRID_ORDER* multiDrawNineGrid)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MultiDrawNineGrid), (void*) multiDrawNineGrid, NULL);
|
||||
}
|
||||
|
||||
void message_LineTo(rdpContext* context, LINE_TO_ORDER* lineTo)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, LineTo), (void*) lineTo, NULL);
|
||||
}
|
||||
|
||||
void message_Polyline(rdpContext* context, POLYLINE_ORDER* polyline)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, Polyline), (void*) polyline, NULL);
|
||||
}
|
||||
|
||||
void message_MemBlt(rdpContext* context, MEMBLT_ORDER* memBlt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, MemBlt), (void*) memBlt, NULL);
|
||||
}
|
||||
|
||||
void message_Mem3Blt(rdpContext* context, MEM3BLT_ORDER* mem3Blt)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, Mem3Blt), (void*) mem3Blt, NULL);
|
||||
}
|
||||
|
||||
void message_SaveBitmap(rdpContext* context, SAVE_BITMAP_ORDER* saveBitmap)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, SaveBitmap), (void*) saveBitmap, NULL);
|
||||
}
|
||||
|
||||
void message_GlyphIndex(rdpContext* context, GLYPH_INDEX_ORDER* glyphIndex)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, GlyphIndex), (void*) glyphIndex, NULL);
|
||||
}
|
||||
|
||||
void message_FastIndex(rdpContext* context, FAST_INDEX_ORDER* fastIndex)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, FastIndex), (void*) fastIndex, NULL);
|
||||
}
|
||||
|
||||
void message_FastGlyph(rdpContext* context, FAST_GLYPH_ORDER* fastGlyph)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, FastGlyph), (void*) fastGlyph, NULL);
|
||||
}
|
||||
|
||||
void message_PolygonSC(rdpContext* context, POLYGON_SC_ORDER* polygonSC)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, PolygonSC), (void*) polygonSC, NULL);
|
||||
}
|
||||
|
||||
void message_PolygonCB(rdpContext* context, POLYGON_CB_ORDER* polygonCB)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, PolygonCB), (void*) polygonCB, NULL);
|
||||
}
|
||||
|
||||
void message_EllipseSC(rdpContext* context, ELLIPSE_SC_ORDER* ellipseSC)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, EllipseSC), (void*) ellipseSC, NULL);
|
||||
}
|
||||
|
||||
void message_EllipseCB(rdpContext* context, ELLIPSE_CB_ORDER* ellipseCB)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PrimaryUpdate, EllipseCB), (void*) ellipseCB, NULL);
|
||||
}
|
||||
|
||||
@ -250,43 +250,43 @@ void message_EllipseCB(rdpContext* context, ELLIPSE_CB_ORDER* ellipseCB)
|
||||
|
||||
void message_CacheBitmap(rdpContext* context, CACHE_BITMAP_ORDER* cacheBitmapOrder)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheBitmap), (void*) cacheBitmapOrder, NULL);
|
||||
}
|
||||
|
||||
void message_CacheBitmapV2(rdpContext* context, CACHE_BITMAP_V2_ORDER* cacheBitmapV2Order)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheBitmapV2), (void*) cacheBitmapV2Order, NULL);
|
||||
}
|
||||
|
||||
void message_CacheBitmapV3(rdpContext* context, CACHE_BITMAP_V3_ORDER* cacheBitmapV3Order)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheBitmapV3), (void*) cacheBitmapV3Order, NULL);
|
||||
}
|
||||
|
||||
void message_CacheColorTable(rdpContext* context, CACHE_COLOR_TABLE_ORDER* cacheColorTableOrder)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheColorTable), (void*) cacheColorTableOrder, NULL);
|
||||
}
|
||||
|
||||
void message_CacheGlyph(rdpContext* context, CACHE_GLYPH_ORDER* cacheGlyphOrder)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheGlyph), (void*) cacheGlyphOrder, NULL);
|
||||
}
|
||||
|
||||
void message_CacheGlyphV2(rdpContext* context, CACHE_GLYPH_V2_ORDER* cacheGlyphV2Order)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheGlyphV2), (void*) cacheGlyphV2Order, NULL);
|
||||
}
|
||||
|
||||
void message_CacheBrush(rdpContext* context, CACHE_BRUSH_ORDER* cacheBrushOrder)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(SecondaryUpdate, CacheBrush), (void*) cacheBrushOrder, NULL);
|
||||
}
|
||||
|
||||
@ -294,73 +294,73 @@ void message_CacheBrush(rdpContext* context, CACHE_BRUSH_ORDER* cacheBrushOrder)
|
||||
|
||||
void message_CreateOffscreenBitmap(rdpContext* context, CREATE_OFFSCREEN_BITMAP_ORDER* createOffscreenBitmap)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, CreateOffscreenBitmap), (void*) createOffscreenBitmap, NULL);
|
||||
}
|
||||
|
||||
void message_SwitchSurface(rdpContext* context, SWITCH_SURFACE_ORDER* switchSurface)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, SwitchSurface), (void*) switchSurface, NULL);
|
||||
}
|
||||
|
||||
void message_CreateNineGridBitmap(rdpContext* context, CREATE_NINE_GRID_BITMAP_ORDER* createNineGridBitmap)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, CreateNineGridBitmap), (void*) createNineGridBitmap, NULL);
|
||||
}
|
||||
|
||||
void message_FrameMarker(rdpContext* context, FRAME_MARKER_ORDER* frameMarker)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, FrameMarker), (void*) frameMarker, NULL);
|
||||
}
|
||||
|
||||
void message_StreamBitmapFirst(rdpContext* context, STREAM_BITMAP_FIRST_ORDER* streamBitmapFirst)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, StreamBitmapFirst), (void*) streamBitmapFirst, NULL);
|
||||
}
|
||||
|
||||
void message_StreamBitmapNext(rdpContext* context, STREAM_BITMAP_NEXT_ORDER* streamBitmapNext)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, StreamBitmapNext), (void*) streamBitmapNext, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusFirst(rdpContext* context, DRAW_GDIPLUS_FIRST_ORDER* drawGdiPlusFirst)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusFirst), (void*) drawGdiPlusFirst, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusNext(rdpContext* context, DRAW_GDIPLUS_NEXT_ORDER* drawGdiPlusNext)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusNext), (void*) drawGdiPlusNext, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusEnd(rdpContext* context, DRAW_GDIPLUS_END_ORDER* drawGdiPlusEnd)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusEnd), (void*) drawGdiPlusEnd, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusCacheFirst(rdpContext* context, DRAW_GDIPLUS_CACHE_FIRST_ORDER* drawGdiPlusCacheFirst)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusCacheFirst), (void*) drawGdiPlusCacheFirst, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusCacheNext(rdpContext* context, DRAW_GDIPLUS_CACHE_NEXT_ORDER* drawGdiPlusCacheNext)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusCacheNext), (void*) drawGdiPlusCacheNext, NULL);
|
||||
}
|
||||
|
||||
void message_DrawGdiPlusCacheEnd(rdpContext* context, DRAW_GDIPLUS_CACHE_END_ORDER* drawGdiplusCacheEnd)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(AltSecUpdate, DrawGdiPlusCacheEnd), (void*) drawGdiplusCacheEnd, NULL);
|
||||
}
|
||||
|
||||
@ -368,61 +368,61 @@ void message_DrawGdiPlusCacheEnd(rdpContext* context, DRAW_GDIPLUS_CACHE_END_ORD
|
||||
|
||||
void message_WindowCreate(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* windowState)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, WindowCreate), (void*) orderInfo, (void*) windowState);
|
||||
}
|
||||
|
||||
void message_WindowUpdate(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* windowState)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, WindowUpdate), (void*) orderInfo, (void*) windowState);
|
||||
}
|
||||
|
||||
void message_WindowIcon(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* windowIcon)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, WindowIcon), (void*) orderInfo, (void*) windowIcon);
|
||||
}
|
||||
|
||||
void message_WindowCachedIcon(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, WINDOW_CACHED_ICON_ORDER* windowCachedIcon)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, WindowCachedIcon), (void*) orderInfo, (void*) windowCachedIcon);
|
||||
}
|
||||
|
||||
void message_WindowDelete(rdpContext* context, WINDOW_ORDER_INFO* orderInfo)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, WindowDelete), (void*) orderInfo, NULL);
|
||||
}
|
||||
|
||||
void message_NotifyIconCreate(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, NotifyIconCreate), (void*) orderInfo, (void*) notifyIconState);
|
||||
}
|
||||
|
||||
void message_NotifyIconUpdate(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notifyIconState)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, NotifyIconUpdate), (void*) orderInfo, (void*) notifyIconState);
|
||||
}
|
||||
|
||||
void message_NotifyIconDelete(rdpContext* context, WINDOW_ORDER_INFO* orderInfo)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, NotifyIconDelete), (void*) orderInfo, NULL);
|
||||
}
|
||||
|
||||
void message_MonitoredDesktop(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, MONITORED_DESKTOP_ORDER* monitoredDesktop)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, MonitoredDesktop), (void*) orderInfo, (void*) monitoredDesktop);
|
||||
}
|
||||
|
||||
void message_NonMonitoredDesktop(rdpContext* context, WINDOW_ORDER_INFO* orderInfo)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(WindowUpdate, NonMonitoredDesktop), (void*) orderInfo, NULL);
|
||||
}
|
||||
|
||||
@ -430,34 +430,226 @@ void message_NonMonitoredDesktop(rdpContext* context, WINDOW_ORDER_INFO* orderIn
|
||||
|
||||
void message_PointerPosition(rdpContext* context, POINTER_POSITION_UPDATE* pointerPosition)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PointerUpdate, PointerPosition), (void*) pointerPosition, NULL);
|
||||
}
|
||||
|
||||
void message_PointerSystem(rdpContext* context, POINTER_SYSTEM_UPDATE* pointerSystem)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PointerUpdate, PointerSystem), (void*) pointerSystem, NULL);
|
||||
}
|
||||
|
||||
void message_PointerColor(rdpContext* context, POINTER_COLOR_UPDATE* pointerColor)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PointerUpdate, PointerColor), (void*) pointerColor, NULL);
|
||||
}
|
||||
|
||||
void message_PointerNew(rdpContext* context, POINTER_NEW_UPDATE* pointerNew)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PointerUpdate, PointerNew), (void*) pointerNew, NULL);
|
||||
}
|
||||
|
||||
void message_PointerCached(rdpContext* context, POINTER_CACHED_UPDATE* pointerCached)
|
||||
{
|
||||
MessageQueue_Post((wMessageQueue*) context->queue, (void*) context,
|
||||
MessageQueue_Post(context->update->queue, (void*) context,
|
||||
MakeMessageId(PointerUpdate, PointerCached), (void*) pointerCached, NULL);
|
||||
}
|
||||
|
||||
/* Message Queue */
|
||||
|
||||
void message_register_interface(rdpMessage* message, rdpUpdate* update)
|
||||
{
|
||||
rdpPrimaryUpdate* primary;
|
||||
rdpSecondaryUpdate* secondary;
|
||||
rdpAltSecUpdate* altsec;
|
||||
rdpWindowUpdate* window;
|
||||
rdpPointerUpdate* pointer;
|
||||
|
||||
primary = update->primary;
|
||||
secondary = update->secondary;
|
||||
altsec = update->altsec;
|
||||
window = update->window;
|
||||
pointer = update->pointer;
|
||||
|
||||
/* Update */
|
||||
|
||||
message->BeginPaint = update->BeginPaint;
|
||||
message->EndPaint = update->EndPaint;
|
||||
message->SetBounds = update->SetBounds;
|
||||
message->Synchronize = update->Synchronize;
|
||||
message->DesktopResize = update->DesktopResize;
|
||||
message->BitmapUpdate = update->BitmapUpdate;
|
||||
message->Palette = update->Palette;
|
||||
message->PlaySound = update->PlaySound;
|
||||
message->RefreshRect = update->RefreshRect;
|
||||
message->SuppressOutput = update->SuppressOutput;
|
||||
message->SurfaceCommand = update->SurfaceCommand;
|
||||
message->SurfaceBits = update->SurfaceBits;
|
||||
message->SurfaceFrameMarker = update->SurfaceFrameMarker;
|
||||
message->SurfaceFrameAcknowledge = update->SurfaceFrameAcknowledge;
|
||||
|
||||
update->BeginPaint = message->BeginPaint;
|
||||
update->EndPaint = message->EndPaint;
|
||||
update->SetBounds = message->SetBounds;
|
||||
update->Synchronize = message->Synchronize;
|
||||
update->DesktopResize = message->DesktopResize;
|
||||
update->BitmapUpdate = message->BitmapUpdate;
|
||||
update->Palette = message->Palette;
|
||||
update->PlaySound = message->PlaySound;
|
||||
update->RefreshRect = message->RefreshRect;
|
||||
update->SuppressOutput = message->SuppressOutput;
|
||||
update->SurfaceCommand = message->SurfaceCommand;
|
||||
update->SurfaceBits = message->SurfaceBits;
|
||||
update->SurfaceFrameMarker = message->SurfaceFrameMarker;
|
||||
update->SurfaceFrameAcknowledge = message->SurfaceFrameAcknowledge;
|
||||
|
||||
/* Primary Update */
|
||||
|
||||
message->DstBlt = primary->DstBlt;
|
||||
message->PatBlt = primary->PatBlt;
|
||||
message->ScrBlt = primary->ScrBlt;
|
||||
message->OpaqueRect = primary->OpaqueRect;
|
||||
message->DrawNineGrid = primary->DrawNineGrid;
|
||||
message->MultiDstBlt = primary->MultiDstBlt;
|
||||
message->MultiPatBlt = primary->MultiPatBlt;
|
||||
message->MultiScrBlt = primary->MultiScrBlt;
|
||||
message->MultiOpaqueRect = primary->MultiOpaqueRect;
|
||||
message->MultiDrawNineGrid = primary->MultiDrawNineGrid;
|
||||
message->LineTo = primary->LineTo;
|
||||
message->Polyline = primary->Polyline;
|
||||
message->MemBlt = primary->MemBlt;
|
||||
message->Mem3Blt = primary->Mem3Blt;
|
||||
message->SaveBitmap = primary->SaveBitmap;
|
||||
message->GlyphIndex = primary->GlyphIndex;
|
||||
message->FastIndex = primary->FastIndex;
|
||||
message->FastGlyph = primary->FastGlyph;
|
||||
message->PolygonSC = primary->PolygonSC;
|
||||
message->PolygonCB = primary->PolygonCB;
|
||||
message->EllipseSC = primary->EllipseSC;
|
||||
message->EllipseCB = primary->EllipseCB;
|
||||
|
||||
primary->DstBlt = message->DstBlt;
|
||||
primary->PatBlt = message->PatBlt;
|
||||
primary->ScrBlt = message->ScrBlt;
|
||||
primary->OpaqueRect = message->OpaqueRect;
|
||||
primary->DrawNineGrid = message->DrawNineGrid;
|
||||
primary->MultiDstBlt = message->MultiDstBlt;
|
||||
primary->MultiPatBlt = message->MultiPatBlt;
|
||||
primary->MultiScrBlt = message->MultiScrBlt;
|
||||
primary->MultiOpaqueRect = message->MultiOpaqueRect;
|
||||
primary->MultiDrawNineGrid = message->MultiDrawNineGrid;
|
||||
primary->LineTo = message->LineTo;
|
||||
primary->Polyline = message->Polyline;
|
||||
primary->MemBlt = message->MemBlt;
|
||||
primary->Mem3Blt = message->Mem3Blt;
|
||||
primary->SaveBitmap = message->SaveBitmap;
|
||||
primary->GlyphIndex = message->GlyphIndex;
|
||||
primary->FastIndex = message->FastIndex;
|
||||
primary->FastGlyph = message->FastGlyph;
|
||||
primary->PolygonSC = message->PolygonSC;
|
||||
primary->PolygonCB = message->PolygonCB;
|
||||
primary->EllipseSC = message->EllipseSC;
|
||||
primary->EllipseCB = message->EllipseCB;
|
||||
|
||||
/* Secondary Update */
|
||||
|
||||
message->CacheBitmap = secondary->CacheBitmap;
|
||||
message->CacheBitmapV2 = secondary->CacheBitmapV2;
|
||||
message->CacheBitmapV3 = secondary->CacheBitmapV3;
|
||||
message->CacheColorTable = secondary->CacheColorTable;
|
||||
message->CacheGlyph = secondary->CacheGlyph;
|
||||
message->CacheGlyphV2 = secondary->CacheGlyphV2;
|
||||
message->CacheBrush = secondary->CacheBrush;
|
||||
|
||||
secondary->CacheBitmap = message->CacheBitmap;
|
||||
secondary->CacheBitmapV2 = message->CacheBitmapV2;
|
||||
secondary->CacheBitmapV3 = message->CacheBitmapV3;
|
||||
secondary->CacheColorTable = message->CacheColorTable;
|
||||
secondary->CacheGlyph = message->CacheGlyph;
|
||||
secondary->CacheGlyphV2 = message->CacheGlyphV2;
|
||||
secondary->CacheBrush = message->CacheBrush;
|
||||
|
||||
/* Alternate Secondary Update */
|
||||
|
||||
message->CreateOffscreenBitmap = altsec->CreateOffscreenBitmap;
|
||||
message->SwitchSurface = altsec->SwitchSurface;
|
||||
message->CreateNineGridBitmap = altsec->CreateNineGridBitmap;
|
||||
message->FrameMarker = altsec->FrameMarker;
|
||||
message->StreamBitmapFirst = altsec->StreamBitmapFirst;
|
||||
message->DrawGdiPlusFirst = altsec->DrawGdiPlusFirst;
|
||||
message->DrawGdiPlusNext = altsec->DrawGdiPlusNext;
|
||||
message->DrawGdiPlusEnd = altsec->DrawGdiPlusEnd;
|
||||
message->DrawGdiPlusCacheFirst = altsec->DrawGdiPlusCacheFirst;
|
||||
message->DrawGdiPlusCacheNext = altsec->DrawGdiPlusCacheNext;
|
||||
message->DrawGdiPlusCacheEnd = altsec->DrawGdiPlusCacheEnd;
|
||||
|
||||
altsec->CreateOffscreenBitmap = message->CreateOffscreenBitmap;
|
||||
altsec->SwitchSurface = message->SwitchSurface;
|
||||
altsec->CreateNineGridBitmap = message->CreateNineGridBitmap;
|
||||
altsec->FrameMarker = message->FrameMarker;
|
||||
altsec->StreamBitmapFirst = message->StreamBitmapFirst;
|
||||
altsec->DrawGdiPlusFirst = message->DrawGdiPlusFirst;
|
||||
altsec->DrawGdiPlusNext = message->DrawGdiPlusNext;
|
||||
altsec->DrawGdiPlusEnd = message->DrawGdiPlusEnd;
|
||||
altsec->DrawGdiPlusCacheFirst = message->DrawGdiPlusCacheFirst;
|
||||
altsec->DrawGdiPlusCacheNext = message->DrawGdiPlusCacheNext;
|
||||
altsec->DrawGdiPlusCacheEnd = message->DrawGdiPlusCacheEnd;
|
||||
|
||||
/* Window Update */
|
||||
|
||||
message->WindowCreate = window->WindowCreate;
|
||||
message->WindowUpdate = window->WindowUpdate;
|
||||
message->WindowIcon = window->WindowIcon;
|
||||
message->WindowCachedIcon = window->WindowCachedIcon;
|
||||
message->WindowDelete = window->WindowDelete;
|
||||
message->NotifyIconCreate = window->NotifyIconCreate;
|
||||
message->NotifyIconUpdate = window->NotifyIconUpdate;
|
||||
message->NotifyIconDelete = window->NotifyIconDelete;
|
||||
message->MonitoredDesktop = window->MonitoredDesktop;
|
||||
message->NonMonitoredDesktop = window->NonMonitoredDesktop;
|
||||
|
||||
window->WindowCreate = message->WindowCreate;
|
||||
window->WindowUpdate = message->WindowUpdate;
|
||||
window->WindowIcon = message->WindowIcon;
|
||||
window->WindowCachedIcon = message->WindowCachedIcon;
|
||||
window->WindowDelete = message->WindowDelete;
|
||||
window->NotifyIconCreate = message->NotifyIconCreate;
|
||||
window->NotifyIconUpdate = message->NotifyIconUpdate;
|
||||
window->NotifyIconDelete = message->NotifyIconDelete;
|
||||
window->MonitoredDesktop = message->MonitoredDesktop;
|
||||
window->NonMonitoredDesktop = message->NonMonitoredDesktop;
|
||||
|
||||
/* Pointer Update */
|
||||
|
||||
message->PointerPosition = pointer->PointerPosition;
|
||||
message->PointerSystem = pointer->PointerSystem;
|
||||
message->PointerColor = pointer->PointerColor;
|
||||
message->PointerNew = pointer->PointerNew;
|
||||
message->PointerCached = pointer->PointerCached;
|
||||
|
||||
pointer->PointerPosition = message->PointerPosition;
|
||||
pointer->PointerSystem = message->PointerSystem;
|
||||
pointer->PointerColor = message->PointerColor;
|
||||
pointer->PointerNew = message->PointerNew;
|
||||
pointer->PointerCached = message->PointerCached;
|
||||
}
|
||||
|
||||
rdpMessage* message_new()
|
||||
{
|
||||
rdpMessage* message;
|
||||
|
||||
message = (rdpMessage*) malloc(sizeof(rdpMessage));
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
void message_free(rdpMessage* message)
|
||||
{
|
||||
if (message)
|
||||
{
|
||||
free(message);
|
||||
}
|
||||
}
|
||||
|
@ -129,4 +129,106 @@
|
||||
#define PointerUpdate_PointerNew 4
|
||||
#define PointerUpdate_PointerCached 5
|
||||
|
||||
/* Message Queue */
|
||||
|
||||
struct rdp_message
|
||||
{
|
||||
/* Update */
|
||||
|
||||
pBeginPaint BeginPaint;
|
||||
pEndPaint EndPaint;
|
||||
pSetBounds SetBounds;
|
||||
pSynchronize Synchronize;
|
||||
pDesktopResize DesktopResize;
|
||||
pBitmapUpdate BitmapUpdate;
|
||||
pPalette Palette;
|
||||
pPlaySound PlaySound;
|
||||
pRefreshRect RefreshRect;
|
||||
pSuppressOutput SuppressOutput;
|
||||
pSurfaceCommand SurfaceCommand;
|
||||
pSurfaceBits SurfaceBits;
|
||||
pSurfaceFrameMarker SurfaceFrameMarker;
|
||||
pSurfaceFrameAcknowledge SurfaceFrameAcknowledge;
|
||||
|
||||
/* Primary Update */
|
||||
|
||||
pDstBlt DstBlt;
|
||||
pPatBlt PatBlt;
|
||||
pScrBlt ScrBlt;
|
||||
pOpaqueRect OpaqueRect;
|
||||
pDrawNineGrid DrawNineGrid;
|
||||
pMultiDstBlt MultiDstBlt;
|
||||
pMultiPatBlt MultiPatBlt;
|
||||
pMultiScrBlt MultiScrBlt;
|
||||
pMultiOpaqueRect MultiOpaqueRect;
|
||||
pMultiDrawNineGrid MultiDrawNineGrid;
|
||||
pLineTo LineTo;
|
||||
pPolyline Polyline;
|
||||
pMemBlt MemBlt;
|
||||
pMem3Blt Mem3Blt;
|
||||
pSaveBitmap SaveBitmap;
|
||||
pGlyphIndex GlyphIndex;
|
||||
pFastIndex FastIndex;
|
||||
pFastGlyph FastGlyph;
|
||||
pPolygonSC PolygonSC;
|
||||
pPolygonCB PolygonCB;
|
||||
pEllipseSC EllipseSC;
|
||||
pEllipseCB EllipseCB;
|
||||
|
||||
/* Secondary Update */
|
||||
|
||||
pCacheBitmap CacheBitmap;
|
||||
pCacheBitmapV2 CacheBitmapV2;
|
||||
pCacheBitmapV3 CacheBitmapV3;
|
||||
pCacheColorTable CacheColorTable;
|
||||
pCacheGlyph CacheGlyph;
|
||||
pCacheGlyphV2 CacheGlyphV2;
|
||||
pCacheBrush CacheBrush;
|
||||
|
||||
/* Alternate Secondary Update */
|
||||
|
||||
pCreateOffscreenBitmap CreateOffscreenBitmap;
|
||||
pSwitchSurface SwitchSurface;
|
||||
pCreateNineGridBitmap CreateNineGridBitmap;
|
||||
pFrameMarker FrameMarker;
|
||||
pStreamBitmapFirst StreamBitmapFirst;
|
||||
pStreamBitmapNext StreamBitmapNext;
|
||||
pDrawGdiPlusFirst DrawGdiPlusFirst;
|
||||
pDrawGdiPlusNext DrawGdiPlusNext;
|
||||
pDrawGdiPlusEnd DrawGdiPlusEnd;
|
||||
pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst;
|
||||
pDrawGdiPlusCacheNext DrawGdiPlusCacheNext;
|
||||
pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd;
|
||||
|
||||
/* Window Update */
|
||||
|
||||
pWindowCreate WindowCreate;
|
||||
pWindowUpdate WindowUpdate;
|
||||
pWindowIcon WindowIcon;
|
||||
pWindowCachedIcon WindowCachedIcon;
|
||||
pWindowDelete WindowDelete;
|
||||
pNotifyIconCreate NotifyIconCreate;
|
||||
pNotifyIconUpdate NotifyIconUpdate;
|
||||
pNotifyIconDelete NotifyIconDelete;
|
||||
pMonitoredDesktop MonitoredDesktop;
|
||||
pNonMonitoredDesktop NonMonitoredDesktop;
|
||||
|
||||
/* Pointer Update */
|
||||
|
||||
pPointerPosition PointerPosition;
|
||||
pPointerSystem PointerSystem;
|
||||
pPointerColor PointerColor;
|
||||
pPointerNew PointerNew;
|
||||
pPointerCached PointerCached;
|
||||
|
||||
/* Internal */
|
||||
|
||||
rdpUpdate* update;
|
||||
};
|
||||
|
||||
void message_register_interface(rdpMessage* message, rdpUpdate* update);
|
||||
|
||||
rdpMessage* message_new();
|
||||
void message_free(rdpMessage* message);
|
||||
|
||||
#endif /* FREERDP_CORE_MESSAGE_PRIVATE_H */
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "update.h"
|
||||
#include "surface.h"
|
||||
#include "message.h"
|
||||
|
||||
#include <freerdp/peer.h>
|
||||
#include <freerdp/codec/bitmap.h>
|
||||
@ -754,7 +755,7 @@ rdpUpdate* update_new(rdpRdp* rdp)
|
||||
if (update->asynchronous)
|
||||
{
|
||||
update->queue = MessageQueue_New();
|
||||
update->context->queue = (void*) update->queue;
|
||||
update->message = message_new();
|
||||
update->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) update_thread, update, 0, NULL);
|
||||
}
|
||||
}
|
||||
@ -783,6 +784,7 @@ void update_free(rdpUpdate* update)
|
||||
if (update->asynchronous)
|
||||
{
|
||||
CloseHandle(update->thread);
|
||||
message_free(update->message);
|
||||
MessageQueue_Free(update->queue);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user