Moved user lock to user.c. Added USER_CheckNotLock function.
[wine/multimedia.git] / include / win.h
blobbc11e39114c1fdb2f5f6675e2ba868d25491c2d0
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 struct tagWND *owner; /* Window owner */
29 struct tagCLASS *class; /* Window class */
30 HWINDOWPROC winproc; /* Window procedure */
31 DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
32 HWND hwndSelf; /* Handle of this window */
33 HINSTANCE hInstance; /* Window hInstance (from CreateWindow) */
34 RECT rectClient; /* Client area rel. to parent client area */
35 RECT rectWindow; /* Whole window rel. to parent client area */
36 LPWSTR text; /* Window text */
37 void *pVScroll; /* Vertical scroll-bar info */
38 void *pHScroll; /* Horizontal scroll-bar info */
39 void *pProp; /* Pointer to properties list */
40 struct tagDCE *dce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
41 HGLOBAL16 hmemTaskQ; /* Task queue global memory handle */
42 HRGN hrgnUpdate; /* Update region */
43 HRGN hrgnWnd; /* window's region */
44 HWND hwndLastActive;/* Last active popup hwnd */
45 DWORD dwStyle; /* Window style (from CreateWindow) */
46 DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
47 DWORD clsStyle; /* Class style at window creation */
48 UINT wIDmenu; /* ID or hmenu (from CreateWindow) */
49 DWORD helpContext; /* Help context ID */
50 UINT flags; /* Misc. flags (see below) */
51 HMENU16 hSysMenu; /* window's copy of System Menu */
52 int cbWndExtra; /* class cbWndExtra at window creation */
53 int irefCount; /* window's reference count*/
54 DWORD userdata; /* User private data */
55 void *pDriverData; /* Window driver data */
56 DWORD wExtra[1]; /* Window extra bytes */
57 } WND;
59 typedef struct
61 RECT16 rectNormal;
62 POINT16 ptIconPos;
63 POINT16 ptMaxPos;
64 HWND16 hwndIconTitle;
65 } INTERNALPOS, *LPINTERNALPOS;
67 /* WND flags values */
68 #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */
69 #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/
70 #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */
71 #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */
72 #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */
73 #define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
74 #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
75 #define WIN_ISDIALOG 0x0200 /* Window is a dialog */
76 #define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
77 #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
78 #define WIN_NEEDS_INTERNALSOP 0x1000 /* Window was hidden by WIN_InternalShowOwnedPopups */
80 /* BuildWinArray() flags */
81 #define BWA_SKIPDISABLED 0x0001
82 #define BWA_SKIPHIDDEN 0x0002
83 #define BWA_SKIPOWNED 0x0004
84 #define BWA_SKIPICONIC 0x0008
86 /* Window functions */
87 extern int WIN_SuspendWndsLock( void );
88 extern void WIN_RestoreWndsLock(int ipreviousLock);
89 extern WND* WIN_FindWndPtr( HWND hwnd );
90 extern WND* WIN_LockWndPtr(WND *wndPtr);
91 extern void WIN_ReleaseWndPtr(WND *wndPtr);
92 extern void WIN_UpdateWndPtr(WND **oldPtr,WND *newPtr);
93 extern WND* WIN_GetDesktop(void);
94 extern void WIN_ReleaseDesktop(void);
95 extern void WIN_DumpWindow( HWND hwnd );
96 extern void WIN_WalkWindows( HWND hwnd, int indent );
97 extern BOOL WIN_UnlinkWindow( HWND hwnd );
98 extern BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
99 extern HWND WIN_FindWinToRepaint( HWND hwnd );
100 extern BOOL WIN_DestroyThreadWindows( HWND hwnd );
101 extern BOOL WIN_CreateDesktopWindow(void);
102 extern HWND WIN_GetTopParent( HWND hwnd );
103 extern WND* WIN_GetTopParentPtr( WND* pWnd );
104 extern BOOL WIN_IsWindowDrawable(WND*, BOOL );
105 extern WND** WIN_BuildWinArray( WND *wndPtr, UINT bwa, UINT* pnum );
106 extern void WIN_ReleaseWinArray(WND **wndArray);
107 extern BOOL WIN_InternalShowOwnedPopups( HWND owner, BOOL fShow, BOOL unmanagedOnly );
109 extern HWND CARET_GetHwnd(void);
110 extern void CARET_GetRect(LPRECT lprc); /* windows/caret.c */
112 extern BOOL16 DRAG_QueryUpdate( HWND, SEGPTR, BOOL );
113 extern void DEFWND_SetTextA( WND *wndPtr, LPCSTR text );
114 extern void DEFWND_SetTextW( WND *wndPtr, LPCWSTR text );
115 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ); /* windows/defwnd.c */
117 extern void PROPERTY_RemoveWindowProps( WND *pWnd ); /* windows/property.c */
119 /* Classes functions */
120 struct tagCLASS; /* opaque structure */
121 struct builtin_class_descr;
122 extern ATOM CLASS_RegisterBuiltinClass( const struct builtin_class_descr *descr );
123 extern struct tagCLASS *CLASS_AddWindow( ATOM atom, HINSTANCE inst, WINDOWPROCTYPE type,
124 INT *winExtra, WNDPROC *winproc,
125 DWORD *style, struct tagDCE **dce );
126 extern void CLASS_RemoveWindow( struct tagCLASS *cls );
127 extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
129 /* windows/focus.c */
130 extern void FOCUS_SwitchFocus( struct tagMESSAGEQUEUE *pMsgQ, HWND , HWND );
132 #endif /* __WINE_WIN_H */