updated simple plug

This commit is contained in:
Basile Burg 2014-07-31 10:02:32 +02:00
parent cfa7c95bbf
commit 645aad2d4f
1 changed files with 17 additions and 3 deletions

View File

@ -17,11 +17,13 @@ it just instanciates fine.
import std.stdio, std.string, std.conv;
import core.runtime;
import CoeditPlugApi;
import iz.types;
version(Posix)
{
}
else
{
@ -37,16 +39,28 @@ class coeditPlug: izObject
protected
{
plugDispatchToHostProc fDispatcher;
Plugin_t asPlugin_t(){return cast(Plugin_t)&this;}
Plugin_t asPlugin_t(){return cast(Plugin_t)this;}
}
public
{
static this()
{
Runtime.initialize();
}
static ~this()
{
Runtime.terminate();
}
this(plugDispatchToHostProc aDispatcher)
{
assert(aDispatcher, "the Coedit dispatcher is missing");
fDispatcher = aDispatcher;
//fDispatcher(asPlugin_t, HELLO_PLUGIN, 0, null, null);
version(none)
{
fDispatcher(asPlugin_t, HELLO_PLUGIN, 0, null, null);
}
auto msg = "simple Coedit plugin is created".toStringz;
fDispatcher(asPlugin_t, PLUG_MSGS_INF, 0, cast(void*)msg, null);
}