Release 970525
[wine/multimedia.git] / include / win.h
blobaabfe63645d23541f93729e68094282d76a84be2
1 /*
2 * Window definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef __WINE_WIN_H
8 #define __WINE_WIN_H
10 #include <X11/Xlib.h>
12 #include "ldt.h"
13 #include "class.h"
14 #include "winproc.h"
16 #define WND_MAGIC 0x444e4957 /* 'WIND' */
18 /* Built-in class names (see _Undocumented_Windows_ p.418) */
19 #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
20 #define DESKTOP_CLASS_NAME "#32769" /* Desktop */
21 #define DIALOG_CLASS_NAME "#32770" /* Dialog */
22 #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
23 #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
25 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
26 #define DESKTOP_CLASS_ATOM ((ATOM)32769) /* Desktop */
27 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
28 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
29 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
31 /* Built-in 32-bit classes */
32 typedef enum
34 BIC32_BUTTON,
35 BIC32_EDIT,
36 BIC32_LISTBOX,
37 BIC32_COMBO,
38 BIC32_COMBOLB,
39 BIC32_POPUPMENU,
40 BIC32_SCROLL,
41 BIC32_DESKTOP,
42 BIC32_DIALOG,
43 BIC32_NB_CLASSES
44 } BUILTIN_CLASS32;
46 /* PAINT_RedrawWindow() control flags */
47 #define RDW_C_USEHRGN 0x0001
48 #define RDW_C_DELETEHRGN 0x0002
50 struct tagDCE;
52 typedef struct tagWND
54 struct tagWND *next; /* Next sibling */
55 struct tagWND *child; /* First child */
56 struct tagWND *parent; /* Window parent (from CreateWindow) */
57 struct tagWND *owner; /* Window owner */
58 CLASS *class; /* Window class */
59 HWINDOWPROC winproc; /* Window procedure */
60 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
61 HWND32 hwndSelf; /* Handle of this window */
62 HINSTANCE16 hInstance; /* Window hInstance (from CreateWindow) */
63 RECT16 rectClient; /* Client area rel. to parent client area */
64 RECT16 rectWindow; /* Whole window rel. to parent client area */
65 RECT16 rectNormal; /* Window rect. when in normal state */
66 POINT16 ptIconPos; /* Icon position */
67 POINT16 ptMaxPos; /* Maximized window position */
68 LPSTR text; /* Window text */
69 void *pVScroll; /* Vertical scroll-bar info */
70 void *pHScroll; /* Horizontal scroll-bar info */
71 void *pProp; /* Pointer to properties list */
72 struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
73 HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */
74 HRGN16 hrgnUpdate; /* Update region */
75 HWND32 hwndLastActive;/* Last active popup hwnd */
76 DWORD dwStyle; /* Window style (from CreateWindow) */
77 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
78 UINT16 wIDmenu; /* ID or hmenu (from CreateWindow) */
79 WORD flags; /* Misc. flags (see below) */
80 Window window; /* X window (only for top-level windows) */
81 HMENU16 hSysMenu; /* window's copy of System Menu */
82 DWORD userdata; /* User private data */
83 DWORD wExtra[1]; /* Window extra bytes */
84 } WND;
86 /* WND flags values */
87 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
88 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
89 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
90 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
91 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
92 #define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */
93 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
94 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
95 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
96 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
97 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
98 #define WIN_SAVEUNDER_OVERRIDE 0x0800
100 /* Window functions */
101 extern WND *WIN_FindWndPtr( HWND32 hwnd );
102 extern WND *WIN_GetDesktop(void);
103 extern void WIN_DumpWindow( HWND32 hwnd );
104 extern void WIN_WalkWindows( HWND32 hwnd, int indent );
105 extern Window WIN_GetXWindow( HWND32 hwnd );
106 extern BOOL32 WIN_UnlinkWindow( HWND32 hwnd );
107 extern BOOL32 WIN_LinkWindow( HWND32 hwnd, HWND32 hwndInsertAfter );
108 extern HWND32 WIN_FindWinToRepaint( HWND32 hwnd, HQUEUE16 hQueue );
109 extern void WIN_SendParentNotify( HWND32 hwnd, WORD event,
110 WORD idChild, LPARAM lValue );
111 extern void WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew );
112 extern BOOL32 WIN_CreateDesktopWindow(void);
113 extern HWND32 WIN_GetTopParent( HWND32 hwnd );
114 extern BOOL32 WIN_IsWindowDrawable(WND*, BOOL32 );
115 extern HINSTANCE16 WIN_GetWindowInstance( HWND32 hwnd );
116 extern WND **WIN_BuildWinArray( WND *wndPtr );
118 extern void DEFWND_SetText( WND *wndPtr, LPCSTR text ); /* windows/defwnd.c */
120 extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
122 extern BOOL32 PAINT_RedrawWindow( HWND32 hwnd, const RECT32 *rectUpdate,
123 HRGN32 hrgnUpdate, UINT32 flags,
124 UINT32 control ); /* windows/painting.c */
126 extern BOOL32 WIDGETS_IsControl32( WND* pWnd, BUILTIN_CLASS32 cls ); /* controls/widgets.c */
128 extern Display * display;
129 extern Screen * screen;
130 extern Window rootWindow;
132 #endif /* __WINE_WIN_H */