forked from enlightenment/efl
edje: Edje_Edit - add edje_edit_part_entry_mode_xet()
Summary: There are new 'get and set' API for block 'entry_mode'. These properties have only parts with type 'TEXTBLOCK'. These functions return or set entry mode for a given part. @feature Reviewers: seoz, cedric, Hermet, raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D1033 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
036267c4f5
commit
8370b22fa8
|
@ -33,7 +33,6 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef enum _Edje_Edit_Image_Comp
|
typedef enum _Edje_Edit_Image_Comp
|
||||||
{
|
{
|
||||||
EDJE_EDIT_IMAGE_COMP_RAW,
|
EDJE_EDIT_IMAGE_COMP_RAW,
|
||||||
|
@ -58,6 +57,14 @@ typedef enum _Edje_Edit_Sound_Comp
|
||||||
EDJE_EDIT_SOUND_COMP_AS_IS
|
EDJE_EDIT_SOUND_COMP_AS_IS
|
||||||
} Edje_Edit_Sound_Comp;
|
} Edje_Edit_Sound_Comp;
|
||||||
|
|
||||||
|
typedef enum _Edje_Edit_Entry_Mode
|
||||||
|
{
|
||||||
|
EDJE_EDIT_ENTRY_MODE_NONE,
|
||||||
|
EDJE_EDIT_ENTRY_MODE_PLAIN,
|
||||||
|
EDJE_EDIT_ENTRY_MODE_EDITABLE,
|
||||||
|
EDJE_EDIT_ENTRY_MODE_PASSWORD
|
||||||
|
} Edje_Edit_Entry_Mode;
|
||||||
|
|
||||||
struct _Edje_Edit_Script_Error
|
struct _Edje_Edit_Script_Error
|
||||||
{
|
{
|
||||||
const char *program_name; /* null == group shared script */
|
const char *program_name; /* null == group shared script */
|
||||||
|
@ -792,16 +799,17 @@ EAPI Eina_Bool edje_edit_external_del(Evas_Object *obj, const char *external);
|
||||||
*/ //@{
|
*/ //@{
|
||||||
|
|
||||||
/** Get the select mode for a textblock part
|
/** Get the select mode for a textblock part
|
||||||
*
|
|
||||||
* @param obj Object being edited.
|
* @param obj Object being edited.
|
||||||
* @param part Name of the part.
|
* @param part Name of the part.
|
||||||
|
*
|
||||||
* @return One of possible enum Edje_Edit_Select_Mode.
|
* @return One of possible enum Edje_Edit_Select_Mode.
|
||||||
|
* @since 1.11
|
||||||
*/
|
*/
|
||||||
EAPI Edje_Edit_Select_Mode
|
EAPI Edje_Edit_Select_Mode
|
||||||
edje_edit_part_select_mode_get(Evas_Object *obj, const char *part);
|
edje_edit_part_select_mode_get(Evas_Object *obj, const char *part);
|
||||||
|
|
||||||
/** Sets the select mode for a textblock part
|
/** Set the select mode for a textblock part
|
||||||
*
|
*
|
||||||
* @param obj Object being edited.
|
* @param obj Object being edited.
|
||||||
* @param part Name of the part.
|
* @param part Name of the part.
|
||||||
|
@ -809,10 +817,35 @@ edje_edit_part_select_mode_get(Evas_Object *obj, const char *part);
|
||||||
* EDJE_EDIT_SELECT_MODE_DEFAULT, EDJE_EDIT_SELECT_MODE_EXPLICIT.
|
* EDJE_EDIT_SELECT_MODE_DEFAULT, EDJE_EDIT_SELECT_MODE_EXPLICIT.
|
||||||
*
|
*
|
||||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
* @since 1.11
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_edit_part_select_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Select_Mode mode);
|
edje_edit_part_select_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Select_Mode mode);
|
||||||
|
|
||||||
|
/** Get the edit mode for a textblock part
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Name of the part.
|
||||||
|
*
|
||||||
|
* @return One of possible enum Edje_Entry_Mode.
|
||||||
|
* @since 1.11
|
||||||
|
*/
|
||||||
|
EAPI Edje_Edit_Entry_Mode
|
||||||
|
edje_edit_part_entry_mode_get(Evas_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/** Set the edit mode for a textblock part
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Name of the part.
|
||||||
|
* @param mode One of possible enum Edje_Entry_Mode:
|
||||||
|
* EDJE_EDIT_ENTRY_MODE_NONE, EDJE_EDIT_ENTRY_MODE_PLAIN, EDJE_EDIT_ENTRY_MODE_EDITABLE, EDJE_EDIT_ENTRY_MODE_PASSWORD.
|
||||||
|
|
||||||
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
* @since 1.11
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_part_entry_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Entry_Mode mode);
|
||||||
|
|
||||||
/** Get the list of all the parts in the given edje object.
|
/** Get the list of all the parts in the given edje object.
|
||||||
*
|
*
|
||||||
* @param obj Object being edited.
|
* @param obj Object being edited.
|
||||||
|
|
|
@ -2637,7 +2637,32 @@ edje_edit_part_select_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Sel
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
rp->part->select_mode = (unsigned char) mode;
|
rp->part->select_mode = (unsigned char) mode;
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Edje_Edit_Entry_Mode
|
||||||
|
edje_edit_part_entry_mode_get(Evas_Object *obj, const char *part)
|
||||||
|
{
|
||||||
|
GET_RP_OR_RETURN(EINA_FALSE);
|
||||||
|
|
||||||
|
if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
return (Edje_Edit_Entry_Mode) rp->part->entry_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_part_entry_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Entry_Mode mode)
|
||||||
|
{
|
||||||
|
if (mode > EDJE_EDIT_ENTRY_MODE_PASSWORD)
|
||||||
|
return EINA_FALSE;
|
||||||
|
GET_RP_OR_RETURN(EINA_FALSE);
|
||||||
|
|
||||||
|
if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
rp->part->entry_mode = (unsigned char) mode;
|
||||||
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
|
|
Loading…
Reference in New Issue