Fixed a file descriptor leak in the PE loader.
[wine] / include / combo.h
1 /*
2  * Combo box definitions
3  */
4
5 #ifndef __WINE_COMBO_H
6 #define __WINE_COMBO_H
7
8 #include "windef.h"
9
10 struct tagWND;
11
12 #define ID_CB_LISTBOX           1000
13 #define ID_CB_EDIT              1001
14
15 /* Internal flags */
16
17 #define CBF_DROPPED             0x0001
18 #define CBF_BUTTONDOWN          0x0002
19 #define CBF_NOROLLUP            0x0004
20 #define CBF_MEASUREITEM         0x0008
21 #define CBF_FOCUSED             0x0010
22 #define CBF_CAPTURE             0x0020
23 #define CBF_EDIT                0x0040
24 #define CBF_NORESIZE            0x0080
25 #define CBF_NOTIFY              0x0100
26 #define CBF_NOREDRAW            0x0200
27 #define CBF_SELCHANGE           0x0400
28 #define CBF_NOEDITNOTIFY        0x1000
29 #define CBF_NOLBSELECT          0x2000  /* do not change current selection */
30 #define CBF_EUI                 0x8000
31
32 /* Combo state struct */
33
34 typedef struct
35 {
36    struct tagWND *self;
37    HWND         owner;
38    UINT         dwStyle;
39    HWND         hWndEdit;
40    HWND         hWndLBox;
41    UINT         wState;
42    HFONT        hFont;
43    RECT         textRect;
44    RECT         buttonRect;
45    RECT         droppedRect;
46    INT          droppedIndex;
47    INT          fixedOwnerDrawHeight;
48    INT          droppedWidth;           /* last two are not used unless set */
49    INT          editHeight;             /* explicitly */
50 } HEADCOMBO,*LPHEADCOMBO;
51
52 /*
53  * Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN)!
54  */
55
56 #define CB_GETTYPE( lphc )    ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
57 #define CB_DISABLED( lphc )   ((lphc)->self->dwStyle & WS_DISABLED)
58 #define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
59 #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
60 #define CB_HWND( lphc )       ((lphc)->self->hwndSelf)
61
62 LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
63
64 BOOL    COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
65 LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL );
66
67 #endif /* __WINE_COMBO_H */
68