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

Last change on this file since 8082 was 6445, checked in by sandervl, 24 years ago

header update

File size: 7.1 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 HWND hwndSelf; /* Handle of this window */
84 HINSTANCE hInstance; /* Window hInstance (from CreateWindow) */
85 DWORD dwStyle; /* Window style (from CreateWindow) */
86 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
87 UINT wIDmenu; /* ID or hmenu (from CreateWindow) */
88 HMENU hSysMenu; /* window's copy of System Menu */
89 RECT rectClient;
90 RECT rectWindow;
91 LPWSTR text; /* Window text */
92 DWORD cbWndExtra;
93 DWORD wExtra[1];
94} WND;
95
96/* Host attributes */
97
98#define HAK_BITGRAVITY 1
99#define HAK_ACCEPTFOCUS 2
100#define HAK_ICONICSTATE 3
101
102/* Bit Gravity */
103
104#define BGForget 0
105#define BGNorthWest 1
106#define BGNorth 2
107#define BGNorthEast 3
108#define BGWest 4
109#define BGCenter 5
110#define BGEast 6
111#define BGSouthWest 7
112#define BGSouth 8
113#define BGSouthEast 9
114#define BGStatic 10
115
116typedef struct tagWND_DRIVER
117{
118 void (*pInitialize)(WND *);
119 void (*pFinalize)(WND *);
120 BOOL (*pCreateDesktopWindow)(WND *, struct tagCLASS *, BOOL);
121 BOOL (*pCreateWindow)(WND *, struct tagCLASS *, CREATESTRUCTA *, BOOL);
122 BOOL (*pDestroyWindow)(WND *);
123 WND* (*pSetParent)(WND *, WND *);
124 void (*pForceWindowRaise)(WND *);
125 void (*pSetWindowPos)(WND *, const WINDOWPOS *, BOOL);
126 void (*pSetText)(WND *, LPCSTR);
127 void (*pSetFocus)(WND *);
128 void (*pPreSizeMove)(WND *);
129 void (*pPostSizeMove)(WND *);
130 void (*pSurfaceCopy)(WND *, struct tagDC *, INT, INT, const RECT *, BOOL);
131 void (*pSetDrawable)(WND *, struct tagDC *, WORD, BOOL);
132 BOOL (*pSetHostAttr)(WND *, INT haKey, INT value);
133 BOOL (*pIsSelfClipping)(WND *);
134} WND_DRIVER;
135
136extern WND_DRIVER *WND_Driver;
137
138typedef struct
139{
140 RECT16 rectNormal;
141 POINT16 ptIconPos;
142 POINT16 ptMaxPos;
143 HWND16 hwndIconTitle;
144} INTERNALPOS, *LPINTERNALPOS;
145
146 /* WND flags values */
147#define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
148#define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
149#define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
150#define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
151#define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
152#define WIN_NATIVE 0x0020 /* Directly mapped to the window provided by the driver */
153#define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
154#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
155#define WIN_MANAGED 0x0100 /* Window managed by the window system */
156#define WIN_ISDIALOG 0x0200 /* Window is a dialog */
157#define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
158#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
159
160 /* BuildWinArray() flags */
161#define BWA_SKIPDISABLED 0x0001
162#define BWA_SKIPHIDDEN 0x0002
163#define BWA_SKIPOWNED 0x0004
164#define BWA_SKIPICONIC 0x0008
165
166 /* Window functions */
167extern void WIN_LockWnds();
168extern void WIN_UnlockWnds();
169extern int WIN_SuspendWndsLock();
170extern void WIN_RestoreWndsLock(int ipreviousLock);
171extern WND* WIN_FindWndPtr( HWND hwnd );
172extern WND* WIN_LockWndPtr(WND *wndPtr);
173extern void WIN_ReleaseWndPtr(WND *wndPtr);
174extern void WIN_UpdateWndPtr(WND **oldPtr,WND *newPtr);
175extern WND* WIN_GetDesktop(void);
176extern void WIN_ReleaseDesktop(void);
177extern void WIN_DumpWindow( HWND hwnd );
178extern void WIN_WalkWindows( HWND hwnd, int indent );
179extern BOOL WIN_UnlinkWindow( HWND hwnd );
180extern BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
181extern HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue );
182extern BOOL WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew);
183extern BOOL WIN_CreateDesktopWindow(void);
184extern HWND WIN_GetTopParent( HWND hwnd );
185extern WND* WIN_GetTopParentPtr( WND* pWnd );
186extern BOOL WIN_IsWindowDrawable(WND*, BOOL );
187extern HINSTANCE WIN_GetWindowInstance( HWND hwnd );
188extern WND** WIN_BuildWinArray( WND *wndPtr, UINT bwa, UINT* pnum );
189extern void WIN_ReleaseWinArray(WND **wndArray);
190
191extern HWND CARET_GetHwnd(void);
192extern void CARET_GetRect(LPRECT lprc); /* windows/caret.c */
193
194extern BOOL16 DRAG_QueryUpdate( HWND, SEGPTR, BOOL );
195extern void DEFWND_SetText( WND *wndPtr, LPCSTR text );
196extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT16 ctlType ); /* windows/defwnd.c */
197
198extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
199
200extern BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
201 HRGN hrgnUpdate, UINT flags,
202 UINT control ); /* windows/painting.c */
203extern HRGN WIN_UpdateNCRgn(WND* wnd, BOOL bUpdate, BOOL bForce); /* windows/painting.c */
204
205
206/* controls/widgets.c */
207extern BOOL WIDGETS_Init( void );
208extern BOOL WIDGETS_IsControl( WND* pWnd, BUILTIN_CLASS32 cls );
209
210/* controls/icontitle.c */
211extern HWND ICONTITLE_Create( WND* );
212extern BOOL ICONTITLE_Init( void );
213
214/* windows/focus.c */
215extern void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND , HWND );
216
217#endif /* __WINE_WIN_H */
Note: See TracBrowser for help on using the repository browser.