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 #include <freerdp/freerdp.h>
24 #include <freerdp/channels/channels.h>
25 #include <freerdp/gdi/gdi.h>
26 #include <freerdp/gdi/dc.h>
27 #include <freerdp/gdi/region.h>
28 #include <freerdp/rail/rail.h>
29 #include <freerdp/cache/cache.h>
31 typedef struct xf_info xfInfo;
33 #include "xf_window.h"
34 #include "xf_monitor.h"
43 typedef struct xf_WorkArea xfWorkArea;
50 typedef struct xf_pointer xfPointer;
57 typedef struct xf_bitmap xfBitmap;
64 typedef struct xf_glyph xfGlyph;
71 rdpSettings* settings;
73 typedef struct xf_context xfContext;
102 boolean grab_keyboard;
112 Window parent_window;
116 uint8* primary_buffer;
119 boolean mouse_active;
120 boolean mouse_motion;
121 boolean fullscreen_toggle;
122 uint32 keyboard_layout_id;
123 boolean pressed_keys[256];
124 XModifierKeymap* modifier_map;
125 XSetWindowAttributes attribs;
126 boolean complex_regions;
127 VIRTUAL_SCREEN vscreen;
128 uint8* bmp_codec_none;
129 uint8* bmp_codec_nsc;
133 void* clipboard_context;
136 Atom _MOTIF_WM_HINTS;
137 Atom _NET_CURRENT_DESKTOP;
141 Atom _NET_WM_STATE_FULLSCREEN;
142 Atom _NET_WM_STATE_SKIP_TASKBAR;
143 Atom _NET_WM_STATE_SKIP_PAGER;
145 Atom _NET_WM_WINDOW_TYPE;
146 Atom _NET_WM_WINDOW_TYPE_NORMAL;
147 Atom _NET_WM_WINDOW_TYPE_DIALOG;
148 Atom _NET_WM_WINDOW_TYPE_UTILITY;
149 Atom _NET_WM_WINDOW_TYPE_POPUP;
150 Atom _NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
152 Atom _NET_WM_MOVERESIZE;
153 Atom _NET_MOVERESIZE_WINDOW;
156 Atom WM_DELETE_WINDOW;
159 void xf_toggle_fullscreen(xfInfo* xfi);
160 boolean xf_post_connect(freerdp* instance);
164 /* section 0-15: protocol-independent codes */
166 XF_EXIT_DISCONNECT = 1,
168 XF_EXIT_IDLE_TIMEOUT = 3,
169 XF_EXIT_LOGON_TIMEOUT = 4,
170 XF_EXIT_CONN_REPLACED = 5,
171 XF_EXIT_OUT_OF_MEMORY = 6,
172 XF_EXIT_CONN_DENIED = 7,
173 XF_EXIT_CONN_DENIED_FIPS = 8,
174 XF_EXIT_USER_PRIVILEGES = 9,
175 XF_EXIT_FRESH_CREDENTIALS_REQUIRED = 10,
176 XF_EXIT_DISCONNECT_BY_USER = 11,
178 /* section 16-31: license error set */
179 XF_EXIT_LICENSE_INTERNAL = 16,
180 XF_EXIT_LICENSE_NO_LICENSE_SERVER = 17,
181 XF_EXIT_LICENSE_NO_LICENSE = 18,
182 XF_EXIT_LICENSE_BAD_CLIENT_MSG = 19,
183 XF_EXIT_LICENSE_HWID_DOESNT_MATCH = 20,
184 XF_EXIT_LICENSE_BAD_CLIENT = 21,
185 XF_EXIT_LICENSE_CANT_FINISH_PROTOCOL = 22,
186 XF_EXIT_LICENSE_CLIENT_ENDED_PROTOCOL = 23,
187 XF_EXIT_LICENSE_BAD_CLIENT_ENCRYPTION = 24,
188 XF_EXIT_LICENSE_CANT_UPGRADE = 25,
189 XF_EXIT_LICENSE_NO_REMOTE_CONNECTIONS = 26,
191 /* section 32-127: RDP protocol error set */
194 /* section 128-254: xfreerdp specific exit codes */
195 XF_EXIT_PARSE_ARGUMENTS = 128,
196 XF_EXIT_MEMORY = 129,
197 XF_EXIT_PROTOCOL = 130,
198 XF_EXIT_CONN_FAILED = 131,
200 XF_EXIT_UNKNOWN = 255,
203 #ifdef WITH_DEBUG_X11
204 #define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__)
206 #define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
209 #ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
210 #define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__)
212 #define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
215 #endif /* __XFREERDP_H */