FreeRDP
include/freerdp/window.h
1 
20 #ifndef FREERDP_UPDATE_WINDOW_H
21 #define FREERDP_UPDATE_WINDOW_H
22 
23 #include <freerdp/types.h>
24 #include <freerdp/rail.h>
25 
26 /* Window Order Header Flags */
27 #define WINDOW_ORDER_TYPE_WINDOW 0x01000000
28 #define WINDOW_ORDER_TYPE_NOTIFY 0x02000000
29 #define WINDOW_ORDER_TYPE_DESKTOP 0x04000000
30 
31 #define WINDOW_ORDER_STATE_NEW 0x10000000
32 #define WINDOW_ORDER_STATE_DELETED 0x20000000
33 
34 /* Window Order Update */
35 #define WINDOW_ORDER_FIELD_OWNER 0x00000002
36 #define WINDOW_ORDER_FIELD_STYLE 0x00000008
37 #define WINDOW_ORDER_FIELD_SHOW 0x00000010
38 #define WINDOW_ORDER_FIELD_TITLE 0x00000004
39 #define WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET 0x00004000
40 #define WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE 0x00010000
41 #define WINDOW_ORDER_FIELD_RESIZE_MARGIN_X 0x00000080
42 #define WINDOW_ORDER_FIELD_RESIZE_MARGIN_Y 0x08000000
43 #define WINDOW_ORDER_FIELD_RP_CONTENT 0x00020000
44 #define WINDOW_ORDER_FIELD_ROOT_PARENT 0x00040000
45 #define WINDOW_ORDER_FIELD_WND_OFFSET 0x00000800
46 #define WINDOW_ORDER_FIELD_WND_CLIENT_DELTA 0x00008000
47 #define WINDOW_ORDER_FIELD_WND_SIZE 0x00000400
48 #define WINDOW_ORDER_FIELD_WND_RECTS 0x00000100
49 #define WINDOW_ORDER_FIELD_VIS_OFFSET 0x00001000
50 #define WINDOW_ORDER_FIELD_VISIBILITY 0x00000200
51 #define WINDOW_ORDER_FIELD_OVERLAY_DESCRIPTION 0x00400000
52 #define WINDOW_ORDER_FIELD_ICON_OVERLAY_NULL 0x00200000
53 #define WINDOW_ORDER_FIELD_TASKBAR_BUTTON 0x00800000
54 #define WINDOW_ORDER_FIELD_ENFORCE_SERVER_ZORDER 0x00080000
55 #define WINDOW_ORDER_FIELD_APPBAR_STATE 0x00000040
56 #define WINDOW_ORDER_FIELD_APPBAR_EDGE 0x00000001
57 
58 /* Window (cached) Icon */
59 #define WINDOW_ORDER_ICON 0x40000000
60 #define WINDOW_ORDER_CACHED_ICON 0x80000000
61 #define WINDOW_ORDER_FIELD_ICON_BIG 0x00002000
62 #define WINDOW_ORDER_FIELD_ICON_OVERLAY 0x00100000
63 
64 #define WINDOW_ORDER_FIELD_NOTIFY_VERSION 0x00000008
65 #define WINDOW_ORDER_FIELD_NOTIFY_TIP 0x00000001
66 #define WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP 0x00000002
67 #define WINDOW_ORDER_FIELD_NOTIFY_STATE 0x00000004
68 #define WINDOW_ORDER_FIELD_DESKTOP_NONE 0x00000001
69 #define WINDOW_ORDER_FIELD_DESKTOP_HOOKED 0x00000002
70 #define WINDOW_ORDER_FIELD_DESKTOP_ARC_COMPLETED 0x00000004
71 #define WINDOW_ORDER_FIELD_DESKTOP_ARC_BEGAN 0x00000008
72 #define WINDOW_ORDER_FIELD_DESKTOP_ZORDER 0x00000010
73 #define WINDOW_ORDER_FIELD_DESKTOP_ACTIVE_WND 0x00000020
74 
75 /* Window Show States */
76 #define WINDOW_HIDE 0x00
77 #define WINDOW_SHOW_MINIMIZED 0x02
78 #define WINDOW_SHOW_MAXIMIZED 0x03
79 #define WINDOW_SHOW 0x05
80 
81 /* Window Styles */
82 #ifndef _WIN32
83 #define WS_NONE 0x00000000
84 #define WS_BORDER 0x00800000
85 #define WS_CAPTION 0x00C00000
86 #define WS_CHILD 0x40000000
87 #define WS_CHILDWINDOW 0x40000000
88 #define WS_CLIPCHILDREN 0x02000000
89 #define WS_CLIPSIBLINGS 0x04000000
90 #define WS_DISABLED 0x08000000
91 #define WS_DLGFRAME 0x00400000
92 #define WS_GROUP 0x00020000
93 #define WS_HSCROLL 0x00100000
94 #define WS_ICONIC 0x20000000
95 #define WS_MAXIMIZE 0x01000000
96 #define WS_MAXIMIZEBOX 0x00010000
97 #define WS_MINIMIZE 0x20000000
98 #define WS_MINIMIZEBOX 0x00020000
99 #define WS_OVERLAPPED 0x00000000
100 #define WS_OVERLAPPEDWINDOW \
101  (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
102 #define WS_POPUP 0x80000000
103 #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
104 #define WS_SIZEBOX 0x00040000
105 #define WS_SYSMENU 0x00080000
106 #define WS_TABSTOP 0x00010000
107 #define WS_THICKFRAME 0x00040000
108 #define WS_VISIBLE 0x10000000
109 #define WS_VSCROLL 0x00200000
110 #define WS_TILEDWINDOW \
111  (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
112 #endif
113 
114 /* Extended Window Styles */
115 #ifndef _WIN32
116 #define WS_EX_NONE 0x00000000
117 #define WS_EX_ACCEPTFILES 0x00000010
118 #define WS_EX_APPWINDOW 0x00040000
119 #define WS_EX_CLIENTEDGE 0x00000200
120 #define WS_EX_COMPOSITED 0x02000000
121 #define WS_EX_CONTEXTHELP 0x00000400
122 #define WS_EX_CONTROLPARENT 0x00010000
123 #define WS_EX_DLGMODALFRAME 0x00000001
124 #define WS_EX_LAYERED 0x00080000
125 #define WS_EX_LAYOUTRTL 0x00400000
126 #define WS_EX_LEFT 0x00000000
127 #define WS_EX_LEFTSCROLLBAR 0x00004000
128 #define WS_EX_LTRREADING 0x00000000
129 #define WS_EX_MDICHILD 0x00000040
130 #define WS_EX_NOACTIVATE 0x08000000
131 #define WS_EX_NOINHERITLAYOUT 0x00100000
132 #define WS_EX_NOPARENTNOTIFY 0x00000004
133 #define WS_EX_NOREDIRECTIONBITMAP 0x00200000
134 #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
135 #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
136 #define WS_EX_RIGHT 0x00001000
137 #define WS_EX_RIGHTSCROLLBAR 0x00000000
138 #define WS_EX_RTLREADING 0x00002000
139 #define WS_EX_STATICEDGE 0x00020000
140 #define WS_EX_TOOLWINDOW 0x00000080
141 #define WS_EX_TOPMOST 0x00000008
142 #define WS_EX_TRANSPARENT 0x00000020
143 #define WS_EX_WINDOWEDGE 0x00000100
144 #endif
145 
151 #define WS_EX_DECORATIONS 0x40000000
152 
153 #ifdef __cplusplus
154 extern "C"
155 {
156 #endif
157 
158  typedef struct
159  {
160  UINT32 windowId;
161  UINT32 fieldFlags;
162  UINT32 notifyIconId;
164 
165  typedef struct
166  {
167  UINT32 cacheEntry;
168  UINT32 cacheId;
169  UINT32 bpp;
170  UINT32 width;
171  UINT32 height;
172  UINT32 cbColorTable;
173  UINT32 cbBitsMask;
174  UINT32 cbBitsColor;
175  BYTE* bitsMask;
176  BYTE* colorTable;
177  BYTE* bitsColor;
178  } ICON_INFO;
179 
180  typedef struct
181  {
182  UINT32 cacheEntry;
183  UINT32 cacheId;
185 
186  typedef struct
187  {
188  UINT32 timeout;
189  UINT32 flags;
190  RAIL_UNICODE_STRING text;
191  RAIL_UNICODE_STRING title;
193 
194  typedef struct
195  {
196  UINT32 ownerWindowId;
197  UINT32 style;
198  UINT32 extendedStyle;
199  UINT32 showState;
200  RAIL_UNICODE_STRING titleInfo;
201  INT32 clientOffsetX;
202  INT32 clientOffsetY;
203  UINT32 clientAreaWidth;
204  UINT32 clientAreaHeight;
205  UINT32 RPContent;
206  UINT32 rootParentHandle;
207  INT32 windowOffsetX;
208  INT32 windowOffsetY;
209  INT32 windowClientDeltaX;
210  INT32 windowClientDeltaY;
211  UINT32 windowWidth;
212  UINT32 windowHeight;
213  UINT32 numWindowRects;
214  RECTANGLE_16* windowRects;
215  INT32 visibleOffsetX;
216  INT32 visibleOffsetY;
217  UINT32 resizeMarginLeft;
218  UINT32 resizeMarginTop;
219  UINT32 resizeMarginRight;
220  UINT32 resizeMarginBottom;
221  UINT32 numVisibilityRects;
222  RECTANGLE_16* visibilityRects;
223  RAIL_UNICODE_STRING OverlayDescription;
224  BYTE TaskbarButton;
225  UINT8 EnforceServerZOrder;
226  UINT8 AppBarState;
227  UINT8 AppBarEdge;
229 
230  typedef struct
231  {
232  ICON_INFO* iconInfo;
234 
235  typedef struct
236  {
237  CACHED_ICON_INFO cachedIcon;
239 
240  typedef struct
241  {
242  UINT32 version;
243  RAIL_UNICODE_STRING toolTip;
244  NOTIFY_ICON_INFOTIP infoTip;
245  UINT32 state;
246  ICON_INFO icon;
247  CACHED_ICON_INFO cachedIcon;
249 
250  typedef struct
251  {
252  UINT32 activeWindowId;
253  UINT32 numWindowIds;
254  UINT32* windowIds;
256 
257  typedef BOOL (*pWindowCreate)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
258  const WINDOW_STATE_ORDER* window_state);
259  typedef BOOL (*pWindowUpdate)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
260  const WINDOW_STATE_ORDER* window_state);
261  typedef BOOL (*pWindowIcon)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
262  const WINDOW_ICON_ORDER* window_icon);
263  typedef BOOL (*pWindowCachedIcon)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
264  const WINDOW_CACHED_ICON_ORDER* window_cached_icon);
265  typedef BOOL (*pWindowDelete)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo);
266  typedef BOOL (*pNotifyIconCreate)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
267  const NOTIFY_ICON_STATE_ORDER* notify_icon_state);
268  typedef BOOL (*pNotifyIconUpdate)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
269  const NOTIFY_ICON_STATE_ORDER* notify_icon_state);
270  typedef BOOL (*pNotifyIconDelete)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo);
271  typedef BOOL (*pMonitoredDesktop)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo,
272  const MONITORED_DESKTOP_ORDER* monitored_desktop);
273  typedef BOOL (*pNonMonitoredDesktop)(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo);
274 
276  {
277  rdpContext* context; /* 0 */
278  UINT32 paddingA[16 - 1]; /* 1 */
279 
280  pWindowCreate WindowCreate; /* 16 */
281  pWindowUpdate WindowUpdate; /* 17 */
282  pWindowIcon WindowIcon; /* 18 */
283  pWindowCachedIcon WindowCachedIcon; /* 19 */
284  pWindowDelete WindowDelete; /* 20 */
285  pNotifyIconCreate NotifyIconCreate; /* 21 */
286  pNotifyIconUpdate NotifyIconUpdate; /* 22 */
287  pNotifyIconDelete NotifyIconDelete; /* 23 */
288  pMonitoredDesktop MonitoredDesktop; /* 24 */
289  pNonMonitoredDesktop NonMonitoredDesktop; /* 25 */
290  UINT32 paddingB[32 - 26]; /* 26 */
291  };
292  typedef struct rdp_window_update rdpWindowUpdate;
293 
294 #ifdef __cplusplus
295 }
296 #endif
297 
298 #endif /* FREERDP_UPDATE_WINDOW_H */