summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_actionslider_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_actionslider_eo.h')
-rw-r--r--src/lib/elementary/elm_actionslider_eo.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_actionslider_eo.h b/src/lib/elementary/elm_actionslider_eo.h
new file mode 100644
index 0000000..9a6b55d
--- /dev/null
+++ b/src/lib/elementary/elm_actionslider_eo.h
@@ -0,0 +1,134 @@
1#ifndef _ELM_ACTIONSLIDER_EO_H_
2#define _ELM_ACTIONSLIDER_EO_H_
3
4#ifndef _ELM_ACTIONSLIDER_EO_CLASS_TYPE
5#define _ELM_ACTIONSLIDER_EO_CLASS_TYPE
6
7typedef Eo Elm_Actionslider;
8
9#endif
10
11#ifndef _ELM_ACTIONSLIDER_EO_TYPES
12#define _ELM_ACTIONSLIDER_EO_TYPES
13
14/** A position for indicators, magnets, and enabled items.
15 *
16 * @ingroup Elm_Actionslider
17 */
18typedef enum
19{
20 ELM_ACTIONSLIDER_NONE = 0, /**< No position is set. */
21 ELM_ACTIONSLIDER_LEFT = 1 /* 1 >> 0 */, /**< Left position. */
22 ELM_ACTIONSLIDER_CENTER = 2 /* 1 >> 1 */, /**< Center position. */
23 ELM_ACTIONSLIDER_RIGHT = 4 /* 1 >> 2 */, /**< Right position. */
24 ELM_ACTIONSLIDER_ALL = 7 /* (1 >> 3) * 1 */ /**< All positions for
25 * left/center/right. */
26} Elm_Actionslider_Pos;
27
28
29#endif
30/**
31 * @brief An actionslider is a switcher for 2 or 3 labels
32 *
33 * with customizable magnet properties. The user drags and releases the
34 * indicator, to choose a label. When the indicator is released, it will move
35 * to its nearest "enabled and magnetized" position.
36 *
37 * @ingroup Elm_Actionslider
38 */
39#define ELM_ACTIONSLIDER_CLASS elm_actionslider_class_get()
40
41EWAPI const Efl_Class *elm_actionslider_class_get(void);
42
43/**
44 * @brief Actionslider position indicator
45 *
46 * @param[in] obj The object.
47 * @param[in] pos The position of the indicator.
48 *
49 * @ingroup Elm_Actionslider
50 */
51EOAPI void elm_obj_actionslider_indicator_pos_set(Eo *obj, Elm_Actionslider_Pos pos);
52
53/**
54 * @brief Actionslider position indicator
55 *
56 * @param[in] obj The object.
57 *
58 * @return The position of the indicator.
59 *
60 * @ingroup Elm_Actionslider
61 */
62EOAPI Elm_Actionslider_Pos elm_obj_actionslider_indicator_pos_get(const Eo *obj);
63
64/**
65 * @brief Actionslider magnet position.
66 *
67 * To make multiple positions magnets OR them together (e.g.
68 * ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
69 *
70 * @param[in] obj The object.
71 * @param[in] pos Bit mask indicating the magnet positions.
72 *
73 * @ingroup Elm_Actionslider
74 */
75EOAPI void elm_obj_actionslider_magnet_pos_set(Eo *obj, Elm_Actionslider_Pos pos);
76
77/**
78 * @brief Actionslider magnet position.
79 *
80 * @param[in] obj The object.
81 *
82 * @return Bit mask indicating the magnet positions.
83 *
84 * @ingroup Elm_Actionslider
85 */
86EOAPI Elm_Actionslider_Pos elm_obj_actionslider_magnet_pos_get(const Eo *obj);
87
88/**
89 * @brief Actionslider enabled position.
90 *
91 * To set multiple positions as enabled OR them together(e.g.
92 * ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
93 *
94 * @note All the positions are enabled by default.
95 *
96 * @param[in] obj The object.
97 * @param[in] pos Bit mask indicating the enabled positions.
98 *
99 * @ingroup Elm_Actionslider
100 */
101EOAPI void elm_obj_actionslider_enabled_pos_set(Eo *obj, Elm_Actionslider_Pos pos);
102
103/**
104 * @brief Actionslider enabled position.
105 *
106 * @param[in] obj The object.
107 *
108 * @return Bit mask indicating the enabled positions.
109 *
110 * @ingroup Elm_Actionslider
111 */
112EOAPI Elm_Actionslider_Pos elm_obj_actionslider_enabled_pos_get(const Eo *obj);
113
114/**
115 * @brief Get actionslider selected label.
116 *
117 * @param[in] obj The object.
118 *
119 * @return Selected label
120 *
121 * @ingroup Elm_Actionslider
122 */
123EOAPI const char *elm_obj_actionslider_selected_label_get(const Eo *obj);
124
125EWAPI extern const Efl_Event_Description _ELM_ACTIONSLIDER_EVENT_POS_CHANGED;
126
127/** The position of the actionslider has changed
128 * @return const char *
129 *
130 * @ingroup Elm_Actionslider
131 */
132#define ELM_ACTIONSLIDER_EVENT_POS_CHANGED (&(_ELM_ACTIONSLIDER_EVENT_POS_CHANGED))
133
134#endif