summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clutter/clutter-actor.c12
-rw-r--r--clutter/clutter-actor.h2
-rw-r--r--clutter/clutter-animator.c10
-rw-r--r--clutter/clutter-id-pool.c30
-rw-r--r--clutter/clutter-id-pool.h6
-rw-r--r--clutter/clutter-main.c99
-rw-r--r--clutter/clutter-main.h6
-rw-r--r--clutter/clutter-score.c22
-rw-r--r--clutter/clutter-score.h4
-rw-r--r--clutter/clutter-script-parser.c40
-rw-r--r--clutter/clutter-script.c8
-rw-r--r--clutter/clutter-scriptable.c12
-rw-r--r--clutter/clutter-scriptable.h4
-rw-r--r--clutter/clutter-state.c18
-rw-r--r--clutter/clutter-timeout-pool.c10
-rw-r--r--clutter/clutter-timeout-pool.h2
16 files changed, 144 insertions, 141 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 0ee1914d7..272778baf 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -8600,13 +8600,13 @@ parse_actor_metas (ClutterScript *script,
for (l = elements; l != NULL; l = l->next)
{
JsonNode *element = l->data;
- const gchar *id = _clutter_script_get_id_from_node (element);
+ const gchar *id_ = _clutter_script_get_id_from_node (element);
GObject *meta;
- if (id == NULL || *id == '\0')
+ if (id_ == NULL || *id_ == '\0')
continue;
- meta = clutter_script_get_object (script, id);
+ meta = clutter_script_get_object (script, id_);
if (meta == NULL)
continue;
@@ -8634,13 +8634,13 @@ parse_behaviours (ClutterScript *script,
for (l = elements; l != NULL; l = l->next)
{
JsonNode *element = l->data;
- const gchar *id = _clutter_script_get_id_from_node (element);
+ const gchar *id_ = _clutter_script_get_id_from_node (element);
GObject *behaviour;
- if (id == NULL || *id == '\0')
+ if (id_ == NULL || *id_ == '\0')
continue;
- behaviour = clutter_script_get_object (script, id);
+ behaviour = clutter_script_get_object (script, id_);
if (behaviour == NULL)
continue;
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index a3752a961..6b05d13d8 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -497,7 +497,7 @@ gboolean clutter_actor_event (ClutterActor
ClutterEvent *event,
gboolean capture);
-ClutterActor * clutter_get_actor_by_gid (guint32 id);
+ClutterActor * clutter_get_actor_by_gid (guint32 id_);
gboolean clutter_actor_set_shader (ClutterActor *self,
ClutterShader *shader);
diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c
index a506d920d..0ba707cc6 100644
--- a/clutter/clutter-animator.c
+++ b/clutter/clutter-animator.c
@@ -1533,7 +1533,7 @@ parse_animator_property (JsonArray *array,
JsonObject *object;
JsonArray *keys;
GObject *gobject;
- const gchar *id, *pname;
+ const gchar *id_, *pname;
GObjectClass *klass;
GParamSpec *pspec;
GSList *valid_keys = NULL;
@@ -1563,11 +1563,11 @@ parse_animator_property (JsonArray *array,
return;
}
- id = json_object_get_string_member (object, "object");
- gobject = clutter_script_get_object (clos->script, id);
+ id_ = json_object_get_string_member (object, "object");
+ gobject = clutter_script_get_object (clos->script, id_);
if (gobject == NULL)
{
- g_warning ("No object with id '%s' has been defined.", id);
+ g_warning ("No object with id '%s' has been defined.", id_);
return;
}
@@ -1579,7 +1579,7 @@ parse_animator_property (JsonArray *array,
g_warning ("The object of type '%s' and name '%s' has no "
"property named '%s'",
G_OBJECT_TYPE_NAME (gobject),
- id,
+ id_,
pname);
return;
}
diff --git a/clutter/clutter-id-pool.c b/clutter/clutter-id-pool.c
index 42dc14d09..d30e42016 100644
--- a/clutter/clutter-id-pool.c
+++ b/clutter/clutter-id-pool.c
@@ -69,46 +69,48 @@ clutter_id_pool_add (ClutterIDPool *id_pool,
gpointer ptr)
{
gpointer *array;
- guint32 id;
+ guint32 retval;
g_return_val_if_fail (id_pool != NULL, 0);
if (id_pool->free_ids) /* There are items on our freelist, reuse one */
{
array = (void*) id_pool->array->data;
- id = GPOINTER_TO_UINT (id_pool->free_ids->data);
+ retval = GPOINTER_TO_UINT (id_pool->free_ids->data);
id_pool->free_ids = g_slist_remove (id_pool->free_ids,
id_pool->free_ids->data);
- array[id] = ptr;
- return id;
+ array[retval] = ptr;
+ return retval;
}
/* Allocate new id */
- id = id_pool->array->len;
+ retval = id_pool->array->len;
g_array_append_val (id_pool->array, ptr);
- return id;
+
+ return retval;
}
void
clutter_id_pool_remove (ClutterIDPool *id_pool,
- guint32 id)
+ guint32 id_)
{
gpointer *array;
g_return_if_fail (id_pool != NULL);
+
array = (void*) id_pool->array->data;
- array[id] = (void*)0xdecafbad; /* set pointer to a recognizably voided
- value */
+ /* set pointer to a recognizably voided value */
+ array[id_] = (void*)0xdecafbad;
id_pool->free_ids = g_slist_prepend (id_pool->free_ids,
- GUINT_TO_POINTER (id));
+ GUINT_TO_POINTER (id_));
}
gpointer
clutter_id_pool_lookup (ClutterIDPool *id_pool,
- guint32 id)
+ guint32 id_)
{
gpointer *array;
@@ -117,14 +119,14 @@ clutter_id_pool_lookup (ClutterIDPool *id_pool,
array = (void*) id_pool->array->data;
- if (id >= id_pool->array->len || array[id] == NULL)
+ if (id_ >= id_pool->array->len || array[id_] == NULL)
{
g_warning ("The required ID of %u does not refer to an existing actor; "
"this usually implies that the pick() of an actor is not "
"correctly implemented or that there is an error in the "
- "glReadPixels() implementation of the GL driver.", id);
+ "glReadPixels() implementation of the GL driver.", id_);
return NULL;
}
- return array[id];
+ return array[id_];
}
diff --git a/clutter/clutter-id-pool.h b/clutter/clutter-id-pool.h
index 114f0b68d..07bf08806 100644
--- a/clutter/clutter-id-pool.h
+++ b/clutter/clutter-id-pool.h
@@ -34,15 +34,15 @@ G_BEGIN_DECLS
typedef struct _ClutterIDPool ClutterIDPool;
-
ClutterIDPool *clutter_id_pool_new (guint initial_size);
void clutter_id_pool_free (ClutterIDPool *id_pool);
+
guint32 clutter_id_pool_add (ClutterIDPool *id_pool,
gpointer ptr);
void clutter_id_pool_remove (ClutterIDPool *id_pool,
- guint32 id);
+ guint32 id_);
gpointer clutter_id_pool_lookup (ClutterIDPool *id_pool,
- guint32 id);
+ guint32 id_);
G_END_DECLS
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index 9ff54b852..9d0e4400c 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -335,17 +335,18 @@ clutter_get_motion_events_enabled (void)
}
static inline ClutterActor *
-_clutter_actor_get_by_id (guint32 id)
+_clutter_actor_get_by_id (guint32 actor_id)
{
ClutterMainContext *context = _clutter_context_get_default ();
g_assert (context->id_pool != NULL);
- return clutter_id_pool_lookup (context->id_pool, id);
+ return clutter_id_pool_lookup (context->id_pool, actor_id);
}
void
-_clutter_id_to_color (guint id, ClutterColor *col)
+_clutter_id_to_color (guint id_,
+ ClutterColor *col)
{
ClutterMainContext *ctx;
gint red, green, blue;
@@ -373,11 +374,11 @@ _clutter_id_to_color (guint id, ClutterColor *col)
}
/* compute the numbers we'll store in the components */
- red = (id >> (ctx->fb_g_mask_used+ctx->fb_b_mask_used))
+ red = (id_ >> (ctx->fb_g_mask_used+ctx->fb_b_mask_used))
& (0xff >> (8-ctx->fb_r_mask_used));
- green = (id >> ctx->fb_b_mask_used)
+ green = (id_ >> ctx->fb_b_mask_used)
& (0xff >> (8-ctx->fb_g_mask_used));
- blue = (id)
+ blue = (id_)
& (0xff >> (8-ctx->fb_b_mask_used));
/* shift left bits a bit and add one, this circumvents
@@ -418,8 +419,8 @@ guint
_clutter_pixel_to_id (guchar pixel[4])
{
ClutterMainContext *ctx;
- gint red, green, blue;
- guint id;
+ gint red, green, blue;
+ guint retval;
ctx = _clutter_context_get_default ();
@@ -455,16 +456,17 @@ _clutter_pixel_to_id (guchar pixel[4])
blue = blue >> (ctx->fb_b_mask - ctx->fb_b_mask_used);
/* combine the correct per component values into the final id */
- id = blue
- + (green << ctx->fb_b_mask_used)
- + (red << (ctx->fb_b_mask_used + ctx->fb_g_mask_used));
+ retval = blue
+ + (green << ctx->fb_b_mask_used)
+ + (red << (ctx->fb_b_mask_used + ctx->fb_g_mask_used));
- return id;
+ return retval;
}
#ifdef USE_GDKPIXBUF
static void
-pixbuf_free (guchar *pixels, gpointer data)
+pixbuf_free (guchar *pixels,
+ gpointer data)
{
g_free (pixels);
}
@@ -472,10 +474,10 @@ pixbuf_free (guchar *pixels, gpointer data)
static void
read_pixels_to_file (char *filename_stem,
- int x,
- int y,
- int width,
- int height)
+ int x,
+ int y,
+ int width,
+ int height)
{
#ifdef USE_GDKPIXBUF
GLubyte *data;
@@ -535,12 +537,12 @@ _clutter_do_pick (ClutterStage *stage,
ClutterPickMode mode)
{
ClutterMainContext *context;
- guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff };
- CoglColor stage_pick_id;
- guint32 id;
- GLboolean dither_was_on;
- ClutterActor *actor;
- gboolean is_clipped;
+ guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff };
+ CoglColor stage_pick_id;
+ guint32 id_;
+ GLboolean dither_was_on;
+ ClutterActor *actor;
+ gboolean is_clipped;
CLUTTER_STATIC_COUNTER (do_pick_counter,
"_clutter_do_pick counter",
"Increments for each full pick run",
@@ -606,8 +608,8 @@ _clutter_do_pick (ClutterStage *stage,
goto result;
}
- id = _clutter_pixel_to_id (pixel);
- actor = _clutter_actor_get_by_id (id);
+ id_ = _clutter_pixel_to_id (pixel);
+ actor = _clutter_actor_get_by_id (id_);
goto result;
}
@@ -698,8 +700,8 @@ _clutter_do_pick (ClutterStage *stage,
goto result;
}
- id = _clutter_pixel_to_id (pixel);
- actor = _clutter_actor_get_by_id (id);
+ id_ = _clutter_pixel_to_id (pixel);
+ actor = _clutter_actor_get_by_id (id_);
result:
@@ -2565,9 +2567,9 @@ _clutter_process_event (ClutterEvent *event)
/**
* clutter_get_actor_by_gid:
- * @id: a #ClutterActor ID.
+ * @id_: a #ClutterActor unique id.
*
- * Retrieves the #ClutterActor with @id.
+ * Retrieves the #ClutterActor with @id_.
*
* Return value: (transfer none): the actor with the passed id or %NULL.
* The returned actor does not have its reference count increased.
@@ -2575,9 +2577,9 @@ _clutter_process_event (ClutterEvent *event)
* Since: 0.6
*/
ClutterActor *
-clutter_get_actor_by_gid (guint32 id)
+clutter_get_actor_by_gid (guint32 id_)
{
- return _clutter_actor_get_by_id (id);
+ return _clutter_actor_get_by_id (id_);
}
void
@@ -2713,7 +2715,7 @@ clutter_grab_pointer (ClutterActor *actor)
/**
* clutter_grab_pointer_for_device:
* @actor: a #ClutterActor
- * @id: a device id, or -1
+ * @id_: a device id, or -1
*
* Grabs all the pointer events coming from the device @id for @actor.
*
@@ -2723,22 +2725,21 @@ clutter_grab_pointer (ClutterActor *actor)
*/
void
clutter_grab_pointer_for_device (ClutterActor *actor,
- gint id)
+ gint id_)
{
ClutterInputDevice *dev;
g_return_if_fail (actor == NULL || CLUTTER_IS_ACTOR (actor));
/* essentially a global grab */
- if (id == -1)
+ if (id_ == -1)
{
clutter_grab_pointer (actor);
return;
}
- dev = clutter_get_input_device_for_id (id);
-
- if (!dev)
+ dev = clutter_get_input_device_for_id (id_);
+ if (dev == NULL)
return;
if (dev->pointer_grab_actor == actor)
@@ -2747,8 +2748,8 @@ clutter_grab_pointer_for_device (ClutterActor *actor,
if (dev->pointer_grab_actor)
{
g_object_weak_unref (G_OBJECT (dev->pointer_grab_actor),
- on_pointer_grab_weak_notify,
- dev);
+ on_pointer_grab_weak_notify,
+ dev);
dev->pointer_grab_actor = NULL;
}
@@ -2757,8 +2758,8 @@ clutter_grab_pointer_for_device (ClutterActor *actor,
dev->pointer_grab_actor = actor;
g_object_weak_ref (G_OBJECT (actor),
- on_pointer_grab_weak_notify,
- dev);
+ on_pointer_grab_weak_notify,
+ dev);
}
}
@@ -2778,16 +2779,16 @@ clutter_ungrab_pointer (void)
/**
* clutter_ungrab_pointer_for_device:
- * @id: a device id
+ * @id_: a device id
*
- * Removes an existing grab of the pointer events for device @id.
+ * Removes an existing grab of the pointer events for device @id_.
*
* Since: 0.8
*/
void
-clutter_ungrab_pointer_for_device (gint id)
+clutter_ungrab_pointer_for_device (gint id_)
{
- clutter_grab_pointer_for_device (NULL, id);
+ clutter_grab_pointer_for_device (NULL, id_);
}
@@ -3012,9 +3013,9 @@ clutter_get_font_flags (void)
/**
* clutter_get_input_device_for_id:
- * @id: the unique id for a device
+ * @id_: the unique id for a device
*
- * Retrieves the #ClutterInputDevice from its @id. This is a convenience
+ * Retrieves the #ClutterInputDevice from its @id_. This is a convenience
* wrapper for clutter_device_manager_get_device() and it is functionally
* equivalent to:
*
@@ -3031,13 +3032,13 @@ clutter_get_font_flags (void)
* Since: 0.8
*/
ClutterInputDevice *
-clutter_get_input_device_for_id (gint id)
+clutter_get_input_device_for_id (gint id_)
{
ClutterDeviceManager *manager;
manager = clutter_device_manager_get_default ();
- return clutter_device_manager_get_device (manager, id);
+ return clutter_device_manager_get_device (manager, id_);
}
/**
diff --git a/clutter/clutter-main.h b/clutter/clutter-main.h
index 33336fd7c..bc906ddfc 100644
--- a/clutter/clutter-main.h
+++ b/clutter/clutter-main.h
@@ -159,12 +159,12 @@ void clutter_clear_glyph_cache (void);
void clutter_set_font_flags (ClutterFontFlags flags);
ClutterFontFlags clutter_get_font_flags (void);
-ClutterInputDevice *clutter_get_input_device_for_id (gint id);
+ClutterInputDevice *clutter_get_input_device_for_id (gint id_);
void clutter_grab_pointer_for_device (ClutterActor *actor,
- gint id);
+ gint id_);
-void clutter_ungrab_pointer_for_device (gint id);
+void clutter_ungrab_pointer_for_device (gint id_);
PangoFontMap * clutter_get_font_map (void);
diff --git a/clutter/clutter-score.c b/clutter/clutter-score.c
index 14182c03f..320f9f9d3 100644
--- a/clutter/clutter-score.c
+++ b/clutter/clutter-score.c
@@ -555,14 +555,14 @@ find_entry_by_timeline (ClutterScore *score,
static GNode *
find_entry_by_id (ClutterScore *score,
- gulong id)
+ gulong id_)
{
ClutterScorePrivate *priv = score->priv;
TraverseClosure closure;
closure.action = FIND_BY_ID;
closure.score = score;
- closure.d.id = id;
+ closure.d.id = id_;
closure.result = NULL;
g_node_traverse (priv->root,
@@ -1010,7 +1010,7 @@ clutter_score_append_at_marker (ClutterScore *score,
/**
* clutter_score_remove:
* @score: a #ClutterScore
- * @id: the id of the timeline to remove
+ * @id_: the id of the timeline to remove
*
* Removes the #ClutterTimeline with the given id inside @score. If
* the timeline has other timelines attached to it, those are removed
@@ -1020,19 +1020,19 @@ clutter_score_append_at_marker (ClutterScore *score,
*/
void
clutter_score_remove (ClutterScore *score,
- gulong id)
+ gulong id_)
{
ClutterScorePrivate *priv;
TraverseClosure closure;
g_return_if_fail (CLUTTER_IS_SCORE (score));
- g_return_if_fail (id > 0);
+ g_return_if_fail (id_ > 0);
priv = score->priv;
closure.action = REMOVE_BY_ID;
closure.score = score;
- closure.d.id = id;
+ closure.d.id = id_;
closure.result = NULL;
g_node_traverse (priv->root,
@@ -1075,9 +1075,9 @@ clutter_score_remove_all (ClutterScore *score)
/**
* clutter_score_get_timeline:
* @score: a #ClutterScore
- * @id: the id of the timeline
+ * @id_: the id of the timeline
*
- * Retrieves the #ClutterTimeline for @id inside @score.
+ * Retrieves the #ClutterTimeline for @id_ inside @score.
*
* Return value: (transfer none): the requested timeline, or %NULL. This
* function does not increase the reference count on the returned
@@ -1087,15 +1087,15 @@ clutter_score_remove_all (ClutterScore *score)
*/
ClutterTimeline *
clutter_score_get_timeline (ClutterScore *score,
- gulong id)
+ gulong id_)
{
GNode *node;
ClutterScoreEntry *entry;
g_return_val_if_fail (CLUTTER_IS_SCORE (score), NULL);
- g_return_val_if_fail (id > 0, NULL);
+ g_return_val_if_fail (id_ > 0, NULL);
- node = find_entry_by_id (score, id);
+ node = find_entry_by_id (score, id_);
if (G_UNLIKELY (!node))
return NULL;
diff --git a/clutter/clutter-score.h b/clutter/clutter-score.h
index 82cd28297..0d1fd294e 100644
--- a/clutter/clutter-score.h
+++ b/clutter/clutter-score.h
@@ -112,10 +112,10 @@ gulong clutter_score_append_at_marker (ClutterScore *score,
const gchar *marker_name,
ClutterTimeline *timeline);
void clutter_score_remove (ClutterScore *score,
- gulong id);
+ gulong id_);
void clutter_score_remove_all (ClutterScore *score);
ClutterTimeline *clutter_score_get_timeline (ClutterScore *score,
- gulong id);
+ gulong id_);
GSList * clutter_score_list_timelines (ClutterScore *score);
void clutter_score_start (ClutterScore *score);
diff --git a/clutter/clutter-script-parser.c b/clutter/clutter-script-parser.c
index debcc39b7..aa786fc5d 100644
--- a/clutter/clutter-script-parser.c
+++ b/clutter/clutter-script-parser.c
@@ -528,11 +528,11 @@ parse_children (ObjectInfo *oinfo,
for (i = 0; i < array_len; i++)
{
JsonNode *child = json_array_get_element (array, i);
- const gchar *id;
+ const gchar *id_;
- id = _clutter_script_get_id_from_node (child);
- if (id)
- retval = g_list_prepend (retval, g_strdup (id));
+ id_ = _clutter_script_get_id_from_node (child);
+ if (id_ != NULL)
+ retval = g_list_prepend (retval, g_strdup (id_));
}
return g_list_reverse (retval);
@@ -820,10 +820,10 @@ _clutter_script_parse_alpha (ClutterScript *script,
if (JSON_NODE_TYPE (val) == JSON_NODE_VALUE &&
json_node_get_string (val) != NULL)
{
- const gchar *id = json_node_get_string (val);
+ const gchar *id_ = json_node_get_string (val);
timeline =
- CLUTTER_TIMELINE (clutter_script_get_object (script, id));
+ CLUTTER_TIMELINE (clutter_script_get_object (script, id_));
}
else if (JSON_NODE_TYPE (val) == JSON_NODE_OBJECT)
{
@@ -833,7 +833,7 @@ _clutter_script_parse_alpha (ClutterScript *script,
}
val = json_object_get_member (object, "mode");
- if (val)
+ if (val != NULL)
mode = clutter_script_resolve_animation_mode (val);
if (mode == CLUTTER_CUSTOM_MODE)
@@ -884,7 +884,7 @@ clutter_script_parser_object_end (JsonParser *json_parser,
ClutterScript *script = parser->script;
ObjectInfo *oinfo;
JsonNode *val;
- const gchar *id;
+ const gchar *id_;
GList *members, *l;
/* if the object definition does not have an 'id' field we'll
@@ -922,17 +922,17 @@ clutter_script_parser_object_end (JsonParser *json_parser,
return;
}
- id = json_object_get_string_member (object, "id");
- CLUTTER_NOTE (SCRIPT, "Getting object info for object '%s'", id);
+ id_ = json_object_get_string_member (object, "id");
+ CLUTTER_NOTE (SCRIPT, "Getting object info for object '%s'", id_);
- oinfo = _clutter_script_get_object_info (script, id);
+ oinfo = _clutter_script_get_object_info (script, id_);
if (oinfo == NULL)
{
const gchar *class_name;
oinfo = g_slice_new0 (ObjectInfo);
oinfo->merge_id = _clutter_script_get_last_merge_id (script);
- oinfo->id = g_strdup (id);
+ oinfo->id = g_strdup (id_);
class_name = json_object_get_string_member (object, "type");
oinfo->class_name = g_strdup (class_name);
@@ -1075,7 +1075,7 @@ clutter_script_parse_node (ClutterScript *script,
{
GType p_type;
ObjectInfo *oinfo;
- const gchar *id;
+ const gchar *id_;
if (G_IS_VALUE (value))
p_type = G_VALUE_TYPE (value);
@@ -1092,11 +1092,11 @@ clutter_script_parse_node (ClutterScript *script,
* definitions are parsed leaf-first we are guaranteed
* to have a defined object at this point
*/
- id = _clutter_script_get_id_from_node (node);
- if (id == NULL || *id == '\0')
+ id_ = _clutter_script_get_id_from_node (node);
+ if (id_ == NULL || *id_ == '\0')
return FALSE;
- oinfo = _clutter_script_get_object_info (script, id);
+ oinfo = _clutter_script_get_object_info (script, id_);
if (oinfo == NULL || oinfo->gtype == G_TYPE_INVALID )
return FALSE;
@@ -1806,13 +1806,13 @@ _clutter_script_check_unresolved (ClutterScript *script,
{
GObject *child = l->data;
ObjectInfo *child_info;
- const gchar *id;
+ const gchar *id_;
- id = clutter_get_script_id (child);
- if (id == NULL || *id == '\0')
+ id_ = clutter_get_script_id (child);
+ if (id_ == NULL || *id_ == '\0')
continue;
- child_info = _clutter_script_get_object_info (script, id);
+ child_info = _clutter_script_get_object_info (script, id_);
if (child_info == NULL)
continue;
diff --git a/clutter/clutter-script.c b/clutter/clutter-script.c
index 282c85034..5ba91d60a 100644
--- a/clutter/clutter-script.c
+++ b/clutter/clutter-script.c
@@ -1196,7 +1196,7 @@ _clutter_script_generate_fake_id (ClutterScript *script)
/*
* _clutter_script_warn_missing_attribute:
* @script: a #ClutterScript
- * @id: the id of an object definition, or %NULL
+ * @id_: the id of an object definition, or %NULL
* @attribute: the expected attribute
*
* Emits a warning, using GLib's log facilities, for a missing
@@ -1205,19 +1205,19 @@ _clutter_script_generate_fake_id (ClutterScript *script)
*/
void
_clutter_script_warn_missing_attribute (ClutterScript *script,
- const gchar *id,
+ const gchar *id_,
const gchar *attribute)
{
ClutterScriptPrivate *priv = script->priv;
JsonParser *parser = JSON_PARSER (priv->parser);
gint current_line = json_parser_get_current_line (parser);
- if (id != NULL && *id != '\0')
+ if (id_ != NULL && *id_ != '\0')
{
g_warning ("%s:%d: object '%s' has no '%s' attribute",
priv->is_filename ? priv->filename : "<input>",
current_line,
- id,
+ id_,
attribute);
}
else
diff --git a/clutter/clutter-scriptable.c b/clutter/clutter-scriptable.c
index 082aebade..501f1df24 100644
--- a/clutter/clutter-scriptable.c
+++ b/clutter/clutter-scriptable.c
@@ -63,9 +63,9 @@ clutter_scriptable_default_init (ClutterScriptableInterface *iface)
/**
* clutter_scriptable_set_id:
* @scriptable: a #ClutterScriptable
- * @id: the #ClutterScript id of the object
+ * @id_: the #ClutterScript id of the object
*
- * Sets @id as the unique Clutter script it for this instance of
+ * Sets @id_ as the unique Clutter script it for this instance of
* #ClutterScriptableIface.
*
* This name can be used by user interface designer applications to
@@ -76,20 +76,20 @@ clutter_scriptable_default_init (ClutterScriptableInterface *iface)
*/
void
clutter_scriptable_set_id (ClutterScriptable *scriptable,
- const gchar *id)
+ const gchar *id_)
{
ClutterScriptableIface *iface;
g_return_if_fail (CLUTTER_IS_SCRIPTABLE (scriptable));
- g_return_if_fail (id != NULL);
+ g_return_if_fail (id_ != NULL);
iface = CLUTTER_SCRIPTABLE_GET_IFACE (scriptable);
if (iface->set_id)
- iface->set_id (scriptable, id);
+ iface->set_id (scriptable, id_);
else
g_object_set_data_full (G_OBJECT (scriptable),
"clutter-script-id",
- g_strdup (id),
+ g_strdup (id_),
g_free);
}
diff --git a/clutter/clutter-scriptable.h b/clutter/clutter-scriptable.h
index 5817ee746..e2c5ff1fe 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 *id);
+ const gchar *id_);
const gchar *(* get_id) (ClutterScriptable *scriptable);
gboolean (* parse_custom_node) (ClutterScriptable *scriptable,
@@ -90,7 +90,7 @@ struct _ClutterScriptableIface
GType clutter_scriptable_get_type (void) G_GNUC_CONST;
void clutter_scriptable_set_id (ClutterScriptable *scriptable,
- const gchar *id);
+ const gchar *id_);
G_CONST_RETURN gchar *clutter_scriptable_get_id (ClutterScriptable *scriptable);
gboolean clutter_scriptable_parse_custom_node (ClutterScriptable *scriptable,
ClutterScript *script,
diff --git a/clutter/clutter-state.c b/clutter/clutter-state.c
index b722281d7..70806bb5b 100644
--- a/clutter/clutter-state.c
+++ b/clutter/clutter-state.c
@@ -1865,13 +1865,13 @@ parse_state_transition (JsonArray *array,
if (json_object_has_member (object, "animator"))
{
- const gchar *id = json_object_get_string_member (object, "animator");
+ const gchar *id_ = json_object_get_string_member (object, "animator");
GObject *animator;
- animator = clutter_script_get_object (clos->script, id);
+ animator = clutter_script_get_object (clos->script, id_);
if (animator == NULL)
{
- g_warning ("No object with id '%s' has been defined.", id);
+ g_warning ("No object with id '%s' has been defined.", id_);
return;
}
@@ -1907,16 +1907,16 @@ parse_state_transition (JsonArray *array,
ClutterStateKey *state_key;
GObject *gobject;
GParamSpec *pspec;
- const gchar *id;
+ const gchar *id_;
const gchar *property;
gulong mode;
gboolean res;
- id = json_array_get_string_element (key, 0);
- gobject = clutter_script_get_object (clos->script, id);
+ id_ = json_array_get_string_element (key, 0);
+ gobject = clutter_script_get_object (clos->script, id_);
if (gobject == NULL)
{
- g_warning ("No object with id '%s' has been defined.", id);
+ g_warning ("No object with id '%s' has been defined.", id_);
continue;
}
@@ -1928,7 +1928,7 @@ parse_state_transition (JsonArray *array,
g_warning ("The object of type '%s' and name '%s' has no "
"property named '%s'.",
G_OBJECT_TYPE_NAME (gobject),
- id,
+ id_,
property);
continue;
}
@@ -1949,7 +1949,7 @@ parse_state_transition (JsonArray *array,
g_warning ("Unable to parse the key value for the "
"property '%s' of object '%s' at index %d",
property,
- id,
+ id_,
index_);
clutter_state_key_free (state_key);
continue;
diff --git a/clutter/clutter-timeout-pool.c b/clutter/clutter-timeout-pool.c
index 540b32143..6ef839b8e 100644
--- a/clutter/clutter-timeout-pool.c
+++ b/clutter/clutter-timeout-pool.c
@@ -463,9 +463,9 @@ clutter_timeout_pool_add (ClutterTimeoutPool *pool,
/**
* clutter_timeout_pool_remove:
* @pool: a #ClutterTimeoutPool
- * @id: the id of the timeout to remove
+ * @id_: the id of the timeout to remove
*
- * Removes a timeout function with @id from the timeout pool. The id
+ * Removes a timeout function with @id_ from the timeout pool. The id
* is the same returned when adding a function to the timeout pool with
* clutter_timeout_pool_add().
*
@@ -475,18 +475,18 @@ clutter_timeout_pool_add (ClutterTimeoutPool *pool,
*/
void
clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
- guint id)
+ guint id_)
{
GList *l;
- if ((l = g_list_find_custom (pool->timeouts, GUINT_TO_POINTER (id),
+ if ((l = g_list_find_custom (pool->timeouts, GUINT_TO_POINTER (id_),
clutter_timeout_find_by_id)))
{
clutter_timeout_unref (l->data);
pool->timeouts = g_list_delete_link (pool->timeouts, l);
}
else if ((l = g_list_find_custom (pool->dispatched_timeouts,
- GUINT_TO_POINTER (id),
+ GUINT_TO_POINTER (id_),
clutter_timeout_find_by_id)))
{
clutter_timeout_unref (l->data);
diff --git a/clutter/clutter-timeout-pool.h b/clutter/clutter-timeout-pool.h
index 23f22122a..0268ab833 100644
--- a/clutter/clutter-timeout-pool.h
+++ b/clutter/clutter-timeout-pool.h
@@ -60,7 +60,7 @@ guint clutter_timeout_pool_add (ClutterTimeoutPool *pool,
gpointer data,
GDestroyNotify notify);
void clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
- guint id);
+ guint id_);
#endif /* CLUTTER_DISABLE_DEPRECATED */