From 35e1f8e14c98807652d12f6213d7af70f6130bf6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 6 Apr 2015 22:26:53 -0400 Subject: Started writing code for handling single-HWND controls on Windows. Similar code will exist for single-GtkWidget controls on GTK+ and single-NSView controls on Cocoa. --- new/ui_windows.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'new/ui_windows.h') diff --git a/new/ui_windows.h b/new/ui_windows.h index f0bbe2c..00a14c8 100644 --- a/new/ui_windows.h +++ b/new/ui_windows.h @@ -33,6 +33,8 @@ // alloc_windows.c extern void *uiAlloc(size_t); +// TODO use this in existing files +#define uiNew(T) ((T *) uiAlloc(sizeof (T))) extern void *uiRealloc(void *, size_t); extern void uiFree(void *); @@ -52,4 +54,14 @@ extern WCHAR *toUTF16(const char *); // window_windows.c extern ATOM registerWindowClass(HICON, HCURSOR); +// singlehandle_windows.c +typedef struct uiSingleHWNDControl uiSingleHWNDControl; +struct uiSingleHWNDControl { + uiControl control; + HWND hwnd; + void (*voidEvent)(uiControl *, void *); + void *voidEventData; +}; +extern uiSingleHWNDControl *newSingleHWNDControl(DWORD, const WCHAR *, DWORD, HWND, HINSTANCE); + #endif -- cgit v1.2.3