... | ... | @@ -66,7 +66,7 @@ const Gtk = imports.gi.Gtk; |
|
|
|
|
|
**Import with `const Cairo = imports.cairo;`**
|
|
|
|
|
|
Mostly API compatible with [cairo](https://www.cairographics.org/documentation/), but using camelCase function names. There is list of constants in [cairo.js][cairo-const] and functions for each object in it's corresponding C++ file (eg. [cairo-context.cpp][cairo-func]). A simple example drawing a 32x32 red circle:
|
|
|
Mostly API compatible with [cairo](https://www.cairographics.org/documentation/), but using camelCase function names. There is list of constants in [cairo.js][cairo-const] and functions for each object in its corresponding C++ file (eg. [cairo-context.cpp][cairo-func]). A simple example drawing a 32x32 red circle:
|
|
|
|
|
|
```js
|
|
|
imports.gi.versions.Gtk = "3.0";
|
... | ... | @@ -134,7 +134,7 @@ Helper functions for gettext. See also [examples/gettext.js][example-gettext] fo |
|
|
|
|
|
## [jsUnit](https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/jsUnit.js)
|
|
|
|
|
|
**`DEPRECATED`**
|
|
|
**DEPRECATED**
|
|
|
|
|
|
Deprecated unit test functions. [Jasmine][jasmine-gjs] for GJS should now be preferred, as demonstrated in the GJS [test suite][gjs-tests].
|
|
|
|
... | ... | @@ -143,7 +143,7 @@ Deprecated unit test functions. [Jasmine][jasmine-gjs] for GJS should now be pre |
|
|
|
|
|
## [`Lang`](https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/lang.js)
|
|
|
|
|
|
**`DEPRECATED`**
|
|
|
**DEPRECATED**
|
|
|
|
|
|
Lang is a mostly obsolete library, that should only be used in cases where older versions of GJS must be supported. For example, `Lang.bind()` was necessary to bind `this` to the function context before the availability of arrow functions:
|
|
|
|
... | ... | @@ -176,7 +176,7 @@ var MyNewClass = class { |
|
|
|
|
|
## [Mainloop](https://gitlab.gnome.org/GNOME/gjs/blob/master/modules/mainloop.js)
|
|
|
|
|
|
**`DEPRECATED`**
|
|
|
**DEPRECATED**
|
|
|
|
|
|
Mainloop is simply a layer of convenience and backwards-compatibility over some GLib functions (such as [`GLib.timeout_add()`][gjs-timeoutadd] which in GJS is mapped to [`g_timeout_add_full()`][c-timeoutaddfull]). It's use is not generally recommended anymore.
|
|
|
|
... | ... | @@ -253,7 +253,7 @@ The System module offers a number of useful functions and properties for debuggi |
|
|
|
|
|
* `version`
|
|
|
|
|
|
This property presumably contains version information about GJS.
|
|
|
This property contains version information about GJS.
|
|
|
|
|
|
* `programInvocationName`
|
|
|
|
... | ... | |