[Cogl] [PATCH 4/4] Remove the deprecated symbols from CoglColor

Damien Lespiau damien.lespiau at gmail.com
Wed May 30 03:47:04 PDT 2012


From: Damien Lespiau <damien.lespiau at intel.com>

set_from_*() have been deprecated in favour of init_from_*() for
consistency sake. Also adds the init_from_() symbols to the
documentation.
---
 cogl/cogl-color.c                      |   22 -----------------
 cogl/cogl-color.h                      |   40 --------------------------------
 cogl/cogl.symbols                      |    2 -
 doc/reference/cogl2/cogl2-sections.txt |    5 ++-
 examples/cogl-crate.c                  |    2 +-
 5 files changed, 4 insertions(+), 67 deletions(-)

diff --git a/cogl/cogl-color.c b/cogl/cogl-color.c
index e969330..ed4dd46 100644
--- a/cogl/cogl-color.c
+++ b/cogl/cogl-color.c
@@ -68,17 +68,6 @@ cogl_color_init_from_4ub (CoglColor *color,
   color->alpha = alpha;
 }
 
-/* XXX: deprecated, use cogl_color_init_from_4ub */
-void
-cogl_color_set_from_4ub (CoglColor *dest,
-                         uint8_t red,
-                         uint8_t green,
-                         uint8_t blue,
-                         uint8_t alpha)
-{
-  cogl_color_init_from_4ub (dest, red, green, blue, alpha);
-}
-
 void
 cogl_color_init_from_4f (CoglColor *color,
                          float red,
@@ -94,17 +83,6 @@ cogl_color_init_from_4f (CoglColor *color,
   color->alpha =  (alpha * 255);
 }
 
-/* XXX: deprecated, use cogl_color_init_from_4f */
-void
-cogl_color_set_from_4f (CoglColor *color,
-                        float red,
-                        float green,
-                        float blue,
-                        float alpha)
-{
-  cogl_color_init_from_4f (color, red, green, blue, alpha);
-}
-
 void
 cogl_color_init_from_4fv (CoglColor *color,
                           float *color_array)
diff --git a/cogl/cogl-color.h b/cogl/cogl-color.h
index fe2dce1..964482a 100644
--- a/cogl/cogl-color.h
+++ b/cogl/cogl-color.h
@@ -100,26 +100,6 @@ cogl_color_init_from_4ub (CoglColor *color,
                           uint8_t alpha);
 
 /**
- * cogl_color_set_from_4ub:
- * @color: A pointer to a #CoglColor to initialize
- * @red: value of the red channel, between 0 and 255
- * @green: value of the green channel, between 0 and 255
- * @blue: value of the blue channel, between 0 and 255
- * @alpha: value of the alpha channel, between 0 and 255
- *
- * Sets the values of the passed channels into a #CoglColor.
- *
- * Since: 1.0
- * Deprecated: 1.4: Use cogl_color_init_from_4ub instead.
- */
-void
-cogl_color_set_from_4ub (CoglColor *color,
-                         uint8_t red,
-                         uint8_t green,
-                         uint8_t blue,
-                         uint8_t alpha);
-
-/**
  * cogl_color_init_from_4f:
  * @color: A pointer to a #CoglColor to initialize
  * @red: value of the red channel, between 0 and %1.0
@@ -139,26 +119,6 @@ cogl_color_init_from_4f (CoglColor *color,
                          float alpha);
 
 /**
- * cogl_color_set_from_4f:
- * @color: A pointer to a #CoglColor to initialize
- * @red: value of the red channel, between 0 and %1.0
- * @green: value of the green channel, between 0 and %1.0
- * @blue: value of the blue channel, between 0 and %1.0
- * @alpha: value of the alpha channel, between 0 and %1.0
- *
- * Sets the values of the passed channels into a #CoglColor
- *
- * Since: 1.0
- * Deprecated: 1.4: Use cogl_color_init_from_4f instead.
- */
-void
-cogl_color_set_from_4f (CoglColor *color,
-                        float red,
-                        float green,
-                        float blue,
-                        float alpha);
-
-/**
  * cogl_color_init_from_4fv:
  * @color: A pointer to a #CoglColor to initialize
  * @color_array: a pointer to an array of 4 float color components
diff --git a/cogl/cogl.symbols b/cogl/cogl.symbols
index 549f9e8..821bb31 100644
--- a/cogl/cogl.symbols
+++ b/cogl/cogl.symbols
@@ -131,8 +131,6 @@ cogl_color_set_alpha_float
 cogl_color_set_blue
 cogl_color_set_blue_byte
 cogl_color_set_blue_float
-cogl_color_set_from_4f
-cogl_color_set_from_4ub
 cogl_color_set_green
 cogl_color_set_green_byte
 cogl_color_set_green_float
diff --git a/doc/reference/cogl2/cogl2-sections.txt b/doc/reference/cogl2/cogl2-sections.txt
index 64c3944..856d9cb 100644
--- a/doc/reference/cogl2/cogl2-sections.txt
+++ b/doc/reference/cogl2/cogl2-sections.txt
@@ -448,8 +448,9 @@ CoglColor
 cogl_color_new
 cogl_color_copy
 cogl_color_free
-cogl_color_set_from_4ub
-cogl_color_set_from_4f
+cogl_color_init_from_4ub
+cogl_color_init_from_4f
+cogl_color_init_from_4fv
 
 <SUBSECTION>
 cogl_color_get_red
diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c
index 6b3c4aa..2b6c83e 100644
--- a/examples/cogl-crate.c
+++ b/examples/cogl-crate.c
@@ -200,7 +200,7 @@ main (int argc, char **argv)
 
   /* Initialize some convenient constants */
   cogl_matrix_init_identity (&identity);
-  cogl_color_set_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
+  cogl_color_init_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
 
   /* rectangle indices allow the GPU to interpret a list of quads (the
    * faces of our cube) as a list of triangles.
-- 
1.7.7.5



More information about the Cogl mailing list