2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
24 #include <freerdp/freerdp.h>
25 #include <freerdp/utils/memory.h>
27 typedef struct xf_localmove xfLocalMove;
28 typedef struct xf_window xfWindow;
32 // Extended ICCM flags http://standards.freedesktop.org/wm-spec/wm-spec-latest.html
33 #define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0
34 #define _NET_WM_MOVERESIZE_SIZE_TOP 1
35 #define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2
36 #define _NET_WM_MOVERESIZE_SIZE_RIGHT 3
37 #define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4
38 #define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5
39 #define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6
40 #define _NET_WM_MOVERESIZE_SIZE_LEFT 7
41 #define _NET_WM_MOVERESIZE_MOVE 8 /* movement only */
42 #define _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9 /* size via keyboard */
43 #define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10 /* move via keyboard */
44 #define _NET_WM_MOVERESIZE_CANCEL 11 /* cancel operation */
46 enum xf_localmove_state
56 int root_x; // relative to root
58 int window_x; // relative to window
60 enum xf_localmove_state state;
78 xfLocalMove local_move;
81 void xf_ewmhints_init(xfInfo* xfi);
83 boolean xf_GetCurrentDesktop(xfInfo* xfi);
84 boolean xf_GetWorkArea(xfInfo* xfi);
86 void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen);
87 void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, boolean show);
88 void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window);
90 xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations);
91 void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height);
93 xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id);
94 void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height);
95 void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state);
96 void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon);
97 void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
98 void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
99 void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style);
100 void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height);
101 boolean xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y);
102 void xf_DestroyWindow(xfInfo* xfi, xfWindow* window);
104 void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int maxHeight,
105 int maxPosX, int maxPosY, int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight);
108 void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x, int y);
109 void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window);
110 void xf_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...);
112 #endif /* __XF_WINDOW_H */