File: rb-sample-vala-plugin.vala

package info (click to toggle)
rhythmbox 2.97-2.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 40,820 kB
  • sloc: ansic: 117,691; xml: 28,786; sh: 11,150; python: 3,862; makefile: 2,561
file content (27 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (8)
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
using GLib;
using RB;

class SampleValaPlugin: Peas.ExtensionBase, Peas.Activatable {
	public GLib.Object object { owned get; construct; }

	public void activate () {
		stdout.printf ("Hello world\n");
	}

	public void deactivate () {
		stdout.printf ("Goodbye world\n");
	}

	public void update_state () {
		stdout.printf ("Update world\n");
	}
}


[ModuleInit]
public void peas_register_types (GLib.TypeModule module) {
	var objmodule = module as Peas.ObjectModule;
	stdout.printf ("Registering plugin %s\n", "SampleValaPlugin");

	objmodule.register_extension_type (typeof (Peas.Activatable), typeof (SampleValaPlugin));
}