diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-06 22:26:53 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-06 22:26:53 -0400 |
| commit | 35e1f8e14c98807652d12f6213d7af70f6130bf6 (patch) | |
| tree | 015c1a39314fe386dd6593a7903d00f774a3d2a2 /new/ui_windows.h | |
| parent | 93b99a690c7b241d62bf09e7c325bf29ca2687b0 (diff) | |
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.
Diffstat (limited to 'new/ui_windows.h')
| -rw-r--r-- | new/ui_windows.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
