This is the main Gtk.Application instance that is running.
window-toggled: (windowName: string, visible: boolean)config-parsed: emitted on startupwindows: Gtk.Window[]configDir: string path to the config directoryiconTheme: stringcursorTheme: stringgtkTheme: stringaddWindow: (window: Gtk.Window) => voidremoveWindow: (window: Gtk.Window) => voidgetWindow: (name: string) => Gtk.WindowcloseWindow: (name: string) => voidopenWindow: (name: string) => voidtoggleWindow: (name: string) => voidquit: () => voidresetCss: () => voidapplyCss: (path: string) => voidaddIcons: (path: string) => voidregisterTheme: (name: string, pathOrCss: string) => voidsetTheme: (name: string) => voidactiveTheme: string | null (read-only)// this is only signaled for windows exported in config.js
// or added with App.addWindow
const label = Widget.Label()
.hook(App, (self, windowName, visible) => {
self.label = `${windowName} is ${visible ? 'visible' : 'not visible'}`;
}, 'window-toggled')
});
If you want to change the style sheet on runtime
specifying a css file
App.applyCss("/path/to/file.css");
applying a stylesheet
App.applyCss(`
window {
background-color: transparent;
}
`);
to reset applied stylesheets
App.resetCss();