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.
26 #include <freerdp/input.h>
27 #include <freerdp/freerdp.h>
28 #include <freerdp/utils/stream.h>
29 #include <freerdp/utils/memory.h>
32 #define INPUT_EVENT_SYNC 0x0000
33 #define INPUT_EVENT_SCANCODE 0x0004
34 #define INPUT_EVENT_UNICODE 0x0005
35 #define INPUT_EVENT_MOUSE 0x8001
36 #define INPUT_EVENT_MOUSEX 0x8002
38 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
40 void input_send_synchronize_event(rdpInput* input, uint32 flags);
41 void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
42 void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
43 void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
44 void input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
46 void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags);
47 void input_send_fastpath_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
48 void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
49 void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
50 void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
52 boolean input_recv(rdpInput* input, STREAM* s);
54 void input_register_client_callbacks(rdpInput* input);
56 rdpInput* input_new(rdpRdp* rdp);
57 void input_free(rdpInput* input);
59 #endif /* __INPUT_H */