Initial commit
[xorg_rtime.git] / xorg-server-1.4 / hw / xwin / winwindow.h
blob9c49d64829bc8934be7fc63f39e7ccbef51b555b
1 #if !defined(_WINWINDOW_H_)
2 #define _WINWINDOW_H_
3 /*
4 *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
6 *Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 *"Software"), to deal in the Software without restriction, including
9 *without limitation the rights to use, copy, modify, merge, publish,
10 *distribute, sublicense, and/or sell copies of the Software, and to
11 *permit persons to whom the Software is furnished to do so, subject to
12 *the following conditions:
14 *The above copyright notice and this permission notice shall be
15 *included in all copies or substantial portions of the Software.
17 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
21 *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22 *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *Except as contained in this notice, the name of the XFree86 Project
26 *shall not be used in advertising or otherwise to promote the sale, use
27 *or other dealings in this Software without prior written authorization
28 *from the XFree86 Project.
30 * Authors: Kensuke Matsuzaki
33 #ifndef NO
34 #define NO 0
35 #endif
36 #ifndef YES
37 #define YES 1
38 #endif
40 /* Constant strings */
41 #ifndef PROJECT_NAME
42 # define PROJECT_NAME "Cygwin/X"
43 #endif
44 #define WINDOW_CLASS "cygwin/x"
45 #define WINDOW_TITLE PROJECT_NAME " - %s:%d"
46 #define WINDOW_TITLE_XDMCP PROJECT_NAME " - %s"
47 #define WIN_SCR_PROP "cyg_screen_prop rl"
48 #define WINDOW_CLASS_X "cygwin/x X rl"
49 #define WINDOW_TITLE_X PROJECT_NAME " X"
50 #define WIN_WINDOW_PROP "cyg_window_prop_rl"
51 #ifdef HAS_DEVWINDOWS
52 # define WIN_MSG_QUEUE_FNAME "/dev/windows"
53 #endif
54 #define WIN_WID_PROP "cyg_wid_prop_rl"
55 #define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl"
56 #ifndef CYGMULTIWINDOW_DEBUG
57 #define CYGMULTIWINDOW_DEBUG NO
58 #endif
59 #ifndef CYGWINDOWING_DEBUG
60 #define CYGWINDOWING_DEBUG NO
61 #endif
63 typedef struct _winPrivScreenRec *winPrivScreenPtr;
67 * Window privates
70 typedef struct
72 DWORD dwDummy;
73 HRGN hRgn;
74 HWND hWnd;
75 winPrivScreenPtr pScreenPriv;
76 Bool fXKilled;
78 /* Privates used by primary fb DirectDraw server */
79 LPDDSURFACEDESC pddsdPrimary;
81 /* Privates used by shadow fb DirectDraw Nonlocking server */
82 LPDIRECTDRAWSURFACE4 pddsPrimary4;
84 /* Privates used by both shadow fb DirectDraw servers */
85 LPDIRECTDRAWCLIPPER pddcPrimary;
86 } winPrivWinRec, *winPrivWinPtr;
88 #ifdef XWIN_MULTIWINDOW
89 typedef struct _winWMMessageRec{
90 DWORD dwID;
91 DWORD msg;
92 int iWindow;
93 HWND hwndWindow;
94 int iX, iY;
95 int iWidth, iHeight;
96 } winWMMessageRec, *winWMMessagePtr;
100 * winmultiwindowwm.c
103 #define WM_WM_MOVE (WM_USER + 1)
104 #define WM_WM_SIZE (WM_USER + 2)
105 #define WM_WM_RAISE (WM_USER + 3)
106 #define WM_WM_LOWER (WM_USER + 4)
107 #define WM_WM_MAP (WM_USER + 5)
108 #define WM_WM_UNMAP (WM_USER + 6)
109 #define WM_WM_KILL (WM_USER + 7)
110 #define WM_WM_ACTIVATE (WM_USER + 8)
111 #define WM_WM_NAME_EVENT (WM_USER + 9)
112 #define WM_WM_HINTS_EVENT (WM_USER + 10)
113 #define WM_WM_CHANGE_STATE (WM_USER + 11)
114 #define WM_MANAGE (WM_USER + 100)
115 #define WM_UNMANAGE (WM_USER + 102)
117 void
118 winSendMessageToWM (void *pWMInfo, winWMMessagePtr msg);
120 Bool
121 winInitWM (void **ppWMInfo,
122 pthread_t *ptWMProc,
123 pthread_t *ptXMsgProc,
124 pthread_mutex_t *ppmServerStarted,
125 int dwScreen,
126 HWND hwndScreen,
127 BOOL allowOtherWM);
129 void
130 winDeinitMultiWindowWM (void);
132 void
133 winMinimizeWindow (Window id);
137 * winmultiwindowicons.c
140 void
141 winUpdateIcon (Window id);
143 void
144 winInitGlobalIcons (void);
146 void
147 winDestroyIcon(HICON hIcon);
149 #endif /* XWIN_MULTIWINDOW */
150 #endif