VirtualBox

source: vbox/trunk/include/VBox/RemoteDesktop/VRDEInput.h@ 69411

Last change on this file since 69411 was 69107, checked in by vboxsync, 7 years ago

include/VBox/: (C) year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.8 KB
Line 
1/** @file
2 * VBox Remote Desktop Extension (VRDE) - Input interface.
3 */
4
5/*
6 * Copyright (C) 2013-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_RemoteDesktop_VRDEInput_h
27#define ___VBox_RemoteDesktop_VRDEInput_h
28
29#include <VBox/RemoteDesktop/VRDE.h>
30
31/*
32 * Interface for receiving input events from the client.
33 */
34
35/* All structures in this file are packed.
36 * Everything is little-endian.
37 */
38#pragma pack(1)
39
40/*
41 * The application interface between VirtualBox and the VRDE server.
42 */
43
44#define VRDE_INPUT_INTERFACE_NAME "VRDE::INPUT"
45
46/*
47 * Supported input methods.
48 */
49#define VRDE_INPUT_METHOD_TOUCH 1
50
51/*
52 * fu32Flags for VRDEInputSetup
53 */
54#define VRDE_INPUT_F_ENABLE 1
55
56/* The interface entry points. Interface version 1. */
57typedef struct VRDEINPUTINTERFACE
58{
59 /* The header. */
60 VRDEINTERFACEHDR header;
61
62 /* Tell the server that an input method will be used or disabled, etc.
63 * VRDECallbackInputSetup will be called with a result.
64 *
65 * @param hServer The VRDE server instance.
66 * @param u32Method The method VRDE_INPUT_METHOD_*.
67 * @param fu32Flags What to do with the method VRDE_INPUT_F_*.
68 * @param pvSetup Method specific parameters (optional).
69 * @param cbSetup Size of method specific parameters (optional).
70 */
71 DECLR3CALLBACKMEMBER(void, VRDEInputSetup, (HVRDESERVER hServer,
72 uint32_t u32Method,
73 uint32_t fu32Flags,
74 const void *pvSetup,
75 uint32_t cbSetup));
76} VRDEINPUTINTERFACE;
77
78
79/* Interface callbacks. */
80typedef struct VRDEINPUTCALLBACKS
81{
82 /* The header. */
83 VRDEINTERFACEHDR header;
84
85 /* VRDPInputSetup async result.
86 *
87 * @param pvCallback The callbacks context specified in VRDEGetInterface.
88 * @param rcSetup The result code of the request.
89 * @param u32Method The method VRDE_INPUT_METHOD_*.
90 * @param pvResult The result information.
91 * @param cbResult The size of buffer pointed by pvResult.
92 */
93 DECLR3CALLBACKMEMBER(void, VRDECallbackInputSetup,(void *pvCallback,
94 int rcRequest,
95 uint32_t u32Method,
96 const void *pvResult,
97 uint32_t cbResult));
98
99 /* Input event.
100 *
101 * @param pvCallback The callbacks context specified in VRDEGetInterface.
102 * @param u32Method The method VRDE_INPUT_METHOD_*.
103 * @param pvEvent The event data.
104 * @param cbEvent The size of buffer pointed by pvEvent.
105 */
106 DECLR3CALLBACKMEMBER(void, VRDECallbackInputEvent,(void *pvCallback,
107 uint32_t u32Method,
108 const void *pvEvent,
109 uint32_t cbEvent));
110} VRDEINPUTCALLBACKS;
111
112
113/*
114 * Touch input definitions VRDE_INPUT_METHOD_TOUCH.
115 */
116
117/* pvResult is not used */
118
119/* RDPINPUT_HEADER */
120typedef struct VRDEINPUTHEADER
121{
122 uint16_t u16EventId;
123 uint32_t u32PDULength;
124} VRDEINPUTHEADER;
125
126/* VRDEINPUTHEADER::u16EventId */
127#define VRDEINPUT_EVENTID_SC_READY 0x0001
128#define VRDEINPUT_EVENTID_CS_READY 0x0002
129#define VRDEINPUT_EVENTID_TOUCH 0x0003
130#define VRDEINPUT_EVENTID_SUSPEND_TOUCH 0x0004
131#define VRDEINPUT_EVENTID_RESUME_TOUCH 0x0005
132#define VRDEINPUT_EVENTID_DISMISS_HOVERING_CONTACT 0x0006
133
134/* RDPINPUT_SC_READY_PDU */
135typedef struct VRDEINPUT_SC_READY_PDU
136{
137 VRDEINPUTHEADER header;
138 uint32_t u32ProtocolVersion;
139} VRDEINPUT_SC_READY_PDU;
140
141#define VRDEINPUT_PROTOCOL_V1 0x00010000
142#define VRDEINPUT_PROTOCOL_V101 0x00010001
143
144/* RDPINPUT_CS_READY_PDU */
145typedef struct VRDEINPUT_CS_READY_PDU
146{
147 VRDEINPUTHEADER header;
148 uint32_t u32Flags;
149 uint32_t u32ProtocolVersion;
150 uint16_t u16MaxTouchContacts;
151} VRDEINPUT_CS_READY_PDU;
152
153#define VRDEINPUT_READY_FLAGS_SHOW_TOUCH_VISUALS 0x00000001
154#define VRDEINPUT_READY_FLAGS_DISABLE_TIMESTAMP_INJECTION 0x00000002
155
156/* RDPINPUT_CONTACT_DATA */
157typedef struct VRDEINPUT_CONTACT_DATA
158{
159 uint8_t u8ContactId;
160 uint16_t u16FieldsPresent;
161 int32_t i32X;
162 int32_t i32Y;
163 uint32_t u32ContactFlags;
164 int16_t i16ContactRectLeft;
165 int16_t i16ContactRectTop;
166 int16_t i16ContactRectRight;
167 int16_t i16ContactRectBottom;
168 uint32_t u32Orientation;
169 uint32_t u32Pressure;
170} VRDEINPUT_CONTACT_DATA;
171
172#define VRDEINPUT_CONTACT_DATA_CONTACTRECT_PRESENT 0x0001
173#define VRDEINPUT_CONTACT_DATA_ORIENTATION_PRESENT 0x0002
174#define VRDEINPUT_CONTACT_DATA_PRESSURE_PRESENT 0x0004
175
176#define VRDEINPUT_CONTACT_FLAG_DOWN 0x0001
177#define VRDEINPUT_CONTACT_FLAG_UPDATE 0x0002
178#define VRDEINPUT_CONTACT_FLAG_UP 0x0004
179#define VRDEINPUT_CONTACT_FLAG_INRANGE 0x0008
180#define VRDEINPUT_CONTACT_FLAG_INCONTACT 0x0010
181#define VRDEINPUT_CONTACT_FLAG_CANCELED 0x0020
182
183/* RDPINPUT_TOUCH_FRAME */
184typedef struct VRDEINPUT_TOUCH_FRAME
185{
186 uint16_t u16ContactCount;
187 uint64_t u64FrameOffset;
188 VRDEINPUT_CONTACT_DATA aContacts[1];
189} VRDEINPUT_TOUCH_FRAME;
190
191/* RDPINPUT_TOUCH_EVENT_PDU */
192typedef struct VRDEINPUT_TOUCH_EVENT_PDU
193{
194 VRDEINPUTHEADER header;
195 uint32_t u32EncodeTime;
196 uint16_t u16FrameCount;
197 VRDEINPUT_TOUCH_FRAME aFrames[1];
198} VRDEINPUT_TOUCH_EVENT_PDU;
199
200/* RDPINPUT_SUSPEND_TOUCH_PDU */
201typedef struct VRDEINPUT_SUSPEND_TOUCH_PDU
202{
203 VRDEINPUTHEADER header;
204} VRDEINPUT_SUSPEND_TOUCH_PDU;
205
206/* RDPINPUT_RESUME_TOUCH_PDU */
207typedef struct VRDEINPUT_RESUME_TOUCH_PDU
208{
209 VRDEINPUTHEADER header;
210} VRDEINPUT_RESUME_TOUCH_PDU;
211
212/* RDPINPUT_DISMISS_HOVERING_CONTACT_PDU */
213typedef struct VRDEINPUT_DISMISS_HOVERING_CONTACT_PDU
214{
215 VRDEINPUTHEADER header;
216 uint8_t u8ContactId;
217} VRDEINPUT_DISMISS_HOVERING_CONTACT_PDU;
218
219#pragma pack()
220
221#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette