ui/wpf/UIwrapper/UIwrapper/toolkit.h

Tue, 27 Jan 2015 09:59:32 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 27 Jan 2015 09:59:32 +0100
changeset 82
0cdb8089a29f
parent 81
5eb765a7a793
child 83
a38aec91bd66
permissions
-rw-r--r--

added event handler for menus (WPF)

// UIwrapper.h

#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Threading;
using namespace System::Windows;
using namespace System::Windows::Controls;

#define UI_EXPORT extern "C" __declspec(dllexport)

extern "C" typedef void(*UIcallback)(void*, void*);

void* ObjectToPtr(Object ^obj);

public ref class EventWrapper {
	UIcallback callback = NULL;
	void *userdata = NULL;
	Action<IntPtr> ^action;

public:
	EventWrapper(UIcallback callback, void *userdata);

	Action<IntPtr>^ GetAction();

	void Callback(IntPtr uiobj);
};

mercurial