forked from enlightenment/efl
add calls to tell evas to propagate (or not) events on an object to its
parent smart object IF there is a callback set. ie. if there is a key down callback set and propagae is set to false then the key event will not prpagate to the parent as long as the child gets the key down events and has the callback set. SVN revision: 18123
This commit is contained in:
parent
34a58f38e0
commit
f56726798f
|
@ -609,6 +609,8 @@ extern "C" {
|
||||||
EAPI Evas_Bool evas_object_pass_events_get (Evas_Object *obj);
|
EAPI Evas_Bool evas_object_pass_events_get (Evas_Object *obj);
|
||||||
EAPI void evas_object_repeat_events_set (Evas_Object *obj, Evas_Bool repeat);
|
EAPI void evas_object_repeat_events_set (Evas_Object *obj, Evas_Bool repeat);
|
||||||
EAPI Evas_Bool evas_object_repeat_events_get (Evas_Object *obj);
|
EAPI Evas_Bool evas_object_repeat_events_get (Evas_Object *obj);
|
||||||
|
EAPI void evas_object_propagate_events_set (Evas_Object *obj, Evas_Bool prop);
|
||||||
|
EAPI Evas_Bool evas_object_propagate_events_get (Evas_Object *obj);
|
||||||
|
|
||||||
EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data);
|
EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data);
|
||||||
EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info));
|
EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info));
|
||||||
|
|
|
@ -193,6 +193,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
|
||||||
obj->callbacks->walking_list--;
|
obj->callbacks->walking_list--;
|
||||||
if (!obj->callbacks->walking_list)
|
if (!obj->callbacks->walking_list)
|
||||||
evas_object_event_callback_clear(obj);
|
evas_object_event_callback_clear(obj);
|
||||||
|
if ((obj->no_propagate) && (*l_mod)) return;
|
||||||
if ((obj->smart.parent) &&
|
if ((obj->smart.parent) &&
|
||||||
(type != EVAS_CALLBACK_FREE) &&
|
(type != EVAS_CALLBACK_FREE) &&
|
||||||
(type <= EVAS_CALLBACK_KEY_UP))
|
(type <= EVAS_CALLBACK_KEY_UP))
|
||||||
|
|
|
@ -971,3 +971,33 @@ evas_object_repeat_events_get(Evas_Object *obj)
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
return obj->repeat_events;
|
return obj->repeat_events;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To be documented.
|
||||||
|
*
|
||||||
|
* FIXME: To be fixed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
evas_object_propagate_events_set(Evas_Object *obj, Evas_Bool prop)
|
||||||
|
{
|
||||||
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
obj->no_propagate = !prop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To be documented.
|
||||||
|
*
|
||||||
|
* FIXME: To be fixed.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Evas_Bool
|
||||||
|
evas_object_propagate_events_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return 0;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
return !(obj->no_propagate);
|
||||||
|
}
|
||||||
|
|
|
@ -233,6 +233,7 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
/* it obviously didn't change - add a NO obscure - this "unupdates" this */
|
/* it obviously didn't change - add a NO obscure - this "unupdates" this */
|
||||||
/* area so if there were updates for it they get wiped. don't do it if we */
|
/* area so if there were updates for it they get wiped. don't do it if we */
|
||||||
/* arent fully opaque and we are visible */
|
/* arent fully opaque and we are visible */
|
||||||
|
/*
|
||||||
if (evas_object_is_visible(obj) &&
|
if (evas_object_is_visible(obj) &&
|
||||||
evas_object_is_opaque(obj) &&
|
evas_object_is_opaque(obj) &&
|
||||||
(!obj->clip.clipees))
|
(!obj->clip.clipees))
|
||||||
|
@ -241,6 +242,7 @@ evas_object_rectangle_render_pre(Evas_Object *obj)
|
||||||
obj->cur.cache.clip.y,
|
obj->cur.cache.clip.y,
|
||||||
obj->cur.cache.clip.w,
|
obj->cur.cache.clip.w,
|
||||||
obj->cur.cache.clip.h);
|
obj->cur.cache.clip.h);
|
||||||
|
*/
|
||||||
done:
|
done:
|
||||||
evas_object_render_pre_effect_updates(updates, obj, is_v, was_v);
|
evas_object_render_pre_effect_updates(updates, obj, is_v, was_v);
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,9 +136,9 @@ struct _Evas_Key_Grab
|
||||||
Evas_Modifier_Mask modifiers;
|
Evas_Modifier_Mask modifiers;
|
||||||
Evas_Modifier_Mask not_modifiers;
|
Evas_Modifier_Mask not_modifiers;
|
||||||
Evas_Object *object;
|
Evas_Object *object;
|
||||||
char exclusive : 1;
|
unsigned char exclusive : 1;
|
||||||
char just_added : 1;
|
unsigned char just_added : 1;
|
||||||
char delete_me : 1;
|
unsigned char delete_me : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Evas_Intercept_Func
|
struct _Evas_Intercept_Func
|
||||||
|
@ -160,8 +160,8 @@ struct _Evas_Smart
|
||||||
|
|
||||||
int usage;
|
int usage;
|
||||||
|
|
||||||
char delete_me : 1;
|
unsigned char delete_me : 1;
|
||||||
char class_allocated : 1;
|
unsigned char class_allocated : 1;
|
||||||
|
|
||||||
Evas_Smart_Class *smart_class;
|
Evas_Smart_Class *smart_class;
|
||||||
};
|
};
|
||||||
|
@ -186,7 +186,7 @@ struct _Evas_Lock
|
||||||
|
|
||||||
struct _Evas_Callbacks
|
struct _Evas_Callbacks
|
||||||
{
|
{
|
||||||
char deletions_waiting : 1;
|
unsigned char deletions_waiting : 1;
|
||||||
int walking_list;
|
int walking_list;
|
||||||
Evas_Object_List *down;
|
Evas_Object_List *down;
|
||||||
Evas_Object_List *up;
|
Evas_Object_List *up;
|
||||||
|
@ -213,7 +213,7 @@ struct _Evas
|
||||||
DATA32 magic;
|
DATA32 magic;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
char inside : 1;
|
unsigned char inside : 1;
|
||||||
int mouse_grabbed;
|
int mouse_grabbed;
|
||||||
DATA32 button;
|
DATA32 button;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -227,14 +227,14 @@ struct _Evas
|
||||||
} pointer;
|
} pointer;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
char changed : 1;
|
unsigned char changed : 1;
|
||||||
} viewport;
|
} viewport;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int w, h;
|
int w, h;
|
||||||
DATA32 render_method;
|
DATA32 render_method;
|
||||||
char changed : 1;
|
unsigned char changed : 1;
|
||||||
} output;
|
} output;
|
||||||
|
|
||||||
int output_validity;
|
int output_validity;
|
||||||
|
@ -246,8 +246,8 @@ struct _Evas
|
||||||
|
|
||||||
Evas_Hash *name_hash;
|
Evas_Hash *name_hash;
|
||||||
|
|
||||||
char changed : 1;
|
unsigned char changed : 1;
|
||||||
char walking_layers : 1;
|
unsigned char walking_layers : 1;
|
||||||
|
|
||||||
int events_frozen;
|
int events_frozen;
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ struct _Evas_Layer
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
|
|
||||||
void *engine_data;
|
void *engine_data;
|
||||||
char delete_me : 1;
|
unsigned char delete_me : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Evas_Object
|
struct _Evas_Object
|
||||||
|
@ -306,8 +306,8 @@ struct _Evas_Object
|
||||||
struct {
|
struct {
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
char visible : 1;
|
unsigned char visible : 1;
|
||||||
char dirty : 1;
|
unsigned char dirty : 1;
|
||||||
} clip;
|
} clip;
|
||||||
} cache;
|
} cache;
|
||||||
struct {
|
struct {
|
||||||
|
@ -316,7 +316,7 @@ struct _Evas_Object
|
||||||
struct {
|
struct {
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
} color;
|
} color;
|
||||||
char visible : 1;
|
unsigned char visible : 1;
|
||||||
int layer;
|
int layer;
|
||||||
Evas_Object *clipper;
|
Evas_Object *clipper;
|
||||||
} cur, prev;
|
} cur, prev;
|
||||||
|
@ -349,23 +349,24 @@ struct _Evas_Object
|
||||||
Evas_Object *parent;
|
Evas_Object *parent;
|
||||||
Evas_Object_List *contained;
|
Evas_Object_List *contained;
|
||||||
Evas_List *callbacks;
|
Evas_List *callbacks;
|
||||||
char deletions_waiting : 1;
|
unsigned char deletions_waiting : 1;
|
||||||
} smart;
|
} smart;
|
||||||
|
|
||||||
int mouse_grabbed;
|
int mouse_grabbed;
|
||||||
|
|
||||||
short store : 1;
|
unsigned short store : 1;
|
||||||
short pass_events : 1;
|
unsigned short pass_events : 1;
|
||||||
short parent_pass_events : 1;
|
unsigned short parent_pass_events : 1;
|
||||||
short parent_cache_valid : 1;
|
unsigned short parent_cache_valid : 1;
|
||||||
short repeat_events : 1;
|
unsigned short repeat_events : 1;
|
||||||
short restack : 1;
|
unsigned short restack : 1;
|
||||||
short changed : 1;
|
unsigned short changed : 1;
|
||||||
short mouse_in : 1;
|
unsigned short mouse_in : 1;
|
||||||
short pre_render_done : 1;
|
unsigned short pre_render_done : 1;
|
||||||
short intercepted : 1;
|
unsigned short intercepted : 1;
|
||||||
short focused : 1;
|
unsigned short focused : 1;
|
||||||
short in_layer : 1;
|
unsigned short in_layer : 1;
|
||||||
|
unsigned short no_propagate : 1;
|
||||||
|
|
||||||
unsigned char delete_me;
|
unsigned char delete_me;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue