Fix changelog email address
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-core / input.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * Input PDUs
4  *
5  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
6  *
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
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20 #ifndef __INPUT_H
21 #define __INPUT_H
22
23 #include "rdp.h"
24 #include "fastpath.h"
25
26 #include <freerdp/input.h>
27 #include <freerdp/freerdp.h>
28 #include <freerdp/utils/stream.h>
29 #include <freerdp/utils/memory.h>
30
31 /* Input Events */
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
37
38 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH      4
39
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);
45
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);
51
52 boolean input_recv(rdpInput* input, STREAM* s);
53
54 void input_register_client_callbacks(rdpInput* input);
55
56 rdpInput* input_new(rdpRdp* rdp);
57 void input_free(rdpInput* input);
58
59 #endif /* __INPUT_H */