mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +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.
26 lines
469 B
C
26 lines
469 B
C
#include <gio/gio.h>
|
|
#include <gio/gdesktopappinfo.h>
|
|
|
|
static void
|
|
test_launch (void)
|
|
{
|
|
GAppInfo *appinfo;
|
|
|
|
appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (SRCDIR "/appinfo-test.desktop");
|
|
g_assert (appinfo != NULL);
|
|
|
|
g_assert (g_app_info_launch (appinfo, NULL, NULL, NULL));
|
|
}
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
g_type_init ();
|
|
g_test_init (&argc, &argv, NULL);
|
|
|
|
g_test_add_func ("/appinfo/launch", test_launch);
|
|
|
|
return g_test_run ();
|
|
}
|
|
|