From: Enlightenment S. <no-...@en...> - 2011-07-08 14:37:23
|
Log: Elementary: colorselector documentation. Author: gastal Date: 2011-07-08 07:37:16 -0700 (Fri, 08 Jul 2011) New Revision: 61156 Trac: http://trac.enlightenment.org/e/changeset/61156 Added: trunk/elementary/doc/img/screenshots/colorselector_example_01.eps trunk/elementary/doc/img/screenshots/colorselector_example_01.png trunk/elementary/src/examples/colorselector_example_01.c Modified: trunk/elementary/src/examples/Makefile.am trunk/elementary/src/lib/Elementary.h.in trunk/elementary/src/lib/elm_colorselector.c Property changes on: trunk/elementary/doc/img/screenshots/colorselector_example_01.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/elementary/src/examples/Makefile.am =================================================================== --- trunk/elementary/src/examples/Makefile.am 2011-07-08 14:37:05 UTC (rev 61155) +++ trunk/elementary/src/examples/Makefile.am 2011-07-08 14:37:16 UTC (rev 61156) @@ -32,6 +32,7 @@ animator_example_01.c \ bubble_example_01.c \ button_example_01.c \ + colorselector_example_01.c transit_example_01.c \ transit_example_02.c \ transit_example_03.c \ @@ -67,6 +68,7 @@ animator_example_01 \ bubble_example_01 \ button_example_01 \ + colorselector_example_01 \ transit_example_01 \ transit_example_02 \ transit_example_03 \ @@ -89,6 +91,7 @@ box_example_02:box_example_02.png:1.3 \ bubble_example_01:bubble_example_01.png:0.0 \ button_example_01:button_01.png:0.0 \ + colorselector_example_01:colorselector_example_01.png:0.0 \ animator_example_01:animator_example_01.png:0.2 \ animator_example_01:animator_example_02.png:0.5 \ animator_example_01:animator_example_03.png:0.9 \ Modified: trunk/elementary/src/lib/Elementary.h.in =================================================================== --- trunk/elementary/src/lib/Elementary.h.in 2011-07-08 14:37:05 UTC (rev 61155) +++ trunk/elementary/src/lib/Elementary.h.in 2011-07-08 14:37:16 UTC (rev 61156) @@ -5717,12 +5717,81 @@ * "selected" - when item is selected (scroller stops) */ - /* colorselector */ + /** + * @page tutorial_colorselector Color selector example + * @dontinclude colorselector_example_01.c + * + * This example shows how to change the color of a rectangle using a color + * selector. We aren't going to explain a lot of the code since it's the + * usual setup code: + * @until show(rect) + * + * Now that we have a window with background and a rectangle we can create + * our color_selector and set it's initial color to fully opaque blue: + * @until show + * + * Next we tell ask to be notified whenever the color changes: + * @until changed + * + * We follow that we some more run of the mill setup code: + * @until ELM_MAIN() + * + * And now get to the callback that sets the color of the rectangle: + * @until } + * + * This example will look like this: + * @image html screenshots/colorselector_example_01.png + * @image latex screenshots/colorselector_example_01.eps + * + * @example colorselector_example_01.c + */ + /** + * @defgroup Colorselector Colorselector + * + * @{ + * + * @brief Widget for user to select a color. + * + * Signals that you can add callbacks for are: + * "changed" - When the color value changes(event_info is NULL). + * + * See @ref tutorial_colorselector. + */ + /** + * @brief Add a new colorselector to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Colorselector + */ EAPI Evas_Object *elm_colorselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); + /** + * Set a color for the colorselector + * + * @param obj Colorselector object + * @param r r-value of color + * @param g g-value of color + * @param b b-value of color + * @param a a-value of color + * + * @ingroup Colorselector + */ EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g , int b, int a) EINA_ARG_NONNULL(1); + /** + * Get a color from the colorselector + * + * @param obj Colorselector object + * @param r integer pointer for r-value of color + * @param g integer pointer for g-value of color + * @param b integer pointer for b-value of color + * @param a integer pointer for a-value of color + * + * @ingroup Colorselector + */ EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g , int *b, int *a) EINA_ARG_NONNULL(1); - /* smart callbacks called: - * "changed" - when the color value changes + /** + * @} */ /* Contextual Popup */ Modified: trunk/elementary/src/lib/elm_colorselector.c =================================================================== --- trunk/elementary/src/lib/elm_colorselector.c 2011-07-08 14:37:05 UTC (rev 61155) +++ trunk/elementary/src/lib/elm_colorselector.c 2011-07-08 14:37:16 UTC (rev 61156) @@ -1,17 +1,6 @@ #include <Elementary.h> #include "elm_priv.h" -/** - * @addtogroup Colorselector Colorselector - * - * By using colorselector, you can select a color. - * Colorselector made a color using HSV/HSB mode. - * - * Signals that you can add callbacks for are: - * - * "changed" - when the color value changes - */ - #define BASE_STEP 360.0 #define HUE_STEP 360.0 #define SAT_STEP 128.0 @@ -793,14 +782,6 @@ _draw_rects(wd->cp[3], x); } -/** - * Add a new colorselector to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Colorselector - */ EAPI Evas_Object * elm_colorselector_add(Evas_Object *parent) { @@ -838,17 +819,6 @@ return obj; } -/** - * Set a color for the colorselector - * - * @param obj Colorselector object - * @param r r-value of color - * @param g g-value of color - * @param b b-value of color - * @param a a-value of color - * - * @ingroup Colorselector - */ EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a) { @@ -856,17 +826,6 @@ _set_color(obj, r, g, b, a); } -/** - * Get a color from the colorselector - * - * @param obj Colorselector object - * @param r integer pointer for r-value of color - * @param g integer pointer for g-value of color - * @param b integer pointer for b-value of color - * @param a integer pointer for a-value of color - * - * @ingroup Colorselector - */ EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int*a) { |