enum Elm.Ctxpopup.Direction
{
   [[Direction in which to show the popup.]]
   down, [[Ctxpopup show appear below clicked area.]]
   right, [[Ctxpopup show appear to the right of the clicked area.]]
   left, [[Ctxpopup show appear to the left of the clicked area.]]
   up, [[Ctxpopup show appear above the clicked area.]]
   unknown [[Ctxpopup does not determine it's direction yet.]]
}

class Elm.Ctxpopup (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
{
   eo_prefix: elm_obj_ctxpopup;
   methods {
      @property horizontal {
         set {
            [[Change the ctxpopup's orientation to horizontal or vertical.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[Get the value of current ctxpopup object's orientation.

              See also @.horizontal.set.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            horizontal: bool; [[$true for horizontal mode, $false for vertical.]]
         }
      }
      @property auto_hide_disabled {
         set {
            [[Set ctxpopup auto hide mode triggered by ctxpopup policy.

              Use this function when user wants ctxpopup not to hide automatically.
              By default, ctxpopup is dismissed whenever mouse clicked its background area, language is changed,
              and its parent geometry is updated(changed).
              Not to hide ctxpopup automatically, disable auto hide function by calling this API,
              then ctxpopup won't be dismissed in those scenarios.

              Default value of disabled is $false.

              See also @.auto_hide_disabled.get.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif

              @since 1.9
            ]]
         }
         get @internal {
            [[Get ctxpopup auto hide mode triggered by ctxpopup policy.

              See also @.auto_hide_disabled.set for more information.

              @since 1.9
            ]]
         }
         values {
            disabled: bool; [[auto hide enable/disable.]]
         }
      }
      @property hover_parent {
         set {
            [[Set the Ctxpopup's parent

              Set the parent object.

              Note: \@ref elm_ctxpopup_add will automatically call this function
              with its $parent argument.

              See also \@ref elm_ctxpopup_add,
              \@ref elm_hover_parent_set.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[Get the Ctxpopup's parent

              See also @.hover_parent.set for more information

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            parent: Evas.Object *; [[The parent to use.]]
         }
      }
      @property direction_priority {
         set {
            [[Set the direction priority of a ctxpopup.

              This functions gives a chance to user to set the priority of ctxpopup
              showing direction. This doesn't guarantee the ctxpopup will appear in the
              requested direction.

              See also @.Direction.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         get {
            [[Get the direction priority of a ctxpopup.

              See also @.direction_priority.set for more information.

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
         }
         values {
            first: Elm.Ctxpopup.Direction; [[1st priority of direction]]
            second: Elm.Ctxpopup.Direction; [[2nd priority of direction]]
            third: Elm.Ctxpopup.Direction; [[3th priority of direction]]
            fourth: Elm.Ctxpopup.Direction; [[4th priority of direction]]
         }
      }
      @property direction {
         get {
            [[Get the current direction of a ctxpopup.

              Warning: Once the ctxpopup showed up, the direction would be determined

              \@if MOBILE \@since_tizen 2.3
              \@elseif WEARABLE \@since_tizen 2.3.1
              \@endif
            ]]
            return: Elm.Ctxpopup.Direction(Elm.Ctxpopup.Direction.unknown);
         }
      }
      @property items {
         get @internal {
            [[Get the internal list of items in a given ctxpopup widget.

              This list is not to be modified in any way and must not be
              freed. Use the list members with functions like
              \@ref elm_object_item_text_set,
              \@ref elm_object_item_text_get,
              \@ref elm_object_item_del.

              Warning: This list is only valid until $obj object's internal
              items list is changed. It should be fetched again with another
              call to this function when changes happen.

              @since 1.11
            ]]
            return: const(list<Elm.Object.Item*>)*; [[The list of items or
            $null on errors.]]

         }
      }
      @property first_item {
         get @internal {
            [[Get the first item in the given ctxpopup widget's list of
              items.

              See also  @.item_append,
              @.last_item.get.

              @since 1.11
            ]]
            return: Elm.Widget_Item *; [[The first item or $null, if it has no items (and on
              errors).]]

         }
      }
      @property last_item {
         get @internal {
            [[Get the last item in the given ctxpopup widget's list of
              items.

              See also @.item_prepend,
              @.first_item.get.

              @since 1.1
            ]]
            return: Elm.Widget_Item *; [[The last item or $null, if it has no items (and on
              errors).]]

         }
      }
      dismiss {
         [[Dismiss a ctxpopup object

         Use this function to simulate clicking outside of the ctxpopup to dismiss it.
         In this way, the ctxpopup will be hidden and the "clicked" signal will be
         emitted.

         \@if MOBILE \@since_tizen 2.3
         \@elseif WEARABLE \@since_tizen 2.3.1
         \@endif
       ]]

      }
      clear {
         [[Clear all items in the given ctxpopup object.

           \@if MOBILE \@since_tizen 2.3
           \@elseif WEARABLE \@since_tizen 2.3.1
           \@endif
         ]]
      }
      item_insert_before @internal {
         [[Insert a new item to a ctxpopup object before item $before.

           See also elm_object_content_set.

           @since 1.21
         ]]
         return: Elm.Widget_Item *; [[A handle to the item added or $null, on errors.]]

         params {
            @in before: Elm.Widget_Item *; [[The ctxpopup item to insert before.]]
            @in label: const(char)*; [[The Label of the new item]]
            @in icon: Evas.Object * @optional; [[Icon to be set on new item]]
            @in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected]]
            @in data: const(void)* @optional; [[Data passed to $func]]
         }
      }
      item_insert_after @internal {
         [[Insert a new item to a ctxpopup object after item $after.

           See also elm_object_content_set.

           @since 1.21
         ]]
         return: Elm.Widget_Item *; [[A handle to the item added or $null, on errors.]]

         params {
            @in after: Elm.Widget_Item *; [[The ctxpopup item to insert after.]]
            @in label: const(char)*; [[The Label of the new item]]
            @in icon: Evas.Object * @optional; [[Icon to be set on new item]]
            @in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected]]
            @in data: const(void)* @optional; [[Data passed to $func]]
         }
      }
      item_append {
         [[Add a new item to a ctxpopup object.


           Warning:Ctxpopup can't hold both an item list and a content at the same
           time. When an item is added, any previous content will be removed.

           See also \@ref elm_object_content_set.

           \@if MOBILE \@since_tizen 2.3
           \@elseif WEARABLE \@since_tizen 2.3.1
           \@endif
         ]]
         return: Elm.Widget_Item *; [[A handle to the item added or $null, on errors.]]

         params {
            @in label: const(char)*; [[The Label of the new item]]
            @in icon: Evas.Object * @optional; [[Icon to be set on new item]]
            @in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected]]
            @in data: const(void)* @optional; [[Data passed to $func]]
         }
      }
      item_prepend @internal {
         [[Prepend a new item to a ctxpopup object.

           Warning: Ctxpopup can't hold both an item list and a content at the same
           time. When an item is added, any previous content will be removed.

           See also \@ref elm_object_content_set.

           @since 1.11
         ]]
         return: Elm.Widget_Item *; [[A handle to the item added or $null, on errors.]]

         params {
            @in label: const(char)*; [[The Label of the new item]]
            @in icon: Evas.Object * @optional; [[Icon to be set on new item]]
            @in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected]]
            @in data: const(void)* @optional; [[Data passed to $func]]
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.del;
      Evas.Object_Smart.add;
      Elm.Widget.parent.set;
      Elm.Widget.focus_direction;
      Elm.Widget.sub_object_add;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_next;
      Elm.Widget.disable;
      Elm.Widget.translate;
      Elm.Widget.theme_apply;
      Elm.Widget.event;
      Elm.Container.content_get;
      Elm.Container.content_set;
      Elm.Container.content_unset;
      Elm.Layout.sub_object_add_enable;
      Elm.Layout.sizing_eval;
      Elm_Interface_Atspi_Widget_Action.elm_actions.get;
      Elm_Interface_Atspi_Accessible.state_set.get;
      Elm_Interface_Atspi_Accessible.children.get;
      //TIZEN ONLY(20160918): name interface added
      Elm_Interface_Atspi_Accessible.name.get;
      //
      Elm_Interface_Atspi_Component.extents.get;
      Elm_Interface_Atspi_Component.highlight_grab;
      Elm_Interface_Atspi_Component.highlight_clear;
   }
   events {
      dismissed;
   }
}
