diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-20 17:18:20 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-20 17:18:20 +0200 |
| commit | 079fdbf1a553e314cbba386b85ca92b67c61b8df (patch) | |
| tree | 7b025b94cd6cdcb26e5dde27207f7761ac1a394d /alf/alf.h | |
| parent | 4efad16e663d33f4700ab77c133ad99e2cdea40f (diff) | |
fixup transparent background work and add test in widgetfactory
Win32s bites once again with its 16bit WPARAM
Diffstat (limited to 'alf/alf.h')
| -rw-r--r-- | alf/alf.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -23,6 +23,7 @@ typedef struct { LRESULT (*notify)(void * /*closure*/, HWND /*window*/, WPARAM /*sourceid*/, NMHDR *); BOOL (*pretranslatemessage)(void * /*closure*/, HWND /*window*/, MSG * /*message*/); void (*paint)(void * /*closure*/, HWND, HDC, RECT *); + void (*windowposchanged)(void * /*closure*/, HWND, WINDOWPOS *); } ALFWindowVTable; typedef struct { @@ -45,6 +46,8 @@ typedef struct { #define ALF_LAYOUT_CUSTOMPOS 0x20 #define ALF_LAYOUT_SIZE_PX 0x40 #define ALF_LAYOUT_INHERITBGCOLOR 0x80 +#define ALF_LAYOUT_TRANSPARENTBG 0x100 +#define ALF_LAYOUT_SENDBGCHANGE 0x200 // label style flags @@ -72,6 +75,7 @@ typedef struct { #define ALF_WM_GETMODALRESULT (ALF_WM__BASE + 8) #define ALF_WM_CENTIPOINTTOPX (ALF_WM__BASE + 9) #define ALF_WM_SETFOCUS (ALF_WM__BASE + 10) +#define ALF_WM_BACKGROUNDCHANGE (ALF_WM__BASE + 11) #define ALF_WM_APPLYSIZE (ALF_WM__BASE + 12) #define ALF_WM_SETBGCOLOR (ALF_WM__BASE + 13) #define ALF_WM_GETBGCOLOR (ALF_WM__BASE + 14) @@ -190,6 +194,12 @@ ALF_WidgetHwndById(HWND win, WORD id); void ALF_InvalidateLayout(HWND win); +// Sends ALF_WM_BACKGROUNDCHANGE to notify the window of a changed background +// Only useful when you have overridden the window or panel pain() vfunc +// when you use solid background colors, ALF will handle this automatically +void +ALF_InvalidateBackground(HWND win); + // Recalculates the window's DPI and all fonts and applies them to child widgets. // ALF does this automatically on a DPI or settings change so you shouldn't have // to call ALF_UpdateFonts(). @@ -197,6 +207,12 @@ void ALF_UpdateFonts(HWND win); void +ALF_SetBackgroundColor(HWND win, ALFColor color); + +ALFColor +ALF_GetBackgroundColor(HWND win); + +void ALF_ResizeWindow(HWND win, int cptWidth, int cptHeight); void |
