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
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
;
64 LRESULT (*button_proc
)(HWND
,UINT
,WPARAM
,LPARAM
,BOOL
);
69 LRESULT (*button_proc
)(HWND
,UINT
,WPARAM
,LPARAM
,BOOL
);
72 extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN
;
74 extern LRESULT
ButtonWndProc_common(HWND
,UINT
,WPARAM
,LPARAM
,BOOL
) DECLSPEC_HIDDEN
;
76 extern void register_wow_handlers(void) DECLSPEC_HIDDEN
;
77 extern void WINAPI
UserRegisterWowHandlers( const struct wow_handlers16
*new,
78 struct wow_handlers32
*orig
);
80 extern WNDPROC EDIT_winproc_handle DECLSPEC_HIDDEN
;
83 struct tagCLASS
; /* opaque structure */
85 extern ATOM
get_int_atom_value( LPCWSTR name
) DECLSPEC_HIDDEN
;
86 extern void CLASS_RegisterBuiltinClasses(void) DECLSPEC_HIDDEN
;
87 extern WNDPROC
get_class_winproc( struct tagCLASS
*class ) DECLSPEC_HIDDEN
;
88 extern struct dce
*get_class_dce( struct tagCLASS
*class ) DECLSPEC_HIDDEN
;
89 extern struct dce
*set_class_dce( struct tagCLASS
*class, struct dce
*dce
) DECLSPEC_HIDDEN
;
90 extern void CLASS_FreeModuleClasses( HMODULE16 hModule
) DECLSPEC_HIDDEN
;
93 extern HBRUSH
DEFWND_ControlColor( HDC hDC
, UINT ctlType
) DECLSPEC_HIDDEN
;
96 extern BOOL
DESKTOP_SetPattern( LPCWSTR pattern
) DECLSPEC_HIDDEN
;
99 extern HWND
ICONTITLE_Create( HWND hwnd
) DECLSPEC_HIDDEN
;
102 extern HWND
MENU_IsMenuActive(void) DECLSPEC_HIDDEN
;
103 extern UINT
MENU_GetMenuBarHeight( HWND hwnd
, UINT menubarWidth
,
104 INT orgX
, INT orgY
) DECLSPEC_HIDDEN
;
105 extern BOOL
MENU_SetMenu(HWND
, HMENU
) DECLSPEC_HIDDEN
;
106 extern void MENU_TrackMouseMenuBar( HWND hwnd
, INT ht
, POINT pt
) DECLSPEC_HIDDEN
;
107 extern void MENU_TrackKbdMenuBar( HWND hwnd
, UINT wParam
, WCHAR wChar
) DECLSPEC_HIDDEN
;
108 extern UINT
MENU_DrawMenuBar( HDC hDC
, LPRECT lprect
,
109 HWND hwnd
, BOOL suppress_draw
) DECLSPEC_HIDDEN
;
110 extern UINT
MENU_FindSubMenu( HMENU
*hmenu
, HMENU hSubTarget
) DECLSPEC_HIDDEN
;
111 extern void MENU_EndMenu(HWND
) DECLSPEC_HIDDEN
;
114 extern LRESULT
NC_HandleNCPaint( HWND hwnd
, HRGN clip
) DECLSPEC_HIDDEN
;
115 extern LRESULT
NC_HandleNCActivate( HWND hwnd
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
116 extern LRESULT
NC_HandleNCCalcSize( HWND hwnd
, RECT
*winRect
) DECLSPEC_HIDDEN
;
117 extern LRESULT
NC_HandleNCHitTest( HWND hwnd
, POINT pt
) DECLSPEC_HIDDEN
;
118 extern LRESULT
NC_HandleNCLButtonDown( HWND hwnd
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
119 extern LRESULT
NC_HandleNCLButtonDblClk( HWND hwnd
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
120 extern LRESULT
NC_HandleSysCommand( HWND hwnd
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
121 extern LRESULT
NC_HandleSetCursor( HWND hwnd
, WPARAM wParam
, LPARAM lParam
) DECLSPEC_HIDDEN
;
122 extern BOOL
NC_DrawSysButton( HWND hwnd
, HDC hdc
, BOOL down
) DECLSPEC_HIDDEN
;
123 extern void NC_GetSysPopupPos( HWND hwnd
, RECT
* rect
) DECLSPEC_HIDDEN
;
126 extern void SCROLL_DrawScrollBar( HWND hwnd
, HDC hdc
, INT nBar
, BOOL arrows
, BOOL interior
) DECLSPEC_HIDDEN
;
127 extern void SCROLL_TrackScrollBar( HWND hwnd
, INT scrollbar
, POINT pt
) DECLSPEC_HIDDEN
;
128 extern INT
SCROLL_SetNCSbState( HWND hwnd
, int vMin
, int vMax
, int vPos
,
129 int hMin
, int hMax
, int hPos
) DECLSPEC_HIDDEN
;
133 #define ID_CB_LISTBOX 1000
134 #define ID_CB_EDIT 1001
137 #define CBF_DROPPED 0x0001
138 #define CBF_BUTTONDOWN 0x0002
139 #define CBF_NOROLLUP 0x0004
140 #define CBF_MEASUREITEM 0x0008
141 #define CBF_FOCUSED 0x0010
142 #define CBF_CAPTURE 0x0020
143 #define CBF_EDIT 0x0040
144 #define CBF_NORESIZE 0x0080
145 #define CBF_NOTIFY 0x0100
146 #define CBF_NOREDRAW 0x0200
147 #define CBF_SELCHANGE 0x0400
148 #define CBF_NOEDITNOTIFY 0x1000
149 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
150 #define CBF_EUI 0x8000
152 /* combo state struct */
166 INT fixedOwnerDrawHeight
;
167 INT droppedWidth
; /* last two are not used unless set */
168 INT editHeight
; /* explicitly */
169 } HEADCOMBO
,*LPHEADCOMBO
;
171 extern BOOL
COMBO_FlipListbox( LPHEADCOMBO
, BOOL
, BOOL
) DECLSPEC_HIDDEN
;
173 /* Dialog info structure */
174 typedef struct tagDIALOGINFO
176 HWND hwndFocus
; /* Current control with focus */
177 HFONT hUserFont
; /* Dialog font */
178 HMENU hMenu
; /* Dialog menu */
179 UINT xBaseUnit
; /* Dialog units (depends on the font) */
181 INT idResult
; /* EndDialog() result / default pushbutton ID */
182 UINT flags
; /* EndDialog() called for this dialog */
183 HGLOBAL16 hDialogHeap
;
186 #define DF_END 0x0001
187 #define DF_OWNERENABLED 0x0002
189 extern DIALOGINFO
*DIALOG_get_info( HWND hwnd
, BOOL create
) DECLSPEC_HIDDEN
;
190 extern void DIALOG_EnableOwner( HWND hOwner
) DECLSPEC_HIDDEN
;
191 extern BOOL
DIALOG_DisableOwner( HWND hOwner
) DECLSPEC_HIDDEN
;
192 extern INT
DIALOG_DoDialogBox( HWND hwnd
, HWND owner
) DECLSPEC_HIDDEN
;
194 #endif /* __WINE_CONTROLS_H */