Enlightenment CVS committal Author : rephorm Project : e17 Module : apps/elicit
Dir : e17/apps/elicit/src Modified Files: callbacks.c callbacks.h conf.c conf.h elicit.c Log Message: elicit's winter theme is now color classed. middle click on the main swatch to set the borders to that color. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/callbacks.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- callbacks.c 14 Aug 2004 16:29:02 -0000 1.16 +++ callbacks.c 7 Mar 2005 00:51:25 -0000 1.17 @@ -290,6 +290,16 @@ } void +elicit_cb_colorclass(void *data, Evas_Object *o, const char *sig, const char *src) +{ + Elicit *el = data; + + edje_object_color_class_set(el->gui, "border", el->color.r, el->color.g, el->color.b, 255, 0, 0, 0, 0, 0, 0, 0, 0); + elicit_config_colorclass_set(el->color.r, el->color.g, el->color.b); +} + + +void elicit_cb_freeze(void *data, Evas_Object *o, const char *sig, const char *src) { Elicit *el = data; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/callbacks.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- callbacks.h 14 Aug 2004 16:29:02 -0000 1.7 +++ callbacks.h 7 Mar 2005 00:51:25 -0000 1.8 @@ -20,5 +20,6 @@ void elicit_cb_freeze(void *data, Evas_Object *o, const char *sig, const char *src); void elicit_cb_thaw(void *data, Evas_Object *o, const char *sig, const char *src); void elicit_cb_size_min(void *data, Evas_Object *o, const char *sig, const char *src); +void elicit_cb_colorclass(void *data, Evas_Object *o, const char *sig, const char *src); #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/conf.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- conf.c 12 Aug 2004 22:26:30 -0000 1.10 +++ conf.c 7 Mar 2005 00:51:25 -0000 1.11 @@ -24,6 +24,9 @@ ecore_config_float_default("/settings/zoom_max", 20.0); ecore_config_theme_default("/settings/theme", "winter"); ecore_config_theme_preview_group_set("/settings/theme", "elicit"); + ecore_config_int_default("/colorclass/r", 229); + ecore_config_int_default("/colorclass/g", 239); + ecore_config_int_default("/colorclass/b", 255); ecore_config_load(); } @@ -99,6 +102,22 @@ ecore_config_int_set("/color/b", b); } +void +elicit_config_colorclass_get(int *r, int *g, int *b) +{ + if (r) *r = ecore_config_int_get("/colorclass/r"); + if (g) *g = ecore_config_int_get("/colorclass/g"); + if (b) *b = ecore_config_int_get("/colorclass/b"); +} + +void +elicit_config_colorclass_set(int r, int g, int b) +{ + ecore_config_int_set("/colorclass/r", r); + ecore_config_int_set("/colorclass/g", g); + ecore_config_int_set("/colorclass/b", b); +} + static int elicit_config_listener(const char *key, const Ecore_Config_Type type, const int tag, void *data) { =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/conf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- conf.h 12 Feb 2004 05:37:05 -0000 1.3 +++ conf.h 7 Mar 2005 00:51:25 -0000 1.4 @@ -26,5 +26,8 @@ void elicit_config_zoom_max_set(double zoom_max); double elicit_config_zoom_max_get(); +void elicit_config_colorclass_get(int *r, int *g, int *b); +void elicit_config_colorclass_set(int r, int g, int b); + #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/elicit.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- elicit.c 14 Aug 2004 16:29:02 -0000 1.19 +++ elicit.c 7 Mar 2005 00:51:25 -0000 1.20 @@ -112,6 +112,12 @@ el->zoom = elicit_config_zoom_get(); el->zoom_max = elicit_config_zoom_max_get(); + /* load up the colorclass */ + { + int r, g, b; + elicit_config_colorclass_get(&r, &g, &b); + edje_object_color_class_set(el->gui, "border", r, g, b, 255, 0, 0, 0, 0, 0, 0, 0, 0); + } /* create the swatch and shot objects */ el->shot = evas_object_image_add(el->evas); evas_object_name_set(el->shot, "shot"); @@ -189,6 +195,7 @@ edje_object_signal_callback_add(el->gui, "elicit,freeze", "*", elicit_cb_freeze, el); edje_object_signal_callback_add(el->gui, "elicit,thaw", "*", elicit_cb_thaw, el); edje_object_signal_callback_add(el->gui, "elicit,size,min,*", "*", elicit_cb_size_min, el); + edje_object_signal_callback_add(el->gui, "elicit,colorclass", "*", elicit_cb_colorclass, el); edje_object_signal_callback_add(el->gui, "elicit,swatch,save", "*", elicit_swatch_save_cb, el); edje_object_signal_callback_add(el->gui, "elicit,shot,save", "*", elicit_shot_save_cb, el); ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs