4 * Copyright 1993 Alexandre Julliard
12 #ifndef X_DISPLAY_MISSING
14 #endif /* !defined(X_DISPLAY_MISSING) */
20 #define WND_MAGIC 0x444e4957 /* 'WIND' */
22 /* Built-in class names (see _Undocumented_Windows_ p.418) */
23 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
24 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
25 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
26 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
27 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
29 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
30 #define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
31 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
32 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
33 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
35 /* Built-in 32-bit classes */
53 /* PAINT_RedrawWindow() control flags */
54 #define RDW_C_USEHRGN 0x0001
55 #define RDW_C_DELETEHRGN 0x0002
63 struct tagWND
*next
; /* Next sibling */
64 struct tagWND
*child
; /* First child */
65 struct tagWND
*parent
; /* Window parent (from CreateWindow) */
66 struct tagWND
*owner
; /* Window owner */
67 CLASS
*class; /* Window class */
68 HWINDOWPROC winproc
; /* Window procedure */
69 DWORD dwMagic
; /* Magic number (must be WND_MAGIC) */
70 HWND32 hwndSelf
; /* Handle of this window */
71 HINSTANCE32 hInstance
; /* Window hInstance (from CreateWindow) */
72 RECT32 rectClient
; /* Client area rel. to parent client area */
73 RECT32 rectWindow
; /* Whole window rel. to parent client area */
74 LPSTR text
; /* Window text */
75 void *pVScroll
; /* Vertical scroll-bar info */
76 void *pHScroll
; /* Horizontal scroll-bar info */
77 void *pProp
; /* Pointer to properties list */
78 struct tagDCE
*dce
; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
79 HGLOBAL16 hmemTaskQ
; /* Task queue global memory handle */
80 HRGN16 hrgnUpdate
; /* Update region */
81 HWND32 hwndLastActive
;/* Last active popup hwnd */
82 DWORD dwStyle
; /* Window style (from CreateWindow) */
83 DWORD dwExStyle
; /* Extended style (from CreateWindowEx) */
84 UINT32 wIDmenu
; /* ID or hmenu (from CreateWindow) */
85 DWORD helpContext
; /* Help context ID */
86 WORD flags
; /* Misc. flags (see below) */
88 Window window
; /* X window (only for top-level windows) */
90 HMENU16 hSysMenu
; /* window's copy of System Menu */
91 DWORD userdata
; /* User private data */
92 struct _WND_DRIVER
*pDriver
; /* Window driver */
93 void *pDriverData
; /* Window driver data */
94 DWORD wExtra
[1]; /* Window extra bytes */
97 typedef struct _WND_DRIVER
99 void (*pInitialize
)(WND
*);
100 void (*pFinalize
)(WND
*);
101 BOOL32 (*pCreateDesktopWindow
)(WND
*, CLASS
*, BOOL32
);
102 BOOL32 (*pCreateWindow
)(WND
*, CLASS
*, CREATESTRUCT32A
*, BOOL32
);
103 BOOL32 (*pDestroyWindow
)(WND
*);
104 WND
* (*pSetParent
)(WND
*, WND
*);
105 void (*pForceWindowRaise
)(WND
*);
106 void (*pSetWindowPos
)(WND
*, const WINDOWPOS32
*, BOOL32
);
107 void (*pSetText
)(WND
*, LPCSTR
);
108 void (*pSetFocus
)(WND
*);
109 void (*pPreSizeMove
)(WND
*);
110 void (*pPostSizeMove
)(WND
*);
111 void (*pScrollWindow
)(WND
*, struct tagDC
*, INT32
, INT32
, const RECT32
*, BOOL32
);
112 void (*pSetDrawable
)(WND
*, struct tagDC
*, WORD
, BOOL32
);
113 BOOL32 (*pIsSelfClipping
)(WND
*);
121 HWND16 hwndIconTitle
;
122 } INTERNALPOS
, *LPINTERNALPOS
;
124 /* WND flags values */
125 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
126 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
127 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
128 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
129 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
130 /* Used to have WIN_NO_REDRAW 0x0020 here */
131 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
132 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
133 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
134 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
135 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
136 #define WIN_SAVEUNDER_OVERRIDE 0x0800
138 /* BuildWinArray() flags */
139 #define BWA_SKIPDISABLED 0x0001
140 #define BWA_SKIPHIDDEN 0x0002
141 #define BWA_SKIPOWNED 0x0004
142 #define BWA_SKIPICONIC 0x0008
144 /* Window functions */
145 extern WND
* WIN_FindWndPtr( HWND32 hwnd
);
146 extern WND
* WIN_GetDesktop(void);
147 extern void WIN_DumpWindow( HWND32 hwnd
);
148 extern void WIN_WalkWindows( HWND32 hwnd
, int indent
);
149 extern BOOL32
WIN_UnlinkWindow( HWND32 hwnd
);
150 extern BOOL32
WIN_LinkWindow( HWND32 hwnd
, HWND32 hwndInsertAfter
);
151 extern HWND32
WIN_FindWinToRepaint( HWND32 hwnd
, HQUEUE16 hQueue
);
152 extern BOOL32
WIN_ResetQueueWindows( WND
* wnd
, HQUEUE16 hQueue
, HQUEUE16 hNew
);
153 extern BOOL32
WIN_CreateDesktopWindow(void);
154 extern HWND32
WIN_GetTopParent( HWND32 hwnd
);
155 extern WND
* WIN_GetTopParentPtr( WND
* pWnd
);
156 extern BOOL32
WIN_IsWindowDrawable(WND
*, BOOL32
);
157 extern HINSTANCE32
WIN_GetWindowInstance( HWND32 hwnd
);
158 extern WND
** WIN_BuildWinArray( WND
*wndPtr
, UINT32 bwa
, UINT32
* pnum
);
160 extern HWND32
CARET_GetHwnd(void);
161 extern void CARET_GetRect(LPRECT32 lprc
); /* windows/caret.c */
163 extern BOOL16
DRAG_QueryUpdate( HWND32
, SEGPTR
, BOOL32
);
164 extern void DEFWND_SetText( WND
*wndPtr
, LPCSTR text
);
165 extern HBRUSH32
DEFWND_ControlColor( HDC32 hDC
, UINT16 ctlType
); /* windows/defwnd.c */
167 extern void PROPERTY_RemoveWindowProps( WND
*pWnd
); /* windows/property.c */
169 extern BOOL32
PAINT_RedrawWindow( HWND32 hwnd
, const RECT32
*rectUpdate
,
170 HRGN32 hrgnUpdate
, UINT32 flags
,
171 UINT32 control
); /* windows/painting.c */
173 /* controls/widgets.c */
174 extern BOOL32
WIDGETS_Init( void );
175 extern BOOL32
WIDGETS_IsControl32( WND
* pWnd
, BUILTIN_CLASS32 cls
);
177 /* controls/icontitle.c */
178 extern HWND32
ICONTITLE_Create( WND
* );
179 extern BOOL32
ICONTITLE_Init( void );
181 /* windows/focus.c */
182 extern void FOCUS_SwitchFocus( HWND32
, HWND32
);
184 extern Display
* display
;
185 extern Screen
* screen
;
186 extern Window rootWindow
;
188 #endif /* __WINE_WIN_H */