2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
23 typedef struct rdp_input rdpInput;
25 #include <freerdp/freerdp.h>
28 #define KBD_FLAGS_EXTENDED 0x0100
29 #define KBD_FLAGS_DOWN 0x4000
30 #define KBD_FLAGS_RELEASE 0x8000
33 #define PTR_FLAGS_WHEEL 0x0200
34 #define PTR_FLAGS_WHEEL_NEGATIVE 0x0100
35 #define PTR_FLAGS_MOVE 0x0800
36 #define PTR_FLAGS_DOWN 0x8000
37 #define PTR_FLAGS_BUTTON1 0x1000
38 #define PTR_FLAGS_BUTTON2 0x2000
39 #define PTR_FLAGS_BUTTON3 0x4000
40 #define WheelRotationMask 0x01FF
42 /* Extended Pointer Flags */
43 #define PTR_XFLAGS_DOWN 0x8000
44 #define PTR_XFLAGS_BUTTON1 0x0001
45 #define PTR_XFLAGS_BUTTON2 0x0002
47 /* Keyboard Toggle Flags */
48 #define KBD_SYNC_SCROLL_LOCK 0x00000001
49 #define KBD_SYNC_NUM_LOCK 0x00000002
50 #define KBD_SYNC_CAPS_LOCK 0x00000004
51 #define KBD_SYNC_KANA_LOCK 0x00000008
53 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
55 typedef void (*pSynchronizeEvent)(rdpInput* input, uint32 flags);
56 typedef void (*pKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code);
57 typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code);
58 typedef void (*pMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y);
59 typedef void (*pExtendedMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y);
63 rdpContext* context; /* 0 */
65 uint32 paddingA[16 - 2]; /* 2 */
67 pSynchronizeEvent SynchronizeEvent; /* 16 */
68 pKeyboardEvent KeyboardEvent; /* 17 */
69 pUnicodeKeyboardEvent UnicodeKeyboardEvent; /* 18 */
70 pMouseEvent MouseEvent; /* 19 */
71 pExtendedMouseEvent ExtendedMouseEvent; /* 20 */
72 uint32 paddingB[32 - 21]; /* 21 */
75 #endif /* __INPUT_API_H */