Commit | Line | Data |
---|---|---|
a09e091a JB |
1 | #if !defined(_WINWINDOW_H_) |
2 | #define _WINWINDOW_H_ | |
3 | /* | |
4 | *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. | |
5 | *Copyright (C) Colin Harrison 2005-2009 | |
6 | * | |
7 | *Permission is hereby granted, free of charge, to any person obtaining | |
8 | * a copy of this software and associated documentation files (the | |
9 | *"Software"), to deal in the Software without restriction, including | |
10 | *without limitation the rights to use, copy, modify, merge, publish, | |
11 | *distribute, sublicense, and/or sell copies of the Software, and to | |
12 | *permit persons to whom the Software is furnished to do so, subject to | |
13 | *the following conditions: | |
14 | * | |
15 | *The above copyright notice and this permission notice shall be | |
16 | *included in all copies or substantial portions of the Software. | |
17 | * | |
18 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
19 | *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
20 | *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
21 | *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR | |
22 | *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | |
23 | *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
24 | *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
25 | * | |
26 | *Except as contained in this notice, the name of the XFree86 Project | |
27 | *shall not be used in advertising or otherwise to promote the sale, use | |
28 | *or other dealings in this Software without prior written authorization | |
29 | *from the XFree86 Project. | |
30 | * | |
31 | * Authors: Kensuke Matsuzaki | |
32 | * Colin Harrison | |
33 | */ | |
34 | ||
35 | #ifndef NO | |
36 | #define NO 0 | |
37 | #endif | |
38 | #ifndef YES | |
39 | #define YES 1 | |
40 | #endif | |
41 | ||
42 | /* Constant strings */ | |
43 | #ifndef PROJECT_NAME | |
44 | #define PROJECT_NAME "Cygwin/X" | |
45 | #endif | |
46 | #define EXECUTABLE_NAME "XWin" | |
47 | #define WINDOW_CLASS "cygwin/x" | |
48 | #define WINDOW_TITLE PROJECT_NAME ":%s.%d" | |
49 | #define WINDOW_TITLE_XDMCP "%s:%s.%d" | |
50 | #define WIN_SCR_PROP "cyg_screen_prop rl" | |
51 | #define WINDOW_CLASS_X "cygwin/x X rl" | |
52 | #define WINDOW_CLASS_X_MSG "cygwin/x X msg" | |
53 | #define WINDOW_TITLE_X PROJECT_NAME " X" | |
54 | #define WIN_WINDOW_PROP "cyg_window_prop_rl" | |
55 | #ifdef HAS_DEVWINDOWS | |
56 | #define WIN_MSG_QUEUE_FNAME "/dev/windows" | |
57 | #endif | |
58 | #define WIN_WID_PROP "cyg_wid_prop_rl" | |
59 | #define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl" | |
60 | #ifndef CYGMULTIWINDOW_DEBUG | |
61 | #define CYGMULTIWINDOW_DEBUG NO | |
62 | #endif | |
63 | #ifndef CYGWINDOWING_DEBUG | |
64 | #define CYGWINDOWING_DEBUG NO | |
65 | #endif | |
66 | ||
67 | #define XMING_SIGNATURE 0x12345678L | |
68 | ||
69 | typedef struct _winPrivScreenRec *winPrivScreenPtr; | |
70 | ||
71 | /* | |
72 | * Window privates | |
73 | */ | |
74 | ||
75 | typedef struct { | |
76 | DWORD dwDummy; | |
77 | HRGN hRgn; | |
78 | HWND hWnd; | |
79 | winPrivScreenPtr pScreenPriv; | |
80 | Bool fXKilled; | |
81 | HDWP hDwp; | |
82 | #ifdef XWIN_GLX_WINDOWS | |
83 | Bool fWglUsed; | |
84 | #endif | |
85 | } winPrivWinRec, *winPrivWinPtr; | |
86 | ||
87 | #ifdef XWIN_MULTIWINDOW | |
88 | typedef struct _winWMMessageRec { | |
89 | DWORD dwID; | |
90 | DWORD msg; | |
91 | int iWindow; | |
92 | HWND hwndWindow; | |
93 | int iX, iY; | |
94 | int iWidth, iHeight; | |
95 | } winWMMessageRec, *winWMMessagePtr; | |
96 | ||
97 | /* | |
98 | * winmultiwindowwm.c | |
99 | */ | |
100 | ||
101 | #define WM_WM_MOVE (WM_USER + 1) | |
102 | #define WM_WM_SIZE (WM_USER + 2) | |
103 | #define WM_WM_RAISE (WM_USER + 3) | |
104 | #define WM_WM_LOWER (WM_USER + 4) | |
105 | #define WM_WM_MAP (WM_USER + 5) | |
106 | #define WM_WM_UNMAP (WM_USER + 6) | |
107 | #define WM_WM_KILL (WM_USER + 7) | |
108 | #define WM_WM_ACTIVATE (WM_USER + 8) | |
109 | #define WM_WM_NAME_EVENT (WM_USER + 9) | |
110 | #define WM_WM_ICON_EVENT (WM_USER + 10) | |
111 | #define WM_WM_CHANGE_STATE (WM_USER + 11) | |
112 | #define WM_WM_MAP2 (WM_USER + 12) | |
113 | #define WM_WM_MAP3 (WM_USER + 13) | |
114 | #define WM_WM_HINTS_EVENT (WM_USER + 14) | |
115 | #define WM_MANAGE (WM_USER + 100) | |
116 | #define WM_UNMANAGE (WM_USER + 102) | |
117 | ||
118 | #define MwmHintsDecorations (1L << 1) | |
119 | ||
120 | #define MwmDecorAll (1L << 0) | |
121 | #define MwmDecorBorder (1L << 1) | |
122 | #define MwmDecorHandle (1L << 2) | |
123 | #define MwmDecorTitle (1L << 3) | |
124 | #define MwmDecorMenu (1L << 4) | |
125 | #define MwmDecorMinimize (1L << 5) | |
126 | #define MwmDecorMaximize (1L << 6) | |
127 | ||
128 | /* This structure only contains 3 elements... the Motif 2.0 structure | |
129 | contains 5... we only need the first 3... so that is all we will define */ | |
130 | typedef struct MwmHints { | |
131 | unsigned long flags, functions, decorations; | |
132 | } MwmHints; | |
133 | ||
134 | #define PropMwmHintsElements 3 | |
135 | ||
136 | void | |
137 | winSendMessageToWM(void *pWMInfo, winWMMessagePtr msg); | |
138 | ||
139 | Bool | |
140 | ||
141 | winInitWM(void **ppWMInfo, | |
142 | pthread_t * ptWMProc, | |
143 | pthread_t * ptXMsgProc, | |
144 | pthread_mutex_t * ppmServerStarted, | |
145 | int dwScreen, HWND hwndScreen, BOOL allowOtherWM); | |
146 | ||
147 | void | |
148 | winDeinitMultiWindowWM(void); | |
149 | ||
150 | void | |
151 | winMinimizeWindow(Window id); | |
152 | ||
153 | void | |
154 | winPropertyStoreInit(void); | |
155 | ||
156 | void | |
157 | winPropertyStoreDestroy(void); | |
158 | ||
159 | void | |
160 | winSetAppUserModelID(HWND hWnd, const char *AppID); | |
161 | ||
162 | void | |
163 | winShowWindowOnTaskbar(HWND hWnd, BOOL show); | |
164 | ||
165 | #endif /* XWIN_MULTIWINDOW */ | |
166 | #endif |