From 9b351568faff7acf1195899773b3dd1f7fab0646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 2 Apr 2013 15:13:10 -0400 Subject: [PATCH] xfreerdp: start implementing simplified client interface --- client/X11/xf_cliprdr.c | 13 +++ client/X11/xf_cliprdr.h | 8 +- client/X11/xf_event.c | 14 ++- client/X11/xf_event.h | 2 +- client/X11/xf_gdi.h | 2 +- client/X11/xf_graphics.h | 2 +- client/X11/xf_interface.c | 57 +++++++++-- client/X11/xf_interface.h | 207 +++++++++++++++++++++++++++++++++++++ client/X11/xf_keyboard.h | 2 +- client/X11/xf_monitor.h | 2 +- client/X11/xf_rail.c | 6 ++ client/X11/xf_rail.h | 2 +- client/X11/xf_tsmf.h | 2 +- client/X11/xf_window.c | 12 +++ client/X11/xf_window.h | 2 +- client/X11/xfreerdp.c | 8 +- client/X11/xfreerdp.h | 208 -------------------------------------- 17 files changed, 307 insertions(+), 242 deletions(-) diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index f8d003d52..c2acee2ac 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -33,6 +33,18 @@ #include "xf_cliprdr.h" +#ifdef WITH_DEBUG_X11 +#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + +#ifdef WITH_DEBUG_X11_CLIPRDR +#define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_CLASS(X11_CLIPRDR, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + typedef struct clipboard_format_mapping clipboardFormatMapping; struct clipboard_format_mapping @@ -498,6 +510,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi) { atom = ((Atom*) data)[i]; DEBUG_X11("atom %d", (int) atom); + for (j = 0; j < cb->num_format_mappings; j++) { if (cb->format_mappings[j].target_format == atom) diff --git a/client/X11/xf_cliprdr.h b/client/X11/xf_cliprdr.h index a874005e2..ead887606 100644 --- a/client/X11/xf_cliprdr.h +++ b/client/X11/xf_cliprdr.h @@ -20,7 +20,7 @@ #ifndef __XF_CLIPRDR_H #define __XF_CLIPRDR_H -#include "xfreerdp.h" +#include "xf_interface.h" void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman); void xf_cliprdr_uninit(xfInfo* xfi); @@ -31,10 +31,4 @@ BOOL xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent); BOOL xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent); void xf_cliprdr_check_owner(xfInfo* xfi); -#ifdef WITH_DEBUG_X11_CLIPRDR -#define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_CLASS(X11_CLIPRDR, fmt, ## __VA_ARGS__) -#else -#define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) -#endif - #endif /* __XF_CLIPRDR_H */ diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 5c9ba42ba..0cba21c2c 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -32,8 +32,7 @@ #include "xf_event.h" -#ifdef WITH_DEBUG_X11 -static const char* const X11_EVENT_STRINGS[] = +const char* const X11_EVENT_STRINGS[] = { "", "", "KeyPress", @@ -71,6 +70,17 @@ static const char* const X11_EVENT_STRINGS[] = "MappingNotify", "GenericEvent", }; + +#ifdef WITH_DEBUG_X11 +#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + +#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE +#define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif static BOOL xf_event_Expose(xfInfo* xfi, XEvent* event, BOOL app) diff --git a/client/X11/xf_event.h b/client/X11/xf_event.h index f0ef8da57..722a7a56e 100644 --- a/client/X11/xf_event.h +++ b/client/X11/xf_event.h @@ -22,7 +22,7 @@ #include "xf_keyboard.h" -#include "xfreerdp.h" +#include "xf_interface.h" BOOL xf_event_process(freerdp* instance, XEvent* event); void xf_event_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...); diff --git a/client/X11/xf_gdi.h b/client/X11/xf_gdi.h index 2a30b8965..b3ac75df9 100644 --- a/client/X11/xf_gdi.h +++ b/client/X11/xf_gdi.h @@ -22,7 +22,7 @@ #include -#include "xfreerdp.h" +#include "xf_interface.h" void xf_gdi_register_update_callbacks(rdpUpdate* update); diff --git a/client/X11/xf_graphics.h b/client/X11/xf_graphics.h index b9256a86c..9d8cfd62f 100644 --- a/client/X11/xf_graphics.h +++ b/client/X11/xf_graphics.h @@ -20,7 +20,7 @@ #ifndef __XF_GRAPHICS_H #define __XF_GRAPHICS_H -#include "xfreerdp.h" +#include "xf_interface.h" void xf_register_graphics(rdpGraphics* graphics); diff --git a/client/X11/xf_interface.c b/client/X11/xf_interface.c index d9d24528e..6e0a6af84 100644 --- a/client/X11/xf_interface.c +++ b/client/X11/xf_interface.c @@ -1086,17 +1086,6 @@ void xf_window_free(xfInfo* xfi) xf_cliprdr_uninit(xfi); } -void xf_free(xfInfo* xfi) -{ - xf_window_free(xfi); - - free(xfi->bmp_codec_none); - - XCloseDisplay(xfi->display); - - free(xfi); -} - void* xf_update_thread(void* arg) { int status; @@ -1475,3 +1464,49 @@ DWORD xf_exit_code_from_disconnect_reason(DWORD reason) return reason; } + +/** + * Client Interface + */ + +int xf_global_init() +{ + setlocale(LC_ALL, ""); + freerdp_handle_signals(); + freerdp_channels_global_init(); + + return 0; +} + +int xf_global_uninit() +{ + freerdp_channels_global_uninit(); + + return 0; +} + +int xf_start(xfInfo* wfi) +{ + return 0; +} + +int xf_stop(xfInfo* wfi) +{ + return 0; +} + +xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv) +{ + return NULL; +} + +void xf_free(xfInfo* xfi) +{ + xf_window_free(xfi); + + free(xfi->bmp_codec_none); + + XCloseDisplay(xfi->display); + + free(xfi); +} diff --git a/client/X11/xf_interface.h b/client/X11/xf_interface.h index 38cf279e7..aaf98698a 100644 --- a/client/X11/xf_interface.h +++ b/client/X11/xf_interface.h @@ -20,8 +20,202 @@ #ifndef __XF_INTERFACE_H #define __XF_INTERFACE_H +#include #include +#include +#include +#include +#include +#include +#include + +typedef struct xf_info xfInfo; + +#include "xf_window.h" +#include "xf_monitor.h" + +struct xf_WorkArea +{ + UINT32 x; + UINT32 y; + UINT32 width; + UINT32 height; +}; +typedef struct xf_WorkArea xfWorkArea; + +struct xf_pointer +{ + rdpPointer pointer; + Cursor cursor; +}; +typedef struct xf_pointer xfPointer; + +struct xf_bitmap +{ + rdpBitmap bitmap; + Pixmap pixmap; +}; +typedef struct xf_bitmap xfBitmap; + +struct xf_glyph +{ + rdpGlyph glyph; + Pixmap pixmap; +}; +typedef struct xf_glyph xfGlyph; + +struct xf_context +{ + rdpContext _p; + + xfInfo* xfi; + rdpSettings* settings; +}; +typedef struct xf_context xfContext; + +struct xf_info +{ + freerdp* instance; + xfContext* context; + rdpContext* _context; + + GC gc; + int bpp; + int xfds; + int depth; + int width; + int height; + int srcBpp; + GC gc_mono; + Screen* screen; + XImage* image; + Pixmap primary; + Pixmap drawing; + Visual* visual; + Display* display; + Drawable drawable; + Pixmap bitmap_mono; + Colormap colormap; + int screen_number; + int scanline_pad; + BOOL big_endian; + BOOL fullscreen; + BOOL grab_keyboard; + BOOL unobscured; + BOOL decorations; + BOOL debug; + xfWindow* window; + xfWorkArea workArea; + int current_desktop; + BOOL remote_app; + BOOL disconnect; + HCLRCONV clrconv; + Window parent_window; + HANDLE mutex; + BOOL UseXThreads; + + HGDI_DC hdc; + BOOL sw_gdi; + BYTE* primary_buffer; + + BOOL frame_begin; + UINT16 frame_x1; + UINT16 frame_y1; + UINT16 frame_x2; + UINT16 frame_y2; + + BOOL focused; + BOOL mouse_active; + BOOL mouse_motion; + BOOL suppress_output; + BOOL fullscreen_toggle; + UINT32 keyboard_layout_id; + BOOL pressed_keys[256]; + XModifierKeymap* modifier_map; + XSetWindowAttributes attribs; + BOOL complex_regions; + VIRTUAL_SCREEN vscreen; + BYTE* bmp_codec_none; + BYTE* bmp_codec_nsc; + void* rfx_context; + void* nsc_context; + void* xv_context; + void* clipboard_context; + + Atom _NET_WM_ICON; + Atom _MOTIF_WM_HINTS; + Atom _NET_CURRENT_DESKTOP; + Atom _NET_WORKAREA; + + Atom _NET_WM_STATE; + Atom _NET_WM_STATE_FULLSCREEN; + Atom _NET_WM_STATE_SKIP_TASKBAR; + Atom _NET_WM_STATE_SKIP_PAGER; + + Atom _NET_WM_WINDOW_TYPE; + Atom _NET_WM_WINDOW_TYPE_NORMAL; + Atom _NET_WM_WINDOW_TYPE_DIALOG; + Atom _NET_WM_WINDOW_TYPE_UTILITY; + Atom _NET_WM_WINDOW_TYPE_POPUP; + Atom _NET_WM_WINDOW_TYPE_DROPDOWN_MENU; + + Atom _NET_WM_MOVERESIZE; + Atom _NET_MOVERESIZE_WINDOW; + + Atom WM_STATE; + Atom WM_PROTOCOLS; + Atom WM_DELETE_WINDOW; +}; + +void xf_create_window(xfInfo* xfi); +void xf_toggle_fullscreen(xfInfo* xfi); +BOOL xf_post_connect(freerdp* instance); + +enum XF_EXIT_CODE +{ + /* section 0-15: protocol-independent codes */ + XF_EXIT_SUCCESS = 0, + XF_EXIT_DISCONNECT = 1, + XF_EXIT_LOGOFF = 2, + XF_EXIT_IDLE_TIMEOUT = 3, + XF_EXIT_LOGON_TIMEOUT = 4, + XF_EXIT_CONN_REPLACED = 5, + XF_EXIT_OUT_OF_MEMORY = 6, + XF_EXIT_CONN_DENIED = 7, + XF_EXIT_CONN_DENIED_FIPS = 8, + XF_EXIT_USER_PRIVILEGES = 9, + XF_EXIT_FRESH_CREDENTIALS_REQUIRED = 10, + XF_EXIT_DISCONNECT_BY_USER = 11, + + /* section 16-31: license error set */ + XF_EXIT_LICENSE_INTERNAL = 16, + XF_EXIT_LICENSE_NO_LICENSE_SERVER = 17, + XF_EXIT_LICENSE_NO_LICENSE = 18, + XF_EXIT_LICENSE_BAD_CLIENT_MSG = 19, + XF_EXIT_LICENSE_HWID_DOESNT_MATCH = 20, + XF_EXIT_LICENSE_BAD_CLIENT = 21, + XF_EXIT_LICENSE_CANT_FINISH_PROTOCOL = 22, + XF_EXIT_LICENSE_CLIENT_ENDED_PROTOCOL = 23, + XF_EXIT_LICENSE_BAD_CLIENT_ENCRYPTION = 24, + XF_EXIT_LICENSE_CANT_UPGRADE = 25, + XF_EXIT_LICENSE_NO_REMOTE_CONNECTIONS = 26, + + /* section 32-127: RDP protocol error set */ + XF_EXIT_RDP = 32, + + /* section 128-254: xfreerdp specific exit codes */ + XF_EXIT_PARSE_ARGUMENTS = 128, + XF_EXIT_MEMORY = 129, + XF_EXIT_PROTOCOL = 130, + XF_EXIT_CONN_FAILED = 131, + + XF_EXIT_UNKNOWN = 255, +}; + +void xf_lock_x11(xfInfo* xfi, BOOL display); +void xf_unlock_x11(xfInfo* xfi, BOOL display); + void xf_context_new(freerdp* instance, rdpContext* context); void xf_context_free(freerdp* instance, rdpContext* context); @@ -38,4 +232,17 @@ DWORD xf_exit_code_from_disconnect_reason(DWORD reason); void* xf_thread(void* param); +/** + * Client Interface + */ + +FREERDP_API int xf_global_init(); +FREERDP_API int xf_global_uninit(); + +FREERDP_API int xf_start(xfInfo* wfi); +FREERDP_API int xf_stop(xfInfo* wfi); + +FREERDP_API xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv); +FREERDP_API void xf_free(xfInfo* xfi); + #endif /* __XF_INTERFACE_H */ diff --git a/client/X11/xf_keyboard.h b/client/X11/xf_keyboard.h index ec90e31c6..01ec6111a 100644 --- a/client/X11/xf_keyboard.h +++ b/client/X11/xf_keyboard.h @@ -22,7 +22,7 @@ #include -#include "xfreerdp.h" +#include "xf_interface.h" void xf_kbd_init(xfInfo* xfi); void xf_kbd_clear(xfInfo* xfi); diff --git a/client/X11/xf_monitor.h b/client/X11/xf_monitor.h index 42196f1da..1020817e6 100644 --- a/client/X11/xf_monitor.h +++ b/client/X11/xf_monitor.h @@ -40,7 +40,7 @@ struct _VIRTUAL_SCREEN }; typedef struct _VIRTUAL_SCREEN VIRTUAL_SCREEN; -#include "xfreerdp.h" +#include "xf_interface.h" BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings); diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index d27f70d00..66ec20dae 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -32,6 +32,12 @@ #include "xf_window.h" #include "xf_rail.h" +#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE +#define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + void xf_rail_enable_remoteapp_mode(xfInfo* xfi) { if (!xfi->remote_app) diff --git a/client/X11/xf_rail.h b/client/X11/xf_rail.h index 9bc24cb4a..e395681c9 100644 --- a/client/X11/xf_rail.h +++ b/client/X11/xf_rail.h @@ -20,7 +20,7 @@ #ifndef __XF_RAIL_H #define __XF_RAIL_H -#include "xfreerdp.h" +#include "xf_interface.h" void xf_rail_paint(xfInfo* xfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom); void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail); diff --git a/client/X11/xf_tsmf.h b/client/X11/xf_tsmf.h index f4aeac43b..db2395204 100644 --- a/client/X11/xf_tsmf.h +++ b/client/X11/xf_tsmf.h @@ -20,7 +20,7 @@ #ifndef __XF_TSMF_H #define __XF_TSMF_H -#include "xfreerdp.h" +#include "xf_interface.h" void xf_tsmf_init(xfInfo* xfi, long xv_port); void xf_tsmf_uninit(xfInfo* xfi); diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 9714330ce..f326e1997 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -42,6 +42,18 @@ #include #endif +#ifdef WITH_DEBUG_X11 +#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + +#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE +#define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + #include "FreeRDP_Icon_256px.h" #define xf_icon_prop FreeRDP_Icon_256px_prop diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h index f5379e8dd..257515925 100644 --- a/client/X11/xf_window.h +++ b/client/X11/xf_window.h @@ -27,7 +27,7 @@ typedef struct xf_localmove xfLocalMove; typedef struct xf_window xfWindow; -#include "xfreerdp.h" +#include "xf_interface.h" // Extended ICCM flags http://standards.freedesktop.org/wm-spec/wm-spec-latest.html #define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0 diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index f55406191..8d2a74d46 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -46,11 +46,7 @@ int main(int argc, char* argv[]) DWORD dwExitCode; freerdp* instance; - freerdp_handle_signals(); - - setlocale(LC_ALL, ""); - - freerdp_channels_global_init(); + xf_global_init(); instance = freerdp_new(); instance->PreConnect = xf_pre_connect; @@ -78,7 +74,7 @@ int main(int argc, char* argv[]) freerdp_context_free(instance); freerdp_free(instance); - freerdp_channels_global_uninit(); + xf_global_uninit(); return xf_exit_code_from_disconnect_reason(dwExitCode); } diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 992c2edac..c8e4780a6 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -20,214 +20,6 @@ #ifndef __XFREERDP_H #define __XFREERDP_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include -#include -#include -#include -#include -#include -#include - -typedef struct xf_info xfInfo; - -#include "xf_window.h" -#include "xf_monitor.h" - -struct xf_WorkArea -{ - UINT32 x; - UINT32 y; - UINT32 width; - UINT32 height; -}; -typedef struct xf_WorkArea xfWorkArea; - -struct xf_pointer -{ - rdpPointer pointer; - Cursor cursor; -}; -typedef struct xf_pointer xfPointer; - -struct xf_bitmap -{ - rdpBitmap bitmap; - Pixmap pixmap; -}; -typedef struct xf_bitmap xfBitmap; - -struct xf_glyph -{ - rdpGlyph glyph; - Pixmap pixmap; -}; -typedef struct xf_glyph xfGlyph; - -struct xf_context -{ - rdpContext _p; - - xfInfo* xfi; - rdpSettings* settings; -}; -typedef struct xf_context xfContext; - -struct xf_info -{ - freerdp* instance; - xfContext* context; - rdpContext* _context; - - GC gc; - int bpp; - int xfds; - int depth; - int width; - int height; - int srcBpp; - GC gc_mono; - Screen* screen; - XImage* image; - Pixmap primary; - Pixmap drawing; - Visual* visual; - Display* display; - Drawable drawable; - Pixmap bitmap_mono; - Colormap colormap; - int screen_number; - int scanline_pad; - BOOL big_endian; - BOOL fullscreen; - BOOL grab_keyboard; - BOOL unobscured; - BOOL decorations; - BOOL debug; - xfWindow* window; - xfWorkArea workArea; - int current_desktop; - BOOL remote_app; - BOOL disconnect; - HCLRCONV clrconv; - Window parent_window; - HANDLE mutex; - BOOL UseXThreads; - - HGDI_DC hdc; - BOOL sw_gdi; - BYTE* primary_buffer; - - BOOL frame_begin; - UINT16 frame_x1; - UINT16 frame_y1; - UINT16 frame_x2; - UINT16 frame_y2; - - BOOL focused; - BOOL mouse_active; - BOOL mouse_motion; - BOOL suppress_output; - BOOL fullscreen_toggle; - UINT32 keyboard_layout_id; - BOOL pressed_keys[256]; - XModifierKeymap* modifier_map; - XSetWindowAttributes attribs; - BOOL complex_regions; - VIRTUAL_SCREEN vscreen; - BYTE* bmp_codec_none; - BYTE* bmp_codec_nsc; - void* rfx_context; - void* nsc_context; - void* xv_context; - void* clipboard_context; - - Atom _NET_WM_ICON; - Atom _MOTIF_WM_HINTS; - Atom _NET_CURRENT_DESKTOP; - Atom _NET_WORKAREA; - - Atom _NET_WM_STATE; - Atom _NET_WM_STATE_FULLSCREEN; - Atom _NET_WM_STATE_SKIP_TASKBAR; - Atom _NET_WM_STATE_SKIP_PAGER; - - Atom _NET_WM_WINDOW_TYPE; - Atom _NET_WM_WINDOW_TYPE_NORMAL; - Atom _NET_WM_WINDOW_TYPE_DIALOG; - Atom _NET_WM_WINDOW_TYPE_UTILITY; - Atom _NET_WM_WINDOW_TYPE_POPUP; - Atom _NET_WM_WINDOW_TYPE_DROPDOWN_MENU; - - Atom _NET_WM_MOVERESIZE; - Atom _NET_MOVERESIZE_WINDOW; - - Atom WM_STATE; - Atom WM_PROTOCOLS; - Atom WM_DELETE_WINDOW; -}; - -void xf_create_window(xfInfo* xfi); -void xf_toggle_fullscreen(xfInfo* xfi); -BOOL xf_post_connect(freerdp* instance); - -enum XF_EXIT_CODE -{ - /* section 0-15: protocol-independent codes */ - XF_EXIT_SUCCESS = 0, - XF_EXIT_DISCONNECT = 1, - XF_EXIT_LOGOFF = 2, - XF_EXIT_IDLE_TIMEOUT = 3, - XF_EXIT_LOGON_TIMEOUT = 4, - XF_EXIT_CONN_REPLACED = 5, - XF_EXIT_OUT_OF_MEMORY = 6, - XF_EXIT_CONN_DENIED = 7, - XF_EXIT_CONN_DENIED_FIPS = 8, - XF_EXIT_USER_PRIVILEGES = 9, - XF_EXIT_FRESH_CREDENTIALS_REQUIRED = 10, - XF_EXIT_DISCONNECT_BY_USER = 11, - - /* section 16-31: license error set */ - XF_EXIT_LICENSE_INTERNAL = 16, - XF_EXIT_LICENSE_NO_LICENSE_SERVER = 17, - XF_EXIT_LICENSE_NO_LICENSE = 18, - XF_EXIT_LICENSE_BAD_CLIENT_MSG = 19, - XF_EXIT_LICENSE_HWID_DOESNT_MATCH = 20, - XF_EXIT_LICENSE_BAD_CLIENT = 21, - XF_EXIT_LICENSE_CANT_FINISH_PROTOCOL = 22, - XF_EXIT_LICENSE_CLIENT_ENDED_PROTOCOL = 23, - XF_EXIT_LICENSE_BAD_CLIENT_ENCRYPTION = 24, - XF_EXIT_LICENSE_CANT_UPGRADE = 25, - XF_EXIT_LICENSE_NO_REMOTE_CONNECTIONS = 26, - - /* section 32-127: RDP protocol error set */ - XF_EXIT_RDP = 32, - - /* section 128-254: xfreerdp specific exit codes */ - XF_EXIT_PARSE_ARGUMENTS = 128, - XF_EXIT_MEMORY = 129, - XF_EXIT_PROTOCOL = 130, - XF_EXIT_CONN_FAILED = 131, - - XF_EXIT_UNKNOWN = 255, -}; - -void xf_lock_x11(xfInfo* xfi, BOOL display); -void xf_unlock_x11(xfInfo* xfi, BOOL display); - -#ifdef WITH_DEBUG_X11 -#define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__) -#else -#define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) -#endif - -#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE -#define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__) -#else -#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) -#endif #endif /* __XFREERDP_H */