20 #ifndef FREERDP_CLIENT_X11_WINDOW_H
21 #define FREERDP_CLIENT_X11_WINDOW_H
25 #include <winpr/platform.h>
26 #include <freerdp/freerdp.h>
27 #include <freerdp/gdi/gfx.h>
34 #include "xf_client.h"
35 #include "xf_floatbar.h"
39 WINPR_PRAGMA_DIAG_PUSH
40 WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO
42 #define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0
43 #define _NET_WM_MOVERESIZE_SIZE_TOP 1
44 #define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2
45 #define _NET_WM_MOVERESIZE_SIZE_RIGHT 3
46 #define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4
47 #define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5
48 #define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6
49 #define _NET_WM_MOVERESIZE_SIZE_LEFT 7
50 #define _NET_WM_MOVERESIZE_MOVE 8
51 #define _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9
52 #define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10
53 #define _NET_WM_MOVERESIZE_CANCEL 11
55 #define _NET_WM_STATE_REMOVE 0
56 #define _NET_WM_STATE_ADD 1
57 #define _NET_WM_STATE_TOGGLE 2
61 enum xf_localmove_state
75 enum xf_localmove_state state;
109 UINT32 ownerWindowId;
117 UINT32 clientAreaWidth;
118 UINT32 clientAreaHeight;
122 INT32 windowClientDeltaX;
123 INT32 windowClientDeltaY;
126 UINT32 numWindowRects;
129 INT32 visibleOffsetX;
130 INT32 visibleOffsetY;
131 UINT32 numVisibilityRects;
134 UINT32 localWindowOffsetCorrX;
135 UINT32 localWindowOffsetCorrY;
137 UINT32 resizeMarginLeft;
138 UINT32 resizeMarginTop;
139 UINT32 resizeMarginRight;
140 UINT32 resizeMarginBottom;
150 xfLocalMove local_move;
155 BOOL rail_ignore_configure;
161 void xf_ewmhints_init(xfContext* xfc);
163 BOOL xf_GetWorkArea(xfContext* xfc);
165 void xf_SetWindowFullscreen(xfContext* xfc, xfWindow* window, BOOL fullscreen);
166 void xf_SetWindowMinimized(xfContext* xfc, xfWindow* window);
167 void xf_SetWindowDecorations(xfContext* xfc, Window window, BOOL show);
168 void xf_SetWindowUnlisted(xfContext* xfc, Window window);
170 xfWindow* xf_CreateDesktopWindow(xfContext* xfc,
char* name,
int width,
int height);
171 void xf_ResizeDesktopWindow(xfContext* xfc, xfWindow* window,
int width,
int height);
172 void xf_DestroyDesktopWindow(xfContext* xfc, xfWindow* window);
174 Window xf_CreateDummyWindow(xfContext* xfc);
175 void xf_DestroyDummyWindow(xfContext* xfc, Window window);
177 BOOL xf_GetWindowProperty(xfContext* xfc, Window window, Atom property,
int length,
178 unsigned long* nitems,
unsigned long* bytes, BYTE** prop);
179 void xf_SendClientEvent(xfContext* xfc, Window window, Atom atom,
unsigned int numArgs, ...);
181 BOOL xf_AppWindowCreate(xfContext* xfc, xfAppWindow* appWindow);
182 int xf_AppWindowInit(xfContext* xfc, xfAppWindow* appWindow);
184 BOOL xf_AppWindowResize(xfContext* xfc, xfAppWindow* appWindow);
186 void xf_SetWindowText(xfContext* xfc, xfAppWindow* appWindow,
const char* name);
187 void xf_MoveWindow(xfContext* xfc, xfAppWindow* appWindow,
int x,
int y,
int width,
int height);
188 void xf_ShowWindow(xfContext* xfc, xfAppWindow* appWindow, BYTE state);
190 void xf_SetWindowRects(xfContext* xfc, xfAppWindow* appWindow,
RECTANGLE_16* rects,
int nrects);
191 void xf_SetWindowVisibilityRects(xfContext* xfc, xfAppWindow* appWindow, UINT32 rectsOffsetX,
193 void xf_SetWindowStyle(xfContext* xfc, xfAppWindow* appWindow, UINT32 style, UINT32 ex_style);
194 void xf_SetWindowActions(xfContext* xfc, xfAppWindow* appWindow);
195 void xf_UpdateWindowArea(xfContext* xfc, xfAppWindow* appWindow,
int x,
int y,
int width,
197 UINT xf_AppUpdateWindowFromSurface(xfContext* xfc, gdiGfxSurface* surface);
199 void xf_DestroyWindow(xfContext* xfc, xfAppWindow* appWindow);
200 void xf_SetWindowMinMaxInfo(xfContext* xfc, xfAppWindow* appWindow,
int maxWidth,
int maxHeight,
201 int maxPosX,
int maxPosY,
int minTrackWidth,
int minTrackHeight,
202 int maxTrackWidth,
int maxTrackHeight);
203 void xf_StartLocalMoveSize(xfContext* xfc, xfAppWindow* appWindow,
int direction,
int x,
int y);
204 void xf_EndLocalMoveSize(xfContext* xfc, xfAppWindow* appWindow);
205 xfAppWindow* xf_AppWindowFromX11Window(xfContext* xfc, Window wnd);
207 const char* window_styles_to_string(UINT32 style,
char* buffer,
size_t length);
208 const char* window_styles_ex_to_string(UINT32 styleEx,
char* buffer,
size_t length);