Release 970112
[wine/multimedia.git] / include / win.h
blobb8b778a32438f5096cd03fa1214d5abf98060166
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 /* PAINT_RedrawWindow() control flags */
32 #define RDW_C_USEHRGN 0x0001
33 #define RDW_C_DELETEHRGN 0x0002
35 struct tagDCE;
37 typedef struct tagWND
39 struct tagWND *next; /* Next sibling */
40 struct tagWND *child; /* First child */
41 struct tagWND *parent; /* Window parent (from CreateWindow) */
42 struct tagWND *owner; /* Window owner */
43 CLASS *class; /* Window class */
44 HWINDOWPROC winproc; /* Window procedure */
45 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
46 HWND32 hwndSelf; /* Handle of this window */
47 HINSTANCE16 hInstance; /* Window hInstance (from CreateWindow) */
48 RECT16 rectClient; /* Client area rel. to parent client area */
49 RECT16 rectWindow; /* Whole window rel. to parent client area */
50 RECT16 rectNormal; /* Window rect. when in normal state */
51 POINT16 ptIconPos; /* Icon position */
52 POINT16 ptMaxPos; /* Maximized window position */
53 LPSTR text; /* Window text */
54 void *pVScroll; /* Vertical scroll-bar info */
55 void *pHScroll; /* Horizontal scroll-bar info */
56 void *pProp; /* Pointer to properties list */
57 struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
58 HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */
59 HRGN16 hrgnUpdate; /* Update region */
60 HWND16 hwndLastActive;/* Last active popup hwnd */
61 DWORD dwStyle; /* Window style (from CreateWindow) */
62 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
63 UINT16 wIDmenu; /* ID or hmenu (from CreateWindow) */
64 WORD flags; /* Misc. flags (see below) */
65 Window window; /* X window (only for top-level windows) */
66 HMENU16 hSysMenu; /* window's copy of System Menu */
67 DWORD userdata; /* User private data */
68 DWORD wExtra[1]; /* Window extra bytes */
69 } WND;
71 /* WND flags values */
72 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
73 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
74 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
75 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
76 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
77 #define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */
78 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
79 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
80 #define WIN_MANAGED 0x0100 /* Window managed by the X wm */
81 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
82 #define WIN_SAVEUNDER_OVERRIDE 0x0400
84 /* Window functions */
85 extern WND *WIN_FindWndPtr( HWND32 hwnd );
86 extern WND *WIN_GetDesktop(void);
87 extern void WIN_DumpWindow( HWND32 hwnd );
88 extern void WIN_WalkWindows( HWND32 hwnd, int indent );
89 extern Window WIN_GetXWindow( HWND32 hwnd );
90 extern BOOL32 WIN_UnlinkWindow( HWND32 hwnd );
91 extern BOOL32 WIN_LinkWindow( HWND32 hwnd, HWND32 hwndInsertAfter );
92 extern HWND32 WIN_FindWinToRepaint( HWND32 hwnd, HQUEUE16 hQueue );
93 extern void WIN_SendParentNotify( HWND32 hwnd, WORD event,
94 WORD idChild, LPARAM lValue );
95 extern void WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew );
96 extern BOOL32 WIN_CreateDesktopWindow(void);
97 extern HWND32 WIN_GetTopParent( HWND32 hwnd );
98 extern BOOL32 WIN_IsWindowDrawable(WND*, BOOL32 );
99 extern HINSTANCE16 WIN_GetWindowInstance( HWND32 hwnd );
100 extern WND **WIN_BuildWinArray( WND *wndPtr );
102 extern void DEFWND_SetText( WND *wndPtr, LPCSTR text ); /* windows/defwnd.c */
104 extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
106 extern BOOL32 PAINT_RedrawWindow( HWND32 hwnd, const RECT32 *rectUpdate,
107 HRGN32 hrgnUpdate, UINT32 flags,
108 UINT32 control ); /* windows/painting.c */
110 extern Display * display;
111 extern Screen * screen;
112 extern Window rootWindow;
114 #endif /* __WINE_WIN_H */