summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-04-09 16:37:16 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-04-09 16:37:16 -0400
commit128338952eb78aaea77834757f8ce134864ce5ac (patch)
treea72423a79f4204c235b04f19a55dd4bef16cdaad
parente569758fef50b8e9d23b4bb10b6efa88537ea8a8 (diff)
remove cslider widget
no longer used
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/bin/Makefile.mk2
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_widget_cslider.c641
-rw-r--r--src/bin/e_widget_cslider.h9
5 files changed, 0 insertions, 654 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0d1f11f..c59c782 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -103,7 +103,6 @@ src/bin/e_widget_button.c
103src/bin/e_widget_check.c 103src/bin/e_widget_check.c
104src/bin/e_widget_color_well.c 104src/bin/e_widget_color_well.c
105src/bin/e_widget_config_list.c 105src/bin/e_widget_config_list.c
106src/bin/e_widget_cslider.c
107src/bin/e_widget_entry.c 106src/bin/e_widget_entry.c
108src/bin/e_widget_filepreview.c 107src/bin/e_widget_filepreview.c
109src/bin/e_widget_font_preview.c 108src/bin/e_widget_font_preview.c
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index a2ff154..105c380 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -167,7 +167,6 @@ src/bin/e_widget_button.h \
167src/bin/e_widget_check.h \ 167src/bin/e_widget_check.h \
168src/bin/e_widget_color_well.h \ 168src/bin/e_widget_color_well.h \
169src/bin/e_widget_config_list.h \ 169src/bin/e_widget_config_list.h \
170src/bin/e_widget_cslider.h \
171src/bin/e_widget_bgpreview.h \ 170src/bin/e_widget_bgpreview.h \
172src/bin/e_widget_entry.h \ 171src/bin/e_widget_entry.h \
173src/bin/e_widget_filepreview.h \ 172src/bin/e_widget_filepreview.h \
@@ -328,7 +327,6 @@ src/bin/e_widget.c \
328src/bin/e_widget_check.c \ 327src/bin/e_widget_check.c \
329src/bin/e_widget_color_well.c \ 328src/bin/e_widget_color_well.c \
330src/bin/e_widget_config_list.c \ 329src/bin/e_widget_config_list.c \
331src/bin/e_widget_cslider.c \
332src/bin/e_widget_bgpreview.c \ 330src/bin/e_widget_bgpreview.c \
333src/bin/e_widget_entry.c \ 331src/bin/e_widget_entry.c \
334src/bin/e_widget_filepreview.c \ 332src/bin/e_widget_filepreview.c \
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index a8d21f9..6218768 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -104,7 +104,6 @@
104#include "e_color.h" 104#include "e_color.h"
105#include "e_spectrum.h" 105#include "e_spectrum.h"
106#include "e_widget_spectrum.h" 106#include "e_widget_spectrum.h"
107#include "e_widget_cslider.h"
108#include "e_widget_color_well.h" 107#include "e_widget_color_well.h"
109#include "e_color_dialog.h" 108#include "e_color_dialog.h"
110#include "e_sys.h" 109#include "e_sys.h"
diff --git a/src/bin/e_widget_cslider.c b/src/bin/e_widget_cslider.c
deleted file mode 100644
index 0eff975..0000000
--- a/src/bin/e_widget_cslider.c
+++ /dev/null
@@ -1,641 +0,0 @@
1#include "e.h"
2
3typedef struct _E_Widget_Data E_Widget_Data;
4
5struct _E_Widget_Data
6{
7 Evas_Object *o_cslider;
8 Evas_Object *o_grad;
9 Evas_Object *o_event;
10
11 Evas_Coord x, y, w, h;
12
13 int vertical;
14 int fixed;
15 E_Color_Component mode;
16 int valnum;
17 E_Color *color;
18 E_Color *prev;
19
20 int dragging;
21};
22
23static void _e_wid_del_hook(Evas_Object *obj);
24static void _e_wid_focus_hook(Evas_Object *obj);
25static void _e_wid_disable_hook(Evas_Object *obj);
26static void _e_wid_focus_steal(void *data, Evas *e, Evas_Object *obj, void *event_info);
27static void _e_wid_value_set(Evas_Object *obj, double vx);
28static void _e_wid_update(E_Widget_Data *wd);
29static void _e_wid_update_standard(E_Widget_Data *wd);
30static void _e_wid_update_fixed(E_Widget_Data *wd);
31
32static void _e_wid_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
33static void _e_wid_resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
34static void _e_wid_cb_drag_start(void *data, Evas_Object *obj, const char *emission, const char *source);
35static void _e_wid_cb_drag_stop(void *data, Evas_Object *obj, const char *emission, const char *source);
36static void _e_wid_cb_drag(void *data, Evas_Object *obj, const char *emission, const char *source);
37
38static void _e_wid_cb_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
39static void _e_wid_cb_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
40static void _e_wid_cb_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
41
42Evas_Object *
43e_widget_cslider_add(Evas *evas, E_Color_Component mode, E_Color *color, int vertical, int fixed)
44{
45 Evas_Object *obj, *o;
46 E_Widget_Data *wd;
47 Evas_Coord mw, mh;
48
49 obj = e_widget_add(evas);
50
51 e_widget_del_hook_set(obj, _e_wid_del_hook);
52 e_widget_focus_hook_set(obj, _e_wid_focus_hook);
53 e_widget_disable_hook_set(obj, _e_wid_disable_hook);
54 wd = calloc(1, sizeof(E_Widget_Data));
55 e_widget_data_set(obj, wd);
56
57 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _e_wid_resize, wd);
58
59 wd->vertical = vertical;
60 wd->fixed = fixed;
61 wd->mode = mode;
62 wd->color = color;
63 wd->prev = calloc(1, sizeof (E_Color));
64
65 o = edje_object_add(evas);
66 wd->o_cslider = o;
67 e_theme_edje_object_set(o, "base/theme/widgets",
68 "e/widgets/cslider");
69 if (wd->vertical)
70 edje_object_signal_emit(o, "e,state,direction,v", "e");
71 else
72 edje_object_signal_emit(o, "e,state,direction,h", "e");
73 evas_object_show(o);
74 edje_object_size_min_calc(o, &mw, &mh);
75 e_widget_size_min_set(obj, mw, mh);
76 evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _e_wid_move, wd);
77 evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _e_wid_resize, wd);
78
79 edje_object_signal_callback_add(wd->o_cslider, "drag,start", "*", _e_wid_cb_drag_start, obj);
80 edje_object_signal_callback_add(wd->o_cslider, "drag", "*", _e_wid_cb_drag, obj);
81 edje_object_signal_callback_add(wd->o_cslider, "drag,stop", "*", _e_wid_cb_drag_stop, obj);
82
83 e_widget_sub_object_add(obj, o);
84 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_wid_focus_steal, obj);
85 e_widget_resize_object_set(obj, o);
86
87 /* add gradient obj */
88 o = evas_object_image_filled_add(evas);
89 e_widget_sub_object_add(obj, o);
90 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_wid_cb_down, obj);
91 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE, _e_wid_cb_move, obj);
92 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _e_wid_cb_up, obj);
93 evas_object_color_set(o, 255, 255, 255, 255);
94 wd->o_grad = o;
95
96 edje_object_part_swallow(wd->o_cslider, "e.swallow.content", o);
97
98 o = evas_object_rectangle_add(evas);
99 evas_object_repeat_events_set(o, EINA_TRUE);
100 e_widget_sub_object_add(obj, o);
101 evas_object_show(o);
102 evas_object_color_set(o, 0, 0, 0, 0);
103 wd->o_event = o;
104
105 _e_wid_update(wd);
106
107 return obj;
108}
109
110static void
111_e_wid_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
112{
113 E_Widget_Data *wd;
114 Evas_Coord x, y;
115
116 wd = data;
117 evas_object_geometry_get(obj, &x, &y, NULL, NULL);
118 evas_object_move(wd->o_event, x, y);
119 _e_wid_update(wd);
120}
121
122static void
123_e_wid_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
124{
125 E_Widget_Data *wd;
126 Evas_Coord w, h;
127
128 wd = data;
129 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
130 evas_object_resize(wd->o_event, w, h);
131 _e_wid_update(wd);
132}
133
134static void
135_e_wid_value_set(Evas_Object *o, double vx)
136{
137 E_Widget_Data *wd;
138
139 wd = e_widget_data_get(o);
140 switch (wd->mode)
141 {
142 case E_COLOR_COMPONENT_R:
143 wd->color->r = 255 * vx;
144 e_color_update_rgb(wd->color);
145 break;
146
147 case E_COLOR_COMPONENT_G:
148 wd->color->g = 255 * vx;
149 e_color_update_rgb(wd->color);
150 break;
151
152 case E_COLOR_COMPONENT_B:
153 wd->color->b = 255 * vx;
154 e_color_update_rgb(wd->color);
155 break;
156
157 case E_COLOR_COMPONENT_H:
158 wd->color->h = 360 * vx;
159 e_color_update_hsv(wd->color);
160 break;
161
162 case E_COLOR_COMPONENT_S:
163 wd->color->s = vx;
164 e_color_update_hsv(wd->color);
165 break;
166
167 case E_COLOR_COMPONENT_V:
168 wd->color->v = vx;
169 e_color_update_hsv(wd->color);
170 break;
171
172 case E_COLOR_COMPONENT_MAX:
173 break;
174 }
175
176 _e_wid_update(wd);
177 e_widget_change(o);
178}
179
180void
181e_widget_cslider_color_value_set(Evas_Object *obj, E_Color *val)
182{
183 E_Widget_Data *wd;
184
185 wd = e_widget_data_get(obj);
186 wd->color = val;
187 _e_wid_update(wd);
188}
189
190void
191e_widget_cslider_update(Evas_Object *obj)
192{
193 E_Widget_Data *wd;
194
195 wd = e_widget_data_get(obj);
196 _e_wid_update(wd);
197}
198
199void
200e_widget_cslider_mode_set(Evas_Object *obj, E_Color_Component mode)
201{
202 E_Widget_Data *wd;
203
204 wd = e_widget_data_get(obj);
205 if (wd->mode == mode) return;
206 wd->mode = mode;
207 _e_wid_update(wd);
208}
209
210static void
211_e_wid_update(E_Widget_Data *wd)
212{
213 Evas_Coord x, y, w, h;
214 Eina_Bool changed = EINA_FALSE;
215
216 evas_object_geometry_get(wd->o_event, &x, &y, &w, &h);
217 if (x != wd->x || y != wd->y || w != wd->w || h != wd->h)
218 changed = EINA_TRUE;
219
220 if (memcmp(wd->color, wd->prev, sizeof (E_Color)))
221 changed = EINA_TRUE;
222
223 if (changed)
224 {
225 if (wd->fixed)
226 _e_wid_update_fixed(wd);
227 else
228 _e_wid_update_standard(wd);
229
230 wd->x = x; wd->y = y;
231 wd->w = w; wd->h = h;
232 memcpy(wd->prev, wd->color, sizeof (E_Color));
233 }
234}
235
236static void
237_e_wid_gradient_set(Evas_Object *o, Eina_Bool orientation,
238 int rf, int gf, int bf,
239 int rt, int gt, int bt)
240{
241 unsigned int *pixels, *p;
242 int x, r, g, b;
243
244 if (!orientation)
245 evas_object_image_size_set(o, 256, 1);
246 else
247 evas_object_image_size_set(o, 1, 256);
248 pixels = evas_object_image_data_get(o, EINA_TRUE);
249 if (pixels)
250 {
251 p = pixels;
252 for (x = 0; x < 256; x++)
253 {
254 r = ((rf * (255 - x)) + (rt * x)) / 255;
255 g = ((gf * (255 - x)) + (gt * x)) / 255;
256 b = ((bf * (255 - x)) + (bt * x)) / 255;
257 *p = 0xff000000 | (r << 16) | (g << 8) | (b);
258 p++;
259 }
260 evas_object_image_data_set(o, pixels);
261 evas_object_image_data_update_add(o, 0, 0, 256, 256);
262 }
263}
264
265static void
266_e_wid_gradient_range_set(Evas_Object *o, Eina_Bool orientation,
267 int rf, int gf, int bf,
268 int rt, int gt, int bt,
269 int from, int to)
270{
271 unsigned int *pixels, *p;
272 int x, r, g, b, v, t;
273
274 if (from < 0) from = 0;
275 if (from > 255) from = 255;
276 if (to < 0) to = 0;
277 if (to > 256) to = 256;
278 if (to <= from) return;
279 if (!orientation)
280 evas_object_image_size_set(o, 256, 1);
281 else
282 evas_object_image_size_set(o, 1, 256);
283 pixels = evas_object_image_data_get(o, EINA_TRUE);
284 if (pixels)
285 {
286 t = to - from;
287 p = pixels + from;
288 for (x = from; x < to; x++)
289 {
290 v = x - from;
291 r = ((rf * (t - v)) + (rt * v)) / t;
292 g = ((gf * (t - v)) + (gt * v)) / t;
293 b = ((bf * (t - v)) + (bt * v)) / t;
294 *p = 0xff000000 | (r << 16) | (g << 8) | (b);
295 p++;
296 }
297 evas_object_image_data_set(o, pixels);
298 evas_object_image_data_update_add(o, 0, 0, 256, 256);
299 }
300}
301
302static void
303_e_wid_update_standard(E_Widget_Data *wd)
304{
305 int r, g, b;
306 int rd, gd, bd;
307 int max, min;
308 unsigned int i;
309 float vx = 0;
310 int *grad[7][3] = {
311 { &max, &min, &min },
312 { &max, &max, &min },
313 { &min, &max, &min },
314 { &min, &max, &max },
315 { &min, &min, &max },
316 { &max, &min, &max },
317 { &max, &min, &min }
318 };
319
320 if (!wd->color) return;
321
322 switch (wd->mode)
323 {
324 case E_COLOR_COMPONENT_R:
325 _e_wid_gradient_set(wd->o_grad, wd->vertical,
326 0, wd->color->g, wd->color->b,
327 255, wd->color->g, wd->color->b);
328 vx = wd->color->r / 255.0;
329 break;
330
331 case E_COLOR_COMPONENT_G:
332 _e_wid_gradient_set(wd->o_grad, wd->vertical,
333 wd->color->r, 0, wd->color->b,
334 wd->color->r, 255, wd->color->b);
335 vx = wd->color->g / 255.0;
336 break;
337
338 case E_COLOR_COMPONENT_B:
339 _e_wid_gradient_set(wd->o_grad, wd->vertical,
340 wd->color->r, wd->color->g, 0,
341 wd->color->r, wd->color->g, 255);
342 vx = wd->color->b / 255.0;
343 break;
344
345 case E_COLOR_COMPONENT_H:
346 evas_color_hsv_to_rgb(0, wd->color->s, wd->color->v, &max, &min, NULL);
347 for (i = 0; i < 6; i++)
348 _e_wid_gradient_range_set(wd->o_grad, wd->vertical,
349 *grad[i][0], *grad[i][1], *grad[i][2],
350 *grad[i + 1][0], *grad[i + 1][1], *grad[i + 1][2],
351 ((i + 0) * 256) / 6,
352 ((i + 1) * 256) / 6);
353 vx = wd->color->h / 360.0;
354 break;
355
356 case E_COLOR_COMPONENT_S:
357 evas_color_hsv_to_rgb(wd->color->h, 0, wd->color->v, &r, &g, &b);
358 evas_color_hsv_to_rgb(wd->color->h, 1, wd->color->v, &rd, &gd, &bd);
359
360 _e_wid_gradient_set(wd->o_grad, wd->vertical,
361 r, g, b,
362 rd, gd, bd);
363 vx = wd->color->s;
364 break;
365
366 case E_COLOR_COMPONENT_V:
367 evas_color_hsv_to_rgb(wd->color->h, wd->color->s, 0, &r, &g, &b);
368 evas_color_hsv_to_rgb(wd->color->h, wd->color->s, 1, &rd, &gd, &bd);
369
370 _e_wid_gradient_set(wd->o_grad, wd->vertical,
371 r, g, b,
372 rd, gd, bd);
373 vx = wd->color->v;
374 break;
375
376 default:
377 break;
378 }
379
380 edje_object_part_drag_value_set(wd->o_cslider, "e.dragable.cursor", vx, vx);
381 edje_object_message_signal_process(wd->o_cslider); /* really needed or go in infinite loop */
382}
383
384void
385_e_wid_update_fixed(E_Widget_Data *wd)
386{
387#define GMAX 255
388#define GMIN 0
389 unsigned int i;
390 float vx = 0;
391 int grad[7][3] = {
392 { GMAX, GMIN, GMIN },
393 { GMAX, GMIN, GMAX },
394 { GMIN, GMIN, GMAX },
395 { GMIN, GMAX, GMAX },
396 { GMIN, GMAX, GMIN },
397 { GMAX, GMAX, GMIN },
398 { GMAX, GMIN, GMIN }
399 };
400
401 if (!wd) return;
402
403 switch (wd->mode)
404 {
405 case E_COLOR_COMPONENT_R:
406 _e_wid_gradient_set(wd->o_grad, wd->vertical,
407 255, 0, 0,
408 0, 0, 0);
409 vx = wd->color->r / 255.0;
410 break;
411
412 case E_COLOR_COMPONENT_G:
413 _e_wid_gradient_set(wd->o_grad, wd->vertical,
414 0, 255, 0,
415 0, 0, 0);
416 vx = wd->color->g / 255.0;
417 break;
418
419 case E_COLOR_COMPONENT_B:
420 _e_wid_gradient_set(wd->o_grad, wd->vertical,
421 0, 0, 255,
422 0, 0, 0);
423 vx = wd->color->b / 255.0;
424 break;
425
426 case E_COLOR_COMPONENT_H:
427 /*
428 * Color Stops:
429 * 0 x n n
430 * 60 x x n
431 * 120 n x n
432 * 180 n x x
433 * 240 n n x
434 * 300 x n x
435 * 360 x n n
436 */
437 for (i = 0; i < 6; i++)
438 _e_wid_gradient_range_set(wd->o_grad, wd->vertical,
439 grad[i][0], grad[i][1], grad[i][2],
440 grad[i + 1][0], grad[i + 1][1], grad[i + 1][2],
441 ((i + 0) * 256) / 6,
442 ((i + 1) * 256) / 6);
443 vx = wd->color->h / 360.0;
444 break;
445
446 case E_COLOR_COMPONENT_S:
447 _e_wid_gradient_set(wd->o_grad, wd->vertical,
448 255, 255, 255,
449 0, 0, 0);
450 vx = wd->color->s;
451 break;
452
453 case E_COLOR_COMPONENT_V:
454 _e_wid_gradient_set(wd->o_grad, wd->vertical,
455 255, 255, 255,
456 0, 0, 0);
457 vx = wd->color->v;
458 break;
459
460 default:
461 break;
462 }
463
464 edje_object_part_drag_value_set(wd->o_cslider, "e.dragable.cursor", vx, vx);
465
466#undef GMAX
467#undef GMIN
468}
469
470static void
471_e_wid_del_hook(Evas_Object *obj)
472{
473 E_Widget_Data *wd;
474
475 wd = e_widget_data_get(obj);
476 free(wd);
477}
478
479static void
480_e_wid_focus_hook(Evas_Object *obj)
481{
482 E_Widget_Data *wd;
483
484 wd = e_widget_data_get(obj);
485 if (e_widget_focus_get(obj))
486 {
487 edje_object_signal_emit(wd->o_cslider, "e,state,focused", "e");
488 evas_object_focus_set(wd->o_cslider, 1);
489 }
490 else
491 {
492 edje_object_signal_emit(wd->o_cslider, "e,state,unfocused", "e");
493 evas_object_focus_set(wd->o_cslider, 0);
494 }
495}
496
497static void
498_e_wid_disable_hook(Evas_Object *obj)
499{
500 E_Widget_Data *wd;
501
502 wd = e_widget_data_get(obj);
503 if (e_widget_disabled_get(obj))
504 edje_object_signal_emit(wd->o_cslider, "e,state,disabled", "e");
505 else
506 edje_object_signal_emit(wd->o_cslider, "e,state,enabled", "e");
507}
508
509static void
510_e_wid_focus_steal(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
511{
512 e_widget_focus_steal(data);
513}
514
515static void
516_e_wid_cb_drag_start(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
517{
518 Evas_Object *o_wid;
519 E_Widget_Data *wd;
520 double val, valx, valy;
521
522 o_wid = data;
523 wd = e_widget_data_get(o_wid);
524 wd->dragging = 1;
525
526 edje_object_part_drag_value_get(wd->o_cslider, "e.dragable.cursor",
527 &valx, &valy);
528 if (wd->vertical) val = valy;
529 else val = valx;
530 if (val > 1) val = 1;
531 if (val < 0) val = 0;
532 _e_wid_value_set(o_wid, val);
533}
534
535static void
536_e_wid_cb_drag_stop(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
537{
538 Evas_Object *o_wid;
539 E_Widget_Data *wd;
540
541 o_wid = data;
542 wd = e_widget_data_get(o_wid);
543 wd->dragging = 0;
544}
545
546static void
547_e_wid_cb_drag(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
548{
549 Evas_Object *o_wid;
550 E_Widget_Data *wd;
551
552 o_wid = data;
553 wd = e_widget_data_get(o_wid);
554
555 if (wd->dragging == 1)
556 {
557 double val, valx, valy;
558
559 edje_object_part_drag_value_get(wd->o_cslider, "e.dragable.cursor",
560 &valx, &valy);
561 if (wd->vertical) val = valy;
562 else val = valx;
563 if (val > 1) val = 1;
564 if (val < 0) val = 0;
565 _e_wid_value_set(o_wid, val);
566 }
567}
568
569static void
570_e_wid_mouse_handle(Evas_Object *obj, int mx, int my)
571{
572 E_Widget_Data *wd;
573 Evas_Coord x, y, w, h;
574 double vx = 0.0, vy = 0.0;
575
576 wd = e_widget_data_get(obj);
577
578 evas_object_geometry_get(wd->o_grad, &x, &y, &w, &h);
579 if (w > 1) vx = (mx - x) / (double)(w - 1);
580 if (h > 1) vy = (my - y) / (double)(h - 1);
581 if (vx > 1) vx = 1;
582 if (vx < 0) vx = 0;
583 if (vy > 1) vy = 1;
584 if (vy < 0) vy = 0;
585
586 if (wd->vertical)
587 {
588 _e_wid_value_set(obj, 1.0 - vy);
589 edje_object_part_drag_value_set(wd->o_cslider, "e.dragable.cursor", 0.5, 1.0 - vy);
590 }
591 else
592 {
593 _e_wid_value_set(obj, vx);
594 edje_object_part_drag_value_set(wd->o_cslider, "e.dragable.cursor", vx, 0.5);
595 }
596 e_widget_change(obj);
597}
598
599static void
600_e_wid_cb_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
601{
602 Evas_Event_Mouse_Down *ev;
603 Evas_Object *o_wid;
604 E_Widget_Data *wd;
605
606 o_wid = data;
607 wd = e_widget_data_get(o_wid);
608 ev = event_info;
609
610 wd->dragging = 1;
611 _e_wid_mouse_handle(o_wid, ev->canvas.x, ev->canvas.y);
612}
613
614static void
615_e_wid_cb_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
616{
617 Evas_Object *o_wid;
618 E_Widget_Data *wd;
619
620 o_wid = data;
621 wd = e_widget_data_get(o_wid);
622 wd->dragging = 0;
623}
624
625static void
626_e_wid_cb_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
627{
628 Evas_Event_Mouse_Move *ev;
629 Evas_Object *o_wid;
630 E_Widget_Data *wd;
631
632 o_wid = data;
633 wd = e_widget_data_get(o_wid);
634 ev = event_info;
635
636 if (wd->dragging == 1)
637 {
638 _e_wid_mouse_handle(o_wid, ev->cur.canvas.x, ev->cur.canvas.y);
639 }
640}
641
diff --git a/src/bin/e_widget_cslider.h b/src/bin/e_widget_cslider.h
deleted file mode 100644
index 31da6ff..0000000
--- a/src/bin/e_widget_cslider.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef E_WIDGET_CSLIDER_H
2#define E_WIDGET_CSLIDER_H
3
4Evas_Object * e_widget_cslider_add(Evas *e, E_Color_Component mode, E_Color *color, int vertical, int fixed);
5void e_widget_cslider_color_value_set(Evas_Object *obj, E_Color *ec);
6void e_widget_cslider_update(Evas_Object *obj);
7void e_widget_cslider_mode_set(Evas_Object *obj, E_Color_Component mode);
8
9#endif