Commit 180c722e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Make mouse-moved a void variable

parent dc25da7e
...@@ -668,9 +668,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -668,9 +668,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
p_vout->render.i_height / i_height; p_vout->render.i_height / i_height;
} }
var_Set( p_vout, "mouse-y", val ); var_Set( p_vout, "mouse-y", val );
var_TriggerCallback( p_vout, "mouse-moved" );
val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
} }
if( [self isFullscreen] ) if( [self isFullscreen] )
[[[[VLCMain sharedInstance] controls] fspanel] fadeIn]; [[[[VLCMain sharedInstance] controls] fspanel] fadeIn];
......
...@@ -1030,10 +1030,7 @@ static pascal OSStatus WindowEventHandler(EventHandlerCallRef nextHandler, Event ...@@ -1030,10 +1030,7 @@ static pascal OSStatus WindowEventHandler(EventHandlerCallRef nextHandler, Event
p_vout->render.i_height / i_height; p_vout->render.i_height / i_height;
var_Set( p_vout, "mouse-y", val ); var_Set( p_vout, "mouse-y", val );
var_TriggerCallback( p_vout, "mouse-moved" );
val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
break; break;
} }
......
...@@ -588,10 +588,7 @@ static pascal OSStatus WindowEventHandler(EventHandlerCallRef nextHandler, Event ...@@ -588,10 +588,7 @@ static pascal OSStatus WindowEventHandler(EventHandlerCallRef nextHandler, Event
p_vout->render.i_height / i_height; p_vout->render.i_height / i_height;
var_Set( p_vout, "mouse-y", val ); var_Set( p_vout, "mouse-y", val );
var_TriggerCallback( p_vout, "mouse-moved" );
val.b_bool = true;
var_Set( p_vout, "mouse-moved", val );
break; break;
} }
......
...@@ -487,7 +487,7 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var, ...@@ -487,7 +487,7 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
{ {
var_SetInteger( p_vout, "mouse-x", nmouse.i_x ); var_SetInteger( p_vout, "mouse-x", nmouse.i_x );
var_SetInteger( p_vout, "mouse-y", nmouse.i_y ); var_SetInteger( p_vout, "mouse-y", nmouse.i_y );
var_SetBool( p_vout, "mouse-moved", true ); var_TriggerCallback( p_vout, "mouse-moved" );
} }
if( vlc_mouse_HasButton( &omouse, &nmouse ) ) if( vlc_mouse_HasButton( &omouse, &nmouse ) )
{ {
......
...@@ -131,7 +131,7 @@ static int CreateVout( vlc_object_t *p_this ) ...@@ -131,7 +131,7 @@ static int CreateVout( vlc_object_t *p_this )
/* Forward events from the opengl provider */ /* Forward events from the opengl provider */
var_Create( p_sys->p_vout, "mouse-x", VLC_VAR_INTEGER ); var_Create( p_sys->p_vout, "mouse-x", VLC_VAR_INTEGER );
var_Create( p_sys->p_vout, "mouse-y", VLC_VAR_INTEGER ); var_Create( p_sys->p_vout, "mouse-y", VLC_VAR_INTEGER );
var_Create( p_sys->p_vout, "mouse-moved", VLC_VAR_BOOL ); var_Create( p_sys->p_vout, "mouse-moved", VLC_VAR_VOID );
var_Create( p_sys->p_vout, "mouse-clicked", VLC_VAR_BOOL ); var_Create( p_sys->p_vout, "mouse-clicked", VLC_VAR_BOOL );
var_Create( p_sys->p_vout, "mouse-button-down", VLC_VAR_INTEGER ); var_Create( p_sys->p_vout, "mouse-button-down", VLC_VAR_INTEGER );
var_Create( p_sys->p_vout, "video-on-top", var_Create( p_sys->p_vout, "video-on-top",
......
...@@ -58,7 +58,7 @@ static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y) ...@@ -58,7 +58,7 @@ static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y)
{ {
var_SetInteger(vout, "mouse-x", x); var_SetInteger(vout, "mouse-x", x);
var_SetInteger(vout, "mouse-y", y); var_SetInteger(vout, "mouse-y", y);
var_SetBool(vout, "mouse-moved", true); var_TriggerCallback(vout, "mouse-moved");
} }
static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
{ {
......
...@@ -405,7 +405,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) ...@@ -405,7 +405,7 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-moved", VLC_VAR_VOID );
var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL );
/* Mouse object (area of interest in a video filter) */ /* Mouse object (area of interest in a video filter) */
var_Create( p_vout, "mouse-object", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-object", VLC_VAR_BOOL );
......
...@@ -366,7 +366,7 @@ void vout_IntfInit( vout_thread_t *p_vout ) ...@@ -366,7 +366,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-moved", VLC_VAR_VOID );
var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL );
var_Create( p_vout, "mouse-object", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-object", VLC_VAR_BOOL );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment