summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/examples.dox60
-rw-r--r--doc/index.doxy3
-rw-r--r--doc/widgets/Makefile.am4
-rw-r--r--doc/widgets/widget_preview_toggle.c11
-rw-r--r--src/examples/Makefile.am6
-rw-r--r--src/examples/toggle_example_01.c75
-rw-r--r--src/lib/Elementary.h.in109
-rw-r--r--src/lib/elm_toggle.c115
9 files changed, 262 insertions, 124 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f6aeb68b6..f9a208268 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -50,7 +50,8 @@ WGT_PREVIEW = \
50 anchorblock:preview-00.png:widget_preview_anchorblock:100:30 \ 50 anchorblock:preview-00.png:widget_preview_anchorblock:100:30 \
51 pager:preview-00.png:widget_preview_pager:100:100 \ 51 pager:preview-00.png:widget_preview_pager:100:100 \
52 separator:preview-00.png:widget_preview_separator:10:80 \ 52 separator:preview-00.png:widget_preview_separator:10:80 \
53 radio:preview-00.png:widget_preview_radio:60:20 53 radio:preview-00.png:widget_preview_radio:60:20 \
54 toggle:preview-00.png:widget_preview_toggle:150:30
54 55
55widget-build: 56widget-build:
56 @$(MAKE) -C widgets 57 @$(MAKE) -C widgets
diff --git a/doc/examples.dox b/doc/examples.dox
index 963fd2b84..c725f43aa 100644
--- a/doc/examples.dox
+++ b/doc/examples.dox
@@ -2964,6 +2964,66 @@
2964 */ 2964 */
2965 2965
2966/** 2966/**
2967 * @page tutorial_toggle Toggle example
2968 * @dontinclude toggle_example_01.c
2969 *
2970 * In this example we'll create 2 toggle widgets. The first will have an icon
2971 * and the state names will be the default "on"/"off", it will also change the
2972 * value of a variable directly. The second won't have a icon, the state names
2973 * will be "Enabled"/"Disabled", it will start "Enabled" and it won't set the
2974 * value of a variable.
2975 *
2976 * We start with the usual includes and prototype for callback which will be
2977 * implemented and detailed later on:
2978 * @until _cb2
2979 *
2980 * We then declare a static global variable(the one whose value will be changed
2981 * by the first toggle):
2982 * @until static
2983 *
2984 * We now have to create our window and all that usual stuff:
2985 * @until show(bx)
2986 *
2987 * The creation of a toggle is no more complicated than that of any other
2988 * widget:
2989 * @until add
2990 *
2991 * For our first toggle we don't set the states labels so they will stay the
2992 * default, however we do set a label for the toggle, an icon and the variable
2993 * whose value it should change:
2994 * @until show
2995 *
2996 * We also set the callback that will be called when the toggles value changes:
2997 * @until smart_callback
2998 *
2999 * For our second toggle it important to note that we set the states labels,
3000 * don't set an icon or variable, but set the initial state to
3001 * EINA_TRUE("Enabled"):
3002 * @until show
3003 *
3004 * For the second toggle we will use a different callback:
3005 * @until smart_callback
3006 *
3007 * We then ask the main loop to start:
3008 * @until ELM_MAIN
3009 *
3010 * The callback for our first toggle will look the value of @p val and print it:
3011 * @until }
3012 *
3013 * For our second callback we need to do a little bit more, since the second
3014 * toggle doesn't change the value of a variable we have to ask it what its
3015 * state is:
3016 * @until }
3017 *
3018 * This example will look like this:
3019 *
3020 * @image html screenshots/toggle_example_01.png
3021 * @image latex screenshots/toggle_example_01.eps width=\textwidth
3022 *
3023 * @example toggle_example_01.c
3024 */
3025
3026/**
2967 * @page bg_example_01_c bg_example_01.c 3027 * @page bg_example_01_c bg_example_01.c
2968 * @include bg_example_01.c 3028 * @include bg_example_01.c
2969 * @example bg_example_01.c 3029 * @example bg_example_01.c
diff --git a/doc/index.doxy b/doc/index.doxy
index 313c13b14..74da13de6 100644
--- a/doc/index.doxy
+++ b/doc/index.doxy
@@ -161,6 +161,9 @@
161 * @li @ref Spinner 161 * @li @ref Spinner
162 * @li @ref Thumb 162 * @li @ref Thumb
163 * @li @ref Toggle 163 * @li @ref Toggle
164 *
165 * @image html img/widget/toggle/preview-00.png
166 * @image latex img/widget/toggle/preview-00.eps
164 * @li @ref Toolbar 167 * @li @ref Toolbar
165 * @li @ref Tooltips 168 * @li @ref Tooltips
166 * @li @ref Video 169 * @li @ref Video
diff --git a/doc/widgets/Makefile.am b/doc/widgets/Makefile.am
index 4b0779725..a725d7f62 100644
--- a/doc/widgets/Makefile.am
+++ b/doc/widgets/Makefile.am
@@ -65,7 +65,8 @@ widget_preview_anchorblock \
65widget_preview_flip \ 65widget_preview_flip \
66widget_preview_pager \ 66widget_preview_pager \
67widget_preview_separator \ 67widget_preview_separator \
68widget_preview_radio 68widget_preview_radio \
69widget_preview_toggle
69 70
70LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@ 71LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
71 72
@@ -113,5 +114,6 @@ EXTRA_DIST = \
113 widget_preview_pager.c \ 114 widget_preview_pager.c \
114 widget_preview_separator.c \ 115 widget_preview_separator.c \
115 widget_preview_radio.c \ 116 widget_preview_radio.c \
117 widget_preview_toggle.c \
116 widget_preview_tmpl_foot.c \ 118 widget_preview_tmpl_foot.c \
117 widget_preview_tmpl_head.c 119 widget_preview_tmpl_head.c
diff --git a/doc/widgets/widget_preview_toggle.c b/doc/widgets/widget_preview_toggle.c
new file mode 100644
index 000000000..a26930a77
--- /dev/null
+++ b/doc/widgets/widget_preview_toggle.c
@@ -0,0 +1,11 @@
1#include "widget_preview_tmpl_head.c"
2
3Evas_Object *o = elm_toggle_add(win);
4evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
5elm_win_resize_object_add(win, o);
6evas_object_show(o);
7
8elm_object_text_set(o, "toggle");
9elm_toggle_states_labels_set(o, "on", "off");
10
11#include "widget_preview_tmpl_foot.c"
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 9c1f429dd..48b9662eb 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -148,7 +148,8 @@ pkglib_PROGRAMS += \
148 index_example_02 \ 148 index_example_02 \
149 pager_example_01 \ 149 pager_example_01 \
150 separator_example_01 \ 150 separator_example_01 \
151 radio_example_01 151 radio_example_01 \
152 toggle_example_01
152 153
153# This variable will hold the list of screenshots that will be made 154# This variable will hold the list of screenshots that will be made
154# by "make screenshots". Each item in the list is of the form: 155# by "make screenshots". Each item in the list is of the form:
@@ -192,7 +193,8 @@ SCREENSHOTS = \
192 ctxpopup_example_01:ctxpopup_example_01.png:0.0 \ 193 ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
193 pager_example_01:pager_example_01.png:0.0 \ 194 pager_example_01:pager_example_01.png:0.0 \
194 separator_example_01:separator_example_01.png:0.0 \ 195 separator_example_01:separator_example_01.png:0.0 \
195 radio_example_01:radio_example_01.png:0.0 196 radio_example_01:radio_example_01.png:0.0 \
197 toggle_example_01:toggle_example_01.png:0.0
196 198
197HTML_SS_DIR=$(top_builddir)/doc/html/screenshots 199HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
198LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots 200LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots
diff --git a/src/examples/toggle_example_01.c b/src/examples/toggle_example_01.c
new file mode 100644
index 000000000..d7d9277d4
--- /dev/null
+++ b/src/examples/toggle_example_01.c
@@ -0,0 +1,75 @@
1//Compile with:
2//gcc -g `pkg-config --cflags --libs elementary` toggle_example_01.c -o toggle_example_01
3
4#include <Elementary.h>
5#ifdef HAVE_CONFIG_H
6# include "elementary_config.h"
7#endif
8
9static void _cb(void *data, Evas_Object *obj, void *event_info);
10static void _cb2(void *data, Evas_Object *obj, void *event_info);
11
12static Eina_Bool val = EINA_FALSE;
13
14EAPI int
15elm_main(int argc, char **argv)
16{
17 Evas_Object *win, *bg, *bx, *toggle, *ic;
18
19 win = elm_win_add(NULL, "toggle", ELM_WIN_BASIC);
20 elm_win_title_set(win, "toggle");
21 elm_win_autodel_set(win, EINA_TRUE);
22 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
23
24 bg = elm_bg_add(win);
25 elm_win_resize_object_add(win, bg);
26 evas_object_show(bg);
27
28 bx = elm_box_add(win);
29 elm_box_horizontal_set(bx, EINA_FALSE);
30 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
32 elm_win_resize_object_add(win, bx);
33 evas_object_show(bx);
34
35 toggle = elm_toggle_add(win);
36 elm_object_text_set(toggle, "Toggle 1");
37 ic = elm_icon_add(win);
38 elm_icon_standard_set(ic, "home");
39 elm_toggle_icon_set(toggle, ic);
40 elm_toggle_state_pointer_set(toggle, &val);
41 elm_box_pack_end(bx, toggle);
42 evas_object_size_hint_weight_set(toggle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
43 evas_object_size_hint_align_set(toggle, EVAS_HINT_FILL, EVAS_HINT_FILL);
44 evas_object_show(toggle);
45 evas_object_smart_callback_add(toggle, "changed", _cb, NULL);
46
47 toggle = elm_toggle_add(win);
48 elm_object_text_set(toggle, "Toggle 2");
49 elm_toggle_states_labels_set(toggle, "Enabled", "Disabled");
50 elm_toggle_state_set(toggle, EINA_TRUE);
51 elm_box_pack_end(bx, toggle);
52 evas_object_size_hint_weight_set(toggle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
53 evas_object_size_hint_align_set(toggle, EVAS_HINT_FILL, EVAS_HINT_FILL);
54 evas_object_show(toggle);
55 evas_object_smart_callback_add(toggle, "changed", _cb2, NULL);
56
57 evas_object_show(win);
58
59 elm_run();
60
61 return 0;
62}
63ELM_MAIN()
64
65static void
66_cb(void *data, Evas_Object *obj, void *event_info)
67{
68 printf("val is now: %s\n", val ? "true" : "false");
69}
70
71static void
72_cb2(void *data, Evas_Object *obj, void *event_info)
73{
74 printf("toggle2's state is now: %s\n", elm_toggle_state_get(obj) ? "true" : "false");
75} \ No newline at end of file
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index ac1d6f6ff..66f2ca661 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -4155,22 +4155,121 @@ extern "C" {
4155 * @} 4155 * @}
4156 */ 4156 */
4157 4157
4158 /* toggle */ 4158 /**
4159 * @defgroup Toggle
4160 *
4161 * @image html img/widget/toggle/preview-00.png
4162 * @image latex img/widget/toggle/preview-00.eps
4163 *
4164 * @brief A toggle is a slider which can be used to toggle between
4165 * two values. It has two states: on and off.
4166 *
4167 * Signals that you can add callbacks for are:
4168 * @li "changed" - Whenever the toggle value has been changed. Is not called
4169 * until the toggle is released by the cursor (assuming it
4170 * has been triggered by the cursor in the first place).
4171 *
4172 * @ref tutorial_toggle show how to use a toggle.
4173 * @{
4174 */
4175 /**
4176 * @brief Add a toggle to @p parent.
4177 *
4178 * @param parent The parent object
4179 *
4180 * @return The toggle object
4181 */
4159 EAPI Evas_Object *elm_toggle_add(Evas_Object *parent) EINA_ARG_NONNULL(1); 4182 EAPI Evas_Object *elm_toggle_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
4183 /**
4184 * @brief Sets the label to be displayed with the toggle.
4185 *
4186 * @param obj The toggle object
4187 * @param label The label to be displayed
4188 *
4189 * @deprecated use elm_object_text_set() instead.
4190 */
4160 EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); 4191 EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
4192 /**
4193 * @brief Gets the label of the toggle
4194 *
4195 * @param obj toggle object
4196 * @return The label of the toggle
4197 *
4198 * @deprecated use elm_object_text_get() instead.
4199 */
4161 EINA_DEPRECATED EAPI const char *elm_toggle_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 4200 EINA_DEPRECATED EAPI const char *elm_toggle_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
4201 /**
4202 * @brief Set the icon used for the toggle
4203 *
4204 * @param obj The toggle object
4205 * @param icon The icon object for the button
4206 *
4207 * Once the icon object is set, a previously set one will be deleted
4208 * If you want to keep that old content object, use the
4209 * elm_toggle_icon_unset() function.
4210 */
4162 EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); 4211 EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
4212 /**
4213 * @brief Get the icon used for the toggle
4214 *
4215 * @param obj The toggle object
4216 * @return The icon object that is being used
4217 *
4218 * Return the icon object which is set for this widget.
4219 *
4220 * @see elm_toggle_icon_set()
4221 */
4163 EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 4222 EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
4223 /**
4224 * @brief Unset the icon used for the toggle
4225 *
4226 * @param obj The toggle object
4227 * @return The icon object that was being used
4228 *
4229 * Unparent and return the icon object which was set for this widget.
4230 *
4231 * @see elm_toggle_icon_set()
4232 */
4164 EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); 4233 EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
4234 /**
4235 * @brief Sets the labels to be associated with the on and off states of the toggle.
4236 *
4237 * @param obj The toggle object
4238 * @param onlabel The label displayed when the toggle is in the "on" state
4239 * @param offlabel The label displayed when the toggle is in the "off" state
4240 */
4165 EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) EINA_ARG_NONNULL(1); 4241 EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) EINA_ARG_NONNULL(1);
4242 /**
4243 * @brief Gets the labels associated with the on and off states of the toggle.
4244 *
4245 * @param obj The toggle object
4246 * @param onlabel A char** to place the onlabel of @p obj into
4247 * @param offlabel A char** to place the offlabel of @p obj into
4248 */
4166 EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) EINA_ARG_NONNULL(1); 4249 EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) EINA_ARG_NONNULL(1);
4250 /**
4251 * @brief Sets the state of the toggle to @p state.
4252 *
4253 * @param obj The toggle object
4254 * @param state The state of @p obj
4255 */
4167 EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); 4256 EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1);
4257 /**
4258 * @brief Gets the state of the toggle to @p state.
4259 *
4260 * @param obj The toggle object
4261 * @return The state of @p obj
4262 */
4168 EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); 4263 EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
4264 /**
4265 * @brief Sets the state pointer of the toggle to @p statep.
4266 *
4267 * @param obj The toggle object
4268 * @param statep The state pointer of @p obj
4269 */
4169 EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1); 4270 EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1);
4170 /* smart callbacks called: 4271 /**
4171 * "changed" - Whenever the toggle value has been changed. Is not called 4272 * @}
4172 * until the toggle is released by the cursor (assuming it has been triggered
4173 * by the cursor in the first place).
4174 */ 4273 */
4175 4274
4176 /** 4275 /**
diff --git a/src/lib/elm_toggle.c b/src/lib/elm_toggle.c
index 33b09fe78..41e845731 100644
--- a/src/lib/elm_toggle.c
+++ b/src/lib/elm_toggle.c
@@ -1,19 +1,6 @@
1#include <Elementary.h> 1#include <Elementary.h>
2#include "elm_priv.h" 2#include "elm_priv.h"
3 3
4/**
5 * @defgroup Toggle
6 *
7 * A toggle is a slider which can be used to toggle between
8 * two values. It has two states: on and off.
9 *
10 * Signals that you can add callbacks for are:
11 *
12 * "changed" - Whenever the toggle value has been changed. Is not called until
13 * the toggle is released by the cursor (assuming it has been
14 * triggered by the cursor in the first place).
15 */
16
17typedef struct _Widget_Data Widget_Data; 4typedef struct _Widget_Data Widget_Data;
18 5
19struct _Widget_Data 6struct _Widget_Data
@@ -228,15 +215,6 @@ _elm_toggle_label_get(const Evas_Object *obj, const char *item)
228 return wd->label; 215 return wd->label;
229} 216}
230 217
231/**
232 * Add a toggle to @p parent.
233 *
234 * @param parent The parent object
235 *
236 * @return The toggle object
237 *
238 * @ingroup Toggle
239 */
240EAPI Evas_Object * 218EAPI Evas_Object *
241elm_toggle_add(Evas_Object *parent) 219elm_toggle_add(Evas_Object *parent)
242{ 220{
@@ -283,48 +261,18 @@ elm_toggle_add(Evas_Object *parent)
283 return obj; 261 return obj;
284} 262}
285 263
286/**
287 * Sets the label to be displayed with the toggle.
288 *
289 * @param obj The toggle object
290 * @param label The label to be displayed
291 *
292 * @ingroup Toggle
293 * @deprecate use elm_object_text_* instead.
294 */
295EAPI void 264EAPI void
296elm_toggle_label_set(Evas_Object *obj, const char *label) 265elm_toggle_label_set(Evas_Object *obj, const char *label)
297{ 266{
298 _elm_toggle_label_set(obj, NULL, label); 267 _elm_toggle_label_set(obj, NULL, label);
299} 268}
300 269
301/**
302 * Gets the label of the toggle
303 *
304 * @param obj toggleeee object
305 * @return The label of the toggle
306 *
307 * @ingroup Toggle
308 * @deprecate use elm_object_text_* instead.
309 */
310EAPI const char * 270EAPI const char *
311elm_toggle_label_get(const Evas_Object *obj) 271elm_toggle_label_get(const Evas_Object *obj)
312{ 272{
313 return _elm_toggle_label_get(obj, NULL); 273 return _elm_toggle_label_get(obj, NULL);
314} 274}
315 275
316/**
317 * Set the icon used for the toggle
318 *
319 * Once the icon object is set, a previously set one will be deleted
320 * If you want to keep that old content object, use the
321 * elm_toggle_icon_unset() function.
322 *
323 * @param obj The toggle object
324 * @param icon The icon object for the button
325 *
326 * @ingroup Toggle
327 */
328EAPI void 276EAPI void
329elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) 277elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
330{ 278{
@@ -346,16 +294,6 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
346 _sizing_eval(obj); 294 _sizing_eval(obj);
347} 295}
348 296
349/**
350 * Get the icon used for the toggle
351 *
352 * Return the icon object which is set for this widget.
353 *
354 * @param obj The toggle object
355 * @return The icon object that is being used
356 *
357 * @ingroup Toggle
358 */
359EAPI Evas_Object * 297EAPI Evas_Object *
360elm_toggle_icon_get(const Evas_Object *obj) 298elm_toggle_icon_get(const Evas_Object *obj)
361{ 299{
@@ -365,16 +303,6 @@ elm_toggle_icon_get(const Evas_Object *obj)
365 return wd->icon; 303 return wd->icon;
366} 304}
367 305
368/**
369 * Unset the icon used for the toggle
370 *
371 * Unparent and return the icon object which was set for this widget.
372 *
373 * @param obj The toggle object
374 * @return The icon object that was being used
375 *
376 * @ingroup Toggle
377 */
378EAPI Evas_Object * 306EAPI Evas_Object *
379elm_toggle_icon_unset(Evas_Object *obj) 307elm_toggle_icon_unset(Evas_Object *obj)
380{ 308{
@@ -389,15 +317,6 @@ elm_toggle_icon_unset(Evas_Object *obj)
389 return icon; 317 return icon;
390} 318}
391 319
392/**
393 * Sets the labels to be associated with the on and off states of the toggle.
394 *
395 * @param obj The toggle object
396 * @param onlabel The label displayed when the toggle is in the "on" state
397 * @param offlabel The label displayed when the toggle is in the "off" state
398 *
399 * @ingroup Toggle
400 */
401EAPI void 320EAPI void
402elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) 321elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel)
403{ 322{
@@ -411,16 +330,6 @@ elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *
411 _sizing_eval(obj); 330 _sizing_eval(obj);
412} 331}
413 332
414
415/**
416 * Gets the labels associated with the on and off states of the toggle.
417 *
418 * @param obj The toggle object
419 * @param onlabel A char** to place the onlabel of @p obj into
420 * @param offlabel A char** to place the offlabel of @p obj into
421 *
422 * @ingroup Toggle
423 */
424EAPI void 333EAPI void
425elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) 334elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel)
426{ 335{
@@ -433,14 +342,6 @@ elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const
433 if (offlabel) *offlabel = wd->offtext; 342 if (offlabel) *offlabel = wd->offtext;
434} 343}
435 344
436/**
437 * Sets the state of the toggle to @p state.
438 *
439 * @param obj The toggle object
440 * @param state The state of @p obj
441 *
442 * @ingroup Toggle
443 */
444EAPI void 345EAPI void
445elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) 346elm_toggle_state_set(Evas_Object *obj, Eina_Bool state)
446{ 347{
@@ -458,14 +359,6 @@ elm_toggle_state_set(Evas_Object *obj, Eina_Bool state)
458 } 359 }
459} 360}
460 361
461/**
462 * Gets the state of the toggle to @p state.
463 *
464 * @param obj The toggle object
465 * @return The state of @p obj
466 *
467 * @ingroup Toggle
468 */
469EAPI Eina_Bool 362EAPI Eina_Bool
470elm_toggle_state_get(const Evas_Object *obj) 363elm_toggle_state_get(const Evas_Object *obj)
471{ 364{
@@ -475,14 +368,6 @@ elm_toggle_state_get(const Evas_Object *obj)
475 return wd->state; 368 return wd->state;
476} 369}
477 370
478/**
479 * Sets the state pointer of the toggle to @p statep.
480 *
481 * @param obj The toggle object
482 * @param statep The state pointer of @p obj
483 *
484 * @ingroup Toggle
485 */
486EAPI void 371EAPI void
487elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) 372elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
488{ 373{