From 88393dcbc2cfad14c8201959a6f97e64dafb4471 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Thu, 27 Dec 2018 17:06:56 +0100 Subject: add win2k and VC6 (with PSDK2003) support --- alf/alf.h | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'alf/alf.h') diff --git a/alf/alf.h b/alf/alf.h index b224538..d56afa5 100644 --- a/alf/alf.h +++ b/alf/alf.h @@ -42,7 +42,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_GETAPPLICATION (ALF_WM__BASE + 11) typedef struct { const WCHAR *className; @@ -67,14 +67,35 @@ typedef struct { UINT margins[4]; } ALFAddWidgetParams; +typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR); +typedef struct { + LRESULT (WINAPI *SetWindowSubclass)(HWND, ALF_COMPAT_SUBCLASSPROC, UINT_PTR, DWORD_PTR); + LRESULT (WINAPI *DefSubclassProc)(HWND, UINT, WPARAM, LPARAM); + BOOL (WINAPI *RemoveWindowSubclass)(HWND, ALF_COMPAT_SUBCLASSPROC, UINT_PTR); +} ALFCompatFunctions; + +typedef struct ALFAppPriv *ALFAPP; + +ALFAPP +ALF_CreateApplication(HINSTANCE hInstance); + +void +ALF_TeardownApplication(ALFAPP app); + +const ALFCompatFunctions * +ALF_CompatFunctionTable(ALFAPP app); + LPTSTR -ALF_RegisterWindowClass(HINSTANCE hInstance, const ALFWindowClassParams *params); +ALF_RegisterWindowClass(ALFAPP app, const ALFWindowClassParams *params); void -ALF_UnregisterWindowClass(HINSTANCE hInstance, LPCTSTR className); +ALF_UnregisterWindowClass(ALFAPP app, LPCTSTR className); HWND -ALF_InstantiateWindow(HINSTANCE hInstance, LPCTSTR className, const ALFWindowInstanceParams *params); +ALF_InstantiateWindow(ALFAPP app, LPCTSTR className, const ALFWindowInstanceParams *params); + +ALFAPP +ALF_ApplicationFromWindow(HWND hwnd); int ALF_CentipointsToPixels(HWND win, int cptValue); -- cgit v1.2.3