summaryrefslogtreecommitdiff
path: root/alf/alf.h
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alf.h')
-rw-r--r--alf/alf.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/alf/alf.h b/alf/alf.h
index 48b7834..d300342 100644
--- a/alf/alf.h
+++ b/alf/alf.h
@@ -8,12 +8,6 @@ extern "C" {
#endif
typedef struct {
- UINT dpi;
- LOGFONT lfMessageFont;
- HFONT hMessageFont;
-} ALFWindowFonts;
-
-typedef struct {
void (*create)(void * /*closure*/, HWND /*window*/);
void (*destroy)(void * /*closure*/, HWND /*window*/);
BOOL (*close)(void * /*closure*/, HWND /*window*/);
@@ -48,6 +42,7 @@ typedef struct {
#define ALF_LAYOUT_INHERITBGCOLOR 0x80
#define ALF_LAYOUT_TRANSPARENTBG 0x100
#define ALF_LAYOUT_SENDBGCHANGE 0x200
+#define ALF_LAYOUT_SENDDPICHANGE 0x400
// label style flags
@@ -76,7 +71,7 @@ typedef struct {
#define ALF_WM_REMOVEWIDGET (ALF_WM__BASE + 6)
#define ALF_WM_SETMODALRESULT (ALF_WM__BASE + 7)
#define ALF_WM_GETMODALRESULT (ALF_WM__BASE + 8)
-#define ALF_WM_CENTIPOINTTOPX (ALF_WM__BASE + 9)
+#define ALF_WM_GETDPI (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)
@@ -106,6 +101,7 @@ typedef struct {
#define ALF_WM_LYT_SETROWFLAGS (ALF_WM__BASE + 36)
#define ALF_WM_GETTEXTCOLOR (ALF_WM__BASE + 37)
#define ALF_WM_SETTEXTCOLOR (ALF_WM__BASE + 38)
+#define ALF_WM_DPICHANGE (ALF_WM__BASE + 39)
#define ALF_WM_LBL_GETSTYLE (ALF_WM__BASE + 201)
#define ALF_WM_LBL_SETSTYLE (ALF_WM__BASE + 202)
@@ -173,7 +169,10 @@ BOOL
ALF_PreTranslateMessage(HWND hwnd, MSG *message);
int
-ALF_CentipointsToPixels(HWND win, int cptValue);
+ALF_CentipointsToPixels(int cptValue, int dpi);
+
+int
+ALF_GetDpi(HWND hwnd);
LRESULT
ALF_DefWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
@@ -208,7 +207,7 @@ ALF_InvalidateLayout(HWND win);
void
ALF_InvalidateBackground(HWND win);
-// Recalculates the window's DPI and all fonts and applies them to child widgets.
+// Recalculates the window's 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().
void