configure: Make the font warning more explicit about what package is missing.
[wine/multimedia.git] / dlls / user / controls.h
blob98dfa4d2e46e007e7da629fd03f2dae01c4c6ee0
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_ATOMA MAKEINTATOMA(32768) /* PopupMenu */
29 #define POPUPMENU_CLASS_ATOMW MAKEINTATOMW(32768) /* PopupMenu */
30 #define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
31 #define DIALOG_CLASS_ATOMA MAKEINTATOMA(32770) /* Dialog */
32 #define DIALOG_CLASS_ATOMW MAKEINTATOMW(32770) /* Dialog */
33 #define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
34 #define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
36 /* Built-in class descriptor */
37 struct builtin_class_descr
39 LPCSTR name; /* class name */
40 UINT style; /* class style */
41 WNDPROC procA; /* ASCII window procedure */
42 WNDPROC procW; /* Unicode window procedure */
43 INT extra; /* window extra bytes */
44 ULONG_PTR cursor; /* cursor id */
45 HBRUSH brush; /* brush or system color */
48 /* Class functions */
49 struct tagCLASS; /* opaque structure */
50 struct tagWND;
51 extern void CLASS_RegisterBuiltinClasses(void);
52 extern void CLASS_AddWindow( struct tagCLASS *class, struct tagWND *win, BOOL unicode );
53 extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
55 /* defwnd proc */
56 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType );
58 /* desktop */
59 extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
61 /* icon title */
62 extern HWND ICONTITLE_Create( HWND hwnd );
64 /* menu controls */
65 extern HWND MENU_IsMenuActive(void);
66 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
67 INT orgX, INT orgY );
68 extern BOOL MENU_SetMenu(HWND, HMENU);
69 extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt );
70 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar );
71 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
72 HWND hwnd, BOOL suppress_draw );
73 extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
75 /* nonclient area */
76 extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip);
77 extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
78 extern LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect );
79 extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt );
80 extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
81 extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
82 extern LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
83 extern LRESULT NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
84 extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
85 extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
87 /* scrollbar */
88 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
89 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
90 extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
91 int hMin, int hMax, int hPos );
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_EUI 0x8000
114 /* combo state struct */
115 typedef struct
117 HWND self;
118 HWND owner;
119 UINT dwStyle;
120 HWND hWndEdit;
121 HWND hWndLBox;
122 UINT wState;
123 HFONT hFont;
124 RECT textRect;
125 RECT buttonRect;
126 RECT droppedRect;
127 INT droppedIndex;
128 INT fixedOwnerDrawHeight;
129 INT droppedWidth; /* last two are not used unless set */
130 INT editHeight; /* explicitly */
131 } HEADCOMBO,*LPHEADCOMBO;
133 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
135 /* Dialog info structure */
136 typedef struct
138 HWND hwndFocus; /* Current control with focus */
139 HFONT hUserFont; /* Dialog font */
140 HMENU hMenu; /* Dialog menu */
141 UINT xBaseUnit; /* Dialog units (depends on the font) */
142 UINT yBaseUnit;
143 INT idResult; /* EndDialog() result / default pushbutton ID */
144 UINT flags; /* EndDialog() called for this dialog */
145 HGLOBAL16 hDialogHeap;
146 } DIALOGINFO;
148 #define DF_END 0x0001
149 #define DF_OWNERENABLED 0x0002
151 /* offset of DIALOGINFO ptr in dialog extra bytes */
152 #define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
154 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
155 extern void DIALOG_EnableOwner( HWND hOwner );
156 extern BOOL DIALOG_DisableOwner( HWND hOwner );
157 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner );
159 #endif /* __WINE_CONTROLS_H */