FreeRDP
Loading...
Searching...
No Matches
xf_rail.h
1
20#ifndef FREERDP_CLIENT_X11_RAIL_H
21#define FREERDP_CLIENT_X11_RAIL_H
22
23#include <freerdp/client/rail.h>
24
25#include <X11/X.h>
26#include <X11/Xlib.h>
27
28#include "xf_types.h"
29
30enum xf_localmove_state
31{
32 LMS_NOT_ACTIVE,
33 LMS_STARTING,
34 LMS_ACTIVE,
35 LMS_TERMINATING
36};
37
39{
40 int root_x;
41 int root_y;
42 int window_x;
43 int window_y;
44 enum xf_localmove_state state;
45 int direction;
46};
47typedef struct xf_localmove xfLocalMove;
48
50{
51 xfContext* xfc;
52
53 int x;
54 int y;
55 int width;
56 int height;
57 char* title;
58
59 UINT32 surfaceId;
60 UINT64 windowId;
61 UINT32 ownerWindowId;
62
63 UINT32 dwStyle;
64 UINT32 dwExStyle;
65 UINT32 showState;
66
67 INT32 clientOffsetX;
68 INT32 clientOffsetY;
69 UINT32 clientAreaWidth;
70 UINT32 clientAreaHeight;
71
72 INT32 windowOffsetX;
73 INT32 windowOffsetY;
74 INT32 windowClientDeltaX;
75 INT32 windowClientDeltaY;
76 UINT32 windowWidth;
77 UINT32 windowHeight;
78 UINT32 numWindowRects;
79 RECTANGLE_16* windowRects;
80
81 INT32 visibleOffsetX;
82 INT32 visibleOffsetY;
83 UINT32 numVisibilityRects;
84 RECTANGLE_16* visibilityRects;
85
86 UINT32 localWindowOffsetCorrX;
87 UINT32 localWindowOffsetCorrY;
88
89 UINT32 resizeMarginLeft;
90 UINT32 resizeMarginTop;
91 UINT32 resizeMarginRight;
92 UINT32 resizeMarginBottom;
93
94 GC gc;
95 int shmid;
96 Window handle;
97 Window* xfwin;
98 BOOL fullscreen;
99 BOOL decorations;
100 BOOL is_mapped;
101 BOOL is_transient;
102 xfLocalMove local_move;
103 BYTE rail_state;
104 BOOL maxVert;
105 BOOL maxHorz;
106 BOOL minimized;
107 BOOL rail_ignore_configure;
108
109 Pixmap pixmap;
110 XImage* image;
111};
112typedef struct xf_app_window xfAppWindow;
113typedef struct xf_rail_icon_cache xfRailIconCache;
114
115BOOL xf_rail_paint(xfContext* xfc, const RECTANGLE_16* rect);
116BOOL xf_rail_paint_surface(xfContext* xfc, UINT64 windowId, const RECTANGLE_16* rect);
117
118BOOL xf_rail_send_client_system_command(xfContext* xfc, UINT64 windowId, UINT16 command);
119BOOL xf_rail_send_activate(xfContext* xfc, Window xwindow, BOOL enabled);
120BOOL xf_rail_adjust_position(xfContext* xfc, xfAppWindow* appWindow);
121BOOL xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow);
122BOOL xf_rail_enable_remoteapp_mode(xfContext* xfc);
123BOOL xf_rail_disable_remoteapp_mode(xfContext* xfc);
124
125xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, INT32 x, INT32 y, UINT32 width,
126 UINT32 height, UINT32 surfaceId);
127
128#define xf_rail_return_window(window) \
129 xf_rail_return_windowFrom((window), __FILE__, __func__, __LINE__)
130void xf_rail_return_windowFrom(xfAppWindow* window, const char* file, const char* fkt, size_t line);
131
132#define xf_rail_get_window(xfc, id) \
133 xf_rail_get_windowFrom((xfc), (id), __FILE__, __func__, __LINE__)
134
135WINPR_ATTR_MALLOC(xf_rail_return_windowFrom, 1)
136xfAppWindow* xf_rail_get_windowFrom(xfContext* xfc, UINT64 id, const char* file, const char* fkt,
137 size_t line);
138
139BOOL xf_rail_del_window(xfContext* xfc, UINT64 id);
140
141int xf_rail_init(xfContext* xfc, RailClientContext* rail);
142int xf_rail_uninit(xfContext* xfc, RailClientContext* rail);
143
144#endif /* FREERDP_CLIENT_X11_RAIL_H */