Added global management of user handles in the server.
[wine/multimedia.git] / include / win.h
blob974ce0cbc65c4c058d409197624e18c31d7f52c7
1 /*
2 * Window definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef __WINE_WIN_H
8 #define __WINE_WIN_H
10 #include "windef.h"
11 #include "winbase.h"
12 #include "wingdi.h"
13 #include "winproc.h"
14 #include "winuser.h"
15 #include "wine/windef16.h"
17 #define WND_MAGIC 0x444e4957 /* 'WIND' */
19 struct tagCLASS;
20 struct tagDCE;
21 struct tagMESSAGEQUEUE;
23 typedef struct tagWND
25 struct tagWND *next; /* Next sibling */
26 struct tagWND *child; /* First child */
27 struct tagWND *parent; /* Window parent (from CreateWindow) */
28 HWND owner; /* Window owner */
29 struct tagCLASS *class; /* Window class */
30 HWINDOWPROC winproc; /* Window procedure */
31 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
32 DWORD tid; /* Owner thread id */
33 HWND hwndSelf; /* Handle of this window */
34 HINSTANCE hInstance; /* Window hInstance (from CreateWindow) */
35 RECT rectClient; /* Client area rel. to parent client area */
36 RECT rectWindow; /* Whole window rel. to parent client area */
37 LPWSTR text; /* Window text */
38 void *pVScroll; /* Vertical scroll-bar info */
39 void *pHScroll; /* Horizontal scroll-bar info */
40 void *pProp; /* Pointer to properties list */
41 struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
42 HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */
43 HRGN hrgnUpdate; /* Update region */
44 HRGN hrgnWnd; /* window's region */
45 HWND hwndLastActive;/* Last active popup hwnd */
46 DWORD dwStyle; /* Window style (from CreateWindow) */
47 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
48 DWORD clsStyle; /* Class style at window creation */
49 UINT wIDmenu; /* ID or hmenu (from CreateWindow) */
50 DWORD helpContext; /* Help context ID */
51 UINT flags; /* Misc. flags (see below) */
52 HMENU16 hSysMenu; /* window's copy of System Menu */
53 int cbWndExtra; /* class cbWndExtra at window creation */
54 int irefCount; /* window's reference count*/
55 DWORD userdata; /* User private data */
56 void *pDriverData; /* Window driver data */
57 DWORD wExtra[1]; /* Window extra bytes */
58 } WND;
60 typedef struct
62 RECT16 rectNormal;
63 POINT16 ptIconPos;
64 POINT16 ptMaxPos;
65 HWND16 hwndIconTitle;
66 } INTERNALPOS, *LPINTERNALPOS;
68 /* WND flags values */
69 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
70 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
71 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
72 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
73 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
74 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
75 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
76 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
77 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
78 #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
79 #define WIN_NEEDS_INTERNALSOP 0x1000 /* Window was hidden by WIN_InternalShowOwnedPopups */
81 /* Window functions */
82 extern int WIN_SuspendWndsLock( void );
83 extern void WIN_RestoreWndsLock(int ipreviousLock);
84 extern WND* WIN_FindWndPtr( HWND hwnd );
85 extern WND* WIN_LockWndPtr(WND *wndPtr);
86 extern void WIN_ReleaseWndPtr(WND *wndPtr);
87 extern void WIN_UpdateWndPtr(WND **oldPtr,WND *newPtr);
88 extern void WIN_DumpWindow( HWND hwnd );
89 extern void WIN_WalkWindows( HWND hwnd, int indent );
90 extern void WIN_LinkWindow( HWND hwnd, HWND parent, HWND hwndInsertAfter );
91 extern void WIN_UnlinkWindow( HWND hwnd );
92 extern HWND WIN_FindWinToRepaint( HWND hwnd );
93 extern void WIN_DestroyThreadWindows( HWND hwnd );
94 extern BOOL WIN_CreateDesktopWindow(void);
95 extern BOOL WIN_IsWindowDrawable(WND*, BOOL );
96 extern HWND *WIN_ListParents( HWND hwnd );
97 extern HWND *WIN_ListChildren( HWND hwnd );
98 extern BOOL WIN_InternalShowOwnedPopups( HWND owner, BOOL fShow, BOOL unmanagedOnly );
100 extern HWND CARET_GetHwnd(void);
101 extern void CARET_GetRect(LPRECT lprc); /* windows/caret.c */
103 extern BOOL16 DRAG_QueryUpdate( HWND, SEGPTR, BOOL );
104 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ); /* windows/defwnd.c */
106 extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
108 /* Classes functions */
109 struct tagCLASS; /* opaque structure */
110 struct builtin_class_descr;
111 extern ATOM CLASS_RegisterBuiltinClass( const struct builtin_class_descr *descr );
112 extern struct tagCLASS *CLASS_AddWindow( ATOM atom, HINSTANCE inst, WINDOWPROCTYPE type,
113 INT *winExtra, WNDPROC *winproc,
114 DWORD *style, struct tagDCE **dce );
115 extern void CLASS_RemoveWindow( struct tagCLASS *cls );
116 extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
118 /* windows/focus.c */
119 extern void FOCUS_SwitchFocus( struct tagMESSAGEQUEUE *pMsgQ, HWND , HWND );
121 #endif /* __WINE_WIN_H */