msi/tests: Delete the temp .msi file in all failure cases.
[wine.git] / dlls / user32 / controls.h
blobd1e7aceee44fd33b10ad6c84590641718098c534
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 "ntuser.h"
26 extern LRESULT WINAPI ImeWndProcA(HWND,UINT,WPARAM,LPARAM);
27 extern LRESULT WINAPI ImeWndProcW(HWND,UINT,WPARAM,LPARAM);
28 extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM);
29 extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM);
30 extern LRESULT WINAPI PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM);
31 extern LRESULT WINAPI MessageWndProc(HWND,UINT,WPARAM,LPARAM);
33 /* Wow handlers */
35 /* the structures must match the corresponding ones in user.exe */
36 struct wow_handlers16
38 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
39 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
40 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
41 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
42 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
43 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
44 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
45 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
46 LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
47 LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
50 struct wow_handlers32
52 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
53 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
54 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
55 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
56 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
57 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
58 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
59 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
60 HWND (*get_win_handle)(HWND);
61 WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
62 struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
63 INT (*dialog_box_loop)(HWND,HWND);
66 extern struct wow_handlers16 wow_handlers;
68 extern LRESULT ButtonWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
69 extern LRESULT ComboWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
70 extern LRESULT EditWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
71 extern LRESULT ListBoxWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
72 extern LRESULT MDIClientWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
73 extern LRESULT ScrollBarWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
74 extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL);
76 /* Class functions */
77 extern ATOM get_int_atom_value( UNICODE_STRING *name );
79 /* desktop */
80 extern BOOL update_wallpaper( const WCHAR *wallpaper, const WCHAR *pattern );
82 /* nonclient area */
83 extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
85 /* scrollbar */
87 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTEST hit_test,
88 const struct SCROLL_TRACKING_INFO *tracking_info, BOOL arrows,
89 BOOL interior );
90 extern void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt );
91 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
93 /* combo box */
95 #define ID_CB_LISTBOX 1000
96 #define ID_CB_EDIT 1001
98 /* internal flags */
99 #define CBF_DROPPED 0x0001
100 #define CBF_BUTTONDOWN 0x0002
101 #define CBF_NOROLLUP 0x0004
102 #define CBF_MEASUREITEM 0x0008
103 #define CBF_FOCUSED 0x0010
104 #define CBF_CAPTURE 0x0020
105 #define CBF_EDIT 0x0040
106 #define CBF_NORESIZE 0x0080
107 #define CBF_NOTIFY 0x0100
108 #define CBF_NOREDRAW 0x0200
109 #define CBF_SELCHANGE 0x0400
110 #define CBF_NOEDITNOTIFY 0x1000
111 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
112 #define CBF_BEENFOCUSED 0x4000 /* has it ever had focus */
113 #define CBF_EUI 0x8000
115 /* combo state struct */
116 typedef struct
118 HWND self;
119 HWND owner;
120 UINT dwStyle;
121 HWND hWndEdit;
122 HWND hWndLBox;
123 UINT wState;
124 HFONT hFont;
125 RECT textRect;
126 RECT buttonRect;
127 RECT droppedRect;
128 INT droppedIndex;
129 INT fixedOwnerDrawHeight;
130 INT droppedWidth; /* not used unless set explicitly */
131 INT item_height;
132 } HEADCOMBO,*LPHEADCOMBO;
134 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
136 /* Dialog info structure (note: shared with user.exe) */
137 typedef struct tagDIALOGINFO
139 HWND hwndFocus; /* Current control with focus */
140 HFONT hUserFont; /* Dialog font */
141 HMENU hMenu; /* Dialog menu */
142 UINT xBaseUnit; /* Dialog units (depends on the font) */
143 UINT yBaseUnit;
144 INT idResult; /* EndDialog() result / default pushbutton ID */
145 UINT flags; /* EndDialog() called for this dialog */
146 } DIALOGINFO;
148 #define DF_END 0x0001
150 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
151 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner );
153 HRGN set_control_clipping( HDC hdc, const RECT *rect );
155 #endif /* __WINE_CONTROLS_H */