Qball's Weblog

Vala plugins for StuffKeeper

Tags plugins  StuffKeeper  vala 

I played a bit with generating bindings for stuffkeeper, this went suprisingly easy. The output needed manual tweaking, but after spamming a bit on #vala I got that sorted out aswell (sorry for that, it was late).

So this now works: (yes it does nothing usefull):

?View Code CSHARP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using GLib;
using Stuffkeeper;
public class Test : Stuffkeeper.Plugin {
 
public override PluginType get_plugin_type()
{
return PluginType.MENU;
}
 
public override weak string get_name()
{
return "Vala Test Plugin";
}
public override void run_menu(Stuffkeeper.DataBackend skdb)
{
weak List list = skdb.get_items();
 
foreach (Stuffkeeper.DataItem item in list){
stdout.printf("%s\n", item.get_title());
}
 
}
 
}
 
[ModuleInit]
public GLib.Type register_plugin()
{
return typeof(Test);
}