![]() |
![]() |
![]() |
GTK+ Reference Manual | ![]() |
---|
libunique lets you send messages with commands to a running
instance using unique_app_send_message()
. GApplication does not
have a direct equivalent for this feature at this time, but
some of the predefined libunique commands have equivalents in
GApplication. Instead of sending the UNIQUE_ACTIVATE
command,
call g_application_activate()
, instead of sending the
UNIQUE_OPEN
command, call g_application_open()
. The
UNIQUE_NEW
and UNIQUE_CLOSE
and user-defined commands don't
have direct replacement at this time.
On the other hand, GApplication supports passing entire
commandlines to the running instance, which reduces the need
for user-defined commands. And GDBus makes it very easy to
implement D-Bus interfaces for communication between
application instances, see e.g. g_dbus_connection_register_object()
.