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);
119void xf_rail_send_activate(xfContext* xfc, Window xwindow, BOOL enabled);
120void xf_rail_adjust_position(xfContext* xfc, xfAppWindow* appWindow);
121void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow);
122void xf_rail_enable_remoteapp_mode(xfContext* xfc);
123void 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
128void xf_rail_return_window(xfAppWindow* window);
129
130WINPR_ATTR_MALLOC(xf_rail_return_window, 1)
131xfAppWindow* xf_rail_get_window(xfContext* xfc, UINT64 id);
132
133BOOL xf_rail_del_window(xfContext* xfc, UINT64 id);
134
135int xf_rail_init(xfContext* xfc, RailClientContext* rail);
136int xf_rail_uninit(xfContext* xfc, RailClientContext* rail);
137
138#endif /* FREERDP_CLIENT_X11_RAIL_H */