From 9b6fbe3b5fd7e8bcad7f0f0993409f4d6777c42f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Sun, 19 Apr 2020 15:40:25 +0200 Subject: panel vtbl first implementation still basically untested --- alf/alf.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'alf/alf.h') diff --git a/alf/alf.h b/alf/alf.h index cc3fc6f..a23eb8c 100644 --- a/alf/alf.h +++ b/alf/alf.h @@ -24,6 +24,13 @@ typedef struct { BOOL (*pretranslatemessage)(void * /*closure*/, HWND /*window*/, MSG * /*message*/); } ALFWindowVTable; +typedef struct { + void (*create)(void * /*closure*/, HWND /*panel*/); + void (*destroy)(void * /*closure*/, HWND /*panel*/); + LRESULT (*message)(void * /*closure*/, HWND, UINT, WPARAM, LPARAM); + void (*paint)(void * /*closure*/, HWND, HDC, RECT * /*rcPaint*/); +} ALFPanelVTable; + // layout flags #define ALF_LAYOUT_SIZE_FIXED 0x00 #define ALF_LAYOUT_SIZE_QUERY 0x01 @@ -93,6 +100,8 @@ typedef struct { #define ALF_WM_LBL_GETSTYLE (ALF_WM__BASE + 201) #define ALF_WM_LBL_SETSTYLE (ALF_WM__BASE + 202) +#define ALF_WM_PANEL_SETVTABLE (ALF_WM__BASE + 201) + typedef DWORD ALFColor; #define ALF_COLOR_TRANSPARENT ((ALFColor)-1) @@ -318,6 +327,12 @@ ALF_ComboBoxSetText(HWND combo, const TCHAR *text); HWND ALF_AddPanel(HWND parent, WORD id, int x, int y); +void +ALF_Panel_SetVTable(HWND panel, const ALFPanelVTable *vtbl, void *closure); + +LRESULT +ALF_Panel_DefWindowProc(HWND panel, UINT msg, WPARAM wparam, LPARAM lparam); + // tab control HWND ALF_AddNotebook(HWND parent, WORD id, int x, int y); -- cgit v1.2.3