elementary/colorselector - just empty API set is added to merge with color palette.

I know you all would blame to me.

But they  will be patched soon indeed. 



SVN revision: 68957
This commit is contained in:
ChunEon Park 2012-03-07 14:25:53 +00:00
parent 0fa91154c8
commit 21d10bb9b6
2 changed files with 173 additions and 2 deletions

View File

@ -780,8 +780,7 @@ elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a)
}
EAPI void
elm_colorselector_color_get(const Evas_Object *obj,int *r, int *g, int *b,
int *a)
elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
{
Widget_Data *wd = elm_widget_data_get(obj);
ELM_CHECK_WIDTYPE(obj, widtype);
@ -791,3 +790,62 @@ elm_colorselector_color_get(const Evas_Object *obj,int *r, int *g, int *b,
if (b) *b = wd->b;
if (a) *a = wd->a;
}
EAPI void
elm_colorselector_mode_set(Evas_Object *obj, Elm_Colorselector_Mode mode __UNUSED__)
{
ELM_CHECK_WIDTYPE(obj, widtype);
//TODO: Implement!
}
EAPI Elm_Colorselector_Mode
elm_colorselector_mode_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_COLORSELECTOR_PALETTE;
//TODO: Implement!
return ELM_COLORSELECTOR_PALETTE;
}
EAPI void
elm_colorselector_palette_item_color_get(const Elm_Object_Item *it, int *r __UNUSED__, int *g __UNUSED__, int *b __UNUSED__, int*a __UNUSED__)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
//TODO: Implement!
}
EAPI void
elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r __UNUSED__, int g __UNUSED__, int b __UNUSED__, int a __UNUSED__)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
//TODO: Implement!
}
EAPI Elm_Object_Item *
elm_colorselector_palette_color_add(Evas_Object *obj, int r __UNUSED__, int g __UNUSED__, int b __UNUSED__, int a __UNUSED__)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
//TODO: Implement!
return NULL;
}
EAPI void
elm_colorselector_palette_clear(Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype);
//TODO: Implement!
}
EAPI void
elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name __UNUSED__)
{
ELM_CHECK_WIDTYPE(obj, widtype);
//TODO: Implement!
}
EAPI const char*
elm_colorselector_palette_name_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
//TODO: Implement!
return NULL;
}

View File

@ -14,6 +14,13 @@
* See @ref tutorial_colorselector.
*/
typedef enum
{
ELM_COLORSELECTOR_PALETTE = 0,
ELM_COLORSELECTOR_COMPONENTS,
ELM_COLORSELECTOR_BOTH
} Elm_Colorselector_Mode;
/**
* @brief Add a new colorselector to the parent
*
@ -50,6 +57,112 @@ EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int
*/
EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
/**
* Set a Colorselector mode.
* Colorselector
*
* @param obj Colorselector object
* @param mode
* @param g G color value to be returned
* @param b B color value to be returned
* @param a A color value to be returned
*
* @ingroup Colorselector
*/
EAPI void elm_colorselector_mode_set(Evas_Object *obj, Elm_Colorselector_Mode mode);
/**
* Get a Colorselector mode.
*
* @param item The color palette item.
* @param r R color value to be returned
* @param g G color value to be returned
* @param b B color value to be returned
* @param a A color value to be returned
*
* @ingroup Colorselector
*/
EAPI Elm_Colorselector_Mode elm_colorselector_mode_get(const Evas_Object *obj);
/**
* Get a palette item's color.
*
* @param item The color palette item.
* @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_palette_item_color_get(const Elm_Object_Item *it, int *r, int *g, int *b, int *a);
/**
* Set the palette item's color.
*
* @param item The color paltte item.
* @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_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a);
/**
* Add a new color item to palette.
*
* @param obj The 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
* @return A new color palette Item.
*
* @ingroup Colorselector
*/
EAPI Elm_Object_Item *elm_colorselector_palette_color_add(Evas_Object *obj, int r, int g, int b, int a);
/**
* Clear the palette items.
*
* @param obj The Colorselector object
*
* @note This API will be available when ELM_COLORSELECTOR_PALETTE or
* ELM_COLORSELECTOR_BOTH mode is set.
*
* @ingroup Colorselector
*/
EAPI void elm_colorselector_palette_clear(Evas_Object *obj);
/**
* Set current palette's name
*
* @param obj The Colorselector object
* @param palette_name Name of palette
*
* When colorpalette name is set, colors will be loaded from and saved to config
* using the set name. If no name is set then colors will be loaded from or
* saved to "default" config.
*
* @ingroup Colorselector
*/
EAPI void elm_colorselector_palette_name_set(Evas_Object *obj, const char *palette_name);
/**
* Get current palette's name
*
* @param obj The Colorselector object
* @return Name of palette
*
* Returns the currently set palette name using which colors will be
* saved/loaded in to config.
*
* @ingroup Colorselector
*/
EAPI const char *elm_colorselector_palette_name_get(const Evas_Object *obj);
/**
* @}
*/