Release 961013
[wine/multimedia.git] / include / listbox.h
blobaf816b6252cb44e8f6b7a6271fb09677a4b71b17
1 /*
2 * Listbox definitions
3 */
5 typedef struct tagLISTSTRUCT {
6 MEASUREITEMSTRUCT16 mis;
7 UINT itemState;
8 RECT16 itemRect;
9 HLOCAL16 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 HFONT16 hFont;
31 BOOL bRedrawFlag;
32 BOOL HasStrings;
33 BOOL OwnerDrawn;
34 WORD iNumStops;
35 LPINT16 TabStops;
36 BOOL needMeasure;
37 HGLOBAL16 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, SEGPTR itemData);
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 ListBoxFindStringExact(LPHEADLIST lphl, UINT nFirst, SEGPTR MatchStr);
58 extern int ListBoxResetContent(LPHEADLIST lphl);
59 extern int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex);
60 extern int ListBoxSetSel(LPHEADLIST lphl, WORD wIndex, WORD state);
61 extern int ListBoxGetSel(LPHEADLIST lphl, WORD wIndex);
62 extern LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec);
63 extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 rect);
64 extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
65 extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
67 extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc,
68 LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction,
69 WORD itemState);
70 extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
71 extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
73 extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);