mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
6427e93757
This adds a GApplication object to GIO, which is the core of an application support class, supporting - uniqueness - exporting actions (simple scripting) - standard actions (quit, activate) The implementation for Linux uses D-Bus, takes a name on the session bus, and exports a org.gtk.Application interface. Implementations for Win32 and OS X are still missing.
21 lines
420 B
C
21 lines
420 B
C
#include <stdlib.h>
|
|
#include <gio/gio.h>
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
const gchar *envvar;
|
|
gint pid_from_env;
|
|
|
|
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
|
|
g_assert (envvar != NULL);
|
|
pid_from_env = atoi (envvar);
|
|
g_assert_cmpint (pid_from_env, ==, getpid ());
|
|
|
|
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
|
|
g_assert_cmpstr (envvar, ==, SRCDIR "/appinfo-test.desktop");
|
|
|
|
return 0;
|
|
}
|
|
|