#ifndef _EFL_TEXT_INTERACTIVE_EO_H_
#define _EFL_TEXT_INTERACTIVE_EO_H_

#ifndef _EFL_TEXT_INTERACTIVE_EO_CLASS_TYPE
#define _EFL_TEXT_INTERACTIVE_EO_CLASS_TYPE

typedef Eo Efl_Text_Interactive;

#endif

#ifndef _EFL_TEXT_INTERACTIVE_EO_TYPES
#define _EFL_TEXT_INTERACTIVE_EO_TYPES


#endif
#ifdef EFL_BETA_API_SUPPORT
/** This is an interface interactive text inputs should implement
 *
 * @ingroup Efl_Text_Interactive
 */
#define EFL_TEXT_INTERACTIVE_INTERFACE efl_text_interactive_interface_get()

EWAPI const Efl_Class *efl_text_interactive_interface_get(void);

/**
 * @brief Whether or not selection is allowed on this object
 *
 * @param[in] obj The object.
 * @param[in] allowed @c true if enabled, @c false otherwise
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI void efl_text_interactive_selection_allowed_set(Eo *obj, Eina_Bool allowed);

/**
 * @brief Whether or not selection is allowed on this object
 *
 * @param[in] obj The object.
 *
 * @return @c true if enabled, @c false otherwise
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI Eina_Bool efl_text_interactive_selection_allowed_get(const Eo *obj);

/**
 * @brief The cursors used for selection handling.
 *
 * If the cursors are equal there's no selection.
 *
 * You are allowed to retain and modify them. Modifying them modifies the
 * selection of the object.
 *
 * @param[in] obj The object.
 * @param[out] start The start of the selection
 * @param[out] end The end of the selection
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI void efl_text_interactive_selection_cursors_get(const Eo *obj, Efl_Text_Cursor_Cursor **start, Efl_Text_Cursor_Cursor **end);

/**
 * @brief Whether the entry is editable.
 *
 * By default text interactives are editable. However setting this property to
 * @c false will make it so that key input will be disregarded.
 *
 * @param[in] obj The object.
 * @param[in] editable If @c true, user input will be inserted in the entry, if
 * not, the entry is read-only and no user input is allowed.
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI void efl_text_interactive_editable_set(Eo *obj, Eina_Bool editable);

/**
 * @brief Whether the entry is editable.
 *
 * By default text interactives are editable. However setting this property to
 * @c false will make it so that key input will be disregarded.
 *
 * @param[in] obj The object.
 *
 * @return If @c true, user input will be inserted in the entry, if not, the
 * entry is read-only and no user input is allowed.
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI Eina_Bool efl_text_interactive_editable_get(const Eo *obj);

/** Clears the selection.
 *
 * @ingroup Efl_Text_Interactive
 */
EOAPI void efl_text_interactive_select_none(Eo *obj);

EWAPI extern const Efl_Event_Description _EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED;

/** The selection on the object has changed. Query using
 * @ref efl_text_interactive_selection_cursors_get
 *
 * @ingroup Efl_Text_Interactive
 */
#define EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED (&(_EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED))
#endif /* EFL_BETA_API_SUPPORT */

#endif
