Added new rail orders textscaleinfo and caretblinkrate
This commit is contained in:
parent
291458d2d5
commit
ea0035b474
@ -870,6 +870,73 @@ static UINT rail_recv_get_application_id_extended_response_order(railPlugin* rai
|
||||
return error;
|
||||
}
|
||||
|
||||
static UINT rail_read_textscaleinfo_order(wStream* s, UINT32* pTextScaleFactor)
|
||||
{
|
||||
WINPR_ASSERT(pTextScaleFactor);
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, 4))
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
Stream_Read_UINT32(s, *pTextScaleFactor);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
static UINT rail_recv_textscaleinfo_order(railPlugin* rail, wStream* s)
|
||||
{
|
||||
RailClientContext* context = rail_get_client_interface(rail);
|
||||
UINT32 TextScaleFactor = 0;
|
||||
UINT error;
|
||||
|
||||
if (!context)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if ((error = rail_read_textscaleinfo_order(s, &TextScaleFactor)))
|
||||
return error;
|
||||
|
||||
if (context->custom)
|
||||
{
|
||||
IFCALLRET(context->ClientTextScale, error, context, TextScaleFactor);
|
||||
|
||||
if (error)
|
||||
WLog_ERR(TAG, "context.ClientTextScale failed with error %" PRIu32 "", error);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
static UINT rail_read_caretblinkinfo_order(wStream* s, UINT32* pCaretBlinkRate)
|
||||
{
|
||||
WINPR_ASSERT(pCaretBlinkRate);
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, 4))
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
Stream_Read_UINT32(s, *pCaretBlinkRate);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
static UINT rail_recv_caretblinkinfo_order(railPlugin* rail, wStream* s)
|
||||
{
|
||||
RailClientContext* context = rail_get_client_interface(rail);
|
||||
UINT32 CaretBlinkRate = 0;
|
||||
UINT error;
|
||||
|
||||
if (!context)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
if ((error = rail_read_caretblinkinfo_order(s, &CaretBlinkRate)))
|
||||
return error;
|
||||
|
||||
if (context->custom)
|
||||
{
|
||||
IFCALLRET(context->ClientCaretBlinkRate, error, context, CaretBlinkRate);
|
||||
|
||||
if (error)
|
||||
WLog_ERR(TAG, "context.ClientCaretBlinkRate failed with error %" PRIu32 "", error);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function description
|
||||
*
|
||||
@ -949,6 +1016,14 @@ UINT rail_order_recv(LPVOID userdata, wStream* s)
|
||||
error = rail_recv_get_application_id_extended_response_order(rail, s);
|
||||
break;
|
||||
|
||||
case TS_RAIL_ORDER_TEXTSCALEINFO:
|
||||
error = rail_recv_textscaleinfo_order(rail, s);
|
||||
break;
|
||||
|
||||
case TS_RAIL_ORDER_CARETBLINKINFO:
|
||||
error = rail_recv_caretblinkinfo_order(rail, s);
|
||||
break;
|
||||
|
||||
default:
|
||||
WLog_ERR(TAG, "Unknown RAIL PDU %s received.",
|
||||
rail_get_order_type_string_full(orderType, buffer, sizeof(buffer)));
|
||||
|
@ -79,6 +79,10 @@ const char* rail_get_order_type_string(UINT16 orderType)
|
||||
return "TS_RAIL_ORDER_GET_APPID_RESP_EX";
|
||||
case TS_RAIL_ORDER_EXEC_RESULT:
|
||||
return "TS_RAIL_ORDER_EXEC_RESULT";
|
||||
case TS_RAIL_ORDER_TEXTSCALEINFO:
|
||||
return "TS_RAIL_ORDER_TEXTSCALEINFO";
|
||||
case TS_RAIL_ORDER_CARETBLINKINFO:
|
||||
return "TS_RAIL_ORDER_CARETBLINKINFO";
|
||||
default:
|
||||
return "TS_RAIL_ORDER_UNKNOWN";
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ extern "C"
|
||||
const RAIL_GET_APPID_RESP_EX* id);
|
||||
typedef UINT (*pcRailClientCompartmentInfo)(RailClientContext* context,
|
||||
const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
|
||||
typedef UINT (*pcRailClientTextScale)(RailClientContext* context, UINT32 TextScale);
|
||||
typedef UINT (*pcRailClientCaretBlinkRate)(RailClientContext* context, UINT32 CaretBlinkRate);
|
||||
|
||||
struct s_rail_client_context
|
||||
{
|
||||
@ -128,6 +130,8 @@ extern "C"
|
||||
pcRailServerGetAppidResponseExtended ServerGetAppidResponseExtended;
|
||||
pcRailClientCompartmentInfo ClientCompartmentInfo;
|
||||
pcRailOnOpen OnOpen;
|
||||
pcRailClientTextScale ClientTextScale;
|
||||
pcRailClientCaretBlinkRate ClientCaretBlinkRate;
|
||||
};
|
||||
|
||||
FREERDP_API UINT client_rail_server_start_cmd(RailClientContext* context);
|
||||
|
@ -526,30 +526,35 @@ typedef struct
|
||||
|
||||
/* RAIL Constants */
|
||||
|
||||
#define TS_RAIL_ORDER_EXEC 0x0001
|
||||
#define TS_RAIL_ORDER_ACTIVATE 0x0002
|
||||
#define TS_RAIL_ORDER_SYSPARAM 0x0003
|
||||
#define TS_RAIL_ORDER_SYSCOMMAND 0x0004
|
||||
#define TS_RAIL_ORDER_HANDSHAKE 0x0005
|
||||
#define TS_RAIL_ORDER_NOTIFY_EVENT 0x0006
|
||||
#define TS_RAIL_ORDER_WINDOWMOVE 0x0008
|
||||
#define TS_RAIL_ORDER_LOCALMOVESIZE 0x0009
|
||||
#define TS_RAIL_ORDER_MINMAXINFO 0x000A
|
||||
#define TS_RAIL_ORDER_CLIENTSTATUS 0x000B
|
||||
#define TS_RAIL_ORDER_SYSMENU 0x000C
|
||||
#define TS_RAIL_ORDER_LANGBARINFO 0x000D
|
||||
#define TS_RAIL_ORDER_GET_APPID_REQ 0x000E
|
||||
#define TS_RAIL_ORDER_GET_APPID_RESP 0x000F
|
||||
#define TS_RAIL_ORDER_TASKBARINFO 0x0010
|
||||
#define TS_RAIL_ORDER_LANGUAGEIMEINFO 0x0011
|
||||
#define TS_RAIL_ORDER_COMPARTMENTINFO 0x0012
|
||||
#define TS_RAIL_ORDER_HANDSHAKE_EX 0x0013
|
||||
#define TS_RAIL_ORDER_ZORDER_SYNC 0x0014
|
||||
#define TS_RAIL_ORDER_CLOAK 0x0015
|
||||
#define TS_RAIL_ORDER_POWER_DISPLAY_REQUEST 0x0016
|
||||
#define TS_RAIL_ORDER_SNAP_ARRANGE 0x0017
|
||||
#define TS_RAIL_ORDER_GET_APPID_RESP_EX 0x0018
|
||||
#define TS_RAIL_ORDER_EXEC_RESULT 0x0080
|
||||
typedef enum
|
||||
{
|
||||
TS_RAIL_ORDER_EXEC = 0x0001,
|
||||
TS_RAIL_ORDER_ACTIVATE = 0x0002,
|
||||
TS_RAIL_ORDER_SYSPARAM = 0x0003,
|
||||
TS_RAIL_ORDER_SYSCOMMAND = 0x0004,
|
||||
TS_RAIL_ORDER_HANDSHAKE = 0x0005,
|
||||
TS_RAIL_ORDER_NOTIFY_EVENT = 0x0006,
|
||||
TS_RAIL_ORDER_WINDOWMOVE = 0x0008,
|
||||
TS_RAIL_ORDER_LOCALMOVESIZE = 0x0009,
|
||||
TS_RAIL_ORDER_MINMAXINFO = 0x000A,
|
||||
TS_RAIL_ORDER_CLIENTSTATUS = 0x000B,
|
||||
TS_RAIL_ORDER_SYSMENU = 0x000C,
|
||||
TS_RAIL_ORDER_LANGBARINFO = 0x000D,
|
||||
TS_RAIL_ORDER_GET_APPID_REQ = 0x000E,
|
||||
TS_RAIL_ORDER_GET_APPID_RESP = 0x000F,
|
||||
TS_RAIL_ORDER_TASKBARINFO = 0x0010,
|
||||
TS_RAIL_ORDER_LANGUAGEIMEINFO = 0x0011,
|
||||
TS_RAIL_ORDER_COMPARTMENTINFO = 0x0012,
|
||||
TS_RAIL_ORDER_HANDSHAKE_EX = 0x0013,
|
||||
TS_RAIL_ORDER_ZORDER_SYNC = 0x0014,
|
||||
TS_RAIL_ORDER_CLOAK = 0x0015,
|
||||
TS_RAIL_ORDER_POWER_DISPLAY_REQUEST = 0x0016,
|
||||
TS_RAIL_ORDER_SNAP_ARRANGE = 0x0017,
|
||||
TS_RAIL_ORDER_GET_APPID_RESP_EX = 0x0018,
|
||||
TS_RAIL_ORDER_TEXTSCALEINFO = 0x0019,
|
||||
TS_RAIL_ORDER_CARETBLINKINFO = 0x001A,
|
||||
TS_RAIL_ORDER_EXEC_RESULT = 0x0080
|
||||
} ORDER_TYPE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
Loading…
Reference in New Issue
Block a user