2008-10-21 Emmanuele Bassi <ebassi@linux.intel.com>

* clutter/clutter-color.[ch] (clutter_value_set_color): Constify
	colors and values where needed.
This commit is contained in:
Emmanuele Bassi 2008-10-21 18:50:44 +00:00
parent 3abaf6841f
commit 3ced5a9086
3 changed files with 23 additions and 17 deletions

View File

@ -1,3 +1,8 @@
2008-10-21 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-color.[ch] (clutter_value_set_color): Constify
colors and values where needed.
2008-10-21 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1197 - Missing const for clutter_init_with_args *

View File

@ -779,8 +779,8 @@ clutter_value_lcopy_color (const GValue *value,
* Since: 1.0
*/
void
clutter_value_set_color (GValue *value,
ClutterColor *color)
clutter_value_set_color (GValue *value,
const ClutterColor *color)
{
g_return_if_fail (CLUTTER_VALUE_HOLDS_COLOR (value));
@ -797,7 +797,7 @@ clutter_value_set_color (GValue *value,
*
* Since: 1.0
*/
const ClutterColor *
G_CONST_RETURN ClutterColor *
clutter_value_get_color (const GValue *value)
{
g_return_val_if_fail (CLUTTER_VALUE_HOLDS_COLOR (value), NULL);

View File

@ -107,13 +107,9 @@ guint32 clutter_color_to_pixel (const ClutterColor *src);
void clutter_color_from_pixel (ClutterColor *dest,
guint32 pixel);
#define CLUTTER_TYPE_PARAM_COLOR (clutter_param_color_get_type ())
#define CLUTTER_PARAM_SPEC_COLOR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), CLUTTER_TYPE_PARAM_COLOR, ClutterParamSpecColor))
#define CLUTTER_IS_PARAM_SPEC_COLOR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), CLUTTER_TYPE_PARAM_COLOR))
#define CLUTTER_VALUE_HOLDS_COLOR(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_COLOR))
/**
* CLUTTER_VALUE_HOLDS_COLOR:
@ -123,12 +119,18 @@ void clutter_color_from_pixel (ClutterColor *dest,
*
* Since: 1.0
*/
#define CLUTTER_VALUE_HOLDS_COLOR(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_COLOR))
typedef struct _ClutterParamSpecColor ClutterParamSpecColor;
/**
* ClutterParamSpecColor:
* @default_value: default color value
*
* A #GParamSpec subclass for defining properties holding
* a #ClutterColor.
*
* Since: 1.0
*/
struct _ClutterParamSpecColor
{
@ -139,17 +141,16 @@ struct _ClutterParamSpecColor
ClutterColor *default_value;
};
GType clutter_param_color_get_type (void) G_GNUC_CONST;
void clutter_value_set_color (GValue *value,
const ClutterColor *color);
G_CONST_RETURN ClutterColor *clutter_value_get_color (const GValue *value);
void clutter_value_set_color (GValue *value,
ClutterColor *color);
const ClutterColor *clutter_value_get_color (const GValue *value);
GParamSpec *clutter_param_spec_color (const gchar *name,
const gchar *nick,
const gchar *blurb,
const ClutterColor *default_value,
GParamFlags flags);
GType clutter_param_color_get_type (void) G_GNUC_CONST;
GParamSpec *clutter_param_spec_color (const gchar *name,
const gchar *nick,
const gchar *blurb,
const ClutterColor *default_value,
GParamFlags flags);
G_END_DECLS