API Documentation

This chapter contains API documentation specific to the Librem 5 as well as links to upstream documentation.

API documentation for the underlying GNOME platform can be found in GTK/GNOME Resources. This list is currently being filled in.

See also the Software Reference for detailed information about the Librem 5 software stack.

Phone/Messaging APIs

Shell APIs

D-Bus APIs provided by the Phone Shell (Phosh):

  • org.gnome.Mutter.DisplayConfig provides display information and configuration:

    • Retrieve information about connected displays
    • Set gamma curve (used for e.g. nightlight)
    • Set primary monitor
    • Backlight brightness

    Mostly used by gnome-settings-daemon.

  • org.gnome.Mutter.IdleMonitor to detect if the session is idle (for e.g. screen lock or power saving). Used by e.g. gnome-session for idle detection.

  • org.gnome.keyring.SystemPrompter provides System modal authentication dialogs (used by e.g. gnupg’s pinentry, SIM card pin entry, etc.)

On-Screen Keyboard

The visibility of the on-screen (virtual) keyboard can be controlled using its D-Bus API, exposed on the session bus as the sm.puri.OSK0 service, on the /sm/puri/OSK0 object path, with the sm.puri.OSK0 interface, as described in the Squeekboard HACKING.md guide.

This interface provides the following property:

  • Visible b

This can be read and changed with the following methods:

  • GetVisible(out b visible)
  • SetVisible(in b visible)

Mobile Widgets

GTK and GNOME APIs

Generally, the GTK and GNOME documentation contains information about the C APIs to use for the underlying widgets and technologies. Documentation specific to each programming language is also available: