1706f2543Smrg#if !defined(_WINWINDOW_H_) 2706f2543Smrg#define _WINWINDOW_H_ 3706f2543Smrg/* 4706f2543Smrg *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. 5706f2543Smrg *Copyright (C) Colin Harrison 2005-2009 6706f2543Smrg * 7706f2543Smrg *Permission is hereby granted, free of charge, to any person obtaining 8706f2543Smrg * a copy of this software and associated documentation files (the 9706f2543Smrg *"Software"), to deal in the Software without restriction, including 10706f2543Smrg *without limitation the rights to use, copy, modify, merge, publish, 11706f2543Smrg *distribute, sublicense, and/or sell copies of the Software, and to 12706f2543Smrg *permit persons to whom the Software is furnished to do so, subject to 13706f2543Smrg *the following conditions: 14706f2543Smrg * 15706f2543Smrg *The above copyright notice and this permission notice shall be 16706f2543Smrg *included in all copies or substantial portions of the Software. 17706f2543Smrg * 18706f2543Smrg *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19706f2543Smrg *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20706f2543Smrg *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21706f2543Smrg *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR 22706f2543Smrg *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 23706f2543Smrg *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24706f2543Smrg *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25706f2543Smrg * 26706f2543Smrg *Except as contained in this notice, the name of the XFree86 Project 27706f2543Smrg *shall not be used in advertising or otherwise to promote the sale, use 28706f2543Smrg *or other dealings in this Software without prior written authorization 29706f2543Smrg *from the XFree86 Project. 30706f2543Smrg * 31706f2543Smrg * Authors: Kensuke Matsuzaki 32706f2543Smrg * Colin Harrison 33706f2543Smrg */ 34706f2543Smrg 35706f2543Smrg#ifndef NO 36706f2543Smrg#define NO 0 37706f2543Smrg#endif 38706f2543Smrg#ifndef YES 39706f2543Smrg#define YES 1 40706f2543Smrg#endif 41706f2543Smrg 42706f2543Smrg/* Constant strings */ 43706f2543Smrg#ifndef PROJECT_NAME 44706f2543Smrg# define PROJECT_NAME "Cygwin/X" 45706f2543Smrg#endif 46706f2543Smrg#define EXECUTABLE_NAME "XWin" 47706f2543Smrg#define WINDOW_CLASS "cygwin/x" 48706f2543Smrg#define WINDOW_TITLE PROJECT_NAME ":%s.%d" 49706f2543Smrg#define WINDOW_TITLE_XDMCP "%s:%s.%d" 50706f2543Smrg#define WIN_SCR_PROP "cyg_screen_prop rl" 51706f2543Smrg#define WINDOW_CLASS_X "cygwin/x X rl" 52706f2543Smrg#define WINDOW_TITLE_X PROJECT_NAME " X" 53706f2543Smrg#define WIN_WINDOW_PROP "cyg_window_prop_rl" 54706f2543Smrg#ifdef HAS_DEVWINDOWS 55706f2543Smrg# define WIN_MSG_QUEUE_FNAME "/dev/windows" 56706f2543Smrg#endif 57706f2543Smrg#define WIN_WID_PROP "cyg_wid_prop_rl" 58706f2543Smrg#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl" 59706f2543Smrg#ifndef CYGMULTIWINDOW_DEBUG 60706f2543Smrg#define CYGMULTIWINDOW_DEBUG NO 61706f2543Smrg#endif 62706f2543Smrg#ifndef CYGWINDOWING_DEBUG 63706f2543Smrg#define CYGWINDOWING_DEBUG NO 64706f2543Smrg#endif 65706f2543Smrg 66706f2543Smrg#define XMING_SIGNATURE 0x12345678L 67706f2543Smrg 68706f2543Smrgtypedef struct _winPrivScreenRec *winPrivScreenPtr; 69706f2543Smrg 70706f2543Smrg 71706f2543Smrg/* 72706f2543Smrg * Window privates 73706f2543Smrg */ 74706f2543Smrg 75706f2543Smrgtypedef struct 76706f2543Smrg{ 77706f2543Smrg DWORD dwDummy; 78706f2543Smrg HRGN hRgn; 79706f2543Smrg HWND hWnd; 80706f2543Smrg winPrivScreenPtr pScreenPriv; 81706f2543Smrg Bool fXKilled; 82706f2543Smrg 83706f2543Smrg /* Privates used by primary fb DirectDraw server */ 84706f2543Smrg LPDDSURFACEDESC pddsdPrimary; 85706f2543Smrg 86706f2543Smrg /* Privates used by shadow fb DirectDraw Nonlocking server */ 87706f2543Smrg LPDIRECTDRAWSURFACE4 pddsPrimary4; 88706f2543Smrg 89706f2543Smrg /* Privates used by both shadow fb DirectDraw servers */ 90706f2543Smrg LPDIRECTDRAWCLIPPER pddcPrimary; 91706f2543Smrg} winPrivWinRec, *winPrivWinPtr; 92706f2543Smrg 93706f2543Smrg#ifdef XWIN_MULTIWINDOW 94706f2543Smrgtypedef struct _winWMMessageRec{ 95706f2543Smrg DWORD dwID; 96706f2543Smrg DWORD msg; 97706f2543Smrg int iWindow; 98706f2543Smrg HWND hwndWindow; 99706f2543Smrg int iX, iY; 100706f2543Smrg int iWidth, iHeight; 101706f2543Smrg} winWMMessageRec, *winWMMessagePtr; 102706f2543Smrg 103706f2543Smrg 104706f2543Smrg/* 105706f2543Smrg * winmultiwindowwm.c 106706f2543Smrg */ 107706f2543Smrg 108706f2543Smrg#define WM_WM_MOVE (WM_USER + 1) 109706f2543Smrg#define WM_WM_SIZE (WM_USER + 2) 110706f2543Smrg#define WM_WM_RAISE (WM_USER + 3) 111706f2543Smrg#define WM_WM_LOWER (WM_USER + 4) 112706f2543Smrg#define WM_WM_MAP (WM_USER + 5) 113706f2543Smrg#define WM_WM_UNMAP (WM_USER + 6) 114706f2543Smrg#define WM_WM_KILL (WM_USER + 7) 115706f2543Smrg#define WM_WM_ACTIVATE (WM_USER + 8) 116706f2543Smrg#define WM_WM_NAME_EVENT (WM_USER + 9) 117706f2543Smrg#define WM_WM_HINTS_EVENT (WM_USER + 10) 118706f2543Smrg#define WM_WM_CHANGE_STATE (WM_USER + 11) 119706f2543Smrg#define WM_WM_MAP2 (WM_USER + 12) 120706f2543Smrg#define WM_WM_MAP3 (WM_USER + 13) 121706f2543Smrg#define WM_MANAGE (WM_USER + 100) 122706f2543Smrg#define WM_UNMANAGE (WM_USER + 102) 123706f2543Smrg 124706f2543Smrg#define MwmHintsDecorations (1L << 1) 125706f2543Smrg 126706f2543Smrg#define MwmDecorAll (1l << 0) 127706f2543Smrg#define MwmDecorBorder (1l << 1) 128706f2543Smrg#define MwmDecorHandle (1l << 2) 129706f2543Smrg#define MwmDecorTitle (1l << 3) 130706f2543Smrg 131706f2543Smrg/* This structure only contains 3 elements... the Motif 2.0 structure 132706f2543Smrgcontains 5... we only need the first 3... so that is all we will define */ 133706f2543Smrgtypedef struct MwmHints { 134706f2543Smrg unsigned long flags, functions, decorations; 135706f2543Smrg} MwmHints; 136706f2543Smrg#define PropMwmHintsElements 3 137706f2543Smrg 138706f2543Smrgvoid 139706f2543SmrgwinSendMessageToWM (void *pWMInfo, winWMMessagePtr msg); 140706f2543Smrg 141706f2543SmrgBool 142706f2543SmrgwinInitWM (void **ppWMInfo, 143706f2543Smrg pthread_t *ptWMProc, 144706f2543Smrg pthread_t *ptXMsgProc, 145706f2543Smrg pthread_mutex_t *ppmServerStarted, 146706f2543Smrg int dwScreen, 147706f2543Smrg HWND hwndScreen, 148706f2543Smrg BOOL allowOtherWM); 149706f2543Smrg 150706f2543Smrgvoid 151706f2543SmrgwinDeinitMultiWindowWM (void); 152706f2543Smrg 153706f2543Smrgvoid 154706f2543SmrgwinMinimizeWindow (Window id); 155706f2543Smrg 156706f2543Smrg 157706f2543Smrg/* 158706f2543Smrg * winmultiwindowicons.c 159706f2543Smrg */ 160706f2543Smrg 161706f2543Smrgvoid 162706f2543SmrgwinUpdateIcon (Window id); 163706f2543Smrg 164706f2543Smrgvoid 165706f2543SmrgwinInitGlobalIcons (void); 166706f2543Smrg 167706f2543Smrgvoid 168706f2543SmrgwinDestroyIcon(HICON hIcon); 169706f2543Smrg 170706f2543Smrg#endif /* XWIN_MULTIWINDOW */ 171706f2543Smrg#endif 172