summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2013-04-28 08:02:17 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2013-04-28 08:37:20 +0300
commit265d570793908471e360ffe9b0defeec7f94d8fe (patch)
treefeba9aa3413dfced03c8d1d5ab14067e5f33601c
parent1a488ec8c9232bc0f5cb01b7596f12bb43433e1c (diff)
downloadelementary-265d570793908471e360ffe9b0defeec7f94d8fe.tar.gz
Elementary: Button header split.
-rw-r--r--src/lib/elm_button.h207
-rw-r--r--src/lib/elm_button_eo.h118
-rw-r--r--src/lib/elm_button_legacy.h95
3 files changed, 219 insertions, 201 deletions
diff --git a/src/lib/elm_button.h b/src/lib/elm_button.h
index 46330de03..1b80dde4e 100644
--- a/src/lib/elm_button.h
+++ b/src/lib/elm_button.h
@@ -65,207 +65,12 @@
* @{
*/
-#define ELM_OBJ_BUTTON_CLASS elm_obj_button_class_get()
-
-const Eo_Class *elm_obj_button_class_get(void) EINA_CONST;
-
-extern EAPI Eo_Op ELM_OBJ_BUTTON_BASE_ID;
-
-enum
-{
- ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_SET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_SET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_GET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_SET,
- ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_GET,
- ELM_OBJ_BUTTON_SUB_ID_LAST
-};
-
-#define ELM_OBJ_BUTTON_ID(sub_id) (ELM_OBJ_BUTTON_BASE_ID + sub_id)
-
-
-/**
- * @def elm_obj_button_admits_autorepeat_get
- * @since 1.8
- *
- * No description supplied by the EAPI.
- *
- * @param[out] ret
- *
- * @see elm_button_admits_autorepeat_get
- */
-#define elm_obj_button_admits_autorepeat_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET), EO_TYPECHECK(Eina_Bool *, ret)
-
-/**
- * @def elm_obj_button_autorepeat_set
- * @since 1.8
- *
- * Turn on/off the autorepeat event generated when the button is kept pressed
- *
- * @param[in] on
- *
- * @see elm_button_autorepeat_set
- */
-#define elm_obj_button_autorepeat_set(on) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_SET), EO_TYPECHECK(Eina_Bool, on)
-
-/**
- * @def elm_obj_button_autorepeat_get
- * @since 1.8
- *
- * Get whether the autorepeat feature is enabled
- *
- * @param[out] ret
- *
- * @see elm_button_autorepeat_get
- */
-#define elm_obj_button_autorepeat_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GET), EO_TYPECHECK(Eina_Bool *, ret)
-
-/**
- * @def elm_obj_button_autorepeat_initial_timeout_set
- * @since 1.8
- *
- * Set the initial timeout before the autorepeat event is generated
- *
- * @param[in] t
- *
- * @see elm_button_autorepeat_initial_timeout_set
- */
-#define elm_obj_button_autorepeat_initial_timeout_set(t) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_SET), EO_TYPECHECK(double, t)
-
-/**
- * @def elm_obj_button_autorepeat_initial_timeout_get
- * @since 1.8
- *
- * Get the initial timeout before the autorepeat event is generated
- *
- * @param[out] ret
- *
- * @see elm_button_autorepeat_initial_timeout_get
- */
-#define elm_obj_button_autorepeat_initial_timeout_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_GET), EO_TYPECHECK(double *, ret)
-
-/**
- * @def elm_obj_button_autorepeat_gap_timeout_set
- * @since 1.8
- *
- * Set the interval between each generated autorepeat event
- *
- * @param[in] t
- *
- * @see elm_button_autorepeat_gap_timeout_set
- */
-#define elm_obj_button_autorepeat_gap_timeout_set(t) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_SET), EO_TYPECHECK(double, t)
-
-/**
- * @def elm_obj_button_autorepeat_gap_timeout_get
- * @since 1.8
- *
- * Get the interval between each generated autorepeat event
- *
- * @param[out] ret
- *
- * @see elm_button_autorepeat_gap_timeout_get
- */
-#define elm_obj_button_autorepeat_gap_timeout_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_GET), EO_TYPECHECK(double *, ret)
-
-/**
- * Add a new button to the parent's canvas
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Button
- */
-EAPI Evas_Object *elm_button_add(Evas_Object *parent);
-
-/**
- * Turn on/off the autorepeat event generated when the button is kept pressed
- *
- * When off, no autorepeat is performed and buttons emit a normal @c clicked
- * signal when they are clicked.
- *
- * When on, keeping a button pressed will continuously emit a @c repeated
- * signal until the button is released. The time it takes until it starts
- * emitting the signal is given by
- * elm_button_autorepeat_initial_timeout_set(), and the time between each
- * new emission by elm_button_autorepeat_gap_timeout_set().
- *
- * @param obj The button object
- * @param on A bool to turn on/off the event
- *
- * @ingroup Button
- */
-EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on);
-
-/**
- * Get whether the autorepeat feature is enabled
- *
- * @param obj The button object
- * @return EINA_TRUE if autorepeat is on, EINA_FALSE otherwise
- *
- * @see elm_button_autorepeat_set()
- *
- * @ingroup Button
- */
-EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj);
-
-/**
- * Set the initial timeout before the autorepeat event is generated
- *
- * Sets the timeout, in seconds, since the button is pressed until the
- * first @c repeated signal is emitted. If @p t is 0.0 or less, there
- * won't be any delay and the event will be fired the moment the button is
- * pressed.
- *
- * @param obj The button object
- * @param t Timeout in seconds
- *
- * @see elm_button_autorepeat_set()
- * @see elm_button_autorepeat_gap_timeout_set()
- *
- * @ingroup Button
- */
-EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t);
-
-/**
- * Get the initial timeout before the autorepeat event is generated
- *
- * @param obj The button object
- * @return Timeout in seconds
- *
- * @see elm_button_autorepeat_initial_timeout_set()
- *
- * @ingroup Button
- */
-EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj);
-
-/**
- * Set the interval between each generated autorepeat event
- *
- * After the first @c repeated event is fired, all subsequent ones will
- * follow after a delay of @p t seconds for each.
- *
- * @param obj The button object
- * @param t Interval in seconds
- *
- * @see elm_button_autorepeat_initial_timeout_set()
- *
- * @ingroup Button
- */
-EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);
-
-/**
- * Get the interval between each generated autorepeat event
- *
- * @param obj The button object
- * @return Interval in seconds
- *
- * @ingroup Button
- */
-EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj);
-
+#ifdef EFL_EO_API_SUPPORT
+#include "elm_button_eo.h"
+#endif
+#ifndef EFL_NOLEGACY_API_SUPPORT
+#include "elm_button_legacy.h"
+#endif
/**
* @}
*/
diff --git a/src/lib/elm_button_eo.h b/src/lib/elm_button_eo.h
new file mode 100644
index 000000000..341750a57
--- /dev/null
+++ b/src/lib/elm_button_eo.h
@@ -0,0 +1,118 @@
+#define ELM_OBJ_BUTTON_CLASS elm_obj_button_class_get()
+
+const Eo_Class *elm_obj_button_class_get(void) EINA_CONST;
+
+extern EAPI Eo_Op ELM_OBJ_BUTTON_BASE_ID;
+
+enum
+{
+ ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_SET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_SET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_GET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_SET,
+ ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_GET,
+ ELM_OBJ_BUTTON_SUB_ID_LAST
+};
+
+#define ELM_OBJ_BUTTON_ID(sub_id) (ELM_OBJ_BUTTON_BASE_ID + sub_id)
+
+
+/**
+ * @def elm_obj_button_admits_autorepeat_get
+ * @since 1.8
+ *
+ * No description supplied by the EAPI.
+ *
+ * @param[out] ret
+ *
+ * @see elm_button_admits_autorepeat_get
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_admits_autorepeat_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_ADMITS_AUTOREPEAT_GET), EO_TYPECHECK(Eina_Bool *, ret)
+
+/**
+ * @def elm_obj_button_autorepeat_set
+ * @since 1.8
+ *
+ * Turn on/off the autorepeat event generated when the button is kept pressed
+ *
+ * @param[in] on
+ *
+ * @see elm_button_autorepeat_set
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_set(on) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_SET), EO_TYPECHECK(Eina_Bool, on)
+
+/**
+ * @def elm_obj_button_autorepeat_get
+ * @since 1.8
+ *
+ * Get whether the autorepeat feature is enabled
+ *
+ * @param[out] ret
+ *
+ * @see elm_button_autorepeat_get
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GET), EO_TYPECHECK(Eina_Bool *, ret)
+
+/**
+ * @def elm_obj_button_autorepeat_initial_timeout_set
+ * @since 1.8
+ *
+ * Set the initial timeout before the autorepeat event is generated
+ *
+ * @param[in] t
+ *
+ * @see elm_button_autorepeat_initial_timeout_set
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_initial_timeout_set(t) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_SET), EO_TYPECHECK(double, t)
+
+/**
+ * @def elm_obj_button_autorepeat_initial_timeout_get
+ * @since 1.8
+ *
+ * Get the initial timeout before the autorepeat event is generated
+ *
+ * @param[out] ret
+ *
+ * @see elm_button_autorepeat_initial_timeout_get
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_initial_timeout_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_INITIAL_TIMEOUT_GET), EO_TYPECHECK(double *, ret)
+
+/**
+ * @def elm_obj_button_autorepeat_gap_timeout_set
+ * @since 1.8
+ *
+ * Set the interval between each generated autorepeat event
+ *
+ * @param[in] t
+ *
+ * @see elm_button_autorepeat_gap_timeout_set
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_gap_timeout_set(t) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_SET), EO_TYPECHECK(double, t)
+
+/**
+ * @def elm_obj_button_autorepeat_gap_timeout_get
+ * @since 1.8
+ *
+ * Get the interval between each generated autorepeat event
+ *
+ * @param[out] ret
+ *
+ * @see elm_button_autorepeat_gap_timeout_get
+ *
+ * @ingroup Button
+ */
+#define elm_obj_button_autorepeat_gap_timeout_get(ret) ELM_OBJ_BUTTON_ID(ELM_OBJ_BUTTON_SUB_ID_AUTOREPEAT_GAP_TIMEOUT_GET), EO_TYPECHECK(double *, ret)
diff --git a/src/lib/elm_button_legacy.h b/src/lib/elm_button_legacy.h
new file mode 100644
index 000000000..5cac61f6c
--- /dev/null
+++ b/src/lib/elm_button_legacy.h
@@ -0,0 +1,95 @@
+/**
+ * Add a new button to the parent's canvas
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * @ingroup Button
+ */
+EAPI Evas_Object *elm_button_add(Evas_Object *parent);
+
+/**
+ * Turn on/off the autorepeat event generated when the button is kept pressed
+ *
+ * When off, no autorepeat is performed and buttons emit a normal @c clicked
+ * signal when they are clicked.
+ *
+ * When on, keeping a button pressed will continuously emit a @c repeated
+ * signal until the button is released. The time it takes until it starts
+ * emitting the signal is given by
+ * elm_button_autorepeat_initial_timeout_set(), and the time between each
+ * new emission by elm_button_autorepeat_gap_timeout_set().
+ *
+ * @param obj The button object
+ * @param on A bool to turn on/off the event
+ *
+ * @ingroup Button
+ */
+EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on);
+
+/**
+ * Get whether the autorepeat feature is enabled
+ *
+ * @param obj The button object
+ * @return EINA_TRUE if autorepeat is on, EINA_FALSE otherwise
+ *
+ * @see elm_button_autorepeat_set()
+ *
+ * @ingroup Button
+ */
+EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj);
+
+/**
+ * Set the initial timeout before the autorepeat event is generated
+ *
+ * Sets the timeout, in seconds, since the button is pressed until the
+ * first @c repeated signal is emitted. If @p t is 0.0 or less, there
+ * won't be any delay and the event will be fired the moment the button is
+ * pressed.
+ *
+ * @param obj The button object
+ * @param t Timeout in seconds
+ *
+ * @see elm_button_autorepeat_set()
+ * @see elm_button_autorepeat_gap_timeout_set()
+ *
+ * @ingroup Button
+ */
+EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t);
+
+/**
+ * Get the initial timeout before the autorepeat event is generated
+ *
+ * @param obj The button object
+ * @return Timeout in seconds
+ *
+ * @see elm_button_autorepeat_initial_timeout_set()
+ *
+ * @ingroup Button
+ */
+EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj);
+
+/**
+ * Set the interval between each generated autorepeat event
+ *
+ * After the first @c repeated event is fired, all subsequent ones will
+ * follow after a delay of @p t seconds for each.
+ *
+ * @param obj The button object
+ * @param t Interval in seconds
+ *
+ * @see elm_button_autorepeat_initial_timeout_set()
+ *
+ * @ingroup Button
+ */
+EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);
+
+/**
+ * Get the interval between each generated autorepeat event
+ *
+ * @param obj The button object
+ * @return Interval in seconds
+ *
+ * @ingroup Button
+ */
+EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj);