forked from enlightenment/efl
edje: Edje_Edit - edje_edit_part_select_mode_xet()
Summary: There are new 'get and set' API for block 'select_mode'. These properties have only parts with type 'TEXTBLOCK'. These functions return or set select mode for a given part. @feature Reviewers: seoz, cedric, Hermet, raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D1034 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
08075be885
commit
6d62dab6ab
|
@ -43,6 +43,12 @@ typedef enum _Edje_Edit_Image_Comp
|
|||
EDJE_EDIT_IMAGE_COMP_LOSSY_ETC1
|
||||
} Edje_Edit_Image_Comp;
|
||||
|
||||
typedef enum _Edje_Edit_Select_Mode
|
||||
{
|
||||
EDJE_EDIT_SELECT_MODE_DEFAULT,
|
||||
EDJE_EDIT_SELECT_MODE_EXPLICIT
|
||||
} Edje_Edit_Select_Mode;
|
||||
|
||||
struct _Edje_Edit_Script_Error
|
||||
{
|
||||
const char *program_name; /* null == group shared script */
|
||||
|
@ -776,6 +782,28 @@ EAPI Eina_Bool edje_edit_external_del(Evas_Object *obj, const char *external);
|
|||
* Functions to deal with part objects (see @ref edcref).
|
||||
*/ //@{
|
||||
|
||||
/** Get the select mode for a textblock part
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param part Name of the part.
|
||||
|
||||
* @return One of possible enum Edje_Edit_Select_Mode.
|
||||
*/
|
||||
EAPI Edje_Edit_Select_Mode
|
||||
edje_edit_part_select_mode_get(Evas_Object *obj, const char *part);
|
||||
|
||||
/** Sets the select mode for a textblock part
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param part Name of the part.
|
||||
* @param mode One of possible enum Edje_Edit_Select_Mode:
|
||||
* EDJE_EDIT_SELECT_MODE_DEFAULT, EDJE_EDIT_SELECT_MODE_EXPLICIT.
|
||||
*
|
||||
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_edit_part_select_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Select_Mode mode);
|
||||
|
||||
/** Get the list of all the parts in the given edje object.
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
|
|
|
@ -2563,6 +2563,31 @@ edje_edit_external_del(Evas_Object *obj, const char *external)
|
|||
/* PARTS API */
|
||||
/***************/
|
||||
|
||||
EAPI Edje_Edit_Select_Mode
|
||||
edje_edit_part_select_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_Select_Mode) rp->part->select_mode;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_edit_part_select_mode_set(Evas_Object *obj, const char *part, Edje_Edit_Select_Mode mode)
|
||||
{
|
||||
if (mode > EDJE_EDIT_SELECT_MODE_EXPLICIT)
|
||||
return EINA_FALSE;
|
||||
GET_RP_OR_RETURN(EINA_FALSE);
|
||||
|
||||
if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)
|
||||
return EINA_FALSE;
|
||||
|
||||
rp->part->select_mode = (unsigned char) mode;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
edje_edit_parts_list_get(Evas_Object *obj)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue