jackdanielz pushed a commit to branch master.

commit f951a2b84d551bd593f5b198d5230e12bcad479e
Author: Daniel Zaoui <[email protected]>
Date:   Sun Apr 28 09:37:46 2013 +0300

    Elementary: Action Slider header split.
---
 src/lib/elm_actionslider.h        | 208 ++------------------------------------
 src/lib/elm_actionslider_common.h |   8 ++
 src/lib/elm_actionslider_eo.h     | 120 ++++++++++++++++++++++
 src/lib/elm_actionslider_legacy.h |  84 +++++++++++++++
 4 files changed, 219 insertions(+), 201 deletions(-)

diff --git a/src/lib/elm_actionslider.h b/src/lib/elm_actionslider.h
index 59e9e4c..d6b8718 100644
--- a/src/lib/elm_actionslider.h
+++ b/src/lib/elm_actionslider.h
@@ -49,207 +49,13 @@
  * @{
  */
 
-#define ELM_OBJ_ACTIONSLIDER_CLASS elm_obj_actionslider_class_get()
-
-const Eo_Class *elm_obj_actionslider_class_get(void) EINA_CONST;
-
-extern EAPI Eo_Op ELM_OBJ_ACTIONSLIDER_BASE_ID;
-
-enum
-{
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_SET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_GET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_SET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_GET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_SET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_GET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_SELECTED_LABEL_GET,
-   ELM_OBJ_ACTIONSLIDER_SUB_ID_LAST
-};
-
-#define ELM_OBJ_ACTIONSLIDER_ID(sub_id) (ELM_OBJ_ACTIONSLIDER_BASE_ID + sub_id)
-
-
-/**
- * @def elm_obj_actionslider_indicator_pos_set
- * @since 1.8
- *
- * Set actionslider indicator position.
- *
- * @param[in] pos
- *
- * @see elm_actionslider_indicator_pos_set
- */
-#define elm_obj_actionslider_indicator_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
-
-/**
- * @def elm_obj_actionslider_indicator_pos_get
- * @since 1.8
- *
- * Get actionslider indicator position.
- *
- * @param[out] ret
- *
- * @see elm_actionslider_indicator_pos_get
- */
-#define elm_obj_actionslider_indicator_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
-
-/**
- * @def elm_obj_actionslider_magnet_pos_set
- * @since 1.8
- *
- * Set actionslider magnet position. To make multiple positions magnets or
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
- *
- * @param[in] pos
- *
- * @see elm_actionslider_magnet_pos_set
- */
-#define elm_obj_actionslider_magnet_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
-
-/**
- * @def elm_obj_actionslider_magnet_pos_get
- * @since 1.8
- *
- * Get actionslider magnet position.
- *
- * @param[out] ret
- *
- * @see elm_actionslider_magnet_pos_get
- */
-#define elm_obj_actionslider_magnet_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
-
-/**
- * @def elm_obj_actionslider_enabled_pos_set
- * @since 1.8
- *
- * Set actionslider enabled position. To set multiple positions as enabled or
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
- *
- * @param[in] pos
- *
- * @see elm_actionslider_enabled_pos_set
- */
-#define elm_obj_actionslider_enabled_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
-
-/**
- * @def elm_obj_actionslider_enabled_pos_get
- * @since 1.8
- *
- * Get actionslider enabled position.
- *
- * @param[out] ret
- *
- * @see elm_actionslider_enabled_pos_get
- */
-#define elm_obj_actionslider_enabled_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
-
-/**
- * @def elm_obj_actionslider_selected_label_get
- * @since 1.8
- *
- * Get actionslider selected label.
- *
- * @param[out] ret
- *
- * @see elm_actionslider_selected_label_get
- */
-#define elm_obj_actionslider_selected_label_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_SELECTED_LABEL_GET), 
EO_TYPECHECK(const char **, ret)
-
-
-typedef enum
-{
-   ELM_ACTIONSLIDER_NONE = 0,
-   ELM_ACTIONSLIDER_LEFT = 1 << 0,
-   ELM_ACTIONSLIDER_CENTER = 1 << 1,
-   ELM_ACTIONSLIDER_RIGHT = 1 << 2,
-   ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
-} Elm_Actionslider_Pos;
-
-/**
- * Add a new actionslider to the parent.
- *
- * @param parent The parent object
- * @return The new actionslider object or NULL if it cannot be created
- *
- * @ingroup Actionslider
- */
-EAPI Evas_Object                *elm_actionslider_add(Evas_Object *parent);
-
-/**
- * Get actionslider selected label.
- *
- * @param obj The actionslider object
- * @return The selected label
- *
- * @ingroup Actionslider
- */
-EAPI const char                 *elm_actionslider_selected_label_get(const 
Evas_Object *obj);
-
-/**
- * Set actionslider indicator position.
- *
- * @param obj The actionslider object.
- * @param pos The position of the indicator.
- *
- * @ingroup Actionslider
- */
-EAPI void                        
elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
-
-/**
- * Get actionslider indicator position.
- *
- * @param obj The actionslider object.
- * @return The position of the indicator.
- *
- * @ingroup Actionslider
- */
-EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const 
Evas_Object *obj);
-
-/**
- * Set actionslider magnet position. To make multiple positions magnets @c or
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
- *
- * @param obj The actionslider object.
- * @param pos Bit mask indicating the magnet positions.
- *
- * @ingroup Actionslider
- */
-EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object 
*obj, Elm_Actionslider_Pos pos);
-
-/**
- * Get actionslider magnet position.
- *
- * @param obj The actionslider object.
- * @return The positions with magnet property.
- *
- * @ingroup Actionslider
- */
-EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const 
Evas_Object *obj);
-
-/**
- * Set actionslider enabled position. To set multiple positions as enabled @c 
or
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
- *
- * @note All the positions are enabled by default.
- *
- * @param obj The actionslider object.
- * @param pos Bit mask indicating the enabled positions.
- *
- * @ingroup Actionslider
- */
-EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object 
*obj, Elm_Actionslider_Pos pos);
-
-/**
- * Get actionslider enabled position.
- *
- * @param obj The actionslider object.
- * @return The enabled positions.
- *
- * @ingroup Actionslider
- */
-EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const 
Evas_Object *obj);
-
+#include "elm_actionslider_common.h"
+#ifdef EFL_EO_API_SUPPORT
+#include "elm_actionslider_eo.h"
+#endif
+#ifndef EFL_NOLEGACY_API_SUPPORT
+#include "elm_actionslider_legacy.h"
+#endif
 /**
  * @}
  */
diff --git a/src/lib/elm_actionslider_common.h 
b/src/lib/elm_actionslider_common.h
new file mode 100644
index 0000000..86137ad
--- /dev/null
+++ b/src/lib/elm_actionslider_common.h
@@ -0,0 +1,8 @@
+typedef enum
+{
+   ELM_ACTIONSLIDER_NONE = 0,
+   ELM_ACTIONSLIDER_LEFT = 1 << 0,
+   ELM_ACTIONSLIDER_CENTER = 1 << 1,
+   ELM_ACTIONSLIDER_RIGHT = 1 << 2,
+   ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
+} Elm_Actionslider_Pos;
diff --git a/src/lib/elm_actionslider_eo.h b/src/lib/elm_actionslider_eo.h
new file mode 100644
index 0000000..90d19df
--- /dev/null
+++ b/src/lib/elm_actionslider_eo.h
@@ -0,0 +1,120 @@
+#define ELM_OBJ_ACTIONSLIDER_CLASS elm_obj_actionslider_class_get()
+
+const Eo_Class *elm_obj_actionslider_class_get(void) EINA_CONST;
+
+extern EAPI Eo_Op ELM_OBJ_ACTIONSLIDER_BASE_ID;
+
+enum
+{
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_SET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_GET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_SET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_GET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_SET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_GET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_SELECTED_LABEL_GET,
+   ELM_OBJ_ACTIONSLIDER_SUB_ID_LAST
+};
+
+#define ELM_OBJ_ACTIONSLIDER_ID(sub_id) (ELM_OBJ_ACTIONSLIDER_BASE_ID + sub_id)
+
+
+/**
+ * @def elm_obj_actionslider_indicator_pos_set
+ * @since 1.8
+ *
+ * Set actionslider indicator position.
+ *
+ * @param[in] pos
+ *
+ * @see elm_actionslider_indicator_pos_set
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_indicator_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
+
+/**
+ * @def elm_obj_actionslider_indicator_pos_get
+ * @since 1.8
+ *
+ * Get actionslider indicator position.
+ *
+ * @param[out] ret
+ *
+ * @see elm_actionslider_indicator_pos_get
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_indicator_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_INDICATOR_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
+
+/**
+ * @def elm_obj_actionslider_magnet_pos_set
+ * @since 1.8
+ *
+ * Set actionslider magnet position. To make multiple positions magnets or
+ * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
+ *
+ * @param[in] pos
+ *
+ * @see elm_actionslider_magnet_pos_set
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_magnet_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
+
+/**
+ * @def elm_obj_actionslider_magnet_pos_get
+ * @since 1.8
+ *
+ * Get actionslider magnet position.
+ *
+ * @param[out] ret
+ *
+ * @see elm_actionslider_magnet_pos_get
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_magnet_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_MAGNET_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
+
+/**
+ * @def elm_obj_actionslider_enabled_pos_set
+ * @since 1.8
+ *
+ * Set actionslider enabled position. To set multiple positions as enabled or
+ * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
+ *
+ * @param[in] pos
+ *
+ * @see elm_actionslider_enabled_pos_set
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_enabled_pos_set(pos) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_SET), 
EO_TYPECHECK(Elm_Actionslider_Pos, pos)
+
+/**
+ * @def elm_obj_actionslider_enabled_pos_get
+ * @since 1.8
+ *
+ * Get actionslider enabled position.
+ *
+ * @param[out] ret
+ *
+ * @see elm_actionslider_enabled_pos_get
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_enabled_pos_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_ENABLED_POS_GET), 
EO_TYPECHECK(Elm_Actionslider_Pos *, ret)
+
+/**
+ * @def elm_obj_actionslider_selected_label_get
+ * @since 1.8
+ *
+ * Get actionslider selected label.
+ *
+ * @param[out] ret
+ *
+ * @see elm_actionslider_selected_label_get
+ *
+ * @ingroup Actionslider
+ */
+#define elm_obj_actionslider_selected_label_get(ret) 
ELM_OBJ_ACTIONSLIDER_ID(ELM_OBJ_ACTIONSLIDER_SUB_ID_SELECTED_LABEL_GET), 
EO_TYPECHECK(const char **, ret)
diff --git a/src/lib/elm_actionslider_legacy.h 
b/src/lib/elm_actionslider_legacy.h
new file mode 100644
index 0000000..db46165
--- /dev/null
+++ b/src/lib/elm_actionslider_legacy.h
@@ -0,0 +1,84 @@
+/**
+ * Add a new actionslider to the parent.
+ *
+ * @param parent The parent object
+ * @return The new actionslider object or NULL if it cannot be created
+ *
+ * @ingroup Actionslider
+ */
+EAPI Evas_Object                *elm_actionslider_add(Evas_Object *parent);
+
+/**
+ * Set actionslider indicator position.
+ *
+ * @param obj The actionslider object.
+ * @param pos The position of the indicator.
+ *
+ * @ingroup Actionslider
+ */
+EAPI void                        
elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
+
+/**
+ * Get actionslider indicator position.
+ *
+ * @param obj The actionslider object.
+ * @return The position of the indicator.
+ *
+ * @ingroup Actionslider
+ */
+EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const 
Evas_Object *obj);
+
+/**
+ * Set actionslider magnet position. To make multiple positions magnets @c or
+ * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
+ *
+ * @param obj The actionslider object.
+ * @param pos Bit mask indicating the magnet positions.
+ *
+ * @ingroup Actionslider
+ */
+EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object 
*obj, Elm_Actionslider_Pos pos);
+
+/**
+ * Get actionslider magnet position.
+ *
+ * @param obj The actionslider object.
+ * @return The positions with magnet property.
+ *
+ * @ingroup Actionslider
+ */
+EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const 
Evas_Object *obj);
+
+/**
+ * Set actionslider enabled position. To set multiple positions as enabled @c 
or
+ * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
+ *
+ * @note All the positions are enabled by default.
+ *
+ * @param obj The actionslider object.
+ * @param pos Bit mask indicating the enabled positions.
+ *
+ * @ingroup Actionslider
+ */
+EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object 
*obj, Elm_Actionslider_Pos pos);
+
+/**
+ * Get actionslider enabled position.
+ *
+ * @param obj The actionslider object.
+ * @return The enabled positions.
+ *
+ * @ingroup Actionslider
+ */
+EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const 
Evas_Object *obj);
+
+
+/**
+ * Get actionslider selected label.
+ *
+ * @param obj The actionslider object
+ * @return The selected label
+ *
+ * @ingroup Actionslider
+ */
+EAPI const char                 *elm_actionslider_selected_label_get(const 
Evas_Object *obj);

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to