- EndThread( p_intf );
-}
-
-/*****************************************************************************
- * InitThread:
- *****************************************************************************/
-static int InitThread( intf_thread_t * p_intf )
-{
- char *psz_button;
- /* we might need some locking here */
- if( !intf_ShouldDie( p_intf ) )
- {
- /* p_intf->change_lock locking strategy:
- * - Every access to p_intf->p_sys are locked threw p_intf->change_lock
- * - make sure there won't be cross increment/decrement ref count
- * of p_intf->p_sys members p_intf->change_lock should be locked
- * during those operations */
- vlc_mutex_lock( &p_intf->change_lock );
-
- p_intf->p_sys->b_got_gesture = false;
- p_intf->p_sys->b_button_pressed = false;
- p_intf->p_sys->i_threshold =
- config_GetInt( p_intf, "gestures-threshold" );
- psz_button = config_GetPsz( p_intf, "gestures-button" );
- if ( !strcmp( psz_button, "left" ) )
- {
- p_intf->p_sys->i_button_mask = 1;
- }
- else if ( !strcmp( psz_button, "middle" ) )
- {
- p_intf->p_sys->i_button_mask = 2;
- }
- else if ( !strcmp( psz_button, "right" ) )
- {
- p_intf->p_sys->i_button_mask = 4;
- }
-
- p_intf->p_sys->i_pattern = 0;
- p_intf->p_sys->i_num_gestures = 0;
- vlc_mutex_unlock( &p_intf->change_lock );
-
- return 0;
- }
- else
- {
- return -1;
- }
-}
-
-/*****************************************************************************
- * EndThread:
- *****************************************************************************/
-static void EndThread( intf_thread_t * p_intf )
-{
- vlc_mutex_lock( &p_intf->change_lock );
-
- if( p_intf->p_sys->p_vout )
- {
- var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved",
- MouseEvent, p_intf );
- var_DelCallback( p_intf->p_sys->p_vout, "mouse-button-down",
- MouseEvent, p_intf );
- vlc_object_release( p_intf->p_sys->p_vout );
- }
-
- vlc_mutex_unlock( &p_intf->change_lock );