Removed the obsolete DIBTexture surface class.
[wine.git] / dlls / user / controls.h
blobbbf0a11d6e4a66f5e2cda13ff7c81b4847d866cf
1 /*
2 * User controls definitions
4 * Copyright 2000 Alexandre Julliard
5 */
7 #ifndef __WINE_CONTROLS_H
8 #define __WINE_CONTROLS_H
10 #include "winuser.h"
11 #include "winproc.h"
13 struct tagWND;
15 /* Built-in class names (see _Undocumented_Windows_ p.418) */
16 #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
17 #define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
18 #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
19 #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
20 #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
22 /* Built-in class descriptor */
23 struct builtin_class_descr
25 LPCSTR name; /* class name */
26 UINT style; /* class style */
27 WNDPROC procA; /* ASCII window procedure */
28 WNDPROC procW; /* Unicode window procedure */
29 INT extra; /* window extra bytes */
30 LPCSTR cursor; /* cursor name */
31 HBRUSH brush; /* brush or system color */
35 /* desktop */
36 extern BOOL DESKTOP_SetPattern( LPCSTR pattern );
38 /* icon title */
39 extern HWND ICONTITLE_Create( struct tagWND * );
41 /* menu controls */
42 extern BOOL MENU_Init(void);
43 extern BOOL MENU_IsMenuActive(void);
44 extern HMENU MENU_GetSysMenu(HWND hWndOwner, HMENU hSysPopup);
45 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
46 INT orgX, INT orgY );
47 extern BOOL MENU_PatchResidentPopup( HQUEUE16, struct tagWND* );
48 extern void MENU_TrackMouseMenuBar( struct tagWND *wnd, INT ht, POINT pt );
49 extern void MENU_TrackKbdMenuBar( struct tagWND *wnd, UINT wParam, INT vkey );
50 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
51 HWND hwnd, BOOL suppress_draw );
52 extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
54 /* scrollbar */
55 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
56 extern void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt );
57 extern INT SCROLL_SetNCSbState( struct tagWND *wndPtr, int vMin, int vMax, int vPos,
58 int hMin, int hMax, int hPos );
60 /* combo box */
62 #define ID_CB_LISTBOX 1000
63 #define ID_CB_EDIT 1001
65 /* internal flags */
66 #define CBF_DROPPED 0x0001
67 #define CBF_BUTTONDOWN 0x0002
68 #define CBF_NOROLLUP 0x0004
69 #define CBF_MEASUREITEM 0x0008
70 #define CBF_FOCUSED 0x0010
71 #define CBF_CAPTURE 0x0020
72 #define CBF_EDIT 0x0040
73 #define CBF_NORESIZE 0x0080
74 #define CBF_NOTIFY 0x0100
75 #define CBF_NOREDRAW 0x0200
76 #define CBF_SELCHANGE 0x0400
77 #define CBF_NOEDITNOTIFY 0x1000
78 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
79 #define CBF_EUI 0x8000
81 /* combo state struct */
82 typedef struct
84 struct tagWND *self;
85 HWND owner;
86 UINT dwStyle;
87 HWND hWndEdit;
88 HWND hWndLBox;
89 UINT wState;
90 HFONT hFont;
91 RECT textRect;
92 RECT buttonRect;
93 RECT droppedRect;
94 INT droppedIndex;
95 INT fixedOwnerDrawHeight;
96 INT droppedWidth; /* last two are not used unless set */
97 INT editHeight; /* explicitly */
98 } HEADCOMBO,*LPHEADCOMBO;
100 /* Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN) */
101 #define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
102 #define CB_DISABLED( lphc ) ((lphc)->self->dwStyle & WS_DISABLED)
103 #define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
104 #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
105 #define CB_HWND( lphc ) ((lphc)->self->hwndSelf)
107 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
109 /* Dialog info structure.
110 * This structure is stored into the window extra bytes (cbWndExtra).
111 * sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
113 #include "pshpack1.h"
115 typedef struct
117 INT msgResult; /* 00 Last message result */
118 HWINDOWPROC dlgProc; /* 04 Dialog procedure */
119 LONG userInfo; /* 08 User information (for DWL_USER) */
121 /* implementation-dependent part */
123 HWND16 hwndFocus; /* 0c Current control with focus */
124 HFONT16 hUserFont; /* 0e Dialog font */
125 HMENU16 hMenu; /* 10 Dialog menu */
126 WORD xBaseUnit; /* 12 Dialog units (depends on the font) */
127 WORD yBaseUnit; /* 14 */
128 INT idResult; /* 16 EndDialog() result / default pushbutton ID */
129 UINT16 flags; /* 1a EndDialog() called for this dialog */
130 HGLOBAL16 hDialogHeap; /* 1c */
131 } DIALOGINFO;
133 #include "poppack.h"
135 #define DF_END 0x0001
136 #define DF_OWNERENABLED 0x0002
138 extern BOOL DIALOG_Init(void);
140 #endif /* __WINE_CONTROLS_H */