From d229036441b3f0a4f7ab5205de46b5dbc9d9d7a9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 9 Dec 2010 12:36:50 +0000 Subject: [PATCH] Reduce the amount of g-ir-scanner warnings As much as we can; the remaining warnings are mostly valid things that the introspection scanner still flags as potential issues. --- clutter/clutter-actor.h | 26 +++++++++++++------------- clutter/clutter-container.c | 16 ++++++++++++---- clutter/clutter-device-manager.h | 10 +++++----- clutter/clutter-layout-manager.h | 8 ++++---- clutter/clutter-offscreen-effect.h | 6 +++--- clutter/clutter-scriptable.h | 2 +- clutter/x11/clutter-backend-x11.c | 10 +++++----- clutter/x11/clutter-stage-x11.c | 7 ++++--- 8 files changed, 47 insertions(+), 38 deletions(-) diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 036f24268..7a01aacf1 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -224,15 +224,15 @@ struct _ClutterActorClass GInitiallyUnownedClass parent_class; /*< public >*/ - void (* show) (ClutterActor *actor); - void (* show_all) (ClutterActor *actor); - void (* hide) (ClutterActor *actor); - void (* hide_all) (ClutterActor *actor); - void (* realize) (ClutterActor *actor); - void (* unrealize) (ClutterActor *actor); - void (* map) (ClutterActor *actor); - void (* unmap) (ClutterActor *actor); - void (* paint) (ClutterActor *actor); + void (* show) (ClutterActor *self); + void (* show_all) (ClutterActor *self); + void (* hide) (ClutterActor *self); + void (* hide_all) (ClutterActor *self); + void (* realize) (ClutterActor *self); + void (* unrealize) (ClutterActor *self); + void (* map) (ClutterActor *self); + void (* unmap) (ClutterActor *self); + void (* paint) (ClutterActor *self); void (* parent_set) (ClutterActor *actor, ClutterActor *old_parent); @@ -244,15 +244,15 @@ struct _ClutterActorClass ClutterActor *leaf_that_queued); /* size negotiation */ - void (* get_preferred_width) (ClutterActor *actor, + void (* get_preferred_width) (ClutterActor *self, gfloat for_height, gfloat *min_width_p, gfloat *natural_width_p); - void (* get_preferred_height) (ClutterActor *actor, + void (* get_preferred_height) (ClutterActor *self, gfloat for_width, gfloat *min_height_p, gfloat *natural_height_p); - void (* allocate) (ClutterActor *actor, + void (* allocate) (ClutterActor *self, const ClutterActorBox *box, ClutterAllocationFlags flags); @@ -287,7 +287,7 @@ struct _ClutterActorClass void (* queue_relayout) (ClutterActor *actor); /* accessibility support */ - AtkObject * (* get_accessible) (ClutterActor *actor); + AtkObject * (* get_accessible) (ClutterActor *self); gboolean (* get_paint_volume) (ClutterActor *actor, ClutterPaintVolume *volume); diff --git a/clutter/clutter-container.c b/clutter/clutter-container.c index 037289e1d..0da2f89f9 100644 --- a/clutter/clutter-container.c +++ b/clutter/clutter-container.c @@ -177,7 +177,7 @@ clutter_container_default_init (ClutterContainerInterface *iface) } /** - * clutter_container_add: + * clutter_container_add: (skip) * @container: a #ClutterContainer * @first_actor: the first #ClutterActor to add * @Varargs: %NULL terminated list of actors to add @@ -214,6 +214,8 @@ clutter_container_add (ClutterContainer *container, * @container. You cannot add a #ClutterActor to more than one * #ClutterContainer. * + * Virtual: add + * * Since: 0.4 */ void @@ -251,7 +253,7 @@ clutter_container_add_actor (ClutterContainer *container, } /** - * clutter_container_add_valist: + * clutter_container_add_valist: (skip) * @container: a #ClutterContainer * @first_actor: the first #ClutterActor to add * @var_args: list of actors to add, followed by %NULL @@ -279,7 +281,7 @@ clutter_container_add_valist (ClutterContainer *container, } /** - * clutter_container_remove: + * clutter_container_remove: (skip) * @container: a #ClutterContainer * @first_actor: first #ClutterActor to remove * @Varargs: a %NULL-terminated list of actors to remove @@ -317,6 +319,8 @@ clutter_container_remove (ClutterContainer *container, * yourself, using g_object_ref(). When the actor has been removed, * the "actor-removed" signal is emitted by @container. * + * Virtual: remove + * * Since: 0.4 */ void @@ -353,7 +357,7 @@ clutter_container_remove_actor (ClutterContainer *container, } /** - * clutter_container_remove_valist: + * clutter_container_remove_valist: (skip) * @container: a #ClutterContainer * @first_actor: the first #ClutterActor to add * @var_args: list of actors to remove, followed by %NULL @@ -490,6 +494,8 @@ clutter_container_foreach_with_internals (ClutterContainer *container, * * Raises @actor to @sibling level, in the depth ordering. * + * Virtual: raise + * * Since: 0.6 */ void @@ -543,6 +549,8 @@ clutter_container_raise_child (ClutterContainer *container, * * Lowers @actor to @sibling level, in the depth ordering. * + * Virtual: lower + * * Since: 0.6 */ void diff --git a/clutter/clutter-device-manager.h b/clutter/clutter-device-manager.h index 9e902fe20..f9546622d 100644 --- a/clutter/clutter-device-manager.h +++ b/clutter/clutter-device-manager.h @@ -70,11 +70,11 @@ struct _ClutterDeviceManagerClass /*< private >*/ GObjectClass parent_class; - const GSList * (* get_devices) (ClutterDeviceManager *manager); - ClutterInputDevice *(* get_core_device) (ClutterDeviceManager *manager, - ClutterInputDeviceType type); - ClutterInputDevice *(* get_device) (ClutterDeviceManager *manager, - gint id); + const GSList * (* get_devices) (ClutterDeviceManager *device_manager); + ClutterInputDevice *(* get_core_device) (ClutterDeviceManager *device_manager, + ClutterInputDeviceType device_type); + ClutterInputDevice *(* get_device) (ClutterDeviceManager *device_manager, + gint device_id); void (* add_device) (ClutterDeviceManager *manager, ClutterInputDevice *device); diff --git a/clutter/clutter-layout-manager.h b/clutter/clutter-layout-manager.h index e249b6b1a..c735869fc 100644 --- a/clutter/clutter-layout-manager.h +++ b/clutter/clutter-layout-manager.h @@ -107,13 +107,13 @@ struct _ClutterLayoutManagerClass void (* get_preferred_width) (ClutterLayoutManager *manager, ClutterContainer *container, gfloat for_height, - gfloat *minimum_width_p, - gfloat *natural_width_p); + gfloat *min_width_p, + gfloat *nat_width_p); void (* get_preferred_height) (ClutterLayoutManager *manager, ClutterContainer *container, gfloat for_width, - gfloat *minimum_height_p, - gfloat *natural_height_p); + gfloat *min_height_p, + gfloat *nat_height_p); void (* allocate) (ClutterLayoutManager *manager, ClutterContainer *container, const ClutterActorBox *allocation, diff --git a/clutter/clutter-offscreen-effect.h b/clutter/clutter-offscreen-effect.h index c9213cbda..0f16c9f31 100644 --- a/clutter/clutter-offscreen-effect.h +++ b/clutter/clutter-offscreen-effect.h @@ -77,9 +77,9 @@ struct _ClutterOffscreenEffectClass /*< public >*/ CoglHandle (* create_texture) (ClutterOffscreenEffect *effect, - gfloat min_width, - gfloat min_height); - void (* paint_target) (ClutterOffscreenEffect *effect); + gfloat width, + gfloat height); + void (* paint_target) (ClutterOffscreenEffect *effect); /*< private >*/ void (* _clutter_offscreen1) (void); diff --git a/clutter/clutter-scriptable.h b/clutter/clutter-scriptable.h index 6ad24ab5a..5817ee746 100644 --- a/clutter/clutter-scriptable.h +++ b/clutter/clutter-scriptable.h @@ -73,7 +73,7 @@ struct _ClutterScriptableIface /*< public >*/ void (* set_id) (ClutterScriptable *scriptable, - const gchar *name); + const gchar *id); const gchar *(* get_id) (ClutterScriptable *scriptable); gboolean (* parse_custom_node) (ClutterScriptable *scriptable, diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c index cd0174891..5efb1150d 100644 --- a/clutter/x11/clutter-backend-x11.c +++ b/clutter/x11/clutter-backend-x11.c @@ -577,7 +577,7 @@ clutter_x11_untrap_x_errors (void) * * Retrieves the pointer to the default display. * - * Return value: the default display + * Return value: (transfer none): the default display * * Since: 0.6 */ @@ -861,9 +861,9 @@ _clutter_x11_get_device_for_xid (XID id) * * Since: 0.8 * - * Return value: a pointer to the internal list of input devices; the - * returned list is owned by Clutter and should not be modified or - * freed + * Return value: (transfer none) (element-type Clutter.InputDevice): a + * pointer to the internal list of input devices; the returned list is + * owned by Clutter and should not be modified or freed */ G_CONST_RETURN GSList * clutter_x11_get_input_devices (void) @@ -1016,7 +1016,7 @@ clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11) * Retrieves the XVisualInfo used by the Clutter X11 * backend. * - * Return value: a XVisualInfo, or + * Return value: (transfer full): a XVisualInfo, or * None. The returned value should be freed using XFree() * when done * diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index 54175dcc0..1b384a0ba 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -741,7 +741,8 @@ clutter_x11_get_stage_window (ClutterStage *stage) * * Gets the stage for a particular X window. * - * Return value: The stage or NULL if a stage does not exist for the window. + * Return value: (transfer none): A #ClutterStage, or% NULL if a stage + * does not exist for the window * * Since: 0.8 */ @@ -782,8 +783,8 @@ clutter_x11_get_stage_from_window (Window win) * along the lines of clutter_backend_x11_get_foreign_visual () or perhaps * clutter_stage_x11_get_foreign_visual () * - * Return value: An XVisualInfo suitable for creating a foreign stage. Use - * XFree() to free the returned value instead + * Return value: (transfer full): An XVisualInfo suitable for creating a + * foreign stage. Use XFree() to free the returned value instead * * Deprecated: 1.2: Use clutter_x11_get_visual_info() instead *