Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gnome javascript documentation

I'm trying to dive into Gnome shell extensions development but I'm a little bit confused at the moment. I can't seem to find a proper documentation about GJS library. For example I want to know at least what imports are available and members/method of classes without that I can only rely on existing extensions code, not too much.

Can anyone lead me in the right direction?

Thanks in advance.

like image 549
mattmils Avatar asked Nov 10 '11 11:11

mattmils


People also ask

Does gnome use JavaScript?

GNOME Shell is written in C and JavaScript as a plugin for Mutter.

Why is Gnome shell written in JavaScript?

Gnome-shell is written in JavaScript because it allows for quick prototyping and development cycles. The difference between javascript and other dynamic languages (python, ruby, php, etc...) is that javascript doesn't depend on a specific platform. Gnome-shell can than run it with its own platform (Gjs).

What is Gnome Gjs?

GJS (GNOME JavaScript) is a programming environment comparable to Node. js. It provides an extensive set of bindings to libraries in the GNOME open in new window ecosystem, enabling developers to build fast and feature-rich applications with a recognizable look and feel.

What are Gnome extensions written in?

GNOME Shell's UI and extensions are written in GJS, which is JavaScript bindings for the GNOME C APIs. This includes libraries like Gtk, GLib/Gio, Clutter, GStreamer and many others. Just like how PyGObject is Python bindings for the same libraries.


1 Answers

To start writing GNOME Shell Extensions, I would recommend you to start looking the Shell Extensions wiki page. There you will find links to tutorials, as well as guidelines.

With respect to modules available, you have everything that is available via GObject Instrospection. In order to get familiar with this, you can take a look the explained demos. For API docuementation, you can go to Platform Overview.

like image 54
gpoo Avatar answered Sep 30 '22 08:09

gpoo