mirror of https://gitlab.com/basile.b/dexed.git
updated simple plug
This commit is contained in:
parent
cfa7c95bbf
commit
645aad2d4f
|
@ -17,11 +17,13 @@ it just instanciates fine.
|
||||||
|
|
||||||
|
|
||||||
import std.stdio, std.string, std.conv;
|
import std.stdio, std.string, std.conv;
|
||||||
|
import core.runtime;
|
||||||
import CoeditPlugApi;
|
import CoeditPlugApi;
|
||||||
import iz.types;
|
import iz.types;
|
||||||
|
|
||||||
version(Posix)
|
version(Posix)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -37,16 +39,28 @@ class coeditPlug: izObject
|
||||||
protected
|
protected
|
||||||
{
|
{
|
||||||
plugDispatchToHostProc fDispatcher;
|
plugDispatchToHostProc fDispatcher;
|
||||||
Plugin_t asPlugin_t(){return cast(Plugin_t)&this;}
|
Plugin_t asPlugin_t(){return cast(Plugin_t)this;}
|
||||||
}
|
}
|
||||||
public
|
public
|
||||||
{
|
{
|
||||||
|
static this()
|
||||||
|
{
|
||||||
|
Runtime.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
static ~this()
|
||||||
|
{
|
||||||
|
Runtime.terminate();
|
||||||
|
}
|
||||||
|
|
||||||
this(plugDispatchToHostProc aDispatcher)
|
this(plugDispatchToHostProc aDispatcher)
|
||||||
{
|
{
|
||||||
assert(aDispatcher, "the Coedit dispatcher is missing");
|
assert(aDispatcher, "the Coedit dispatcher is missing");
|
||||||
fDispatcher = aDispatcher;
|
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;
|
auto msg = "simple Coedit plugin is created".toStringz;
|
||||||
fDispatcher(asPlugin_t, PLUG_MSGS_INF, 0, cast(void*)msg, null);
|
fDispatcher(asPlugin_t, PLUG_MSGS_INF, 0, cast(void*)msg, null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue