2011-08-07 17:52:40 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
* X11 Client
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __XFREERDP_H
|
|
|
|
#define __XFREERDP_H
|
|
|
|
|
2011-08-07 21:41:54 +04:00
|
|
|
#include <X11/Xlib.h>
|
2011-08-11 11:37:46 +04:00
|
|
|
#include <X11/Xutil.h>
|
2011-08-07 17:52:40 +04:00
|
|
|
#include <freerdp/freerdp.h>
|
2011-08-15 22:33:04 +04:00
|
|
|
#include <freerdp/chanman/chanman.h>
|
|
|
|
#include <freerdp/gdi/gdi.h>
|
2011-08-16 08:22:00 +04:00
|
|
|
#include <freerdp/rail/rail.h>
|
2011-08-26 22:48:51 +04:00
|
|
|
#include <freerdp/cache/cache.h>
|
2011-08-07 17:52:40 +04:00
|
|
|
|
2011-08-09 06:24:12 +04:00
|
|
|
typedef struct xf_info xfInfo;
|
|
|
|
|
|
|
|
#include "xf_window.h"
|
2011-08-31 04:59:42 +04:00
|
|
|
#include "xf_monitor.h"
|
2011-08-09 06:24:12 +04:00
|
|
|
|
2011-08-07 17:52:40 +04:00
|
|
|
#define SET_XFI(_instance, _xfi) (_instance)->param1 = _xfi
|
|
|
|
#define GET_XFI(_instance) ((xfInfo*) ((_instance)->param1))
|
|
|
|
|
|
|
|
#define SET_CHANMAN(_instance, _chanman) (_instance)->param2 = _chanman
|
|
|
|
#define GET_CHANMAN(_instance) ((rdpChanMan*) ((_instance)->param2))
|
|
|
|
|
2011-08-17 22:13:44 +04:00
|
|
|
struct xf_WorkArea
|
|
|
|
{
|
|
|
|
uint32 x;
|
|
|
|
uint32 y;
|
|
|
|
uint32 width;
|
|
|
|
uint32 height;
|
|
|
|
};
|
|
|
|
typedef struct xf_WorkArea xfWorkArea;
|
|
|
|
|
2011-08-07 17:52:40 +04:00
|
|
|
struct xf_info
|
|
|
|
{
|
2011-08-07 21:41:54 +04:00
|
|
|
GC gc;
|
|
|
|
int bpp;
|
|
|
|
int xfds;
|
|
|
|
int depth;
|
|
|
|
int width;
|
|
|
|
int height;
|
2011-08-26 22:48:51 +04:00
|
|
|
int srcBpp;
|
2011-08-07 21:41:54 +04:00
|
|
|
Screen* screen;
|
2011-08-07 22:09:18 +04:00
|
|
|
XImage* image;
|
2011-08-07 21:41:54 +04:00
|
|
|
Pixmap primary;
|
2011-08-26 22:48:51 +04:00
|
|
|
Pixmap drawing;
|
2011-08-07 21:41:54 +04:00
|
|
|
Visual* visual;
|
|
|
|
Display* display;
|
|
|
|
Colormap colormap;
|
|
|
|
int screen_number;
|
|
|
|
int scanline_pad;
|
|
|
|
boolean big_endian;
|
|
|
|
boolean fullscreen;
|
|
|
|
boolean unobscured;
|
|
|
|
boolean decoration;
|
|
|
|
freerdp* instance;
|
2011-08-09 06:24:12 +04:00
|
|
|
xfWindow* window;
|
2011-08-17 22:13:44 +04:00
|
|
|
xfWorkArea workArea;
|
|
|
|
int current_desktop;
|
2011-08-17 22:51:17 +04:00
|
|
|
boolean remote_app;
|
2011-08-26 22:48:51 +04:00
|
|
|
HCLRCONV clrconv;
|
2011-08-18 00:45:09 +04:00
|
|
|
rdpRail* rail;
|
2011-08-26 22:48:51 +04:00
|
|
|
rdpCache* cache;
|
2011-08-07 17:52:40 +04:00
|
|
|
|
2011-08-07 21:41:54 +04:00
|
|
|
boolean focused;
|
|
|
|
boolean mouse_active;
|
|
|
|
boolean mouse_motion;
|
|
|
|
boolean fullscreen_toggle;
|
|
|
|
uint32 keyboard_layout_id;
|
|
|
|
boolean pressed_keys[256];
|
|
|
|
XModifierKeymap* modifier_map;
|
2011-08-09 06:24:12 +04:00
|
|
|
XSetWindowAttributes attribs;
|
2011-08-26 21:37:23 +04:00
|
|
|
boolean complex_regions;
|
2011-08-31 04:59:42 +04:00
|
|
|
VIRTUAL_SCREEN vscreen;
|
2011-08-24 08:46:34 +04:00
|
|
|
|
|
|
|
Atom _NET_WM_ICON;
|
|
|
|
Atom _MOTIF_WM_HINTS;
|
|
|
|
Atom _NET_CURRENT_DESKTOP;
|
|
|
|
Atom _NET_WORKAREA;
|
2011-08-25 01:16:57 +04:00
|
|
|
|
2011-08-24 08:46:34 +04:00
|
|
|
Atom _NET_WM_STATE;
|
|
|
|
Atom _NET_WM_STATE_FULLSCREEN;
|
2011-08-25 01:16:57 +04:00
|
|
|
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;
|
2011-09-01 02:22:21 +04:00
|
|
|
|
|
|
|
Atom _NET_WM_MOVERESIZE;
|
2011-08-07 17:52:40 +04:00
|
|
|
};
|
|
|
|
|
2011-08-07 21:41:54 +04:00
|
|
|
void xf_toggle_fullscreen(xfInfo* xfi);
|
|
|
|
|
2011-09-02 21:29:17 +04:00
|
|
|
#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
|
|
|
|
|
2011-09-04 00:38:01 +04:00
|
|
|
#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
|
|
|
|
|
|
|
|
|
2011-08-07 17:52:40 +04:00
|
|
|
#endif /* __XFREERDP_H */
|