[glib/application] tweaks
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/application] tweaks
- Date: Thu, 5 Aug 2010 15:44:39 +0000 (UTC)
commit b028531d4bbd918d716cb1d7c1562fd0cbded22c
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Aug 5 17:43:59 2010 +0200
tweaks
gio/gapplication.h | 54 ++++++++++++++++++---------------------------------
1 files changed, 19 insertions(+), 35 deletions(-)
---
diff --git a/gio/gapplication.h b/gio/gapplication.h
index f74bb25..91a646a 100644
--- a/gio/gapplication.h
+++ b/gio/gapplication.h
@@ -80,16 +80,18 @@ struct _GApplicationClass
void (* startup) (GApplication *application);
void (* open) (GApplication *application,
- GFile *file,
+ GFile **files,
+ gint n_files,
const gchar *hint);
void (* activate) (GApplication *application);
- gint (* invoke) (GApplication *application,
+ int (* cmdline) (GApplication *application,
GApplicationInvocation *invocation);
gboolean (* action) (GApplication *application,
- const gchar *action_name);
+ const gchar *action_name,
+ GVariant *parameters);
/* vfuncs */
@@ -121,43 +123,25 @@ struct _GApplicationClass
gpointer padding[12];
};
-/**
- * GApplicationDisposition:
- * @G_APPLICATION_DISPOSITION_UNIQUE: the application is a unique application contained within and launched
- * by this executable. The application will stop running when its use
- * count drops to zero. This is the default.
- * @G_APPLICATION_DISPOSITION_NON_UNIQUE: the application is a non-unique application contained within and
- * launched by this executable. This is useful if you want the lifecycle
- * management provided by #GApplication but not the unique application
- * support. The application will stop running when its use count drops
- * to zero.
- * @G_APPLICATION_DISPOSITION_SERVICE: this executable contains a service that provides the application; the
- * application is not usually launched by running this executable. The
- * application will stop running when its use count drops to zero.
- * @G_APPLICATION_DISPOSITION_LAUNCHER: this executable is used only for launching the application. The
- * application service will be started if it is not already running.
- * This process will stop running when the application service is done
- * handling the request dispatched by this process.
- **/
typedef enum
{
- G_APPLICATION_DISPOSITION_UNIQUE,
- G_APPLICATION_DISPOSITION_NON_UNIQUE,
- G_APPLICATION_DISPOSITION_SERVICE,
- G_APPLICATION_DISPOSITION_LAUNCHER
-} GApplicationDisposition;
+ G_APPLICATION_FLAGS_NONE,
+ G_APPLICATION_FLAGS_CAN_OPEN = (1 << 0),
+ G_APPLICATION_FLAGS_REMOTE_CMDLINE = (1 << 1)
+} GApplicationFlags;
GType g_application_get_type (void) G_GNUC_CONST;
GApplication * g_application_get_instance (void);
gboolean g_application_is_supported (void);
-GApplication * g_application_new (const gchar *appid);
+GApplication * g_application_new (const gchar *appid,
+ GApplicationFlags flags);
gboolean g_application_register (GApplication *application);
gboolean g_application_is_remote (GApplication *application);
-void g_application_set_disposition (GApplication *application,
- GApplicationDisposition disposition);
+void g_application_set_flags (GApplication *application,
+ GApplicationFlags flags);
const gchar * g_application_get_id (GApplication *application);
@@ -174,22 +158,22 @@ gboolean g_application_get_action_enabled (GApplic
const gchar *name);
const gchar * g_application_get_action_description (GApplication *application,
const gchar *name);
-void g_application_invoke_action (GApplication *application,
- const gchar *name);
-int g_application_invoke_with_arguments (GApplication *application,
+int g_application_cmdline_with_arguments (GApplication *application,
GVariant *arguments);
-int g_application_invoke (GApplication *application,
+int g_application_cmdline (GApplication *application,
int argc,
char **argv);
void g_application_action (GApplication *application,
- const gchar *action);
+ const gchar *action,
+ GVariant *parameters);
void g_application_activate (GApplication *application);
void g_application_open (GApplication *application,
- GFile *file,
+ GFile **file,
+ gint n_files,
const gchar *hint);
int g_application_run_service (GApplication *application);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]