From 89d174ab47af8a31ba316e03e36883e6924171bf Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Wed, 2 Jan 2019 16:56:43 +0100 Subject: make combobox implementation more complete --- alf/alf.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'alf/alf.h') 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 -- cgit v1.2.3