xfreerdp: get graphical updates and mouse + keyboard input working
[platform/upstream/freerdp.git] / client / X11 / xfreerdp.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * X11 Client
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 __XFREERDP_H
21 #define __XFREERDP_H
22
23 #include "gdi.h"
24 #include <X11/Xlib.h>
25 #include <freerdp/freerdp.h>
26 #include <freerdp/chanman.h>
27
28 #define SET_XFI(_instance, _xfi) (_instance)->param1 = _xfi
29 #define GET_XFI(_instance) ((xfInfo*) ((_instance)->param1))
30
31 #define SET_CHANMAN(_instance, _chanman) (_instance)->param2 = _chanman
32 #define GET_CHANMAN(_instance) ((rdpChanMan*) ((_instance)->param2))
33
34 struct xf_info
35 {
36         GC gc;
37         int bpp;
38         int xfds;
39         int depth;
40         int width;
41         int height;
42         Window window;
43         Screen* screen;
44         Pixmap primary;
45         Drawable drawing;
46         Visual* visual;
47         Display* display;
48         Colormap colormap;
49         int screen_number;
50         int scanline_pad;
51         boolean big_endian;
52         boolean fullscreen;
53         boolean unobscured;
54         boolean decoration;
55         freerdp* instance;
56
57         GC gc_mono;
58         GC gc_default;
59         Pixmap bitmap_mono;
60
61         boolean focused;
62         boolean mouse_active;
63         boolean mouse_motion;
64         boolean fullscreen_toggle;
65         uint32 keyboard_layout_id;
66         boolean pressed_keys[256];
67         XModifierKeymap* modifier_map;
68 };
69 typedef struct xf_info xfInfo;
70
71 void xf_toggle_fullscreen(xfInfo* xfi);
72
73 #endif /* __XFREERDP_H */