ui/wpf/UIcore/Toolkit.cs

Sun, 22 Sep 2024 18:16:14 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 22 Sep 2024 18:16:14 +0200
branch
newapi
changeset 305
98470af75dcf
parent 82
0cdb8089a29f
permissions
-rw-r--r--

simplfy macro usage in container.c (GTK)

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