ui/wpf/UIcore/Toolkit.cs

changeset 0
804d8803eade
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/wpf/UIcore/Toolkit.cs	Wed Dec 09 11:32:01 2020 +0100
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace UI
+{
+    public class EventCallback
+    {
+        public IntPtr Object;
+        public Action<IntPtr> Action;
+
+        public EventCallback(IntPtr uiobj, Action<IntPtr> action)
+        {
+            Object = uiobj;
+            Action = action;
+        }
+
+        public void Callback(object sender, RoutedEventArgs a)
+        {
+            Action.Invoke(Object);
+        }
+    }
+}

mercurial