atspi: Add and expose API 15/125515/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Fri, 14 Apr 2017 04:14:15 +0000 (13:14 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Tue, 18 Apr 2017 01:47:33 +0000 (10:47 +0900)
[add]
- elm_object_part_access_register

[expose]
- elm_object_part_access_object_get
- elm_access_object_register
- elm_access_object_unregister
- elm_access_object_get
- elm_atspi_bridge_utils_say
- elm_atspi_accessible_name_cb_set
- elm_atspi_accessible_description_cb_set
- elm_atspi_accessible_attribute_append
- elm_atspi_accessible_reading_info_type_set
- elm_atspi_accessible_reading_info_type_get
- elm_atspi_accessible_gesture_cb_set
- elm_atspi_accessible_can_highlight_set
- elm_atspi_accessible_can_highlight_get
- elm_atspi_component_highlight_grab
- elm_atspi_component_highlight_clear

Change-Id: Id9cf551a18cb2362081cd4058950c2adf6152424

src/lib/elm_access.h
src/lib/elm_atspi_bridge.h
src/lib/elm_interface_atspi_accessible.eo
src/lib/elm_interface_atspi_component.eo
src/lib/elm_main.c
src/lib/elm_object.h

index 291701f570472daf633ca455654040ceadcc1040..ba97449f8d8fba1cb475236dfe0040d56c4eaf1c 100644 (file)
@@ -111,8 +111,6 @@ typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Ob
 
 
 /**
- * @internal
- *
  * @brief Register evas object as an accessible object.
  * @since 1.8
  *
@@ -121,24 +119,26 @@ typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Ob
  * accessible object.
  *
  * @ingroup Access
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Evas_Object *elm_access_object_register(Evas_Object *obj, Evas_Object *parent);
 
 /**
- * @internal
- *
  * @brief Unregister accessible object.
  * @since 1.8
  *
  * @param obj The Evas object to unregister accessible object.
  *
  * @ingroup Access
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI void elm_access_object_unregister(Evas_Object *obj);
 
 /**
- * @internal
- *
  * @brief Get an accessible object of the evas object.
  * @since 1.8
  *
@@ -146,6 +146,9 @@ EAPI void elm_access_object_unregister(Evas_Object *obj);
  * @return Accessible object of the evas object or NULL for any error
  *
  * @ingroup Access
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Evas_Object *elm_access_object_get(const Evas_Object *obj);
 
index 41556d23a51d6181d7f3de02f61a7394f390e831..2ac1c834d5f88c9d68b741ee13e4271bee7deb1f 100644 (file)
@@ -17,6 +17,9 @@ typedef void (*Elm_Atspi_Say_Signal_Cb)(void *data, const char *say_signal);
  * @param data The user data to be passed to the callback function
  *
  * @ingoup Elm_Atspi_Bridge
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI void elm_atspi_bridge_utils_say(const char* text,
                                      Eina_Bool discardable,
index a2843a2a9ceed1d011cb7769163db529dcac8052..2fc99062c90cd4aa95f9b29888d69d3bf9dfc967 100644 (file)
@@ -50,11 +50,15 @@ mixin Elm_Interface_Atspi_Accessible ()
       //TIZEN_ONLY(20190922): add name callback, description callback.
       @property name_cb {
          set {
-            [[Sets name information callback about widget.]]
+            [[Sets name information callback about widget.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          values {
-            name_cb: Elm_Atspi_Reading_Info_Cb;
-            data: const(void)*;
+            name_cb: Elm_Atspi_Reading_Info_Cb; [[The function called to provide the accessible name.]]
+            data: const(void)*; [[The data passed to \@c name_cb.]]
          }
       }
       //
@@ -113,10 +117,14 @@ mixin Elm_Interface_Atspi_Accessible ()
       }
       //TIZEN_ONLY(20160729): attributes_get, append, reading_information set APIs added/updated.
       attribute_append {
-         [[Add key-value pair identifying widget extra attribute]]
+         [[Add key-value pair identifying widget extra attribute
+
+           \@if WEARABLE \@since_tizen 3.0
+           \@endif
+         ]]
          params {
-            @in key: const(char)*;
-            @in value: const(char)*;
+            @in key: const(char)*; [[The string key to give extra information.]]
+            @in value: const(char)*; [[The string value to give extra information.]]
          }
       }
 
@@ -127,10 +135,18 @@ mixin Elm_Interface_Atspi_Accessible ()
 
       @property reading_info_type @protected {
          get {
-            [[Gets reading information of an accessible object.]]
+            [[Gets reading information types of an accessible object.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          set {
-            [[Gets reading information of an accessible object.]]
+            [[Gets reading information of an accessible object.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          values {
             reading_info: Elm_Atspi_Reading_Info_Type_Mask; [[Reading information types]]
@@ -169,18 +185,26 @@ mixin Elm_Interface_Atspi_Accessible ()
       //TIZEN_ONLY(20190922): add name callback, description callback.
       @property description_cb {
          set {
-            [[Sets contextual information callback about widget.]]
+            [[Sets contextual information callback about widget.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          values {
-            description_cb: Elm_Atspi_Reading_Info_Cb;
-            data: const(void)*;
+            description_cb: Elm_Atspi_Reading_Info_Cb; [[The function called to provide the accessible description.]]
+            data: const(void)*; [[The data passed to \@c description_cb.]]
          }
       }
       //
       //TIZEN_ONLY(20170405) Add gesture method to accessible interface
       @property gesture_cb {
          set {
-            [[Sets gesture callback to give widget.]]
+            [[Sets gesture callback to give widget.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          values {
             gesutre_cb: Elm_Atspi_Gesture_Cb;
@@ -218,13 +242,21 @@ mixin Elm_Interface_Atspi_Accessible ()
       //TIZEN_ONLY(20160726): add API elm_atspi_accessible_can_highlight_set/get
       @property can_highlight {
          get {
-            [[Gets highlightable of given widget.]]
+            [[Gets highlightable of given widget.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          set {
-            [[Sets highlightable to given widget.]]
+            [[Sets highlightable to given widget.
+
+              \@if WEARABLE \@since_tizen 3.0
+              \@endif
+            ]]
          }
          values {
-            can_highlight: bool;
+            can_highlight: bool; [[If \@c true, the object is highlightable.]]
          }
       }
       //
index 91950a0022a139956c2682523e936068fe713073..ae7ea76fc3dd2898a4bbd0d56a440d2270db20c1 100644 (file)
@@ -101,17 +101,25 @@ mixin Elm_Interface_Atspi_Component ()
          return: Eo*;
       }
       //TIZEN_ONLY(20160329): atspi: implement HighlightGrab and HighlightClear methods (29e253e2f7ef3c632ac3a64c489bf569df407f30)
-      highlight_grab @protected {
+      highlight_grab {
          [[ Highlights accessible widget.
-         returns true if highlight grab has successed, false otherwise. ]]
+         returns true if highlight grab has successed, false otherwise.
+
+           \@if WEARABLE \@since_tizen 3.0
+           \@endif
+         ]]
          //TIZEN_ONLY(20160721): atspi: provide highlight legacy API
          legacy: elm_atspi_component_highlight_grab;
          //
          return: bool;
       }
-      highlight_clear @protected {
+      highlight_clear {
          [[ Clears highlight of accessible widget.
-         returns true if clear has successed, false otherwise. ]]
+         returns true if clear has successed, false otherwise.
+
+           \@if WEARABLE \@since_tizen 3.0
+           \@endif
+         ]]
          //TIZEN_ONLY(20160721): atspi: provide highlight legacy API
          legacy: elm_atspi_component_highlight_clear;
          //
index 94c86584d8663b1a116552a22fdc14b1fc6ef6b6..55f53f702e510eddd139407a0a08d386d68471a0 100644 (file)
@@ -1856,6 +1856,21 @@ elm_object_focus_region_show_mode_get(const Evas_Object *obj)
    return elm_widget_focus_region_show_mode_get(obj);
 }
 
+EAPI Evas_Object *
+elm_object_part_access_register(Evas_Object *obj, const char *part)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
+   if (!evas_object_smart_type_check(obj, "elm_layout"))
+     {
+        ERR("Only for parts of a layout, access object can be registered");
+        return NULL;
+     }
+
+   Evas_Object *edj = elm_layout_edje_get(obj);
+   return _elm_access_edje_object_part_object_register(obj, edj, part);
+}
+
 //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
 EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part)
 {
index 1374e0255cb8c955cc5625994f6fcc6f451a4e03..03816cfcf707550ee945833d08fe7eb49216e5af 100644 (file)
@@ -614,16 +614,32 @@ EAPI void        elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina
  */
 EAPI Eina_Bool   elm_object_orientation_mode_disabled_get(const Evas_Object *obj);
 
-//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
+//TIZEN_ONLY(20170414): add API elm_object_part_access_register
 /**
- * Get the access object which is registered to part
+ * @brief Registers a part of an object as an access object.
+ *
+ * @param obj The object
+ * @param part The object's part name to register
  *
- * @param obj The Elementary widget
- * @param part The widget's part name to get access object
+ * @ingroup General
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
+ */
+EAPI Evas_Object *elm_object_part_access_register(Evas_Object *obj, const char *part);
+//
+
+//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
+/**
+ * @brief Get the access object which is registered to part
  *
- * @since 1.18
+ * @param obj The object
+ * @param part The object's part name to get access object
  *
  * @ingroup General
+ *
+ * @if WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part);
 //