ui/ui/toolkit.h

branch
newapi
changeset 181
c52d88ea020b
parent 177
e79a60b3a7cb
child 183
3ce2eb11913b
--- a/ui/ui/toolkit.h	Tue May 23 14:19:06 2023 +0200
+++ b/ui/ui/toolkit.h	Mon May 29 10:37:23 2023 +0200
@@ -68,10 +68,27 @@
 #endif
 
 #elif UI_WINUI
+
+#ifdef __cplusplus
+#include <Windows.h>
+#undef GetCurrentTime
+#include <winrt/Windows.Foundation.Collections.h>
+#include <winrt/Windows.UI.Xaml.Interop.h>
+#include <winrt/Microsoft.UI.Xaml.Controls.h>
+
+#define UIWIDGET winrt::Microsoft::UI::Xaml::UIElement
+#define UIWINDOW winrt::Microsoft::UI::Xaml::Window
+#define UIMENU   void*
+
+#else
 #define UIWIDGET void*
+#define UIWINDOW void*
 #define UIMENU   void*
 #endif
 
+
+#endif
+
 #ifndef TRUE
 #define TRUE 1
 #endif
@@ -137,6 +154,13 @@
      * native widget
      */
     UIWIDGET    widget;
+
+#ifdef UI_WINUI
+    /*
+     * native window object 
+     */
+    UIWINDOW    wobj;
+#endif
     
     /*
      * user window data

mercurial