GObject-Plugin/test/plugins/typeA/typeA1/TypeA1.vala

37 lines
695 B
Vala
Raw Normal View History

2014-09-19 11:04:31 +04:00
using GObject.Plugins;
/**
* Plugin of type A1.
*/
public class TypeA1 : PluginTypeA {
/**
* Constructs a new ``TypeA1``.
*/
construct {
2014-10-16 16:11:28 +04:00
stdout.puts ("TypeA1 init () called\n");
2014-09-19 11:04:31 +04:00
}
/**
* Destroys the ``TypeA1``.
*/
2015-01-26 20:42:17 +03:00
~TypeA1 () {
2014-10-16 16:11:28 +04:00
stdout.puts ("TypeA1 deinit () called\n");
2014-09-19 11:04:31 +04:00
}
/**
2014-10-16 16:11:28 +04:00
* Any abstract method realization for PluginTypeA.
2014-09-19 11:04:31 +04:00
*/
public override void method_a () {
stdout.puts ("TypeA1.method_a () called\n");
2014-10-16 16:11:28 +04:00
stdout.puts ("Call IHostLoaderTest.method_host () from TypeA1:\n ");
2020-04-29 08:50:21 +03:00
var test = host as IHostLoaderTest;
if (test != null) test.method_host ();
2014-09-19 11:04:31 +04:00
}
}
[ModuleInit]
2020-04-29 08:50:21 +03:00
public Type plugin_init (GLib.TypeModule type_module) {
2014-09-19 11:04:31 +04:00
return typeof (TypeA1);
}