#ifndef _EFL_UI_TEXT_EO_H_
#define _EFL_UI_TEXT_EO_H_

#ifndef _EFL_UI_TEXT_EO_CLASS_TYPE
#define _EFL_UI_TEXT_EO_CLASS_TYPE

typedef Eo Efl_Ui_Text;

#endif

#ifndef _EFL_UI_TEXT_EO_TYPES
#define _EFL_UI_TEXT_EO_TYPES


#endif
#ifdef EFL_BETA_API_SUPPORT
/** A flexible text widget which can be static (as a label) or editable by the
 * user (as a text entry). It provides all sorts of editing facilities like
 * automatic scrollbars, virtual keyboard, clipboard, configurable context
 * menus, password mode or autocapitalization, for example.
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_CLASS efl_ui_text_class_get()

EWAPI const Efl_Class *efl_ui_text_class_get(void);

/**
 * @brief Enable or disable scrolling in the widget.
 *
 * When scrolling is enabled scrollbars will appear if the text does not fit
 * the widget size.
 *
 * @param[in] obj The object.
 * @param[in] scroll @c true to enable scrolling. Default is @c false.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_scrollable_set(Eo *obj, Eina_Bool scroll);

/**
 * @brief Enable or disable scrolling in the widget.
 *
 * When scrolling is enabled scrollbars will appear if the text does not fit
 * the widget size.
 *
 * @param[in] obj The object.
 *
 * @return @c true to enable scrolling. Default is @c false.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_scrollable_get(const Eo *obj);

/**
 * @brief The attribute to show the input panel in case of only a user's
 * explicit Mouse Up event. It doesn't request to show the input panel even
 * though it has focus.
 *
 * @param[in] obj The object.
 * @param[in] ondemand If @c true, the input panel will be shown in case of
 * only Mouse up event. (Focus event will be ignored.)
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_show_on_demand_set(Eo *obj, Eina_Bool ondemand);

/**
 * @brief The attribute to show the input panel in case of only a user's
 * explicit Mouse Up event. It doesn't request to show the input panel even
 * though it has focus.
 *
 * @param[in] obj The object.
 *
 * @return If @c true, the input panel will be shown in case of only Mouse up
 * event. (Focus event will be ignored.)
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_input_panel_show_on_demand_get(const Eo *obj);

/**
 * @brief This disables the entry's contextual (longpress) menu.
 *
 * @param[in] obj The object.
 * @param[in] disabled If @c true, the menu is disabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_context_menu_disabled_set(Eo *obj, Eina_Bool disabled);

/**
 * @brief This disables the entry's contextual (longpress) menu.
 *
 * @param[in] obj The object.
 *
 * @return If @c true, the menu is disabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_context_menu_disabled_get(const Eo *obj);

/**
 * @brief Control pasting of text and images for the widget.
 *
 * Normally the entry allows both text and images to be pasted.
 *
 * @note This only changes the behaviour of text.
 *
 * @param[in] obj The object.
 * @param[in] format Format for copy & paste.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_cnp_mode_set(Eo *obj, Efl_Ui_Selection_Format format);

/**
 * @brief Control pasting of text and images for the widget.
 *
 * Normally the entry allows both text and images to be pasted.
 *
 * @note This only changes the behaviour of text.
 *
 * @param[in] obj The object.
 *
 * @return Format for copy & paste.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Efl_Ui_Selection_Format efl_ui_text_cnp_mode_get(const Eo *obj);

/**
 * @brief The language mode of the input panel.
 *
 * This API can be used if you want to show the alphabet keyboard mode.
 *
 * @param[in] obj The object.
 * @param[in] lang Language to be set to the input panel.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_language_set(Eo *obj, Elm_Input_Panel_Lang lang);

/**
 * @brief The language mode of the input panel.
 *
 * This API can be used if you want to show the alphabet keyboard mode.
 *
 * @param[in] obj The object.
 *
 * @return Language to be set to the input panel.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Elm_Input_Panel_Lang efl_ui_text_input_panel_language_get(const Eo *obj);

/**
 * @brief This disables the entry's selection handlers.
 *
 * @param[in] obj The object.
 * @param[in] disabled If @c true, the selection handlers are disabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_selection_handler_disabled_set(Eo *obj, Eina_Bool disabled);

/**
 * @brief This disables the entry's selection handlers.
 *
 * @param[in] obj The object.
 *
 * @return If @c true, the selection handlers are disabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_selection_handler_disabled_get(const Eo *obj);

/**
 * @brief Set the input panel layout variation of the entry
 *
 * @param[in] obj The object.
 * @param[in] variation Layout variation type.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_layout_variation_set(Eo *obj, int variation);

/**
 * @brief Set the input panel layout variation of the entry
 *
 * @param[in] obj The object.
 *
 * @return Layout variation type.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI int efl_ui_text_input_panel_layout_variation_get(const Eo *obj);

/**
 * @brief Set the autocapitalization type on the immodule.
 *
 * @param[in] obj The object.
 * @param[in] autocapital_type The type of autocapitalization.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_autocapital_type_set(Eo *obj, Elm_Autocapital_Type autocapital_type);

/**
 * @brief Set the autocapitalization type on the immodule.
 *
 * @param[in] obj The object.
 *
 * @return The type of autocapitalization.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Elm_Autocapital_Type efl_ui_text_autocapital_type_get(const Eo *obj);

/**
 * @brief Sets the entry to password mode.
 *
 * In password mode entries are implicitly single line and the display of any
 * text inside them is replaced with asterisks (*).
 *
 * @param[in] obj The object.
 * @param[in] password If true, password mode is enabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_password_mode_set(Eo *obj, Eina_Bool password);

/**
 * @brief Sets the entry to password mode.
 *
 * In password mode entries are implicitly single line and the display of any
 * text inside them is replaced with asterisks (*).
 *
 * @param[in] obj The object.
 *
 * @return If true, password mode is enabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_password_mode_get(const Eo *obj);

/**
 * @brief Set the return key on the input panel to be disabled.
 *
 * @param[in] obj The object.
 * @param[in] disabled The state to put in in: @c true for disabled, @c false
 * for enabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_return_key_disabled_set(Eo *obj, Eina_Bool disabled);

/**
 * @brief Set the return key on the input panel to be disabled.
 *
 * @param[in] obj The object.
 *
 * @return The state to put in in: @c true for disabled, @c false for enabled.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_input_panel_return_key_disabled_get(const Eo *obj);

/**
 * @brief Whether the entry should allow predictive text.
 *
 * @param[in] obj The object.
 * @param[in] prediction Whether the entry should allow predictive text.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_prediction_allow_set(Eo *obj, Eina_Bool prediction);

/**
 * @brief Whether the entry should allow predictive text.
 *
 * @param[in] obj The object.
 *
 * @return Whether the entry should allow predictive text.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_prediction_allow_get(const Eo *obj);

/**
 * @brief Sets the input hint which allows input methods to fine-tune their
 * behavior.
 *
 * @param[in] obj The object.
 * @param[in] hints Input hint.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_hint_set(Eo *obj, Elm_Input_Hints hints);

/**
 * @brief Sets the input hint which allows input methods to fine-tune their
 * behavior.
 *
 * @param[in] obj The object.
 *
 * @return Input hint.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Elm_Input_Hints efl_ui_text_input_hint_get(const Eo *obj);

/**
 * @brief Set the input panel layout of the entry.
 *
 * @param[in] obj The object.
 * @param[in] layout Layout type.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_layout_set(Eo *obj, Elm_Input_Panel_Layout layout);

/**
 * @brief Set the input panel layout of the entry.
 *
 * @param[in] obj The object.
 *
 * @return Layout type.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Elm_Input_Panel_Layout efl_ui_text_input_panel_layout_get(const Eo *obj);

/**
 * @brief Set the "return" key type. This type is used to set string or icon on
 * the "return" key of the input panel.
 *
 * An input panel displays the string or icon associated with this type.
 *
 * @param[in] obj The object.
 * @param[in] return_key_type The type of "return" key on the input panel.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_return_key_type_set(Eo *obj, Elm_Input_Panel_Return_Key_Type return_key_type);

/**
 * @brief Set the "return" key type. This type is used to set string or icon on
 * the "return" key of the input panel.
 *
 * An input panel displays the string or icon associated with this type.
 *
 * @param[in] obj The object.
 *
 * @return The type of "return" key on the input panel.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Elm_Input_Panel_Return_Key_Type efl_ui_text_input_panel_return_key_type_get(const Eo *obj);

/**
 * @brief Sets the attribute to show the input panel automatically.
 *
 * @param[in] obj The object.
 * @param[in] enabled If @c true, the input panel is appeared when entry is
 * clicked or has a focus.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_enabled_set(Eo *obj, Eina_Bool enabled);

/**
 * @brief Sets the attribute to show the input panel automatically.
 *
 * @param[in] obj The object.
 *
 * @return If @c true, the input panel is appeared when entry is clicked or has
 * a focus.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Eina_Bool efl_ui_text_input_panel_enabled_get(const Eo *obj);

/**
 * @brief Whether the return key on the input panel is disabled automatically
 * when entry has no text.
 *
 * If @c enabled is @c true, the return key on input panel is disabled when the
 * entry has no text. The return key on the input panel is automatically
 * enabled when the entry has text.
 *
 * @param[in] obj The object.
 * @param[in] enabled If @c true, the return key is automatically disabled when
 * the entry has no text.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_return_key_autoenabled_set(Eo *obj, Eina_Bool enabled);

/**
 * @brief The factory that provides item in the text e.g. "emoticon/happy" or
 * "href=file://image.jpg" etc.
 *
 * @param[in] obj The object.
 * @param[in] item_factory Factory to create items
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_item_factory_set(Eo *obj, Efl_Canvas_Text_Factory *item_factory);

/**
 * @brief The factory that provides item in the text e.g. "emoticon/happy" or
 * "href=file://image.jpg" etc.
 *
 * @param[in] obj The object.
 *
 * @return Factory to create items
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Efl_Canvas_Text_Factory *efl_ui_text_item_factory_get(const Eo *obj);

/**
 * @brief Show the input panel (virtual keyboard) based on the input panel
 * property of entry such as layout, autocapital types and so on.
 *
 * Note that input panel is shown or hidden automatically according to the
 * focus state of entry widget. This API can be used in the case of manually
 * controlling by using @ref efl_ui_text_input_panel_enabled_set(en, @c false).
 * @param[in] obj The object.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_show(Eo *obj);

/** This executes a "copy" action on the selected text in the entry.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_selection_copy(Eo *obj);

/**
 * @brief This clears and frees the items in a entry's contextual (longpress)
 * menu.
 *
 * See also @ref efl_ui_text_context_menu_item_add.
 * @param[in] obj The object.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_context_menu_clear(Eo *obj);

/**
 * @brief Set the input panel-specific data to deliver to the input panel.
 *
 * This API is used by applications to deliver specific data to the input
 * panel. The data format MUST be negotiated by both application and the input
 * panel. The size and format of data are defined by the input panel.
 *
 * @param[in] obj The object.
 * @param[in] data The specific data to be set to the input panel.
 * @param[in] len The length of data, in bytes, to send to the input panel.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_imdata_set(Eo *obj, const void *data, int len);

/**
 * @brief Get the specific data of the current input panel.
 *
 * @param[in] obj The object.
 * @param[in,out] data The specific data to be obtained from the input panel.
 * @param[out] len The length of data.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_imdata_get(const Eo *obj, void *data, int *len);

/** This executes a "paste" action in the entry.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_selection_paste(Eo *obj);

/**
 * @brief Hide the input panel (virtual keyboard).
 *
 * Note that input panel is shown or hidden automatically according to the
 * focus state of entry widget. This API can be used in the case of manually
 * controlling by using @ref efl_ui_text_input_panel_enabled_set(en, @c false)
 * @param[in] obj The object.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_input_panel_hide(Eo *obj);

/** This ends a selection within the entry as though the user had just released
 * the mouse button while making a selection.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_cursor_selection_end(Eo *obj);

/** This executes a "cut" action on the selected text in the entry.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_selection_cut(Eo *obj);

/**
 * @brief This adds an item to the entry's contextual menu.
 *
 * A longpress on an entry will make the contextual menu show up unless this
 * has been disabled with @ref efl_ui_text_context_menu_disabled_set. By
 * default this menu provides a few options like enabling selection mode, which
 * is useful on embedded devices that need to be explicit about it. When a
 * selection exists it also shows the copy and cut actions.
 *
 * With this function, developers can add other options to this menu to perform
 * any action they deem necessary.
 *
 * @param[in] obj The object.
 * @param[in] label The item's text label.
 * @param[in] icon_file The item's icon file.
 * @param[in] icon_type The item's icon type.
 * @param[in] func The callback to execute when the item is clicked.
 * @param[in] data The data to associate with the item for related functions.
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI void efl_ui_text_context_menu_item_add(Eo *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);

/**
 * @brief Creates and returns a new cursor for the text.
 *
 * @param[in] obj The object.
 *
 * @return Text cursor
 *
 * @ingroup Efl_Ui_Text
 */
EOAPI Efl_Text_Cursor_Cursor *efl_ui_text_cursor_new(Eo *obj);

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_CHANGED;

/** Called when entry changes
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_CHANGED (&(_EFL_UI_TEXT_EVENT_CHANGED))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_CHANGED_USER;

/** The text object has changed due to user interaction
 * @return Efl_Ui_Text_Change_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_CHANGED_USER (&(_EFL_UI_TEXT_EVENT_CHANGED_USER))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_VALIDATE;

/** Called when validating
 * @return Elm_Validate_Content
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_VALIDATE (&(_EFL_UI_TEXT_EVENT_VALIDATE))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_CONTEXT_OPEN;

/** Called when context menu was opened
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_CONTEXT_OPEN (&(_EFL_UI_TEXT_EVENT_CONTEXT_OPEN))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_PREEDIT_CHANGED;

/** Called when entry preedit changed
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_PREEDIT_CHANGED (&(_EFL_UI_TEXT_EVENT_PREEDIT_CHANGED))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_PRESS;

/** Called when entry pressed
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_PRESS (&(_EFL_UI_TEXT_EVENT_PRESS))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_REDO_REQUEST;

/** Called when redo is requested
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_REDO_REQUEST (&(_EFL_UI_TEXT_EVENT_REDO_REQUEST))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_UNDO_REQUEST;

/** Called when undo is requested
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_UNDO_REQUEST (&(_EFL_UI_TEXT_EVENT_UNDO_REQUEST))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ABORTED;

/** Called when entry is aborted
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ABORTED (&(_EFL_UI_TEXT_EVENT_ABORTED))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ANCHOR_DOWN;

/** Called on anchor down
 * @return Elm_Entry_Anchor_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ANCHOR_DOWN (&(_EFL_UI_TEXT_EVENT_ANCHOR_DOWN))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ANCHOR_HOVER_OPENED;

/** Called when hover opened
 * @return Elm_Entry_Anchor_Hover_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ANCHOR_HOVER_OPENED (&(_EFL_UI_TEXT_EVENT_ANCHOR_HOVER_OPENED))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ANCHOR_IN;

/** Called on anchor in
 * @return Elm_Entry_Anchor_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ANCHOR_IN (&(_EFL_UI_TEXT_EVENT_ANCHOR_IN))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ANCHOR_OUT;

/** Called on anchor out
 * @return Elm_Entry_Anchor_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ANCHOR_OUT (&(_EFL_UI_TEXT_EVENT_ANCHOR_OUT))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_ANCHOR_UP;

/** called on anchor up
 * @return Elm_Entry_Anchor_Info
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_ANCHOR_UP (&(_EFL_UI_TEXT_EVENT_ANCHOR_UP))

EWAPI extern const Efl_Event_Description _EFL_UI_TEXT_EVENT_CURSOR_CHANGED_MANUAL;

/** Called on manual cursor change
 *
 * @ingroup Efl_Ui_Text
 */
#define EFL_UI_TEXT_EVENT_CURSOR_CHANGED_MANUAL (&(_EFL_UI_TEXT_EVENT_CURSOR_CHANGED_MANUAL))
#endif /* EFL_BETA_API_SUPPORT */

#endif
