aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl/interfaces/efl_gfx_color.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-12-29 13:06:44 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2018-01-02 15:41:34 +0900
commit44b6aa16c1054b545583408c31c4243144852960 (patch)
tree30ab47885f4ba544a5246ddfd638187d4001847b /src/lib/efl/interfaces/efl_gfx_color.c
parentefl loop - make param as unused to remove warning (diff)
downloadefl-44b6aa16c1054b545583408c31c4243144852960.tar.gz
Efl.Gfx.Color: add color_class_code.set/get{} method
Diffstat (limited to 'src/lib/efl/interfaces/efl_gfx_color.c')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_color.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_color.c b/src/lib/efl/interfaces/efl_gfx_color.c
index 1e65f62977..91f8a4fd32 100644
--- a/src/lib/efl/interfaces/efl_gfx_color.c
+++ b/src/lib/efl/interfaces/efl_gfx_color.c
@@ -117,4 +117,27 @@ _efl_gfx_color_color_code_get(Eo *obj, void *_pd EINA_UNUSED)
return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a);
}
-#include "interfaces/efl_gfx_color.eo.c" \ No newline at end of file
+EOLIAN static void
+_efl_gfx_color_color_class_code_set(Eo *obj, void *_pd EINA_UNUSED, const char *color_class,
+ Efl_Gfx_Color_Class_Layer layer, const char *colorcode)
+{
+ int len;
+ unsigned char r, g, b, a;
+
+ len = _format_clean_param(colorcode);
+
+ _format_color_parse(colorcode, len, &r, &g, &b, &a);
+ efl_gfx_color_class_set(obj, color_class, layer, r, g, b, a);
+}
+
+EOLIAN static const char *
+_efl_gfx_color_color_class_code_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
+ const char *color_class, Efl_Gfx_Color_Class_Layer layer)
+{
+ int r, g, b, a;
+
+ efl_gfx_color_class_get(obj, color_class, layer, &r, &g, &b, &a);
+ return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a);
+}
+
+#include "interfaces/efl_gfx_color.eo.c"