1 #if !defined(_WINWINDOW_H_)
4 *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
5 *Copyright (C) Colin Harrison 2005-2009
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:
15 *The above copyright notice and this permission notice shall be
16 *included in all copies or substantial portions of the Software.
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.
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.
31 * Authors: Kensuke Matsuzaki
42 /* Constant strings */
44 #define PROJECT_NAME "Cygwin/X"
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"
56 #define WIN_MSG_QUEUE_FNAME "/dev/windows"
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
63 #ifndef CYGWINDOWING_DEBUG
64 #define CYGWINDOWING_DEBUG NO
67 #define XMING_SIGNATURE 0x12345678L
69 typedef struct _winPrivScreenRec
*winPrivScreenPtr
;
79 winPrivScreenPtr pScreenPriv
;
82 #ifdef XWIN_GLX_WINDOWS
85 } winPrivWinRec
, *winPrivWinPtr
;
87 #ifdef XWIN_MULTIWINDOW
88 typedef struct _winWMMessageRec
{
95 } winWMMessageRec
, *winWMMessagePtr
;
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)
118 #define MwmHintsDecorations (1L << 1)
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)
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
;
134 #define PropMwmHintsElements 3
137 winSendMessageToWM(void *pWMInfo
, winWMMessagePtr msg
);
141 winInitWM(void **ppWMInfo
,
142 pthread_t
* ptWMProc
,
143 pthread_t
* ptXMsgProc
,
144 pthread_mutex_t
* ppmServerStarted
,
145 int dwScreen
, HWND hwndScreen
, BOOL allowOtherWM
);
148 winDeinitMultiWindowWM(void);
151 winMinimizeWindow(Window id
);
154 winPropertyStoreInit(void);
157 winPropertyStoreDestroy(void);
160 winSetAppUserModelID(HWND hWnd
, const char *AppID
);
163 winShowWindowOnTaskbar(HWND hWnd
, BOOL show
);
165 #endif /* XWIN_MULTIWINDOW */