Merge pull request #10616 from hardening/rail_text_scale

rails: add missing functions client implementation
This commit is contained in:
akallabeth 2024-09-16 19:56:30 +02:00 committed by GitHub
commit 6c88d89566
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 56 additions and 0 deletions

View File

@ -498,6 +498,24 @@ static UINT rail_client_snap_arrange(RailClientContext* context, const RAIL_SNAP
return rail_send_client_snap_arrange_order(rail, snap);
}
static UINT rail_client_text_scale(RailClientContext* context, UINT32 textScale)
{
if (!context || !context->handle)
return ERROR_INVALID_PARAMETER;
railPlugin* rail = (railPlugin*)context->handle;
return rail_send_client_text_scale_order(rail, textScale);
}
static UINT rail_client_caret_blink_rate(RailClientContext* context, UINT32 rate)
{
if (!context || !context->handle)
return ERROR_INVALID_PARAMETER;
railPlugin* rail = (railPlugin*)context->handle;
return rail_send_client_caret_blink_rate_order(rail, rate);
}
static VOID VCAPITYPE rail_virtual_channel_open_event_ex(LPVOID lpUserParam, DWORD openHandle,
UINT event, LPVOID pData,
UINT32 dataLength, UINT32 totalLength,
@ -707,6 +725,8 @@ FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS p
context->ClientSnapArrange = rail_client_snap_arrange;
context->ClientCloak = rail_client_cloak;
context->ClientCompartmentInfo = rail_client_compartment_info;
context->ClientTextScale = rail_client_text_scale;
context->ClientCaretBlinkRate = rail_client_caret_blink_rate;
rail->rdpcontext = pEntryPointsEx->context;
rail->context = context;
isFreerdp = TRUE;

View File

@ -1573,3 +1573,37 @@ UINT rail_send_client_snap_arrange_order(railPlugin* rail, const RAIL_SNAP_ARRAN
Stream_Write_INT16(s, snap->bottom);
return rail_send_pdu(rail, s, TS_RAIL_ORDER_SNAP_ARRANGE);
}
UINT rail_send_client_text_scale_order(railPlugin* rail, UINT32 textScale)
{
if (!rail)
return ERROR_INVALID_PARAMETER;
wStream* s = rail_pdu_init(4);
if (!s)
{
WLog_ERR(TAG, "rail_pdu_init failed!");
return CHANNEL_RC_NO_MEMORY;
}
Stream_Write_UINT32(s, textScale);
return rail_send_pdu(rail, s, TS_RAIL_ORDER_TEXTSCALEINFO);
}
UINT rail_send_client_caret_blink_rate_order(railPlugin* rail, UINT32 rate)
{
if (!rail)
return ERROR_INVALID_PARAMETER;
wStream* s = rail_pdu_init(4);
if (!s)
{
WLog_ERR(TAG, "rail_pdu_init failed!");
return CHANNEL_RC_NO_MEMORY;
}
Stream_Write_UINT32(s, rate);
return rail_send_pdu(rail, s, TS_RAIL_ORDER_CARETBLINKINFO);
}

View File

@ -56,5 +56,7 @@ UINT rail_send_client_cloak_order(railPlugin* rail, const RAIL_CLOAK* cloak);
UINT rail_send_client_snap_arrange_order(railPlugin* rail, const RAIL_SNAP_ARRANGE* snap);
UINT rail_send_client_compartment_info_order(railPlugin* rail,
const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
UINT rail_send_client_text_scale_order(railPlugin* rail, UINT32 textScale);
UINT rail_send_client_caret_blink_rate_order(railPlugin* rail, UINT32 rate);
#endif /* FREERDP_CHANNEL_RAIL_CLIENT_ORDERS_H */