Colorselector : Add docs of elm_colorselector_palette_item_* APIs
[platform/upstream/elementary.git] / src / lib / elm_colorselector_common.h
1 /**
2  * @addtogroup Elm_Colorselector
3  *
4  * @{
5  */
6
7 typedef struct _Elm_Color_RGBA Elm_Color_RGBA;
8 struct _Elm_Color_RGBA
9 {
10    unsigned int r;
11    unsigned int g;
12    unsigned int b;
13    unsigned int a;
14 };
15
16 typedef struct _Elm_Custom_Palette Elm_Custom_Palette;
17 struct _Elm_Custom_Palette
18 {
19    const char *palette_name;
20    Eina_List  *color_list;
21 };
22
23 /* TIZEN_ONLY(20160705): Move Elm_Colorselector_Mode enum to
24                          elm_colorselector_common.h to mark enum members
25                          as deprecated. */
26 typedef enum
27 {
28    ELM_COLORSELECTOR_PALETTE = 0, /**< Only color palette is displayed, default */
29    ELM_COLORSELECTOR_COMPONENTS, /**< Only color selector is displayed */
30    ELM_COLORSELECTOR_BOTH, /**< Both Palette and selector is displayed */
31    ELM_COLORSELECTOR_PICKER, /**< Only color picker is displayed */
32    ELM_COLORSELECTOR_PLANE, /**< @deprecated This mode is not supported. If you use this, nothing will be shown */
33    ELM_COLORSELECTOR_PALETTE_PLANE, /**< @deprecated This mode is not supported. If you use this, it will be shown same with ELM_COLORSELECTOR_PALETTE mode */
34    ELM_COLORSELECTOR_ALL /**< @deprecated This mode is not supported. If you use this, it will be shown same with ELM_COLORSELECTOR_PALETTE mode */
35 } Elm_Colorselector_Mode;
36 /* END */
37
38 /**
39  * @brief Get Palette item's color.
40  *
41  * @if MOBILE @since_tizen 2.3
42  * @elseif WEARABLE @since_tizen 2.3.1
43  * @endif
44  *
45  * @param[in] it The color palette item.
46  * @param[out] r integer pointer for r-value of color
47  * @param[out] g integer pointer for g-value of color
48  * @param[out] b integer pointer for b-value of color
49  * @param[out] a integer pointer for a-value of color
50  *
51  * @ingroup Colorselector
52  */
53 EAPI void elm_colorselector_palette_item_color_get(const Elm_Object_Item *it, int *r, int *g, int *b, int *a);
54
55 /**
56  * @brief Set palette item's color.
57  *
58  * @if MOBILE @since_tizen 2.3
59  * @elseif WEARABLE @since_tizen 2.3.1
60  * @endif
61  *
62  * @param[in] it The color palette item.
63  * @param[in] r r-value of color
64  * @param[in] g g-value of color
65  * @param[in] b b-value of color
66  * @param[in] a a-value of color
67  *
68  * @ingroup Colorselector
69  */
70 EAPI void elm_colorselector_palette_item_color_set(Elm_Object_Item *it, int r, int g, int b, int a);
71
72 /**
73  * @brief Get the selected state of color palette item.
74  *
75  * @if MOBILE @since_tizen 2.3.1
76  * @endif
77  *
78  * @param[in] it The Colorpalette item
79  * @return @c EINA_TRUE if the item is selected, @c EINA_FALSE otherwise.
80
81  * @ingroup Colorselector
82  */
83 EAPI Eina_Bool elm_colorselector_palette_item_selected_get(const Elm_Object_Item *it);
84
85 /**
86  * @brief Set the selected state of color palette item.
87  *
88  * @if MOBILE @since_tizen 2.3.1
89  * @endif
90  *
91  * @param[in] it The Colorpalette item
92  * @param[in] selected The selected state
93
94  * @ingroup Colorselector
95  */
96 EAPI void elm_colorselector_palette_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
97
98 /**
99  * @}
100  */