ui/ui/toolkit.h

branch
newapi
changeset 181
c52d88ea020b
parent 177
e79a60b3a7cb
child 183
3ce2eb11913b
equal deleted inserted replaced
180:f34953bf4ac7 181:c52d88ea020b
66 #define UIWIDGET void* 66 #define UIWIDGET void*
67 #define UIMENU void* 67 #define UIMENU void*
68 #endif 68 #endif
69 69
70 #elif UI_WINUI 70 #elif UI_WINUI
71
72 #ifdef __cplusplus
73 #include <Windows.h>
74 #undef GetCurrentTime
75 #include <winrt/Windows.Foundation.Collections.h>
76 #include <winrt/Windows.UI.Xaml.Interop.h>
77 #include <winrt/Microsoft.UI.Xaml.Controls.h>
78
79 #define UIWIDGET winrt::Microsoft::UI::Xaml::UIElement
80 #define UIWINDOW winrt::Microsoft::UI::Xaml::Window
81 #define UIMENU void*
82
83 #else
71 #define UIWIDGET void* 84 #define UIWIDGET void*
85 #define UIWINDOW void*
72 #define UIMENU void* 86 #define UIMENU void*
87 #endif
88
89
73 #endif 90 #endif
74 91
75 #ifndef TRUE 92 #ifndef TRUE
76 #define TRUE 1 93 #define TRUE 1
77 #endif 94 #endif
135 struct UiObject { 152 struct UiObject {
136 /* 153 /*
137 * native widget 154 * native widget
138 */ 155 */
139 UIWIDGET widget; 156 UIWIDGET widget;
157
158 #ifdef UI_WINUI
159 /*
160 * native window object
161 */
162 UIWINDOW wobj;
163 #endif
140 164
141 /* 165 /*
142 * user window data 166 * user window data
143 */ 167 */
144 void *window; 168 void *window;

mercurial