aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl/interfaces/efl_gfx_color.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2018-01-16 14:16:23 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2018-01-16 18:03:23 +0900
commit62b3813ae4ef0531cc47507c2a32a502f021340f (patch)
treeb925914f29b0a7a66197812141fceb8c67d2577a /src/lib/efl/interfaces/efl_gfx_color.c
parentEfl.Gfx.color: move the common code to util file. (diff)
downloadefl-devs/ami/color.tar.gz
Efl.Gfx.Color_Class: move color_class_code{} to color_class intf.devs/ami/color
Ideally it should have belong to color_class interface from beginning.
Diffstat (limited to 'src/lib/efl/interfaces/efl_gfx_color.c')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_color.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_color.c b/src/lib/efl/interfaces/efl_gfx_color.c
index ab679cdf41..f55309fae4 100644
--- a/src/lib/efl/interfaces/efl_gfx_color.c
+++ b/src/lib/efl/interfaces/efl_gfx_color.c
@@ -2,31 +2,13 @@
#include "Efl.h"
#include "efl_gfx_color_internal.h"
-static int
-_format_clean_param(Eina_Tmpstr *s)
-{
- Eina_Tmpstr *ss;
- char *ds;
- int len = 0;
-
- ds = (char*) s;
- for (ss = s; *ss; ss++, ds++, len++)
- {
- if ((*ss == '\\') && *(ss + 1)) ss++;
- if (ds != ss) *ds = *ss;
- }
- *ds = 0;
-
- return len;
-}
-
EOLIAN static void
_efl_gfx_color_color_code_set(Eo *obj, void *_pd EINA_UNUSED, const char *colorcode)
{
int len;
unsigned char r, g, b, a;
- len = _format_clean_param(colorcode);
+ len = _gfx_color_format_clean_param(colorcode);
_gfx_color_format_color_parse(colorcode, len, &r, &g, &b, &a);
efl_gfx_color_set(obj, r, g, b, a);
@@ -41,27 +23,4 @@ _efl_gfx_color_color_code_get(Eo *obj, void *_pd EINA_UNUSED)
return eina_slstr_printf("#%02X%02X%02X%02X", r, g, b, a);
}
-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);
-
- _gfx_color_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"