Commit 47976dd9 authored by David Boddie's avatar David Boddie

Add links to API documentation and examples

parent 73f4733f
......@@ -11,6 +11,11 @@ API documentation for the underlying GNOME platform can be found in
:ref:`gnome_resources`. This list is currently being `filled in
<https://source.puri.sm/Librem5/developer.puri.sm/issues/60>`_.
.. toctree::
:hidden:
APIs/Application
See also the :ref:`software_reference` for detailed information about the
Librem 5 software stack.
......
.. index:: application-level APIs
.. _api_app_level:
Application-Level APIs
======================
Applications access software and hardware features of the phone using a number of APIs. Some features are not directly accessible to applications.
.. contents::
:local:
Audio
-----
The audio services of the phone can be accessed in a number of ways. These include:
* The `GSound`_ API for playing system sounds and custom sound files.
* The `feedbackd D-Bus interface`_ for a more general API that also provides other ways to give the user feedback.
* GStreamer -- see the `GStreamer 1.0 Core Reference Manual`_ and `Gst 1.0`_ Python documentation.
Examples:
* :ref:`examples_Audio_Play_Sounds`
Battery Gauge
-------------
Battery state and charge level can be read and monitored using the ``org.freedesktop.UPower`` D-Bus interface provided by the ``upowerd`` daemon. This is described in the `UPower D-Bus API Reference`_ documentation.
Bluetooth
---------
Access to Bluetooth devices is managed using the `gnome-bluetooth`_ API -- see also the `GnomeBluetooth`_ Python API.
Haptic Motor
------------
The haptic (vibration) motor is accessed using the ``org.sigxcpu.Feedback`` D-Bus interface provided by the `feedbackd`_ daemon. This is described in the `feedbackd D-Bus interface`_ documentation.
Inertial Module
---------------
This sensor can be read and monitored using the ``net.hadess.SensorProxy`` D-Bus interface provided by the `iio-sensor-proxy`_ daemon. This is described in the `net.hadess.SensorProxy`_ documentation.
Modem/WWAN
----------
The modem can be accessed via the ``org.freedesktop.ModemManager1`` D-Bus interface provided by `ModemManager`_. This is described in the `ModemManager D-Bus APIs`_ documentation.
Networking
----------
Access to information about network connections can be obtained using the ``org.freedesktop.NetworkManager`` D-Bus interface provided by `NetworkManager`_. This is described in the `NetworkManager D-Bus APIs`_ documentation.
Examples:
* :ref:`examples_Network_State`
Proximity and Ambient Light Sensors
-----------------------------------
These sensors can be read and monitored using the ``net.hadess.SensorProxy`` D-Bus interface provided by the `iio-sensor-proxy`_ daemon. This is described in the `net.hadess.SensorProxy`_ documentation.
Examples:
* :ref:`examples_Sensors_Ambient_Light`
* :ref:`examples_Sensors_Proximity`
Push Buttons
------------
The states of the push buttons, such as the volume up and down buttons, can be read using the standard GTK widget `key press`_ and `key release`_ events.
Examples:
* `Read Buttons`_
.. _`Read Buttons`: https://source.puri.sm/Librem5/example-apps/read-buttons
.. _`key press`: https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Widget.html#Gtk.Widget.signals.key_press_event
.. _`key release`: https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Widget.html#Gtk.Widget.signals.key_release_event
.. include:: /links.txt
......@@ -28,6 +28,11 @@ ranging from tutorials and example applications to guides about using specific f
Examples/index
Guides/index
API Documentation
-----------------
The application-level APIs are described in the :ref:`api_app_level` documentation.
Packaging and Publishing
------------------------
......
......@@ -57,6 +57,8 @@
.. _`GNOME`: https://www.gnome.org
.. _`GNOME Human Interface Guidelines`: https://developer.gnome.org/hig/stable/
.. _`GNOME Software`: https://wiki.gnome.org/Apps/Software
.. _`gnome-bluetooth`: https://developer.gnome.org/gnome-bluetooth/stable/index.html
.. _`GnomeBluetooth`: https://lazka.github.io/pgi-docs/#GnomeBluetooth-1.0
.. _`GNU gettext utilities`: https://www.gnu.org/software/gettext/manual/gettext.html
.. _`The GNU Privacy Handbook`: https://gnupg.org/gph/en/manual.html
.. _`GResource`: https://developer.gnome.org/gio/stable/GResource.html
......@@ -65,6 +67,8 @@
.. _`GSettings`: https://developer.gnome.org/gio/stable/GSettings.html
.. _`GSound`: https://lazka.github.io/pgi-docs/#GSound-1.0
.. _`GSound.Context`: https://lazka.github.io/pgi-docs/#GSound-1.0/classes/Context.html
.. _`Gst 1.0`: https://lazka.github.io/pgi-docs/#Gst-1.0
.. _`GStreamer 1.0 Core Reference Manual`: https://developer.gnome.org/gstreamer/stable/
.. _`GTK 3 documentation`: https://developer.gnome.org/gtk3/stable/
.. _GtkApplication: https://developer.gnome.org/gtk3/stable/GtkApplication.html
.. _`Gtk.Application`: https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Application.html
......@@ -114,7 +118,7 @@
.. _`Handy.SearchBar`: https://lazka.github.io/pgi-docs/#Handy-0.0/classes/SearchBar.html
.. _HdyTitleBar : https://developer.puri.sm/projects/libhandy/unstable/HdyTitleBar.html
.. _`How to create a GTK application using Python`: https://belmoussaoui.com/2019/05/13/how-to-create-a-gtk-application-using-python-part-1/
.. _`iio-sensor-proxy`: https://github.com/hadess/iio-sensor-proxy
.. _`iio-sensor-proxy`: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/
.. _`image-builder`: https://source.puri.sm/Librem5/image-builder/
.. _`Image Builds`: https://arm01.puri.sm/job/Images/job/Image%20Build/
.. _`journalctl man page`: https://www.freedesktop.org/software/systemd/man/journalctl.html
......@@ -193,10 +197,14 @@
.. _`Running GTK Applications`: https://developer.gnome.org/gtk3/stable/gtk-running.html
.. _`Sandbox Permissions`: http://docs.flatpak.org/en/latest/sandbox-permissions-reference.html
.. _`Scalable Vector Graphics`: https://www.w3.org/TR/SVG/
.. _`Sensor Proxy Reference Manual`: https://developer.gnome.org/iio-sensor-proxy/1.0/
.. _`Sidebar lists`: https://developer.gnome.org/hig/stable/sidebar-lists.html.en
.. _`Squeekboard`: https://source.puri.sm/Librem5/squeekboard
.. _`Squeekboard documentation`: https://developer.puri.sm/projects/squeekboard/
.. _`U-Boot Librem 5 Builds`: https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/
.. _`UPower`: https://upower.freedesktop.org/
.. _`UPower Reference Manual`: https://upower.freedesktop.org/docs/
.. _`UPower D-Bus API Reference`: https://upower.freedesktop.org/docs/ref-dbus.html
.. _`Using GtkApplication`: https://developer.gnome.org/GtkApplication/
.. _`Using GSettings`: https://developer.gnome.org/GSettings/
.. _`Virtboard`: https://source.puri.sm/Librem5/virtboard/blob/master/README.md
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment