From 467120d5aa52fd6d25a9f5b3d63df1a64e68f15a Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 6 Feb 2024 15:47:30 +0100 Subject: [PATCH] cleanup: Remove unused callbacks Part-of: --- clutter/clutter/clutter-actor-private.h | 4 +--- clutter/clutter/clutter-actor.h | 18 ------------------ clutter/clutter/clutter-binding-pool.c | 2 +- clutter/clutter/clutter-binding-pool.h | 21 --------------------- src/backends/native/meta-kms-private.h | 3 --- 5 files changed, 2 insertions(+), 46 deletions(-) diff --git a/clutter/clutter/clutter-actor-private.h b/clutter/clutter/clutter-actor-private.h index c7ff16a0a..4ad504658 100644 --- a/clutter/clutter/clutter-actor-private.h +++ b/clutter/clutter/clutter-actor-private.h @@ -83,9 +83,7 @@ typedef ClutterActorTraverseVisitFlags (*ClutterTraverseCallback) (ClutterActor * @user_data: The private data specified when starting the iteration * * A generic callback for iterating over actor, such as with - * _clutter_actor_foreach_child. The difference when compared to - * #ClutterCallback is that it returns a boolean so it is possible to break - * out of an iteration early. + * _clutter_actor_foreach_child. * * Return value: %TRUE to continue iterating or %FALSE to break iteration * early. diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h index df76f7604..c0510c937 100644 --- a/clutter/clutter/clutter-actor.h +++ b/clutter/clutter/clutter-actor.h @@ -56,24 +56,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref) typedef struct _ClutterActorClass ClutterActorClass; typedef struct _ClutterActorPrivate ClutterActorPrivate; -/** - * ClutterCallback: - * @actor: a #ClutterActor - * @data: (closure): user data - * - * Generic callback - */ -typedef void (*ClutterCallback) (ClutterActor *actor, - gpointer data); - -/** - * CLUTTER_CALLBACK: - * @f: a function - * - * Convenience macro to cast a function to #ClutterCallback - */ -#define CLUTTER_CALLBACK(f) ((ClutterCallback) (f)) - struct _ClutterActor { diff --git a/clutter/clutter/clutter-binding-pool.c b/clutter/clutter/clutter-binding-pool.c index 1d2400f75..97f3db540 100644 --- a/clutter/clutter/clutter-binding-pool.c +++ b/clutter/clutter/clutter-binding-pool.c @@ -429,7 +429,7 @@ clutter_binding_pool_find (const gchar *name) * @action_name: the name of the action * @key_val: key symbol * @modifiers: bitmask of modifiers - * @callback: (type Clutter.BindingActionFunc): function to be called + * @callback: function to be called * when the action is activated * @data: data to be passed to @callback * @notify: function to be called when the action is removed diff --git a/clutter/clutter/clutter-binding-pool.h b/clutter/clutter/clutter-binding-pool.h index 341ce0b34..4b09bf695 100644 --- a/clutter/clutter/clutter-binding-pool.h +++ b/clutter/clutter/clutter-binding-pool.h @@ -42,27 +42,6 @@ G_DECLARE_FINAL_TYPE (ClutterBindingPool, BINDING_POOL, GObject) -/** - * ClutterBindingActionFunc: - * @gobject: a #GObject - * @action_name: the name of the action - * @key_val: the key symbol - * @modifiers: bitmask of the modifier flags - * @user_data: data passed to the function - * - * The prototype for the callback function registered with - * [method@Clutter.BindingPool.install_action] and invoked by - * [method@Clutter.BindingPool.activate]. - * - * Return value: the function should return %TRUE if the key - * binding has been handled, and return %FALSE otherwise - */ -typedef gboolean (* ClutterBindingActionFunc) (GObject *gobject, - const gchar *action_name, - guint key_val, - ClutterModifierType modifiers, - gpointer user_data); - CLUTTER_EXPORT ClutterBindingPool * clutter_binding_pool_new (const gchar *name); CLUTTER_EXPORT diff --git a/src/backends/native/meta-kms-private.h b/src/backends/native/meta-kms-private.h index 2f427de62..cc81c748f 100644 --- a/src/backends/native/meta-kms-private.h +++ b/src/backends/native/meta-kms-private.h @@ -24,9 +24,6 @@ #include "backends/native/meta-kms-types.h" #include "backends/native/meta-kms-types-private.h" -typedef void (* MetaKmsCallback) (MetaKms *kms, - gpointer user_data); - void meta_kms_queue_callback (MetaKms *kms, GMainContext *main_context, MetaThreadCallback callback,