@ -15,7 +15,7 @@
if ( act ) act - > func . go_mouse = _e_actions_act_ # # name # # _go_mouse ; \
}
# define ACT_FN_GO_MOUSE(act, use) \
static void _e_actions_act_ # # act # # _go_mouse ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Mouse_Button * ev EINA_UNUSED )
static Eina_Bool _e_actions_act_ # # act # # _go_mouse ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Mouse_Button * ev EINA_UNUSED )
# define ACT_GO_WHEEL(name) \
{ \
@ -23,7 +23,7 @@
if ( act ) act - > func . go_wheel = _e_actions_act_ # # name # # _go_wheel ; \
}
# define ACT_FN_GO_WHEEL(act, use) \
static void _e_actions_act_ # # act # # _go_wheel ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Wheel * ev EINA_UNUSED )
static Eina_Bool _e_actions_act_ # # act # # _go_wheel ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Wheel * ev EINA_UNUSED )
# define ACT_GO_EDGE(name) \
{ \
@ -63,7 +63,7 @@
if ( act ) act - > func . end_mouse = _e_actions_act_ # # name # # _end_mouse ; \
}
# define ACT_FN_END_MOUSE(act, use) \
static void _e_actions_act_ # # act # # _end_mouse ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Mouse_Button * ev EINA_UNUSED )
static Eina_Bool _e_actions_act_ # # act # # _end_mouse ( E_Object * obj EINA_UNUSED , const char * params use , E_Binding_Event_Mouse_Button * ev EINA_UNUSED )
# define ACT_END_KEY(name) \
{ \
@ -103,9 +103,10 @@ ACT_FN_GO(window_move, EINA_UNUSED)
ACT_FN_GO_MOUSE ( window_move , EINA_UNUSED )
{
if ( ! obj ) obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( obj - > type ! = E_CLIENT_TYPE ) return ;
if ( ! obj ) return EINA_FALSE ;
if ( obj - > type ! = E_CLIENT_TYPE ) return EINA_FALSE ;
e_client_act_move_begin ( ( E_Client * ) obj , ev ) ;
return EINA_TRUE ;
}
ACT_FN_GO_SIGNAL ( window_move , )
@ -136,9 +137,10 @@ ACT_FN_END(window_move, EINA_UNUSED)
ACT_FN_END_MOUSE ( window_move , EINA_UNUSED )
{
if ( ! obj ) obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( obj - > type ! = E_CLIENT_TYPE ) return ;
if ( ! obj ) return EINA_FALSE ;
if ( obj - > type ! = E_CLIENT_TYPE ) return EINA_FALSE ;
e_client_act_move_end ( ( E_Client * ) obj , ev ) ;
return EINA_TRUE ;
}
ACT_FN_GO_KEY ( window_move , EINA_UNUSED , EINA_UNUSED )
@ -167,10 +169,11 @@ ACT_FN_GO(window_resize, EINA_UNUSED)
ACT_FN_GO_MOUSE ( window_resize , EINA_UNUSED )
{
if ( ! obj ) obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( obj - > type ! = E_CLIENT_TYPE ) return ;
if ( ! obj ) return EINA_FALSE ;
if ( obj - > type ! = E_CLIENT_TYPE ) return EINA_FALSE ;
if ( ! ( ( E_Client * ) obj ) - > lock_user_size )
e_client_act_resize_begin ( ( E_Client * ) obj , ev ) ;
return EINA_TRUE ;
}
ACT_FN_GO_SIGNAL ( window_resize , )
@ -204,9 +207,10 @@ ACT_FN_END(window_resize, EINA_UNUSED)
ACT_FN_END_MOUSE ( window_resize , EINA_UNUSED )
{
if ( ! obj ) obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( obj - > type ! = E_CLIENT_TYPE ) return ;
if ( ! obj ) return EINA_FALSE ;
if ( obj - > type ! = E_CLIENT_TYPE ) return EINA_FALSE ;
e_client_act_resize_end ( ( E_Client * ) obj , ev ) ;
return EINA_TRUE ;
}
ACT_FN_GO_KEY ( window_resize , EINA_UNUSED , EINA_UNUSED )
@ -238,13 +242,14 @@ ACT_FN_GO(window_menu, EINA_UNUSED)
ACT_FN_GO_MOUSE ( window_menu , EINA_UNUSED )
{
if ( ! obj ) obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( ! obj ) return EINA_FALSE ;
if ( obj - > type ! = E_CLIENT_TYPE )
{
obj = E_OBJECT ( e_client_focused_get ( ) ) ;
if ( ! obj ) return ;
if ( ! obj ) return EINA_FALSE ;
}
e_client_act_menu_begin ( ( E_Client * ) obj , ev , 0 ) ;
return EINA_TRUE ;
}
ACT_FN_GO_KEY ( window_menu , EINA_UNUSED , EINA_UNUSED )
@ -1909,31 +1914,24 @@ ACT_FN_GO(menu_show, )
ACT_FN_GO_MOUSE ( menu_show , )
{
E_Zone * zone ;
E_Menu * m = NULL ;
int x , y ;
/* menu is active - abort */
if ( e_comp_util_kbd_grabbed ( ) | | e_comp_util_mouse_grabbed ( ) ) return ;
if ( e_comp_util_kbd_grabbed ( ) | | e_comp_util_mouse_grabbed ( ) ) return EINA_TRUE ;
zone = _e_actions_zone_get ( obj ) ;
if ( zone )
{
if ( params )
{
E_Menu * m = NULL ;
m = _e_actions_menu_find ( params ) ;
if ( m )
{
int x , y ;
/* FIXME: this is a bit of a hack... setting m->c - bad hack */
m - > zone = zone ;
x = ev - > canvas . x ;
y = ev - > canvas . y ;
e_menu_post_deactivate_callback_set ( m , _e_actions_cb_menu_end , NULL ) ;
e_menu_activate_mouse ( m , zone , x , y , 1 , 1 ,
E_MENU_POP_DIRECTION_DOWN , ev - > timestamp ) ;
}
}
}
if ( ! zone ) return EINA_TRUE ;
if ( ! params ) return EINA_TRUE ;
m = _e_actions_menu_find ( params ) ;
if ( ! m ) return EINA_TRUE ;
/* FIXME: this is a bit of a hack... setting m->zone - bad hack */
m - > zone = zone ;
x = ev - > canvas . x ;
y = ev - > canvas . y ;
e_menu_post_deactivate_callback_set ( m , _e_actions_cb_menu_end , NULL ) ;
e_menu_activate_mouse ( m , zone , x , y , 1 , 1 ,
E_MENU_POP_DIRECTION_DOWN , ev - > timestamp ) ;
return EINA_TRUE ;
}
ACT_FN_GO_KEY ( menu_show , , EINA_UNUSED )
@ -2866,6 +2864,7 @@ ACT_FN_GO_KEY(delayed_action, , )
ACT_FN_GO_MOUSE ( delayed_action , )
{
_delayed_action_mouse_add ( obj , params , ev ) ;
return EINA_TRUE ;
}
ACT_FN_END_KEY ( delayed_action , )
@ -2876,6 +2875,7 @@ ACT_FN_END_KEY(delayed_action, )
ACT_FN_END_MOUSE ( delayed_action , )
{
_delayed_action_mouse_del ( obj , params , ev ) ;
return EINA_TRUE ;
}
ACT_FN_GO ( dim_screen , EINA_UNUSED )
@ -2956,7 +2956,7 @@ ACT_FN_GO_MOUSE(mouse_to_key, )
} ;
int modifiers = 0 , mod = 0 ;
if ( ( ! params ) | | ( ! params [ 0 ] ) | | ( params [ 0 ] = = ' + ' ) ) return ;
if ( ( ! params ) | | ( ! params [ 0 ] ) | | ( params [ 0 ] = = ' + ' ) ) return EINA_TRUE ;
for ( p = params ; p ; p = nextp )
{
const char * * m ;
@ -2975,7 +2975,7 @@ ACT_FN_GO_MOUSE(mouse_to_key, )
key + + ;
else
key = params ;
if ( ! key [ 0 ] ) return ;
if ( ! key [ 0 ] ) return EINA_TRUE ;
mod | = ( ECORE_EVENT_MODIFIER_SHIFT * ! ! ( modifiers & E_BINDING_MODIFIER_SHIFT ) ) ;
mod | = ( ECORE_EVENT_MODIFIER_CTRL * ! ! ( modifiers & E_BINDING_MODIFIER_CTRL ) ) ;
@ -2984,6 +2984,7 @@ ACT_FN_GO_MOUSE(mouse_to_key, )
mod | = ( ECORE_EVENT_MODIFIER_ALTGR * ! ! ( modifiers & E_BINDING_MODIFIER_ALTGR ) ) ;
e_comp_wl_input_keyboard_event_generate ( key , mod , 0 ) ;
e_comp_wl_input_keyboard_event_generate ( key , mod , 1 ) ;
return EINA_TRUE ;
}
# endif