source: trunk/include/win/win.h@ 10367

Last change on this file since 10367 was 9521, checked in by sandervl, 23 years ago

header updates

File size: 7.2 KB
Line 
1/*
2 * Window definitions
3 *
4 * Copyright 1993 Alexandre Julliard
5 */
6
7#ifndef __WINE_WIN_H
8#define __WINE_WIN_H
9
10#include "queue.h"
11#include "class.h"
12
13#define WND_MAGIC 0x444e4957 /* 'WIND' */
14
15 /* Built-in class names (see _Undocumented_Windows_ p.418) */
16#ifndef POPUPMENU_CLASS_NAME
17#define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
18#endif
19#ifndef DESKTOP_CLASS_NAME
20#define DESKTOP_CLASS_NAME "#32769" /* Desktop */
21#endif
22#ifndef DIALOG_CLASS_NAME
23#define DIALOG_CLASS_NAME "#32770" /* Dialog */
24#endif
25#ifndef WINSWITCH_CLASS_NAME
26#define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
27#endif
28#ifndef ICONTITLE_CLASS_NAME
29#define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
30#endif
31
32#ifndef POPUPMENU_CLASS_ATOM
33#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
34#endif
35#ifndef DESKTOP_CLASS_ATOM
36#define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
37#endif
38#ifndef DIALOG_CLASS_ATOM
39#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
40#endif
41#ifndef WINSWITCH_CLASS_ATOM
42#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
43#endif
44#ifndef ICONTITLE_CLASS_ATOM
45#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
46#endif
47
48/* Built-in 32-bit classes */
49typedef enum
50{
51 BIC32_BUTTON,
52 BIC32_EDIT,
53 BIC32_LISTBOX,
54 BIC32_COMBO,
55 BIC32_COMBOLB,
56 BIC32_POPUPMENU,
57 BIC32_STATIC,
58 BIC32_SCROLL,
59 BIC32_MDICLIENT,
60 BIC32_DESKTOP,
61 BIC32_DIALOG,
62 BIC32_ICONTITLE,
63 BIC32_NB_CLASSES
64} BUILTIN_CLASS32;
65
66 /* PAINT_RedrawWindow() control flags */
67#define RDW_EX_USEHRGN 0x0001
68#define RDW_EX_DELETEHRGN 0x0002
69#define RDW_EX_XYWINDOW 0x0004
70#define RDW_EX_TOPFRAME 0x0010
71
72struct tagCLASS;
73struct tagDCE;
74struct tagDC;
75struct tagWND_DRIVER;
76
77typedef struct tagWND
78{
79 struct tagWND *parent;
80 struct tagWND *child;
81 struct tagWND *next;
82 struct tagWND *owner;
83 void *pVScroll; /* Vertical scroll-bar info */
84 void *pHScroll; /* Horizontal scroll-bar info */
85 HWND hwndSelf; /* Handle of this window */
86 HINSTANCE hInstance; /* Window hInstance (from CreateWindow) */
87 DWORD dwStyle; /* Window style (from CreateWindow) */
88 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
89 UINT wIDmenu; /* ID or hmenu (from CreateWindow) */
90 HMENU hSysMenu; /* window's copy of System Menu */
91 RECT rectClient;
92 RECT rectWindow;
93 LPWSTR text; /* Window text */
94 DWORD cbWndExtra;
95 DWORD flags;
96 DWORD wExtra[1];
97} WND;
98
99/* Host attributes */
100
101#define HAK_BITGRAVITY 1
102#define HAK_ACCEPTFOCUS 2
103#define HAK_ICONICSTATE 3
104
105/* Bit Gravity */
106
107#define BGForget 0
108#define BGNorthWest 1
109#define BGNorth 2
110#define BGNorthEast 3
111#define BGWest 4
112#define BGCenter 5
113#define BGEast 6
114#define BGSouthWest 7
115#define BGSouth 8
116#define BGSouthEast 9
117#define BGStatic 10
118
119typedef struct tagWND_DRIVER
120{
121 void (*pInitialize)(WND *);
122 void (*pFinalize)(WND *);
123 BOOL (*pCreateDesktopWindow)(WND *, struct tagCLASS *, BOOL);
124 BOOL (*pCreateWindow)(WND *, struct tagCLASS *, CREATESTRUCTA *, BOOL);
125 BOOL (*pDestroyWindow)(WND *);
126 WND* (*pSetParent)(WND *, WND *);
127 void (*pForceWindowRaise)(WND *);
128 void (*pSetWindowPos)(WND *, const WINDOWPOS *, BOOL);
129 void (*pSetText)(WND *, LPCSTR);
130 void (*pSetFocus)(WND *);
131 void (*pPreSizeMove)(WND *);
132 void (*pPostSizeMove)(WND *);
133 void (*pSurfaceCopy)(WND *, struct tagDC *, INT, INT, const RECT *, BOOL);
134 void (*pSetDrawable)(WND *, struct tagDC *, WORD, BOOL);
135 BOOL (*pSetHostAttr)(WND *, INT haKey, INT value);
136 BOOL (*pIsSelfClipping)(WND *);
137} WND_DRIVER;
138
139extern WND_DRIVER *WND_Driver;
140
141typedef struct
142{
143 RECT16 rectNormal;
144 POINT16 ptIconPos;
145 POINT16 ptMaxPos;
146 HWND16 hwndIconTitle;
147} INTERNALPOS, *LPINTERNALPOS;
148
149 /* WND flags values */
150#define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
151#define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
152#define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
153#define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
154#define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
155#define WIN_NATIVE 0x0020 /* Directly mapped to the window provided by the driver */
156#define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
157#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
158#define WIN_MANAGED 0x0100 /* Window managed by the window system */
159#define WIN_ISDIALOG 0x0200 /* Window is a dialog */
160#define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
161#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
162
163 /* BuildWinArray() flags */
164#define BWA_SKIPDISABLED 0x0001
165#define BWA_SKIPHIDDEN 0x0002
166#define BWA_SKIPOWNED 0x0004
167#define BWA_SKIPICONIC 0x0008
168
169 /* Window functions */
170extern void WIN_LockWnds();
171extern void WIN_UnlockWnds();
172extern int WIN_SuspendWndsLock();
173extern void WIN_RestoreWndsLock(int ipreviousLock);
174extern WND* WIN_FindWndPtr( HWND hwnd );
175extern WND* WIN_LockWndPtr(WND *wndPtr);
176extern void WIN_ReleaseWndPtr(WND *wndPtr);
177extern void WIN_UpdateWndPtr(WND **oldPtr,WND *newPtr);
178extern WND* WIN_GetDesktop(void);
179extern void WIN_ReleaseDesktop(void);
180extern void WIN_DumpWindow( HWND hwnd );
181extern void WIN_WalkWindows( HWND hwnd, int indent );
182extern BOOL WIN_UnlinkWindow( HWND hwnd );
183extern BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
184extern HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue );
185extern BOOL WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew);
186extern BOOL WIN_CreateDesktopWindow(void);
187extern HWND WIN_GetTopParent( HWND hwnd );
188extern WND* WIN_GetTopParentPtr( WND* pWnd );
189extern BOOL WIN_IsWindowDrawable(WND*, BOOL );
190extern HINSTANCE WIN_GetWindowInstance( HWND hwnd );
191extern WND** WIN_BuildWinArray( WND *wndPtr, UINT bwa, UINT* pnum );
192extern void WIN_ReleaseWinArray(WND **wndArray);
193
194extern HWND CARET_GetHwnd(void);
195extern void CARET_GetRect(LPRECT lprc); /* windows/caret.c */
196
197extern BOOL16 DRAG_QueryUpdate( HWND, SEGPTR, BOOL );
198extern void DEFWND_SetText( WND *wndPtr, LPCSTR text );
199extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT16 ctlType ); /* windows/defwnd.c */
200
201extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
202
203extern BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
204 HRGN hrgnUpdate, UINT flags,
205 UINT control ); /* windows/painting.c */
206extern HRGN WIN_UpdateNCRgn(WND* wnd, BOOL bUpdate, BOOL bForce); /* windows/painting.c */
207
208
209/* controls/widgets.c */
210extern BOOL WIDGETS_Init( void );
211extern BOOL WIDGETS_IsControl( WND* pWnd, BUILTIN_CLASS32 cls );
212
213/* controls/icontitle.c */
214extern HWND ICONTITLE_Create( HWND );
215extern BOOL ICONTITLE_Init( void );
216
217/* windows/focus.c */
218extern void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND , HWND );
219
220
221#endif /* __WINE_WIN_H */
Note: See TracBrowser for help on using the repository browser.