Release 960606
[wine.git] / include / listbox.h
blob8dfcf652a1528ec4cd1b1f84b9b9559c14fe34ca
1 /*
2 * Listbox definitions
3 */
5 typedef struct tagLISTSTRUCT {
6 MEASUREITEMSTRUCT mis;
7 UINT itemState;
8 RECT16 itemRect;
9 HANDLE hData;
10 char *itemText;
11 struct tagLISTSTRUCT *lpNext;
12 } LISTSTRUCT, *LPLISTSTRUCT;
14 typedef struct {
15 WORD FirstVisible;
16 WORD ItemsCount;
17 WORD ItemsVisible;
18 WORD ColumnsVisible;
19 WORD ItemsPerColumn;
20 short ItemFocused;
21 short PrevFocused;
22 WORD StdItemHeight;
23 WORD ColumnsWidth;
24 WORD DrawCtlType;
25 WORD CtlID;
26 LPLISTSTRUCT lpFirst;
27 HWND hSelf;
28 DWORD dwStyle; /* added for COMBOLBOX style faking */
29 HWND hParent;
30 HFONT hFont;
31 BOOL bRedrawFlag;
32 BOOL HasStrings;
33 BOOL OwnerDrawn;
34 WORD iNumStops;
35 LPINT16 TabStops;
36 BOOL needMeasure;
37 HANDLE HeapSel;
38 /* MDESC *Heap; */
39 } HEADLIST,*LPHEADLIST;
41 /* shared code between listbox and combo controls */
42 extern void CreateListBoxStruct(HWND hwnd, WORD CtlType, LONG styles, HWND parent);
43 extern void DestroyListBoxStruct(LPHEADLIST lphl);
45 extern void ListBoxSendNotification(LPHEADLIST lphl, WORD code);
47 extern LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT uIndex);
48 extern int ListMaxFirstVisible(LPHEADLIST lphl);
49 extern int ListBoxScrollToFocus(LPHEADLIST lphl);
50 extern int ListBoxAddString(LPHEADLIST lphl, LPCSTR newstr);
51 extern int ListBoxInsertString(LPHEADLIST lphl, UINT uIndex, LPCSTR newstr);
52 extern int ListBoxGetText(LPHEADLIST lphl, UINT uIndex, LPSTR OutStr);
53 extern DWORD ListBoxGetItemData(LPHEADLIST lphl, UINT uIndex);
54 extern int ListBoxSetItemData(LPHEADLIST lphl, UINT uIndex, DWORD ItemData);
55 extern int ListBoxDeleteString(LPHEADLIST lphl, UINT uIndex);
56 extern int ListBoxFindString(LPHEADLIST lphl, UINT nFirst, SEGPTR MatchStr);
57 extern int ListBoxResetContent(LPHEADLIST lphl);
58 extern int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex);
59 extern int ListBoxSetSel(LPHEADLIST lphl, WORD wIndex, WORD state);
60 extern int ListBoxGetSel(LPHEADLIST lphl, WORD wIndex);
61 extern LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec);
62 extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 rect);
63 extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
64 extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
66 extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc,
67 LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction,
68 WORD itemState);
69 extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
70 extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
72 extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);