Reference Manual

G-Golf is under active development. We hope to be able to release a pre-alpha version before the end of May 2021. Meanwhile, if you want to try or just follow G-Golf, please consider installing from the source.

During this active developmet phase, the content of the online manual is 'in sync' with G-Golf source repository.

G-Golf reference manual is available in the following formats:

Examples

G-Golf is distributed with a series of small examples, located in the /examples subdir of your G-Golf source tree. Each example comes as a 'self executable' script, together with a screenshot.

As Savannah uses cgit as its projects summary and source repositories browser, one can not (remotely) visualize rendered version of image files - cgit displays those files as plain text (ofs, hex dump and ascii columns), and so we have uploaded a copy of each example screenshot here.

Gtk-4 Examples

Special thanks to the GNOME team, both Gtk-4 and GI developers, and their gtk-4-examples, from which these G-Golf examples are largely inspired.

Hello World!

Following the tradition, let's start with the often seen, familiar, minimal and friendly greeting program ‘Hello World!’.

hello-world.scm

Search bar

The search bar example shows how to define and use a header bar, a search button and a search entry. It also demonstrates how to use the css-classes property, and finally, how to bind object properties.

search-bar.scm

Clipboard

The clipboard example shows how to define and use a (gdk) clipboard, content-providers, textures, as well as (gtk) entries and images.

clipboard.scm

Revealer

The revealer example shows how to define and use a ui (user interface) builder, revealers, as well as how to 'animate' them, setting a procedure to be called at regular intervals using g-timeout-add.

revealer.scm

Css Basics

The css-basics example shows how to define and use a <gtk-css-provider>, how to add the <gtk-css-provider> instance to a widget and finally, how to recursively apply it to all widget's child(ren).

css-basics.scm