---
# System prepended metadata

title: Understanding phosh code

---

# Understanding phosh code
phosh uses Dbus interface to blend with GNOME services 

phoc (wayland phone compositor) is invoked using gnome-session.

gnome-session contains the GNOME session manager, as well as a configuration program to choose applications starting on login.

https://gitlab.gnome.org/GNOME/mutter - Mutter is a Wayland display server and X11 window manager and compositor library used by gnome-shell. But phosh uses phoc

![](https://i.imgur.com/9aODHJJ.png)

## GTK Dev
Install builder (gnome-builder)
builder docs to help with usage -
https://builder.readthedocs.io/en/latest/
https://builder.readthedocs.io/en/latest/howto/index.html

### GLib
Provides many data structures that is used in GTK programming. Ex-
**GLib Lists** https://developer.gnome.org/documentation/tutorials/lists.html

### GtkApplication
https://developer.gnome.org/documentation/tutorials/application.html
Base class of a GTK Application. Responsible for app lifecycle from startup to user interaction to shutdown. GTK is event driven programming.

### GtkBuilder
https://docs.gtk.org/gtk4/class.Builder.html
reads XML descriptions of UI and instantiates the objects.

#### Glade UI programming
https://www.micahcarrick.com/gtk-glade3-gui-programming.html
https://gitlab.gnome.org/GNOME/epiphany/-/issues/84
https://discourse.gnome.org/t/how-to-make-an-adaptive-gtk-app-in-glade/4083