summaryrefslogtreecommitdiff
path: root/alf/alf.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-02 16:56:43 +0100
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-02 16:56:43 +0100
commit89d174ab47af8a31ba316e03e36883e6924171bf (patch)
tree25b21619207cda9a81885b4b17e2933a905453dd /alf/alf.h
parentd19993c9d4891978c0b593eced6376d17aa1ffec (diff)
make combobox implementation more complete
Diffstat (limited to 'alf/alf.h')
-rw-r--r--alf/alf.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/alf/alf.h b/alf/alf.h
index c6a7b77..62f4563 100644
--- a/alf/alf.h
+++ b/alf/alf.h
@@ -20,7 +20,7 @@ typedef struct {
void (*postdestroy)(void * /*closure*/);
void (*updatefonts)(void * /*closure*/, HWND /*window*/, const ALFWindowFonts *fonts);
LRESULT (*message)(void * /*closure*/, HWND, UINT, WPARAM, LPARAM);
- LRESULT (*command)(void * /*closure*/, HWND /*window*/, UINT /*sourceid*/, UINT /*notificationcode*/, LPARAM);
+ LRESULT (*command)(void * /*closure*/, HWND /*window*/, WORD /*notificationcode*/, WORD /*sourceid*/, HWND /*control*/);
LRESULT (*notify)(void * /*closure*/, HWND /*window*/, WPARAM /*sourceid*/, NMHDR *);
} ALFWindowVTable;
@@ -142,6 +142,18 @@ ALF_SetModalResult(HWND win, int result);
int
ALF_GetModalResult(HWND win);
+void
+ALF_SetText(HWND hwnd, const TCHAR *text);
+
+void
+ALF_SetWidgetText(HWND parent, WORD id, const TCHAR *text);
+
+TCHAR * // free with HeapFree
+ALF_Text(HWND hwnd);
+
+TCHAR * // free with HeapFree
+ALF_WidgetText(HWND parent, WORD id);
+
// combo box
HWND
@@ -159,14 +171,16 @@ ALF_ComboBoxInsertString(HWND combo, int index, const TCHAR *text);
void
ALF_ComboBoxRemoveString(HWND combo, int index);
+TCHAR * // free with HeapFree
+ALF_ComboBoxStringForIndex(HWND combo, int index);
+
int
ALF_ComboBoxCurrentIndex(HWND combo);
void
-ALF_ComboBoxSetCurrentIndex(HWND combo);
+ALF_ComboBoxSetCurrentIndex(HWND combo, int index);
-// NOTE: call HeapFree
-TCHAR *
+TCHAR * // free with HeapFree
ALF_ComboBoxCurrentText(HWND combo);
void