atspi, floatingbutton : update Efl.Access.Component.Extents function
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 31 Jan 2018 12:08:24 +0000 (21:08 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 19 Mar 2018 05:48:08 +0000 (14:48 +0900)
Change-Id: I00ce7c8377c4c1ee7ecf99219f208a2896bde11a

src/mobile/eext_floatingbutton.c
src/mobile/eext_floatingbutton.eo

index 992ee5d094d41dd625d5ca5bce38be6a97e1979b..8843158129d949be26c091c53fdd3c76c8893509 100644 (file)
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
+#define EFL_ACCESS_COMPONENT_BETA
+#define EFL_ACCESS_COMPONENT_PROTECTED
 #define ELM_INTERNAL_API_ARGESFSDFEFC 1
 #define ELM_WIDGET_PROTECTED
 #define EFL_UI_WIDGET_PROTECTED
@@ -619,32 +620,28 @@ _eext_floatingbutton_floatingbutton_mode_get(Eo *obj,
    return sd->mode;
 }
 
-/* TODO : there will be this definition once we rebase onto upstream/master
-EOLIAN static void
-_eext_floatingbutton_efl_access_component_extents_get(Eo *obj EINA_UNUSED, Eext_Floatingbutton_Data *sd, Eina_Bool screen_coords, int *x, int *y, int *w, int *h)
+EOLIAN static Eina_Rect
+_eext_floatingbutton_efl_access_component_extents_get(Eo *obj EINA_UNUSED, Eext_Floatingbutton_Data *sd, Eina_Bool screen_coords)
 {
+   Eina_Rect r = EINA_RECT(-1, -1, -1, -1);
    int ee_x, ee_y;
 
    if (!sd->box)
-     {
-        if (x) *x = -1;
-        if (y) *y = -1;
-        if (w) *w = -1;
-        if (h) *h = -1;
-        return;
-     }
-   evas_object_geometry_get(sd->box, x, y, w, h);
+     return r;
+   r = efl_gfx_geometry_get(sd->box);
 
    if (screen_coords)
      {
         Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->box));
-        if (!ee) return;
-        ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
-        if (x) *x += ee_x;
-        if (y) *y += ee_y;
+        if (ee)
+          {
+             ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
+             r.x += ee_x;
+             r.y += ee_y;
+          }
      }
+   return r;
 }
-*/
 
 EOLIAN static Eina_Bool
 _eext_floatingbutton_efl_ui_base_mirrored_get(Eo *obj EINA_UNUSED, Eext_Floatingbutton_Data *sd EINA_UNUSED)
@@ -818,4 +815,4 @@ _eext_floatingbutton_efl_part_part(const Eo *obj, Eext_Floatingbutton_Data *sd E
                   _eext_floatingbutton_part_initialize(efl_added, (Eo *) obj, part));
 }
 
-#include "eext_floatingbutton_part_content.eo.c"
\ No newline at end of file
+#include "eext_floatingbutton_part_content.eo.c"
index 4c61f4bf91186673e6d1c546f160bc72ac3f02f1..202183f4727e04ad62a31f371e1560a559b3b70d 100644 (file)
@@ -17,7 +17,7 @@ enum Eext.Floatingbutton.Mode {
    last          [[ indicates the last, do not use this ]]
 }
 
-class Eext.Floatingbutton (Efl.Ui.Layout) {
+class Eext.Floatingbutton (Efl.Ui.Layout, Efl.Access.Component) {
    methods {
       @property floatingbutton_pos {
          set {
@@ -109,7 +109,7 @@ class Eext.Floatingbutton (Efl.Ui.Layout) {
       Efl.Object.constructor;
       Efl.Ui.Base.mirrored { get; set; }
       Efl.Ui.Widget.theme_apply;
-//      Efl.Access.Component.extents.get; // TODO : there will be this definition once we rebase onto upstream/master
+      Efl.Access.Component.extents { get; }
       Efl.Part.part;
    }
 }