2014-11-21 00:19:29 +03:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
* Extended Input channel common definitions
|
|
|
|
*
|
|
|
|
* Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
* Copyright 2014 Thincast Technologies Gmbh.
|
|
|
|
* Copyright 2014 David FORT <contact@hardening-consulting.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.
|
|
|
|
*/
|
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#ifndef FREERDP_CHANNEL_RDPEI_H
|
|
|
|
#define FREERDP_CHANNEL_RDPEI_H
|
2014-11-21 00:19:29 +03:00
|
|
|
|
|
|
|
#include <winpr/wtypes.h>
|
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define RDPINPUT_HEADER_LENGTH 6
|
2014-11-21 00:19:29 +03:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define RDPEI_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Input"
|
2014-11-21 00:19:29 +03:00
|
|
|
|
|
|
|
/** @brief protocol version */
|
2019-11-06 17:24:51 +03:00
|
|
|
enum
|
|
|
|
{
|
2014-11-21 00:19:29 +03:00
|
|
|
RDPINPUT_PROTOCOL_V10 = 0x00010000,
|
2020-11-11 10:54:46 +03:00
|
|
|
RDPINPUT_PROTOCOL_V101 = 0x00010001,
|
|
|
|
RDPINPUT_PROTOCOL_V200 = 0x00020000,
|
|
|
|
RDPINPUT_PROTOCOL_V300 = 0x00030000
|
2014-11-21 00:19:29 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Client Ready Flags */
|
2020-11-11 10:54:46 +03:00
|
|
|
#define CS_READY_FLAGS_SHOW_TOUCH_VISUALS 0x00000001
|
|
|
|
#define CS_READY_FLAGS_DISABLE_TIMESTAMP_INJECTION 0x00000002
|
|
|
|
#define CS_READY_FLAGS_ENABLE_MULTIPEN_INJECTION 0x00000004
|
2014-11-21 00:19:29 +03:00
|
|
|
|
2019-11-06 17:24:51 +03:00
|
|
|
#define CONTACT_DATA_CONTACTRECT_PRESENT 0x0001
|
|
|
|
#define CONTACT_DATA_ORIENTATION_PRESENT 0x0002
|
|
|
|
#define CONTACT_DATA_PRESSURE_PRESENT 0x0004
|
2014-11-21 00:19:29 +03:00
|
|
|
|
2020-11-11 10:54:46 +03:00
|
|
|
typedef enum
|
|
|
|
{
|
2020-11-30 15:40:15 +03:00
|
|
|
RDPINPUT_PEN_CONTACT_PENFLAGS_PRESENT = 0x0001,
|
|
|
|
RDPINPUT_PEN_CONTACT_PRESSURE_PRESENT = 0x0002,
|
|
|
|
RDPINPUT_PEN_CONTACT_ROTATION_PRESENT = 0x0004,
|
|
|
|
RDPINPUT_PEN_CONTACT_TILTX_PRESENT = 0x0008,
|
|
|
|
RDPINPUT_PEN_CONTACT_TILTY_PRESENT = 0x0010
|
2020-11-11 10:54:46 +03:00
|
|
|
} RDPINPUT_PEN_FIELDS_PRESENT;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2020-11-30 15:40:15 +03:00
|
|
|
RDPINPUT_CONTACT_FLAG_DOWN = 0x0001,
|
|
|
|
RDPINPUT_CONTACT_FLAG_UPDATE = 0x0002,
|
|
|
|
RDPINPUT_CONTACT_FLAG_UP = 0x0004,
|
|
|
|
RDPINPUT_CONTACT_FLAG_INRANGE = 0x0008,
|
|
|
|
RDPINPUT_CONTACT_FLAG_INCONTACT = 0x0010,
|
|
|
|
RDPINPUT_CONTACT_FLAG_CANCELED = 0x0020
|
2020-11-11 10:54:46 +03:00
|
|
|
} RDPINPUT_CONTACT_FLAGS;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2020-11-30 15:40:15 +03:00
|
|
|
RDPINPUT_PEN_FLAG_BARREL_PRESSED = 0x0001,
|
|
|
|
RDPINPUT_PEN_FLAG_ERASER_PRESSED = 0x0002,
|
|
|
|
RDPINPUT_PEN_FLAG_INVERTED = 0x0004
|
2020-11-11 10:54:46 +03:00
|
|
|
} RDPINPUT_PEN_FLAGS;
|
2014-11-21 00:19:29 +03:00
|
|
|
|
|
|
|
/** @brief a contact point */
|
|
|
|
struct _RDPINPUT_CONTACT_DATA
|
|
|
|
{
|
|
|
|
UINT32 contactId;
|
2020-11-11 10:54:46 +03:00
|
|
|
UINT16 fieldsPresent;
|
2014-11-21 00:19:29 +03:00
|
|
|
INT32 x;
|
|
|
|
INT32 y;
|
|
|
|
UINT32 contactFlags;
|
2020-11-11 10:54:46 +03:00
|
|
|
INT16 contactRectLeft;
|
|
|
|
INT16 contactRectTop;
|
|
|
|
INT16 contactRectRight;
|
|
|
|
INT16 contactRectBottom;
|
2014-11-21 00:19:29 +03:00
|
|
|
UINT32 orientation;
|
|
|
|
UINT32 pressure;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_CONTACT_DATA RDPINPUT_CONTACT_DATA;
|
|
|
|
|
|
|
|
/** @brief a frame containing contact points */
|
|
|
|
struct _RDPINPUT_TOUCH_FRAME
|
|
|
|
{
|
2020-11-11 10:54:46 +03:00
|
|
|
UINT16 contactCount;
|
2014-11-21 00:19:29 +03:00
|
|
|
UINT64 frameOffset;
|
|
|
|
RDPINPUT_CONTACT_DATA* contacts;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_TOUCH_FRAME RDPINPUT_TOUCH_FRAME;
|
|
|
|
|
|
|
|
/** @brief a touch event with some frames*/
|
|
|
|
struct _RDPINPUT_TOUCH_EVENT
|
|
|
|
{
|
|
|
|
UINT32 encodeTime;
|
|
|
|
UINT16 frameCount;
|
|
|
|
RDPINPUT_TOUCH_FRAME* frames;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_TOUCH_EVENT RDPINPUT_TOUCH_EVENT;
|
|
|
|
|
2020-11-11 10:54:46 +03:00
|
|
|
struct _RDPINPUT_PEN_CONTACT
|
|
|
|
{
|
|
|
|
UINT8 deviceId;
|
|
|
|
UINT16 fieldsPresent;
|
|
|
|
INT32 x;
|
|
|
|
INT32 y;
|
|
|
|
UINT32 contactFlags;
|
|
|
|
UINT32 penFlags;
|
|
|
|
UINT32 pressure;
|
|
|
|
UINT16 rotation;
|
|
|
|
INT16 tiltX;
|
|
|
|
INT16 tiltY;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_PEN_CONTACT RDPINPUT_PEN_CONTACT;
|
|
|
|
|
|
|
|
struct _RDPINPUT_PEN_FRAME
|
|
|
|
{
|
|
|
|
UINT16 contactCount;
|
|
|
|
UINT64 frameOffset;
|
|
|
|
RDPINPUT_PEN_CONTACT* contacts;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_PEN_FRAME RDPINPUT_PEN_FRAME;
|
|
|
|
|
|
|
|
/** @brief a touch event with some frames*/
|
|
|
|
struct _RDPINPUT_PEN_EVENT
|
|
|
|
{
|
|
|
|
UINT32 encodeTime;
|
|
|
|
UINT16 frameCount;
|
|
|
|
RDPINPUT_PEN_FRAME* frames;
|
|
|
|
};
|
|
|
|
typedef struct _RDPINPUT_PEN_EVENT RDPINPUT_PEN_EVENT;
|
2017-06-06 15:01:41 +03:00
|
|
|
#endif /* FREERDP_CHANNEL_RDPEI_H */
|