... | ... | @@ -20,31 +20,10 @@ Please see the [Mapping](Mapping) page for details and examples of mapping GLib |
|
|
|
|
|
### Modules
|
|
|
|
|
|
GJS includes some built-in modules that are mostly undocumented but are fairly simple to understand and contain a number of useful helper functions. They can be imported using `const imports.<name> = Name;`.
|
|
|
|
|
|
* Cairo: Mostly API compatible with cairo, but using camelCase function names.
|
|
|
* [Format][format]: provides `printf()`-like functionality for the `String` object.
|
|
|
* [Gettext][gettext]: helper functions for gettext. See also examples/gettext.js for usage.
|
|
|
* [jsUnit][jsunit]: Unit test functions for GJS, as used in the GJS [test-suite][gjs-tests]
|
|
|
* [Lang][lang]: Utilities that are "meta-language" things like manipulating object props
|
|
|
* [Mainloop][mainloop]: A layer of convenience and backwards-compatibility over GLib MainLoop facilities
|
|
|
* [Package][package]: Infrastructure for standalone applications. See [Standalone Applications](#standalone-applications).
|
|
|
* [Signals][signals]: GObject-like signal framework for native Javascript objects
|
|
|
* [System][system]: Offers `System.programInvocationName` and `System.version`. Used especially with `Gio.Application.run()`; see [examples/gtk-application.js](https://gitlab.gnome.org/GNOME/gjs/blob/master/examples/gtk-application.js)
|
|
|
* [Tweener][tweener]: Built-in version of [tweener][tweener-www] animations/transitions imported with `imports.tweener.tweener`
|
|
|
|
|
|
[gjs-tests]: https://gitlab.gnome.org/GNOME/gjs/tree/master/installed-tests/js
|
|
|
|
|
|
[format]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/format.js
|
|
|
[gettext]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/gettext.js
|
|
|
[jsunit]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/jsUnit.js
|
|
|
[lang]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/lang.js
|
|
|
[mainloop]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/mainloop.js
|
|
|
[package]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/package.js
|
|
|
[signals]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/signals.js
|
|
|
[system]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/system.cpp
|
|
|
[tweener]: https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/tweener/
|
|
|
[tweener-www]: http://hosted.zeh.com.br/tweener/docs/
|
|
|
GJS includes some built-in modules that are mostly undocumented containing a number of useful helper functions, such as the Gettext module, and API compatibility, such as the Cairo or Mainloop modules.
|
|
|
|
|
|
Please see the [Modules](Modules) page for an overview of the built-in modules and their usage.
|
|
|
|
|
|
|
|
|
### Overrides
|
|
|
|
... | ... | |