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