mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 00:13:40 +02:00
GDBusActionGroup: add static platform registration
We provide a mechanism by which a 'platform' (eg: Gtk) can register some hook functions to be called to collect platform-data at the point of sending an outgoing action activation request and also to inform the platform of this data on incoming requests (before and after dispatching the actual request). This can be used for forwarding timestamp and startup-notification information (as is presently done in GApplication) but the before/after hook could also be used for acquiring/releasing the Gdk lock or other similar things. https://bugzilla.gnome.org/show_bug.cgi?id=665737
This commit is contained in:
@@ -45,9 +45,17 @@ G_BEGIN_DECLS
|
||||
|
||||
GType g_dbus_action_group_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path);
|
||||
GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path);
|
||||
|
||||
typedef void (* GDBusActionGroupSendHookFunc) (GDBusActionGroup *group,
|
||||
GVariantBuilder *builder);
|
||||
typedef void (* GDBusActionGroupEmitHookFunc) (GActionGroup *group,
|
||||
GVariant *platform_data);
|
||||
void g_dbus_action_group_register_platform (GDBusActionGroupSendHookFunc send_hook,
|
||||
GDBusActionGroupEmitHookFunc before_hook,
|
||||
GDBusActionGroupEmitHookFunc after_hook);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user