GUACAMOLE-249: Correct prototypes of GDI handlers.

This commit is contained in:
Michael Jumper 2019-09-22 11:16:55 -07:00
parent fbfbaff540
commit 82664b4e6b
2 changed files with 32 additions and 28 deletions

View File

@ -92,7 +92,7 @@ guac_transfer_function guac_rdp_rop3_transfer_function(guac_client* client,
} }
void guac_rdp_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt) { BOOL guac_rdp_gdi_dstblt(rdpContext* context, const DSTBLT_ORDER* dstblt) {
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface; guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface;
@ -135,9 +135,11 @@ void guac_rdp_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt) {
} }
return TRUE;
} }
void guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { BOOL guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) {
/* /*
* Note that this is not a full implementation of PATBLT. This is a * Note that this is not a full implementation of PATBLT. This is a
@ -203,9 +205,11 @@ void guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) {
} }
return TRUE;
} }
void guac_rdp_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) { BOOL guac_rdp_gdi_scrblt(rdpContext* context, const SCRBLT_ORDER* scrblt) {
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface; guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface;
@ -224,9 +228,11 @@ void guac_rdp_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) {
guac_common_surface_copy(rdp_client->display->default_surface, guac_common_surface_copy(rdp_client->display->default_surface,
x_src, y_src, w, h, current_surface, x, y); x_src, y_src, w, h, current_surface, x, y);
return TRUE;
} }
void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) { BOOL guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface; guac_common_surface* current_surface = ((guac_rdp_client*) client->data)->current_surface;
@ -316,9 +322,11 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
} }
return TRUE;
} }
void guac_rdp_gdi_opaquerect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) { BOOL guac_rdp_gdi_opaquerect(rdpContext* context, const OPAQUE_RECT_ORDER* opaque_rect) {
/* Get client data */ /* Get client data */
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
@ -338,9 +346,11 @@ void guac_rdp_gdi_opaquerect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect
(color ) & 0xFF, (color ) & 0xFF,
0xFF); 0xFF);
return TRUE;
} }
void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds) { BOOL guac_rdp_gdi_set_bounds(rdpContext* context, const rdpBounds* bounds) {
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
@ -356,13 +366,16 @@ void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds) {
bounds->right - bounds->left + 1, bounds->right - bounds->left + 1,
bounds->bottom - bounds->top + 1); bounds->bottom - bounds->top + 1);
return TRUE;
} }
void guac_rdp_gdi_end_paint(rdpContext* context) { BOOL guac_rdp_gdi_end_paint(rdpContext* context) {
/* IGNORE */ /* IGNORE */
return TRUE;
} }
void guac_rdp_gdi_desktop_resize(rdpContext* context) { BOOL guac_rdp_gdi_desktop_resize(rdpContext* context) {
guac_client* client = ((rdp_freerdp_context*) context)->client; guac_client* client = ((rdp_freerdp_context*) context)->client;
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
@ -377,6 +390,8 @@ void guac_rdp_gdi_desktop_resize(rdpContext* context) {
guac_rdp_get_width(context->instance), guac_rdp_get_width(context->instance),
guac_rdp_get_height(context->instance)); guac_rdp_get_height(context->instance));
return TRUE;
} }

View File

@ -54,7 +54,7 @@ guac_composite_mode guac_rdp_rop3_transfer_function(guac_client* client,
* @param dstblt * @param dstblt
* The DSTBLT update to handle. * The DSTBLT update to handle.
*/ */
void guac_rdp_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt); BOOL guac_rdp_gdi_dstblt(rdpContext* context, const DSTBLT_ORDER* dstblt);
/** /**
* Handler for RDP PATBLT update. * Handler for RDP PATBLT update.
@ -65,7 +65,7 @@ void guac_rdp_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt);
* @param patblt * @param patblt
* The PATBLT update to handle. * The PATBLT update to handle.
*/ */
void guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt); BOOL guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt);
/** /**
* Handler for RDP SCRBLT update. * Handler for RDP SCRBLT update.
@ -76,7 +76,7 @@ void guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt);
* @param scrblt * @param scrblt
* The SCRBLT update to handle. * The SCRBLT update to handle.
*/ */
void guac_rdp_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt); BOOL guac_rdp_gdi_scrblt(rdpContext* context, const SCRBLT_ORDER* scrblt);
/** /**
* Handler for RDP MEMBLT update. * Handler for RDP MEMBLT update.
@ -87,7 +87,7 @@ void guac_rdp_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt);
* @param memblt * @param memblt
* The MEMBLT update to handle. * The MEMBLT update to handle.
*/ */
void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt); BOOL guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt);
/** /**
* Handler for RDP OPAQUE RECT update. * Handler for RDP OPAQUE RECT update.
@ -98,19 +98,8 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt);
* @param opaque_rect * @param opaque_rect
* The OPAQUE RECT update to handle. * The OPAQUE RECT update to handle.
*/ */
void guac_rdp_gdi_opaquerect(rdpContext* context, BOOL guac_rdp_gdi_opaquerect(rdpContext* context,
OPAQUE_RECT_ORDER* opaque_rect); const OPAQUE_RECT_ORDER* opaque_rect);
/**
* Handler called when the remote color palette is changing.
*
* @param context
* The rdpContext associated with the current RDP session.
*
* @param palette
* The PALETTE update containing the new palette.
*/
void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette);
/** /**
* Handler called prior to calling the handlers for specific updates when * Handler called prior to calling the handlers for specific updates when
@ -125,7 +114,7 @@ void guac_rdp_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette);
* The clipping rectangle to set, or NULL to remove any applied clipping * The clipping rectangle to set, or NULL to remove any applied clipping
* rectangle. * rectangle.
*/ */
void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds); BOOL guac_rdp_gdi_set_bounds(rdpContext* context, const rdpBounds* bounds);
/** /**
* Handler called when a paint operation is complete. We don't actually * Handler called when a paint operation is complete. We don't actually
@ -134,7 +123,7 @@ void guac_rdp_gdi_set_bounds(rdpContext* context, rdpBounds* bounds);
* @param context * @param context
* The rdpContext associated with the current RDP session. * The rdpContext associated with the current RDP session.
*/ */
void guac_rdp_gdi_end_paint(rdpContext* context); BOOL guac_rdp_gdi_end_paint(rdpContext* context);
/** /**
* Handler called when the desktop dimensions change, either from a * Handler called when the desktop dimensions change, either from a
@ -148,6 +137,6 @@ void guac_rdp_gdi_end_paint(rdpContext* context);
* @param context * @param context
* The rdpContext associated with the current RDP session. * The rdpContext associated with the current RDP session.
*/ */
void guac_rdp_gdi_desktop_resize(rdpContext* context); BOOL guac_rdp_gdi_desktop_resize(rdpContext* context);
#endif #endif