Moved most of the headers to C++.
This commit is contained in:
parent
655e05463d
commit
09c1a62a8e
|
@ -38,9 +38,9 @@ _UI_EXTERN void uiWindowsControlQueueRelayout(uiWindowsControl *);
|
|||
} \
|
||||
static void _ ## type ## CommitDestroy(uiControl *c) \
|
||||
{ \
|
||||
type *this = type(c); \
|
||||
type *me = type(c); \
|
||||
onDestroy; \
|
||||
uiWindowsEnsureDestroyWindow(this->hwnd); \
|
||||
uiWindowsEnsureDestroyWindow(me->hwnd); \
|
||||
} \
|
||||
static uintptr_t _ ## type ## Handle(uiControl *c) \
|
||||
{ \
|
||||
|
@ -71,7 +71,7 @@ _UI_EXTERN void uiWindowsControlQueueRelayout(uiWindowsControl *);
|
|||
}
|
||||
|
||||
#define uiWindowsDefineControl(type, typefn) \
|
||||
uiWindowsDefineControlWithOnDestroy(type, typefn, (void) this;)
|
||||
uiWindowsDefineControlWithOnDestroy(type, typefn, (void) me;)
|
||||
|
||||
#define uiWindowsFinishNewControl(variable, type) \
|
||||
uiControl(variable)->CommitDestroy = _ ## type ## CommitDestroy; \
|
||||
|
@ -89,7 +89,7 @@ _UI_EXTERN void uiWindowsControlQueueRelayout(uiWindowsControl *);
|
|||
_UI_EXTERN void uiWindowsFinishControl(uiControl *c);
|
||||
|
||||
// This creates a HWND compatible with libui.
|
||||
// It has no failure state; libui handles errors for you.
|
||||
// It will not return NULL; libui handles errors for you.
|
||||
_UI_EXTERN HWND uiWindowsEnsureCreateControlHWND(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, HINSTANCE hInstance, LPVOID lpParam, BOOL useStandardControlFont);
|
||||
|
||||
// This is a wrapper for certain Windows API functions; use them to have libui handle errors for you.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// 30 may 2015
|
||||
#include "winapi.h"
|
||||
#include "resources.h"
|
||||
#include "winapi.hpp"
|
||||
#include "resources.hpp"
|
||||
|
||||
// this is a UTF-8 file
|
||||
#pragma code_page(65001)
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
#define _UNICODE
|
||||
#define STRICT
|
||||
#define STRICT_TYPED_ITEMIDS
|
||||
#ifndef __cplusplus
|
||||
#define CINTERFACE
|
||||
#define COBJMACROS
|
||||
#endif
|
||||
// see https://github.com/golang/go/issues/9916#issuecomment-74812211
|
||||
// TODO get rid of this
|
||||
#define INITGUID
|
||||
|
@ -37,8 +33,5 @@
|
|||
#include <math.h>
|
||||
#include <d2d1.h>
|
||||
#include <float.h>
|
||||
// see drawtext.cpp for details
|
||||
#ifdef __cplusplus
|
||||
#include <dwrite.h>
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue