winwindow.h revision 706f2543
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_TITLE_X PROJECT_NAME " X" 53#define WIN_WINDOW_PROP "cyg_window_prop_rl" 54#ifdef HAS_DEVWINDOWS 55# define WIN_MSG_QUEUE_FNAME "/dev/windows" 56#endif 57#define WIN_WID_PROP "cyg_wid_prop_rl" 58#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl" 59#ifndef CYGMULTIWINDOW_DEBUG 60#define CYGMULTIWINDOW_DEBUG NO 61#endif 62#ifndef CYGWINDOWING_DEBUG 63#define CYGWINDOWING_DEBUG NO 64#endif 65 66#define XMING_SIGNATURE 0x12345678L 67 68typedef struct _winPrivScreenRec *winPrivScreenPtr; 69 70 71/* 72 * Window privates 73 */ 74 75typedef struct 76{ 77 DWORD dwDummy; 78 HRGN hRgn; 79 HWND hWnd; 80 winPrivScreenPtr pScreenPriv; 81 Bool fXKilled; 82 83 /* Privates used by primary fb DirectDraw server */ 84 LPDDSURFACEDESC pddsdPrimary; 85 86 /* Privates used by shadow fb DirectDraw Nonlocking server */ 87 LPDIRECTDRAWSURFACE4 pddsPrimary4; 88 89 /* Privates used by both shadow fb DirectDraw servers */ 90 LPDIRECTDRAWCLIPPER pddcPrimary; 91} winPrivWinRec, *winPrivWinPtr; 92 93#ifdef XWIN_MULTIWINDOW 94typedef struct _winWMMessageRec{ 95 DWORD dwID; 96 DWORD msg; 97 int iWindow; 98 HWND hwndWindow; 99 int iX, iY; 100 int iWidth, iHeight; 101} winWMMessageRec, *winWMMessagePtr; 102 103 104/* 105 * winmultiwindowwm.c 106 */ 107 108#define WM_WM_MOVE (WM_USER + 1) 109#define WM_WM_SIZE (WM_USER + 2) 110#define WM_WM_RAISE (WM_USER + 3) 111#define WM_WM_LOWER (WM_USER + 4) 112#define WM_WM_MAP (WM_USER + 5) 113#define WM_WM_UNMAP (WM_USER + 6) 114#define WM_WM_KILL (WM_USER + 7) 115#define WM_WM_ACTIVATE (WM_USER + 8) 116#define WM_WM_NAME_EVENT (WM_USER + 9) 117#define WM_WM_HINTS_EVENT (WM_USER + 10) 118#define WM_WM_CHANGE_STATE (WM_USER + 11) 119#define WM_WM_MAP2 (WM_USER + 12) 120#define WM_WM_MAP3 (WM_USER + 13) 121#define WM_MANAGE (WM_USER + 100) 122#define WM_UNMANAGE (WM_USER + 102) 123 124#define MwmHintsDecorations (1L << 1) 125 126#define MwmDecorAll (1l << 0) 127#define MwmDecorBorder (1l << 1) 128#define MwmDecorHandle (1l << 2) 129#define MwmDecorTitle (1l << 3) 130 131/* This structure only contains 3 elements... the Motif 2.0 structure 132contains 5... we only need the first 3... so that is all we will define */ 133typedef struct MwmHints { 134 unsigned long flags, functions, decorations; 135} MwmHints; 136#define PropMwmHintsElements 3 137 138void 139winSendMessageToWM (void *pWMInfo, winWMMessagePtr msg); 140 141Bool 142winInitWM (void **ppWMInfo, 143 pthread_t *ptWMProc, 144 pthread_t *ptXMsgProc, 145 pthread_mutex_t *ppmServerStarted, 146 int dwScreen, 147 HWND hwndScreen, 148 BOOL allowOtherWM); 149 150void 151winDeinitMultiWindowWM (void); 152 153void 154winMinimizeWindow (Window id); 155 156 157/* 158 * winmultiwindowicons.c 159 */ 160 161void 162winUpdateIcon (Window id); 163 164void 165winInitGlobalIcons (void); 166 167void 168winDestroyIcon(HICON hIcon); 169 170#endif /* XWIN_MULTIWINDOW */ 171#endif 172