/* TIZEN_ONLY(20160705): Move Elm_Colorselector_Mode enum to
                         elm_colorselector_common.h to mark enum members
                         as deprecated.
enum Elm.Colorselector.Mode
{
   [[Different modes supported by Colorselector

      See also @Elm.Colorselector.mode.set, @Elm.Colorselector.mode.get.
   ]]
   legacy: elm_colorselector;
   palette = 0, [[Only color palette is displayed.]]
   components, [[Only color selector is displayed.]]
   both, [[Both Palette and selector is displayed, default.]]
   picker, [[Only color picker is displayed.]]
   all [[All possible color selector is displayed.]]
}
 */
/* END */

class Elm.Colorselector (Elm.Layout, Elm_Interface_Atspi_Widget_Action,
                         Evas.Clickable_Interface)
{
   eo_prefix: elm_obj_colorselector;
   methods {
      @property color {
         set {
            [[\@MOBILE_ONLY

              Set color to colorselector.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]

         }
         get {
            [[\@MOBILE_ONLY

              Get current color from colorselector.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]
         }
         values {
            r: int; [[r-value of color]]
            g: int; [[g-value of color]]
            b: int; [[b-value of color]]
            a: int; [[a-value of color]]
         }
      }
      @property palette_name {
         set {
            [[\@MOBILE_ONLY

              Set current palette's name

              When colorpalette name is set, colors will be loaded from and saved to config
              using the set name. If no name is set then colors will be loaded from or
              saved to "default" config.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]
         }
         get {
            [[\@MOBILE_ONLY

              Get current palette's name

              Returns the currently set palette name using which colors will be
              saved/loaded in to config.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]
         }
         values {
            palette_name: const(char)*; [[Name of palette]]
         }
      }
      @property mode {
         set {
            [[\@MOBILE_ONLY

              Set Colorselector's mode.

              Colorselector supports three modes palette only, selector only and both.
              Only palette mode is supported in Tizen 3.0.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]
         }
         get {
            [[\@MOBILE_ONLY

              Get Colorselector's mode.

              \@if MOBILE \@since_tizen 2.3
              \@endif
            ]]
         }
         values {
            mode: Elm.Colorselector.Mode; [[Elm_Colorselector_Mode]]
         }
      }
      @property palette_items {
         get {
            [[\@MOBILE_ONLY

              Get list of palette items.

              Note That palette item list is internally managed by colorselector widget and
              it should not be freed/modified by application.

              \@if MOBILE \@since_tizen 2.3
              \@endif

              @since 1.9
            ]]
            return: const(list<Elm.Object.Item*>)*;[[The list of color palette items.]]
         }
      }
      @property palette_selected_item {
         get @internal {
            [[Get the selected item in colorselector palette.

              @since 1.9]]

            return: Elm.Widget_Item *;[[The selected item, or $null if none
selected.]]
         }
      }
      palette_color_add {
         [[\@MOBILE_ONLY

           Add a new color item to palette.

           \@if MOBILE \@since_tizen 2.3
           \@endif
         ]]

         return: Elm.Widget_Item *;[[A new color palette Item.]]
         params {
            @in r: int; [[r-value of color]]
            @in g: int; [[g-value of color]]
            @in b: int; [[b-value of color]]
            @in a: int; [[a-value of color]]
         }
      }
      palette_clear {
         [[\@MOBILE_ONLY

           Clear the palette items.

           \@if MOBILE \@since_tizen 2.3
           \@endif
         ]]
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
      Elm.Widget.theme_apply;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.focus_next;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.focus_highlight_geometry_get;
      Elm.Widget.access;
      Elm.Widget.event;
      Elm.Layout.sizing_eval;
      Elm_Interface_Atspi_Widget_Action.elm_actions.get;
      //TIZEN_ONLY(20150707) : improve colorselctor atspi support
      Elm_Interface_Atspi_Accessible.children.get;
      ///
   }
   events {
      color,item,selected;
      color,item,longpressed;
      changed;
      changed,user;
      language,changed;
      access,changed;
   }

}
