summaryrefslogtreecommitdiff
path: root/alf/alf.h
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alf.h')
-rw-r--r--alf/alf.h29
1 files changed, 25 insertions, 4 deletions
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);