riched20: Trace the result of a failing test.
[wine/multimedia.git] / dlls / user32 / controls.h
bloba16d166bf385b4d2113009b5389faf4895c1c395
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 LPCWSTR 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 extern const struct builtin_class_descr BUTTON_builtin_class DECLSPEC_HIDDEN;
47 extern const struct builtin_class_descr COMBO_builtin_class DECLSPEC_HIDDEN;
48 extern const struct builtin_class_descr COMBOLBOX_builtin_class DECLSPEC_HIDDEN;
49 extern const struct builtin_class_descr DIALOG_builtin_class DECLSPEC_HIDDEN;
50 extern const struct builtin_class_descr DESKTOP_builtin_class DECLSPEC_HIDDEN;
51 extern const struct builtin_class_descr EDIT_builtin_class DECLSPEC_HIDDEN;
52 extern const struct builtin_class_descr ICONTITLE_builtin_class DECLSPEC_HIDDEN;
53 extern const struct builtin_class_descr LISTBOX_builtin_class DECLSPEC_HIDDEN;
54 extern const struct builtin_class_descr MDICLIENT_builtin_class DECLSPEC_HIDDEN;
55 extern const struct builtin_class_descr MENU_builtin_class DECLSPEC_HIDDEN;
56 extern const struct builtin_class_descr MESSAGE_builtin_class DECLSPEC_HIDDEN;
57 extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN;
58 extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN;
60 extern WNDPROC EDIT_winproc_handle DECLSPEC_HIDDEN;
62 /* Class functions */
63 struct tagCLASS; /* opaque structure */
64 struct tagWND;
65 extern ATOM get_int_atom_value( LPCWSTR name ) DECLSPEC_HIDDEN;
66 extern void CLASS_RegisterBuiltinClasses(void) DECLSPEC_HIDDEN;
67 extern WNDPROC get_class_winproc( struct tagCLASS *class ) DECLSPEC_HIDDEN;
68 extern struct dce *get_class_dce( struct tagCLASS *class ) DECLSPEC_HIDDEN;
69 extern struct dce *set_class_dce( struct tagCLASS *class, struct dce *dce ) DECLSPEC_HIDDEN;
70 extern void CLASS_FreeModuleClasses( HMODULE16 hModule ) DECLSPEC_HIDDEN;
72 /* defwnd proc */
73 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) DECLSPEC_HIDDEN;
75 /* desktop */
76 extern BOOL DESKTOP_SetPattern( LPCWSTR pattern ) DECLSPEC_HIDDEN;
78 /* icon title */
79 extern HWND ICONTITLE_Create( HWND hwnd ) DECLSPEC_HIDDEN;
81 /* menu controls */
82 extern HWND MENU_IsMenuActive(void) DECLSPEC_HIDDEN;
83 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
84 INT orgX, INT orgY ) DECLSPEC_HIDDEN;
85 extern BOOL MENU_SetMenu(HWND, HMENU) DECLSPEC_HIDDEN;
86 extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt ) DECLSPEC_HIDDEN;
87 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar ) DECLSPEC_HIDDEN;
88 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
89 HWND hwnd, BOOL suppress_draw ) DECLSPEC_HIDDEN;
90 extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget ) DECLSPEC_HIDDEN;
92 /* nonclient area */
93 extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
94 extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
95 extern LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) DECLSPEC_HIDDEN;
96 extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
97 extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
98 extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;
99 extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
100 extern LRESULT NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
101 extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) DECLSPEC_HIDDEN;
102 extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) DECLSPEC_HIDDEN;
104 /* scrollbar */
105 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior ) DECLSPEC_HIDDEN;
106 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt ) DECLSPEC_HIDDEN;
107 extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
108 int hMin, int hMax, int hPos ) DECLSPEC_HIDDEN;
110 /* combo box */
112 #define ID_CB_LISTBOX 1000
113 #define ID_CB_EDIT 1001
115 /* internal flags */
116 #define CBF_DROPPED 0x0001
117 #define CBF_BUTTONDOWN 0x0002
118 #define CBF_NOROLLUP 0x0004
119 #define CBF_MEASUREITEM 0x0008
120 #define CBF_FOCUSED 0x0010
121 #define CBF_CAPTURE 0x0020
122 #define CBF_EDIT 0x0040
123 #define CBF_NORESIZE 0x0080
124 #define CBF_NOTIFY 0x0100
125 #define CBF_NOREDRAW 0x0200
126 #define CBF_SELCHANGE 0x0400
127 #define CBF_NOEDITNOTIFY 0x1000
128 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
129 #define CBF_EUI 0x8000
131 /* combo state struct */
132 typedef struct
134 HWND self;
135 HWND owner;
136 UINT dwStyle;
137 HWND hWndEdit;
138 HWND hWndLBox;
139 UINT wState;
140 HFONT hFont;
141 RECT textRect;
142 RECT buttonRect;
143 RECT droppedRect;
144 INT droppedIndex;
145 INT fixedOwnerDrawHeight;
146 INT droppedWidth; /* last two are not used unless set */
147 INT editHeight; /* explicitly */
148 } HEADCOMBO,*LPHEADCOMBO;
150 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL ) DECLSPEC_HIDDEN;
152 /* Dialog info structure */
153 typedef struct
155 HWND hwndFocus; /* Current control with focus */
156 HFONT hUserFont; /* Dialog font */
157 HMENU hMenu; /* Dialog menu */
158 UINT xBaseUnit; /* Dialog units (depends on the font) */
159 UINT yBaseUnit;
160 INT idResult; /* EndDialog() result / default pushbutton ID */
161 UINT flags; /* EndDialog() called for this dialog */
162 HGLOBAL16 hDialogHeap;
163 } DIALOGINFO;
165 #define DF_END 0x0001
166 #define DF_OWNERENABLED 0x0002
168 /* offset of DIALOGINFO ptr in dialog extra bytes */
169 #define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
171 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) DECLSPEC_HIDDEN;
172 extern void DIALOG_EnableOwner( HWND hOwner ) DECLSPEC_HIDDEN;
173 extern BOOL DIALOG_DisableOwner( HWND hOwner ) DECLSPEC_HIDDEN;
174 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN;
176 #endif /* __WINE_CONTROLS_H */