Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test : Gtk.Widget {
- static construct {
- ParamSpecInt _pspec = new ParamSpecInt (
- "dummy", "dummy", "dummy",
- 0, 0, 0, // min, max, def
- ParamFlags.READWRITE
- );
- install_style_property (_pspec);
- }
- construct {
- string css = """
- * {
- -Test-dummy: 10;
- }""";
- var cssprov = new Gtk.CssProvider ();
- cssprov.load_from_data (css);
- get_style_context ().add_provider (cssprov, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
- }
- }
- void main (string? argv[]) {
- Gtk.init (ref argv);
- var wid = new Test ();
- int dummy;
- wid.style_get ("dummy", out dummy);
- print (dummy.to_string () + "\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement