How to import St library in gjs

Answer a similar question that I cannot import Shell material offline. However, as far as I understand, St is a separate library written in C. But I still cannot import it into gjs ...

those.

$ gjs -c "imports.gi.Gtk" 

works (i.e. no output). But

 $ gjs -c "imports.gi.St" 

not working with

 Error: Requiring St, version none: Typelib file for namespace 'St' (any version) not found 

Is there a way to import the St library from standalone (not GNOME shell extension) gjs?

+4
source share
1 answer

Some of them do not exist (for example, Meta, Shell, St), because they are considered "private". Read more about how to import them here: http://mathematicalcoffee.blogspot.ca/2012/09/developing-gnome-shell-extensions_6.html?m=1

St Lib really (!!!) will help in writing applications using user interfaces due to the use of CSS. If we could use the library with Clutter and gjs, it would really appeal to developers due to the ease of use of the St and Shell libraries.

+5
source

All Articles