Ive managed to do some of the things I wanted to do, but I feel utterly starved of information. I cannot find any useful documentation anywhere. I've wasted entire days of my life frantically googling every imaginable search term in a desperate attempt to find useful information.
The GNOME website has hundreds of extensions for download. These are not trivial 3-liners; they're sophisticated pieces of code. It defies belief that anybody could write these without documentation explaining how to do it.
Please, can somebody tell me where the actual documentation is? So far, the best I've managed to do is take apart existing extensions trying to track down the magic command that does the specific bit I'm interested in. (Not an easy task!)
Since the documentation is nearly unavailable (or up to date), you'll need to do a lot of source-reading. I linked the gnome-shell sources above (the JavaScript part) which is a good start when diving into parts that are not covered by the In-official documentation (which is the most complete thing you'll find).
When searching for something to use or more documentation on a particular function, you can also consult manuals for bindings in different languages (thought the parameters and return-values might not match).
For debugging the prefs-part of your extension, you can launch the preferences by using the gnome-shell-extension-prefs-tool from a terminal, to see any exception-output on the console (you can also call the tool like gnome-shell-extension-prefs [uuid], to directly show your extensions preferences).
Since there is currently no real way of debugging with breakpoints (there is, but it's tricky), you can log on the console for quick checking, use the print()-function. You will see the output as mentioned above (either in the sessions-error file or on the terminal when starting gnome-shell-extension-prefs-tool).
St
St - Shell Toolkit - is the GNOME Shell's custom Clutter-based toolkit that defines useful actors. Some of these actors, such as StBoxLayout and StBin implement various layout options.
PyGObject
PyGObject is a Python extension module that gives clean and consistent access to the entire GNOME software platform through the use of GObject Introspection. Specifically speaking, it is Python Bindings for GLib, GObject, GIO and GTK+.
This reference contains a chapter for each PyGObject module containing the class descriptions.
Originally, the rationale for not having "proper" gnome-shelldocumentation was that the (internal JavaScript) API was prettyunstable. The deal was, you don't get a stable API but you get to readthe source in the same language you're going to write it in. In someways this makes sense, given that you can modify the prototype of liveobjects and monkey-patch at whim.
The API has settled down a lot, but no one has really stepped up towrite a script to auto-document it, yet. My best advice would be tobookmark the Mutter, Shell and St documentation and use Github orGitLab's search to make things easier.
Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that theentire resulting derived work is distributed under the terms of apermission notice identical to this one.
Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translationapproved by the R Core Team.
The contributions to early versions of this manual by Saikat DebRoy(who wrote the first draft of a guide to using .Call and.External) and Adrian Trapletti (who provided information on theC++ interface) are gratefully acknowledged.
The concept of lazy loading of code or data is mentioned atseveral points. This is part of the installation, always selected forR code but optional for data. When used the R objects of thepackage are created at installation time and stored in a database in theR directory of the installed package, being loaded into thesession at first use. This makes the R session start up faster anduse less (virtual) memory.(For technical details,see Lazy loading in R Internals.)
CRAN is a network of WWW sites holding the R distributionsand contributed code, especially R packages. Users of R areencouraged to join in the collaborative project and to submit their ownpackages to CRAN: current instructions are linked from -
project.org/banner.shtml#submitting.
The sources of an R package consist of a subdirectory containing thefiles DESCRIPTION and NAMESPACE, and the subdirectoriesR, data, demo, exec, inst,man, po, src, tests, tools andvignettes (some of which can be missing, but which should not beempty). The package subdirectory may also contain files INDEX,configure, cleanup, LICENSE, LICENCE andNEWS. Other files such as INSTALL (for non-standardinstallation instructions), README/README.md2, or ChangeLog will be ignored by R, but maybe useful to end users. The utility R CMD build may add filesin a build directory (but this should not be used for otherpurposes).
The optional files configure and cleanup are (Bourne)shell scripts which are, respectively, executed before and (if option--clean was given) after installation on Unix-alikes, seeConfigure and cleanup. The analogues on Windows areconfigure.win and cleanup.win. Since R 4.2.0 on Windows,configure.ucrt and cleanup.ucrt are supported and takeprecedence over configure.win and cleanup.win. They canhence be used to provide content specific to UCRT or Rtools42 and newer, if needed,but the support for .ucrt files may be removed in future whenbuilding packages from source on the older versions of R will no longerbe needed, and hence the files may be renamed back to .win.
The package subdirectory should be given the same name as the package.Because some file systems (e.g., those on Windows and by default onmacOS) are not case-sensitive, to maintain portability it is stronglyrecommended that case distinctions not be used to distinguish differentpackages. For example, if you have a package named foo, do notalso create a package named Foo.
A source package if possible should not contain binary executable files:they are not portable, and a security risk if they are of theappropriate architecture. R CMD check will warn aboutthem4 unless they are listed (one filepath per line) in a fileBinaryFiles at the top level of the package. Note thatCRAN will not accept submissions containing binary fileseven if they are listed.
Note that the display name (the part before the address in anglebrackets) should be enclosed in double quotes if it containsnon-alphanumeric characters such as comma or period. (The currentstandard, RFC 5322, allows periods but RFC 2822 did not.)
There is no restriction on the use of other fields not mentioned here(but using other capitalizations of these field names would causeconfusion). Fields Note, Contact (for contacting theauthors/developers11) and MailingList are in commonuse. Some repositories (including CRAN and R-forge) add theirown fields.
Please ensure that the license you choose also covers any dependencies(including system dependencies) of your package: it is particularlyimportant that any restrictions on the use of such dependencies areevident to people reading your DESCRIPTION file.
Whereas you should feel free to include a license file in yoursource distribution, please do not arrange to install yetanother copy of the GNU COPYING or COPYING.LIBfiles but refer to the copies on -
project.org/Licenses/ and included in the Rdistribution (in directory share/licenses). Since files namedLICENSE or LICENCE will be installed, do not usethese names for standard license files. To include comments about thelicensing rather than the body of a license, use a file named somethinglike LICENSE.note.
It is inadvisable to use a dependence on R with patch level (the thirddigit) other than zero. Doing so with packages which others depend onwill cause the other packages to become unusable under earlier versionsin the series, and e.g. versions 4.x.1 are widely used throughout theNorthern Hemisphere academic year.
It is important that the information in these fields is complete andaccurate: it is for example used to compute which packages depend on anupdated package and which packages can safely be installed in parallel.
Note that someone wanting to run the examples/tests/vignettes may nothave a suggested package available (and it may not even be possible toinstall it for that platform). The recommendation used to be to maketheir use conditional via if(require("pkgname")):this is OK if that conditioning is done in examples/tests/vignettes,although using if(requireNamespace("pkgname")) ispreferred, if possible.
However, using require for conditioning in package code isnot good practice as it alters the search path for the rest of thesession and relies on functions in that package not being masked byother require or library calls. It is better practice touse code like
Note the use of rgl:: as that object would not necessarily bevisible (and if it is, it need not be the one from that namespace:plot3d occurs in several other packages). If the intention is togive an error if the suggested package is not available, simply usee.g. rgl::plot3d.
Note that the recommendation to use suggested packages conditionally intests does also apply to packages used to manage test suites: anotorious example was testthat which in version 1.0.0 containedillegal C++ code and hence could not be installed on standards-compliantplatforms.
The optional file INDEX contains a line for each sufficientlyinteresting object in the package, giving its name and a description(functions such as print methods not usually called explicitly might notbe included). Normally this file is missing and the correspondinginformation is automatically generated from the documentation sources(using tools::Rdindex()) when installing from source.
3a8082e126