![]() |
![]() |
![]() |
GtkUnique Reference Manual | ![]() |
---|
The Xlibs-based GtkUnique protocol uses X as an IPC (Inter-Process Communication) channel. It works by setting and retrieving data using X properties set on a window. The protocol is implemented by the GtkUniqueAppXlibs object available when GtkUnique has been compiled with the Xlibs backend.
The protocol is composed by three phases: discovery, setup and communication.
The discovery phase is performed when the gtk_unique_app_is_running()
function is used. In this phase every top-level window is checked
for the existence of the _GTK_UNIQUE_VERSION and _GTK_UNIQUE_NAME
properties. If the _GTK_UNIQUE_VERSION is the same implemented by
the current version of GtkUniqueAppXlibs and the _GTK_UNIQUE_NAME
property is set to the same name used when creating the GtkUniqueApp
instance, then the discovery phase ends.
If no top-level window with both _GTK_UNIQUE_VERSION and _GTK_UNIQUE_NAME properties matching to the desired values, then no previous application has been found and a new instance should be created by following the "set up" phase.