quartz: Add a cleanup callback for parser filters to call on release.
[wine.git] / dlls / user32 / controls.h
blob6178100cc27ffa8b5e4d661dd1baffa4c617b8c8
1 /*
2 * User controls definitions
4 * Copyright 2000 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_CONTROLS_H
22 #define __WINE_CONTROLS_H
24 #include "winuser.h"
25 #include "wine/winbase16.h"
27 /* Built-in class names (see _Undocumented_Windows_ p.418) */
28 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
29 #define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
30 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
31 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
32 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
34 /* Built-in class descriptor */
35 struct builtin_class_descr
37 LPCSTR name; /* class name */
38 UINT style; /* class style */
39 WNDPROC procA; /* ASCII window procedure */
40 WNDPROC procW; /* Unicode window procedure */
41 INT extra; /* window extra bytes */
42 ULONG_PTR cursor; /* cursor id */
43 HBRUSH brush; /* brush or system color */
46 /* Class functions */
47 struct tagCLASS; /* opaque structure */
48 struct tagWND;
49 extern void CLASS_RegisterBuiltinClasses(void);
50 extern void CLASS_AddWindow( struct tagCLASS *class, struct tagWND *win, BOOL unicode );
51 extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
53 /* defwnd proc */
54 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType );
56 /* desktop */
57 extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
59 /* icon title */
60 extern HWND ICONTITLE_Create( HWND hwnd );
62 /* menu controls */
63 extern HWND MENU_IsMenuActive(void);
64 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
65 INT orgX, INT orgY );
66 extern BOOL MENU_SetMenu(HWND, HMENU);
67 extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt );
68 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar );
69 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
70 HWND hwnd, BOOL suppress_draw );
71 extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
73 /* nonclient area */
74 extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip);
75 extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
76 extern LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect );
77 extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt );
78 extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
79 extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
80 extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
81 extern LRESULT NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
82 extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
83 extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
85 /* scrollbar */
86 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
87 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
88 extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
89 int hMin, int hMax, int hPos );
91 /* combo box */
93 #define ID_CB_LISTBOX 1000
94 #define ID_CB_EDIT 1001
96 /* internal flags */
97 #define CBF_DROPPED 0x0001
98 #define CBF_BUTTONDOWN 0x0002
99 #define CBF_NOROLLUP 0x0004
100 #define CBF_MEASUREITEM 0x0008
101 #define CBF_FOCUSED 0x0010
102 #define CBF_CAPTURE 0x0020
103 #define CBF_EDIT 0x0040
104 #define CBF_NORESIZE 0x0080
105 #define CBF_NOTIFY 0x0100
106 #define CBF_NOREDRAW 0x0200
107 #define CBF_SELCHANGE 0x0400
108 #define CBF_NOEDITNOTIFY 0x1000
109 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
110 #define CBF_EUI 0x8000
112 /* combo state struct */
113 typedef struct
115 HWND self;
116 HWND owner;
117 UINT dwStyle;
118 HWND hWndEdit;
119 HWND hWndLBox;
120 UINT wState;
121 HFONT hFont;
122 RECT textRect;
123 RECT buttonRect;
124 RECT droppedRect;
125 INT droppedIndex;
126 INT fixedOwnerDrawHeight;
127 INT droppedWidth; /* last two are not used unless set */
128 INT editHeight; /* explicitly */
129 } HEADCOMBO,*LPHEADCOMBO;
131 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
133 /* Dialog info structure */
134 typedef struct
136 HWND hwndFocus; /* Current control with focus */
137 HFONT hUserFont; /* Dialog font */
138 HMENU hMenu; /* Dialog menu */
139 UINT xBaseUnit; /* Dialog units (depends on the font) */
140 UINT yBaseUnit;
141 INT idResult; /* EndDialog() result / default pushbutton ID */
142 UINT flags; /* EndDialog() called for this dialog */
143 HGLOBAL16 hDialogHeap;
144 } DIALOGINFO;
146 #define DF_END 0x0001
147 #define DF_OWNERENABLED 0x0002
149 /* offset of DIALOGINFO ptr in dialog extra bytes */
150 #define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
152 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
153 extern void DIALOG_EnableOwner( HWND hOwner );
154 extern BOOL DIALOG_DisableOwner( HWND hOwner );
155 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner );
157 #endif /* __WINE_CONTROLS_H */