import elm_general;

enum Elm.Theme.Apply
{
   failed = 0,
   default = 1,
   success = 3
}

//TIZEN_ONLY(20160527): widget: add AtspiAction interface to all widgets
/*
abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Interface_Atspi_Component)
*/
abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible,
         Elm_Interface_Atspi_Component, Elm_Interface_Atspi_Widget_Action)
//
{
   eo_prefix: elm_obj_widget;
   data: Elm_Widget_Smart_Data;
   methods {
      @property focus {
         set {
         }
         get {
         }
         values {
            focus: bool;
         }
      }
      @property drag_lock_y {
         set {
         }
         get {
         }
         values {
            lock: bool;
         }
      }
      @property focus_highlight_style {
         [[Control the widget focus highlight style.]]
         set {
            return: bool;
         }
         get {
         }
         values {
            style: const(char)*;
         }
      }
      @property tree_unfocusable {
         set {
         }
         get {
         }
         values {
            tree_unfocusable: bool;
         }
      }
      @property mirrored {
         [[Control the widget's mirrored mode.]]
         set {
         }
         get {
         }
         values {
            mirrored: bool;
         }
      }
      @property theme {
         set {
         }
         get {
         }
         values {
            th: Elm_Theme * @nullable;
         }
      }
      @property disabled {
         set {
         }
         get {
         }
         values {
            disabled: bool;
         }
      }
      @property highlight_ignore {
         set {
         }
         get {
         }
         values {
            ignore: bool;
         }
      }
      @property mirrored_automatic {
         [[Control the widget's mirrored mode setting.]]
         set {
         }
         get {
         }
         values {
            automatic: bool;
         }
      }
      @property orientation_mode_disabled {
         set {
         }
         get {
         }
         values {
            disabled: bool;
         }
      }
      @property style {
         set {
            return: Elm.Theme.Apply;
         }
         get {
         }
         values {
            style: const(char)*;
         }
      }
      @property scale {
         set {
         }
         get {
         }
         values {
            scale: double;
         }
      }
      @property focus_custom_chain {
         set {
            values {
               objs: list<Evas.Object*>*;
            }
         }
         get {
            values {
               objs: const(list<Evas.Object*>)*;
            }
         }
      }
      @property can_focus {
         set {
         }
         get {
         }
         values {
            can_focus: bool;
         }
      }
      @property highlight_in_theme {
         set {
         }
         get {
         }
         values {
            highlight: bool;
         }
      }
      @property parent {
         set {
         }
         get {
         }
         values {
            parent: Evas.Object * @nullable;
         }
      }
      @property access_info {
         set {
         }
         get {
         }
         values {
            txt: const(char)* @nullable;
         }
      }
      @property drag_lock_x {
         set {
         }
         get {
         }
         values {
            lock: bool;
         }
      }
      @property access_highlight_in_theme {
         set {
         }
         get {
         }
         values {
            highlight: bool; [[highlight]]
         }
      }
      @property focus_region_show_mode {
         [[Control the focus_region_show mode.]]
         set {
         }
         get {
         }
         values {
            mode: Elm_Focus_Region_Show_Mode;
         }
      }
      @property parent_highlight {
         set {
         }
         values {
            highlighted: bool;
         }
      }
      @property theme_object {
         set {
            return: Elm.Theme.Apply;
         }
         values {
            edj: Evas.Object *;
            wname: const(char)*;
            welement: const(char)*;
            wstyle: const(char)*;
         }
      }
      @property hover_object {
         set {
         }
         values {
            sobj: Evas.Object * @nullable;
         }
      }
      @property display_mode {
         set {
         }
         values {
            dispmode: Evas_Display_Mode;
         }
      }
      @property on_show_region_hook {
         set {
         }
         values {
            func: region_hook_func_type @nullable;
            data: void * @optional;
         }
      }
      @property domain_part_text_translatable {
         set {
         }
         values {
            part: const(char)*;
            domain: const(char)*;
            translatable: bool;
         }
      }
      @property orientation {
         set {
         }
         values {
            rotation: int;
         }
      }
      @property resize_object {
         set {
         }
         values {
            sobj: Evas.Object * @nullable;
            sub_obj: bool;
         }
      }
      @property domain_translatable_part_text {
         set {
         }
         values {
            part: const(char)*;
            domain: const(char)*;
            label: const(char)*;
         }
      }
      @property scrollable_children {
         get {
            [[Function to operate on a given widget's scrollabe children when necessary.

              Warning: free the returned list with eina_list_free().]]
            return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused;
         }
      }
      @property scroll_hold {
         get {
            return: int;
         }
      }
      @property drag_child_locked_y {
         get {
            return: int;
         }
      }
      @property item_loop_enabled {
         [[Control item loop feature.]]
         set {
         }
         get {
         }
         values {
            enable: bool;
         }
      }
      @property child_can_focus {
         get {
            return: bool;
         }
      }
      @property scroll_freeze {
         get {
            return: int;
         }
      }
      @property focus_region {
         get {
            return: bool;
         }
         values {
            x: Evas.Coord;
            y: Evas.Coord;
            w: Evas.Coord;
            h: Evas.Coord;
         }
      }
      @property top {
         get {
            return: Evas.Object *;
         }
      }
      @property focus_order {
         get {
            return: uint;
         }
      }
      @property drag_child_locked_x {
         get {
            return: int;
         }
      }
      @property can_focus_child_list {
         get {
            return: free(own(list<Evas.Object *> *), eina_list_free) @warn_unused;
         }
      }
      @property focused_item {
         get {
            [[Get the focused widget item.]]
            return: Elm.Widget_Item *;
         }
      }
      @property parents_bounce {
         get {
         }
         values {
            horiz: bool;
            vert: bool;
         }
      }
      @property parent_widget {
         get {
            return: Evas.Object *;
            legacy: null;
         }
      }
      @property highlight {
         get {
            return: bool;
         }
      }
      @property focused_object {
         get {
            return: Evas.Object *;
         }
      }
      @property parent2 {
         set {
         }
         get {
         }
         values {
            parent: Evas.Object * @nullable;
         }
      }
      @property part_text {
         set {
         }
         get {
         }
         keys {
            part: const(char)*;
         }
         values {
            label: const(char)*;
         }
      }
      newest_focus_order_get @const {
         return: Evas.Object *;
         params {
            @out newest_focus_order: uint;
            @in can_focus_only: bool;
         }
      }
      scroll_hold_push {
      }
      cursor_add {
         params {
            @in cur: Elm_Cursor *;
         }
      }
      focus_next_object_set {
         [[Set the next object with specific focus direction.

           @since 1.8]]
         params {
            @in next: Evas.Object * @nullable; [[Focus next object]]
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_object_get @const {
         [[Get the next object with specific focus direction.

           @since 1.8]]
         return: Evas.Object *; [[Focus next object]]
         params {
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_item_set {
         [[Set the next object item with specific focus direction.

           @since 1.16]]
         params {
            @in next_item: Elm_Object_Item * @nullable; [[Focus next object item]]
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_next_item_get @const {
         [[Get the next object item with specific focus direction.

           @since 1.16]]
         return: Elm_Object_Item *; [[Focus next object item]]
         params {
            @in dir: Elm.Focus_Direction; [[Focus direction]]
         }
      }
      focus_tree_unfocusable_handle {
      }
      focus_custom_chain_prepend {
         params {
            @in child: Evas.Object *;
            @in relative_child: Evas.Object * @optional;
         }
      }
      part_text_translate {
         return: const(char)*;
         params {
            @in part: const(char)*;
            @in text: const(char)*;
         }
      }
      focus_highlight_geometry_get @const {
         [[Get the focus highlight geometry of widget.]]
         params {
            @in x: Evas.Coord *;
            @in y: Evas.Coord *;
            @in w: Evas.Coord *;
            @in h: Evas.Coord *;
         }
      }
      activate {
         [['Virtual' function to activate widget.]]
         params {
            @in act: Elm_Activate;
         }
         return: bool;
         legacy: null; /* the legacy API has not the same number of parameter to we don't generate it. */
      }
      sub_object_add {
         [['Virtual' function handling sub objects being added.]]
         return: bool;
         params {
            @in sobj: Evas.Object *;
         }
      }
      focus_direction_manager_is {
         [['Virtual' function which checks if handling of passing focus to sub-objects in given direction is supported by widget.]]
         return: bool;
         legacy: null;
      }
      event {
         [['Virtual' function handling input events on the widget.]]
         params {
            @in source: Evas.Object *;
            @in type: Evas_Callback_Type;
            @in event_info: void *;
         }
         return: bool;
      }
      event_callback_add {
         params {
            @in func: Elm_Event_Cb;
            @in data: const(void)* @optional;
         }
      }
      access {
         [['Virtual' function on the widget being set access.]]
         params {
            @in acs: bool;
         }
         legacy: null;
      }
      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
      //register/unregister access objects accordingly.
      // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property
      screen_reader {
         [['Virtual' function on the widget being set screen reader.]]
         params {
            @in is_screen_reader: bool;
         }
         legacy: null;
      }
      //TIZEN_ONLY(20170621) handle atspi proxy connection at runtime
      atspi {
         [['Virtual' function on the widget being set atspi.]]
         params {
            @in is_atspi: bool;
         }
         legacy: null;
      }
      //
      //
      //
      cursor_del {
         params {
            @in cur: Elm_Cursor *;
         }
      }
      event_callback_del {
         return: void *;
         params {
            @in func: Elm_Event_Cb;
            @in data: const(void)* @nullable;
         }
      }
      on_focus {
         [['Virtual' function handling focus in/out events on the widget.  return true if this widget can handle focus, false otherwise]]
         params {
            @in item: Elm_Object_Item * @nullable;
         }
         return: bool;
      }
      on_focus_region {
         [['Virtual' function returning an inner area of a widget that should be brought into the visible area of a broader viewport, may this context arise.]]
         params {
            @out x: Evas.Coord;
            @out y: Evas.Coord;
            @out w: Evas.Coord;
            @out h: Evas.Coord;
         }
         return: bool;
      }
      focus_cycle {
         params {
            @in dir: Elm.Focus_Direction;
         }
      }
      focus_direction {
         [['Virtual' function handling passing focus to sub-objects given a direction, in degrees.]]
         params {
            @in base: const(Evas.Object)*;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm_Object_Item *;
            @out weight: double;
         }
         return: bool;
      }
      event_propagate {
         return: bool;
         params {
            @in type: Evas_Callback_Type;
            @in event_info: void *;
            @in event_flags: Evas_Event_Flags *;
         }
      }
      signal_callback_add {
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
            @in func: Edje_Signal_Cb;
            @in data: void *;
         }
      }
      focus_next_manager_is {
         [['Virtual' function which checks if handling of passing focus to sub-objects is supported by widget.]]
         return: bool;
      }
      name_find @const {
         return: Evas.Object *;
         params {
            @in name: const(char)*;
            @in recurse: int;
         }
      }
      focus_list_direction_get @const {
         return: bool;
         params {
            @in base: const(Evas.Object)*;
            @in items: const(list<Eo.Base*>)*;
            @in list_data_get: list_data_get_func_type;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm_Object_Item *;
            @out weight: double;
         }
      }
      focused_object_clear {
      }
      focus_direction_go {
         return: bool;
         params {
            @in degree: double;
         }
      }
      show_region_set {
         params {
            @in x: Evas.Coord;
            @in y: Evas.Coord;
            @in w: Evas.Coord;
            @in h: Evas.Coord;
            @in forceshow: bool;
         }
      }
      show_region_get @const {
         params {
            @out x: Evas.Coord @optional;
            @out y: Evas.Coord @optional;
            @out w: Evas.Coord @optional;
            @out h: Evas.Coord @optional;
         }
      }
      scroll_freeze_pop {
      }
      tooltip_del {
         params {
            @in tt: Elm_Tooltip *;
         }
      }
      focus_next_get @const {
         return: bool;
         params {
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm_Object_Item *;
         }
      }
      translatable_part_text_get @const {
         return: const(char)*;
         params {
            @in part: const(char)*;
         }
      }
      focus_restore {
         [[Restore the focus state of the sub-tree.

         This API will restore the focus state of the sub-tree to the latest
         state. If a sub-tree is unfocused and wants to get back to the latest
         focus state, this API will be helpful.]]
      }
      scroll_hold_pop {
      }
      translate {
         [['Virtual' function handling language changes on Elementary.]]
         return: bool;
         legacy: null;
      }
      scroll_freeze_push {
      }
      focus_custom_chain_unset {
      }
      focus_steal {
         params {
            @in item: Elm_Object_Item * @nullable;
         }
      }
      focus_hide_handle {
      }
      focus_next {
         [['Virtual' function handling passing focus to sub-objects.]]
         params {
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm_Object_Item *;
         }
         return: bool;
      }
      focus_list_next_get @const {
         return: bool;
         params {
            @in items: const(list<Eo.Base*>)*;
            @in list_data_get: list_data_get_func_type;
            @in dir: Elm.Focus_Direction;
            @out next: Evas.Object *;
            @out next_item: Elm_Object_Item *;
         }
      }
      focus_mouse_up_handle {
         legacy: null;
      }
      theme_apply {
         [['Virtual' function on the widget being re-themed.]]
         return: Elm.Theme.Apply;
      }
      focus_direction_get @const {
         return: bool;
         params {
            @in base: const(Evas.Object)*;
            @in degree: double;
            @out direction: Evas.Object *;
            @out direction_item: Elm_Object_Item *;
            @out weight: double;
         }
      }
      signal_callback_del {
         return: void *;
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
            @in func: Edje_Signal_Cb;
         }
      }
      signal_emit {
         params {
            @in emission: const(char)*;
            @in source: const(char)*;
         }
      }
      disable {
         [['Virtual' function on the widget being disabled.]]
         return: bool;
      }
      sub_object_del {
         [['Virtual' function handling sub objects being removed.]]
         return: bool;
         params {
            @in sobj: Evas.Object *;
         }
      }
      tooltip_add {
         params {
            @in tt: Elm_Tooltip *;
         }
      }
      focus_region_show @const {
      }
      focus_disabled_handle {
      }
      focus_custom_chain_append {
         params {
            @in child: Evas.Object *;
            @in relative_child: Evas.Object * @optional;
         }
      }
      @property focus_move_policy {
         set {
            [[Sets the widget's focus move policy.]]
         }
         get {
            [[Returns the widget's focus move policy.]]
         }
         values {
            policy: Elm_Focus_Move_Policy; [[Object's focus move policy.]]
         }
      }
      @property focus_move_policy_automatic {
         [[Control the widget's focus_move_policy mode setting.]]
         set {
         }
         get {
         }
         values {
            automatic: bool; [[$true to follow system focus move policy change, $false otherwise]]
         }
      }
      focus_reconfigure {
      }
      //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
      part_access_object_get @const {
         [[Get the access object of given part of the widget.

           @since 1.18]]
         return: Evas.Object *;
         params {
            @in part: const(char)*; [[The object's part name to get access object]]
         }
      }
      //
      //TIZEN_ONLY(20161013): clean up elm color class feature
      @property class_color {
         set {
            return: bool;
         }
         get {
            return: bool;
         }
         keys {
            color_class: const(char)*;
         }
         values {
            r: int;
            g: int;
            b: int;
            a: int;
         }
      }
      @property class_color2 {
         set {
            return: bool;
         }
         get {
            return: bool;
         }
         keys {
            color_class: const(char)*;
         }
         values {
            r: int;
            g: int;
            b: int;
            a: int;
         }
      }
      @property class_color3 {
         set {
            return: bool;
         }
         get {
            return: bool;
         }
         keys {
            color_class: const(char)*;
         }
         values {
            r: int;
            g: int;
            b: int;
            a: int;
         }
      }
      class_color_del {
         params {
            @in color_class: const(char)*;
         }
      }
      class_color_clear {
      }
      //
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Eo.Base.destructor;
      Eo.Base.dbg_info_get;
	  /* TIZEN_ONLY(20160622): Override Paragraph Direction APIs */
      Evas.Object.paragraph_direction.set;
	  /* END */
      Evas.Object_Smart.hide;
      Evas.Object_Smart.calculate;
      Evas.Object_Smart.clip_unset;
      Evas.Object_Smart.show;
      Evas.Object_Smart.color.set;
      Evas.Object_Smart.move;
      Evas.Object_Smart.member_del;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
      Evas.Object_Smart.clip.set;
      Evas.Object_Smart.member_add;
      Evas.Object_Smart.resize;
      @virtual .focus_direction;
      @virtual .focus_next;
      @virtual .parent_widget.get;
      Elm_Interface_Atspi_Accessible.name.get;
      //TIZEN_ONLY(20150717) add widget name setter
      Elm_Interface_Atspi_Accessible.name.set;
      //
      //TIZEN_ONLY(20161111) add widget/widget_item description get/set
      Elm_Interface_Atspi_Accessible.description.set;
      Elm_Interface_Atspi_Accessible.description.get;
      //
      Elm_Interface_Atspi_Accessible.state_set.get;
      Elm_Interface_Atspi_Accessible.children.get;
      Elm_Interface_Atspi_Accessible.parent.get;
      Elm_Interface_Atspi_Accessible.attributes.get;
      //TIZEN_ONLY(20150709) : atspi relations api
      Elm_Interface_Atspi_Accessible.relation_set.get;
      Elm_Interface_Atspi_Accessible.relationship_append;
      Elm_Interface_Atspi_Accessible.relationship_remove;
      Elm_Interface_Atspi_Accessible.relationships_clear;
      //
      //TIZEN_ONLY(20150731) : add i18n support for name and description
      Elm_Interface_Atspi_Accessible.translation_domain.set;
      Elm_Interface_Atspi_Accessible.translation_domain.get;
      //
      //TIZEN_ONLY(20160726): add API elm_atspi_accessible_can_highlight_set/get
      Elm_Interface_Atspi_Accessible.can_highlight.set;
      Elm_Interface_Atspi_Accessible.can_highlight.get;
      //
      Elm_Interface_Atspi_Component.focus_grab;
      //TIZEN_ONLY(20160329): atspi: implement HighlightGrab and HighlightClear methods (29e253e2f7ef3c632ac3a64c489bf569df407f30)
      Elm_Interface_Atspi_Component.highlight_grab;
      Elm_Interface_Atspi_Component.highlight_clear;
      //
      //TIZEN_ONLY(20160329): widget: improve accessibile_at_point getter (a8aff0423202b9a55dbb3843205875226678fbd6)
      Elm_Interface_Atspi_Component.accessible_at_point_get;
      //
      //TIZEN_ONLY(20160527): widget: add AtspiAction interface to all widgets
      Elm_Interface_Atspi_Widget_Action.elm_actions.get;
      //
   }
   events {
      moved;
      focused;
      unfocused;
      // TIZEN_ONLY(20161018): add highlighted/unhighlighted signal for atspi
      atspi,highlighted;
      atspi,unhighlighted;
      //
      language,changed;
      access,changed;
   }
}
