Gtk.ThemingEngine

const Gtk = imports.gi.Gtk;

let theming_engine = new Gtk.ThemingEngine({
    name: value,
});
  

Gtk.ThemingEngine is the object used for rendering themed content in GTK+ widgets. Even though GTK+ has a default implementation, it can be overridden in CSS files by enforcing a Gtk.ThemingEngine object to be loaded as a module.

In order to implement a theming engine, a Gtk.ThemingEngine subclass must be created, alongside the CSS file that will reference it, the theming engine would be created as an .so library, and installed in $(gtk-modules-dir)/theming-engines/.

Gtk.ThemingEngine<!-- -->s have limited access to the object they are rendering, the Gtk.ThemingEngine API has read-only accessors to the style information contained in the rendered object's Gtk.StyleContext.

Hierarchy

  • GObject.Object
    • Gtk.ThemingEngine