2011-09-28 13:16:26 +00:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
2009-09-18 19:51:15 +00:00
|
|
|
|
2017-02-15 00:43:09 +00:00
|
|
|
const Config = imports.misc.config;
|
|
|
|
|
2023-04-12 13:20:42 +00:00
|
|
|
imports.gi.versions = {Clutter: Config.LIBMUTTER_API_VERSION};
|
2017-02-15 00:43:09 +00:00
|
|
|
|
2023-06-08 04:52:46 +00:00
|
|
|
const Clutter = imports.gi.Clutter;
|
|
|
|
const Gio = imports.gi.Gio;
|
|
|
|
const GLib = imports.gi.GLib;
|
|
|
|
const St = imports.gi.St;
|
2009-09-18 19:51:15 +00:00
|
|
|
|
|
|
|
const Environment = imports.ui.environment;
|
|
|
|
|
2012-06-24 19:02:46 +00:00
|
|
|
function init(stage) {
|
2009-09-18 19:51:15 +00:00
|
|
|
Environment.init();
|
2018-02-21 12:01:56 +00:00
|
|
|
let themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
|
|
|
|
themeResource._register();
|
|
|
|
|
2012-06-24 19:02:46 +00:00
|
|
|
let context = St.ThemeContext.get_for_stage(stage);
|
2009-09-18 19:51:15 +00:00
|
|
|
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
|
2014-09-19 02:22:02 +00:00
|
|
|
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
|
2012-06-24 19:02:46 +00:00
|
|
|
context.set_theme(theme);
|
2009-09-18 19:51:15 +00:00
|
|
|
}
|
2012-06-24 19:11:41 +00:00
|
|
|
|
|
|
|
function main(stage) {
|
|
|
|
stage.show();
|
2017-10-31 00:38:18 +00:00
|
|
|
stage.connect('destroy', () => {
|
2012-06-24 19:11:41 +00:00
|
|
|
Clutter.main_quit();
|
|
|
|
});
|
|
|
|
Clutter.main();
|
|
|
|
}
|