[floatingbutton] Add legacy api and modify eo_prefix 14/174214/2 submit/tizen/20180403.101617
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 29 Mar 2018 06:26:09 +0000 (15:26 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 30 Mar 2018 05:25:24 +0000 (14:25 +0900)
Change-Id: Ic929e557c5f9a141a66be0011c6793d1e84c10cc

inc/mobile/eext_floatingbutton_legacy.h
src/mobile/eext_floatingbutton.c
src/mobile/eext_floatingbutton.eo

index 9e9c77c719e4acc972d77faf3e6a4171bccdc484..9b0371e3c2bbb0ca9c0403e11e7d42d6b73eb82c 100644 (file)
  */
 EAPI Evas_Object *eext_floatingbutton_add(Evas_Object *parent);
 
+/**
+ * @brief Set the floatingbutton position
+ *
+ * The floatingbutton can be moved among predefined positions (LEFT_OUT, LEFT,
+ * CENTER, RIGHT, RIGHT_OUT), eext_floatingbutton_pos_set() moves
+ * floatingbutton to a given position immediately (without animation).
+ *
+ * return EINA_TRUE on success, EINA_FALSE otherwise.
+ *
+ * @param[in] obj The object.
+ * @param[in] pos the floatingbutton position
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI Eina_Bool eext_floatingbutton_pos_set(Evas_Object *obj, Eext_Floatingbutton_Pos pos);
+
+/**
+ * @brief Get the floatingbutton position
+ *
+ * return Floatingbutton position with Eext_Floatingbutton_Pos enumeration
+ *
+ * see eext_floatingbutton_pos_set()
+ *
+ * @param[in] obj The object.
+ *
+ * @return the floatingbutton position
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI Eext_Floatingbutton_Pos eext_floatingbutton_pos_get(const Evas_Object *obj);
+
+/**
+ * @brief Set whether floatingbutton can be moved or not.
+ *
+ * By default, floatingbutton are movable by user interaction.
+ *
+ * @param[in] obj The object.
+ * @param[in] block the floatingbutton movability
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI void eext_floatingbutton_movement_block_set(Evas_Object *obj, Eina_Bool block);
+
+/**
+ * @brief Get movability for a given floatingbutton widget.
+ *
+ * return EINA_TRUE, if obj is set to be unmovable, EINA_FALSE, if it's
+ * movable.
+ *
+ * see eext_floatingbutton_movement_block_set()
+ *
+ * @param[in] obj The object.
+ *
+ * @return the floatingbutton movability
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI Eina_Bool eext_floatingbutton_movement_block_get(const Evas_Object *obj);
+
+/**
+ * @brief Set floatingbutton mode.
+ *
+ * Positions where floatingbutton can stop are restrained by mode.
+ *
+ * @param[in] obj The object.
+ * @param[in] mode floatingbutton mode
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI void eext_floatingbutton_mode_set(Evas_Object *obj, Eext_Floatingbutton_Mode mode);
+
+/**
+ * @brief Get floatingbutton mode.
+ *
+ * see eext_floatingbutton_mode_set()
+ *
+ * @param[in] obj The object.
+ *
+ * @return floatingbutton mode
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI Eext_Floatingbutton_Mode eext_floatingbutton_mode_get(const Evas_Object *obj);
+
+/**
+ * @brief Set the floatingbutton position with animation
+ *
+ * Move floatingbutton similar to eext_floatingbutton_pos_set(), but with
+ * animation.
+ *
+ * return EINA_TRUE on success, EINA_FALSE otherwise.
+ *
+ * see eext_floatingbutton_pos_set()
+ *
+ * @param[in] obj The object.
+ * @param[in] pos the floatingbutton position
+ *
+ * @ingroup Eext_Floatingbutton
+ */
+EAPI Eina_Bool eext_floatingbutton_pos_bring_in(Evas_Object *obj, const Eext_Floatingbutton_Pos pos);
+
 #include "eext_floatingbutton.eo.legacy.h"
index e44dcdb92f2d801da84560abab87e9ca06fa6c9e..a0347411a8a0873817d29834c8ea343f67435827 100644 (file)
@@ -825,4 +825,39 @@ _eext_floatingbutton_efl_part_part(const Eo *obj, Eext_Floatingbutton_Data *sd E
                   _eext_floatingbutton_part_initialize(efl_added, (Eo *) obj, part));
 }
 
+EAPI Eina_Bool eext_floatingbutton_pos_set(Evas_Object *obj, Eext_Floatingbutton_Pos pos)
+{
+   return eext_ui_floatingbutton_pos_set(obj, pos);
+}
+
+EAPI Eext_Floatingbutton_Pos eext_floatingbutton_pos_get(const Evas_Object *obj)
+{
+   return eext_ui_floatingbutton_pos_get(obj);
+}
+
+EAPI void eext_floatingbutton_movement_block_set(Evas_Object *obj, Eina_Bool block)
+{
+   eext_ui_floatingbutton_movement_block_set(obj, block);
+}
+
+EAPI Eina_Bool eext_floatingbutton_movement_block_get(const Evas_Object *obj)
+{
+   return eext_ui_floatingbutton_movement_block_get(obj);
+}
+
+EAPI void eext_floatingbutton_mode_set(Evas_Object *obj, Eext_Floatingbutton_Mode mode)
+{
+   eext_ui_floatingbutton_mode_set(obj, mode);
+}
+
+EAPI Eext_Floatingbutton_Mode eext_floatingbutton_mode_get(const Evas_Object *obj)
+{
+   return eext_ui_floatingbutton_mode_get(obj);
+}
+
+EAPI Eina_Bool eext_floatingbutton_pos_bring_in(Eext_Floatingbutton *obj, const Eext_Floatingbutton_Pos pos)
+{
+   return eext_ui_floatingbutton_pos_bring_in(obj, pos);
+}
+
 #include "eext_floatingbutton_part_content.eo.c"
index 202183f4727e04ad62a31f371e1560a559b3b70d..67a0b3b363085fbaab13c736a11b02619c19bce7 100644 (file)
@@ -18,6 +18,7 @@ enum Eext.Floatingbutton.Mode {
 }
 
 class Eext.Floatingbutton (Efl.Ui.Layout, Efl.Access.Component) {
+   eo_prefix: eext_ui_floatingbutton;
    methods {
       @property floatingbutton_pos {
          set {