~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/user32/controls.h

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * User controls definitions
  3  *
  4  * Copyright 2000 Alexandre Julliard
  5  *
  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.
 10  *
 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.
 15  *
 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
 19  */
 20 
 21 #ifndef __WINE_CONTROLS_H
 22 #define __WINE_CONTROLS_H
 23 
 24 #include "winuser.h"
 25 
 26 /* Built-in class names (see _Undocumented_Windows_ p.418) */
 27 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768)  /* PopupMenu */
 28 #define DESKTOP_CLASS_ATOM   MAKEINTATOM(32769)  /* Desktop */
 29 #define DIALOG_CLASS_ATOM    MAKEINTATOM(32770)  /* Dialog */
 30 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771)  /* WinSwitch */
 31 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772)  /* IconTitle */
 32 
 33 enum builtin_winprocs
 34 {
 35     /* dual A/W procs */
 36     WINPROC_BUTTON = 0,
 37     WINPROC_COMBO,
 38     WINPROC_DEFWND,
 39     WINPROC_DIALOG,
 40     WINPROC_EDIT,
 41     WINPROC_LISTBOX,
 42     WINPROC_MDICLIENT,
 43     WINPROC_SCROLLBAR,
 44     WINPROC_STATIC,
 45     /* unicode-only procs */
 46     WINPROC_DESKTOP,
 47     WINPROC_ICONTITLE,
 48     WINPROC_MENU,
 49     WINPROC_MESSAGE,
 50     NB_BUILTIN_WINPROCS,
 51     NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP
 52 };
 53 
 54 #define WINPROC_HANDLE (~0u >> 16)
 55 #define BUILTIN_WINPROC(index) ((WNDPROC)(ULONG_PTR)((index) | (WINPROC_HANDLE << 16)))
 56 
 57 /* Built-in class descriptor */
 58 struct builtin_class_descr
 59 {
 60     LPCWSTR   name;    /* class name */
 61     UINT      style;   /* class style */
 62     enum builtin_winprocs proc;
 63     INT       extra;   /* window extra bytes */
 64     ULONG_PTR cursor;  /* cursor id */
 65     HBRUSH    brush;   /* brush or system color */
 66 };
 67 
 68 extern const struct builtin_class_descr BUTTON_builtin_class DECLSPEC_HIDDEN;
 69 extern const struct builtin_class_descr COMBO_builtin_class DECLSPEC_HIDDEN;
 70 extern const struct builtin_class_descr COMBOLBOX_builtin_class DECLSPEC_HIDDEN;
 71 extern const struct builtin_class_descr DIALOG_builtin_class DECLSPEC_HIDDEN;
 72 extern const struct builtin_class_descr DESKTOP_builtin_class DECLSPEC_HIDDEN;
 73 extern const struct builtin_class_descr EDIT_builtin_class DECLSPEC_HIDDEN;
 74 extern const struct builtin_class_descr ICONTITLE_builtin_class DECLSPEC_HIDDEN;
 75 extern const struct builtin_class_descr LISTBOX_builtin_class DECLSPEC_HIDDEN;
 76 extern const struct builtin_class_descr MDICLIENT_builtin_class DECLSPEC_HIDDEN;
 77 extern const struct builtin_class_descr MENU_builtin_class DECLSPEC_HIDDEN;
 78 extern const struct builtin_class_descr MESSAGE_builtin_class DECLSPEC_HIDDEN;
 79 extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN;
 80 extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN;
 81 
 82 extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
 83 extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
 84 extern LRESULT WINAPI PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
 85 extern LRESULT WINAPI MessageWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN;
 86 
 87 /* Wow handlers */
 88 
 89 /* the structures must match the corresponding ones in user.exe */
 90 struct wow_handlers16
 91 {
 92     LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 93     LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 94     LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 95     LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 96     LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 97     LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 98     LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
 99     DWORD   (*wait_message)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
100     HWND    (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
101     LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
102     LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
103     void    (*free_icon_param)(ULONG_PTR);
104 };
105 
106 struct wow_handlers32
107 {
108     LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
109     LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
110     LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
111     LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
112     LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
113     LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
114     LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
115     DWORD   (*wait_message)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
116     HWND    (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
117     HWND    (*get_win_handle)(HWND);
118     WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
119     struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
120     INT     (*dialog_box_loop)(HWND,HWND);
121     ULONG_PTR (*get_icon_param)(HICON);
122     ULONG_PTR (*set_icon_param)(HICON,ULONG_PTR);
123 };
124 
125 extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN;
126 
127 extern LRESULT ButtonWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
128 extern LRESULT ComboWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
129 extern LRESULT EditWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
130 extern LRESULT ListBoxWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
131 extern LRESULT MDIClientWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
132 extern LRESULT ScrollBarWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
133 extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN;
134 
135 extern ULONG_PTR get_icon_param( HICON handle ) DECLSPEC_HIDDEN;
136 extern ULONG_PTR set_icon_param( HICON handle, ULONG_PTR param ) DECLSPEC_HIDDEN;
137 
138 /* Class functions */
139 struct tagCLASS;  /* opaque structure */
140 struct tagWND;
141 extern ATOM get_int_atom_value( LPCWSTR name ) DECLSPEC_HIDDEN;
142 extern void CLASS_RegisterBuiltinClasses(void) DECLSPEC_HIDDEN;
143 extern WNDPROC get_class_winproc( struct tagCLASS *class ) DECLSPEC_HIDDEN;
144 extern struct dce *get_class_dce( struct tagCLASS *class ) DECLSPEC_HIDDEN;
145 extern struct dce *set_class_dce( struct tagCLASS *class, struct dce *dce ) DECLSPEC_HIDDEN;
146 
147 /* defwnd proc */
148 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) DECLSPEC_HIDDEN;
149 
150 /* desktop */
151 extern BOOL DESKTOP_SetPattern( LPCWSTR pattern ) DECLSPEC_HIDDEN;
152 
153 /* icon title */
154 extern HWND ICONTITLE_Create( HWND hwnd ) DECLSPEC_HIDDEN;
155 
156 /* menu controls */
157 extern HWND MENU_IsMenuActive(void) DECLSPEC_HIDDEN;
158 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
159                                      INT orgX, INT orgY ) DECLSPEC_HIDDEN;
160 extern BOOL MENU_SetMenu(HWND, HMENU) DECLSPEC_HIDDEN;
161 extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt ) DECLSPEC_HIDDEN;
162 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar ) DECLSPEC_HIDDEN;
163 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
164                                 HWND hwnd, BOOL suppress_draw ) DECLSPEC_HIDDEN;
165 extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
166 
167 /* nonclient area */
168 extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
169 extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
170 extern LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) DECLSPEC_HIDDEN;
171 extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
172 extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
173 extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;
174 extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
175 extern LRESULT NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
176 extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) DECLSPEC_HIDDEN;
177 extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) DECLSPEC_HIDDEN;
178 
179 /* scrollbar */
180 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior ) DECLSPEC_HIDDEN;
181 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt ) DECLSPEC_HIDDEN;
182 extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
183                                 int hMin, int hMax, int hPos ) DECLSPEC_HIDDEN;
184 
185 /* combo box */
186 
187 #define ID_CB_LISTBOX           1000
188 #define ID_CB_EDIT              1001
189 
190 /* internal flags */
191 #define CBF_DROPPED             0x0001
192 #define CBF_BUTTONDOWN          0x0002
193 #define CBF_NOROLLUP            0x0004
194 #define CBF_MEASUREITEM         0x0008
195 #define CBF_FOCUSED             0x0010
196 #define CBF_CAPTURE             0x0020
197 #define CBF_EDIT                0x0040
198 #define CBF_NORESIZE            0x0080
199 #define CBF_NOTIFY              0x0100
200 #define CBF_NOREDRAW            0x0200
201 #define CBF_SELCHANGE           0x0400
202 #define CBF_NOEDITNOTIFY        0x1000
203 #define CBF_NOLBSELECT          0x2000  /* do not change current selection */
204 #define CBF_BEENFOCUSED         0x4000  /* has it ever had focus           */
205 #define CBF_EUI                 0x8000
206 
207 /* combo state struct */
208 typedef struct
209 {
210    HWND           self;
211    HWND           owner;
212    UINT           dwStyle;
213    HWND           hWndEdit;
214    HWND           hWndLBox;
215    UINT           wState;
216    HFONT          hFont;
217    RECT           textRect;
218    RECT           buttonRect;
219    RECT           droppedRect;
220    INT            droppedIndex;
221    INT            fixedOwnerDrawHeight;
222    INT            droppedWidth;   /* last two are not used unless set */
223    INT            editHeight;     /* explicitly */
224 } HEADCOMBO,*LPHEADCOMBO;
225 
226 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL ) DECLSPEC_HIDDEN;
227 
228 /* Dialog info structure (note: shared with user.exe) */
229 typedef struct tagDIALOGINFO
230 {
231     HWND      hwndFocus;   /* Current control with focus */
232     HFONT     hUserFont;   /* Dialog font */
233     HMENU     hMenu;       /* Dialog menu */
234     UINT      xBaseUnit;   /* Dialog units (depends on the font) */
235     UINT      yBaseUnit;
236     INT       idResult;    /* EndDialog() result / default pushbutton ID */
237     UINT      flags;       /* EndDialog() called for this dialog */
238 } DIALOGINFO;
239 
240 #define DF_END  0x0001
241 #define DF_OWNERENABLED 0x0002
242 
243 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) DECLSPEC_HIDDEN;
244 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN;
245 
246 #endif  /* __WINE_CONTROLS_H */
247 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.