forked from enlightenment/efl
edje: Edje_Edit - add edje_edit_part_pointer_mode functions.
Summary: Add two main functions - edje_edit_part_pointer_mode_get - edje_edit_part_pointer_mode_set Also support pointer mode into part's source code generation. EVAS_OBJECT_POINTER_MODE_AUTOGRAB is default value, so generation won't add "AUTOGRAB" into source code if this type of pointer mode is set. @feature Reviewers: cedric, seoz, Hermet, raster Reviewed By: cedric CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D941 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
f1000b5c36
commit
bebcc49bd0
|
@ -1102,6 +1102,30 @@ EAPI Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const ch
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags);
|
EAPI Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags);
|
||||||
|
|
||||||
|
/** Get pointer_mode of a part.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Part name to get it's pointer_mode.
|
||||||
|
*
|
||||||
|
* @return Ponter Mode of the part.
|
||||||
|
*/
|
||||||
|
EAPI Evas_Object_Pointer_Mode edje_edit_part_pointer_mode_get(Evas_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/** Get pointer_mode of a part.
|
||||||
|
*
|
||||||
|
* Note that Ponter Mode can be:
|
||||||
|
* - EVAS_OBJECT_POINTER_MODE_AUTOGRAB - default, X11-like
|
||||||
|
* - EVAS_OBJECT_POINTER_MODE_NOGRAB - pointer always bound to the object right below it
|
||||||
|
* - EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN - useful on object with "repeat events" enabled, @since 1.2
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Part name to get it's pointer_mode.
|
||||||
|
* @param pointer_mode Pointer Mode.
|
||||||
|
*
|
||||||
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool edje_edit_part_pointer_mode_set(Evas_Object *obj, const char *part, Evas_Object_Pointer_Mode pointer_mode);
|
||||||
|
|
||||||
/** Set scale property for the part.
|
/** Set scale property for the part.
|
||||||
*
|
*
|
||||||
* This property tells Edje that the given part should be scaled by the
|
* This property tells Edje that the given part should be scaled by the
|
||||||
|
|
|
@ -2914,6 +2914,25 @@ edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_F
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Evas_Object_Pointer_Mode
|
||||||
|
edje_edit_part_pointer_mode_get(Evas_Object *obj, const char *part)
|
||||||
|
{
|
||||||
|
GET_RP_OR_RETURN(0);
|
||||||
|
|
||||||
|
return rp->part->pointer_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_part_pointer_mode_set(Evas_Object *obj, const char *part, Evas_Object_Pointer_Mode pointer_mode)
|
||||||
|
{
|
||||||
|
GET_RP_OR_RETURN(EINA_FALSE);
|
||||||
|
|
||||||
|
if (!rp->object) return EINA_FALSE;
|
||||||
|
|
||||||
|
rp->part->pointer_mode = pointer_mode;
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale)
|
edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale)
|
||||||
{
|
{
|
||||||
|
@ -8035,7 +8054,8 @@ _edje_generate_source_of_part(Evas_Object *obj, Edje_Part *ep, Eina_Strbuf *buf)
|
||||||
if (edje_edit_part_scale_get(obj, part))
|
if (edje_edit_part_scale_get(obj, part))
|
||||||
BUF_APPEND(I4"scale: 1;\n");
|
BUF_APPEND(I4"scale: 1;\n");
|
||||||
//TODO Support ignore_flags
|
//TODO Support ignore_flags
|
||||||
//TODO Support pointer_mode
|
if (edje_edit_part_pointer_mode_get(obj, part) == EVAS_OBJECT_POINTER_MODE_NOGRAB)
|
||||||
|
BUF_APPEND(I4"pointer_mode: NOGRAB;\n");
|
||||||
//TODO Support precise_is_inside
|
//TODO Support precise_is_inside
|
||||||
//TODO Support use_alternate_font_metrics
|
//TODO Support use_alternate_font_metrics
|
||||||
if ((str = edje_edit_part_clip_to_get(obj, part)))
|
if ((str = edje_edit_part_clip_to_get(obj, part)))
|
||||||
|
|
Loading…
Reference in New Issue