FreeRDP/client/X11/xfreerdp.h

163 lines
3.3 KiB
C
Raw Normal View History

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
#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>
#include <freerdp/channels/channels.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/gdi/dc.h>
#include <freerdp/gdi/region.h>
#include <freerdp/rail/rail.h>
#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"
#include "xf_monitor.h"
2011-08-09 06:24:12 +04:00
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_context
{
rdpContext _p;
xfInfo* xfi;
rdpSettings* settings;
};
typedef struct xf_context xfContext;
2011-08-07 17:52:40 +04:00
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;
boolean big_endian;
boolean fullscreen;
boolean grab_keyboard;
boolean unobscured;
2011-10-07 23:50:07 +04:00
boolean decorations;
2011-08-09 06:24:12 +04:00
xfWindow* window;
xfWorkArea workArea;
int current_desktop;
boolean remote_app;
HCLRCONV clrconv;
2011-08-07 17:52:40 +04:00
HGDI_DC hdc;
boolean sw_gdi;
uint8* primary_buffer;
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;
boolean complex_regions;
VIRTUAL_SCREEN vscreen;
uint8* bmp_codec_none;
2011-10-02 23:16:22 +04:00
uint8* bmp_codec_nsc;
void* rfx_context;
2011-10-02 23:16:22 +04:00
void* nsc_context;
2011-09-20 12:27:59 +04:00
void* xv_context;
2011-09-23 07:37:17 +04:00
void* clipboard_context;
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-24 08:46:34 +04:00
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_MOVERESIZE;
Atom WM_PROTOCOLS;
Atom WM_DELETE_WINDOW;
2011-08-07 17:52:40 +04:00
};
void xf_toggle_fullscreen(xfInfo* xfi);
2011-09-14 06:20:04 +04:00
boolean xf_post_connect(freerdp* instance);
#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
2011-08-07 17:52:40 +04:00
#endif /* __XFREERDP_H */