File: rb-sample-vala-plugin.vala

package info (click to toggle)
rhythmbox 3.4.9-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,376 kB
  • sloc: ansic: 114,861; python: 4,941; xml: 730; javascript: 350; perl: 307; sh: 84; makefile: 43
file content (27 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (9)
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));
}