X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcontrol%2Fgestures.c;h=a9358f3702d3e2e9613e5934bc68a533faf66254;hb=4e69a7226d6b54b9457c85d8c1467056aab36ce3;hp=149206f25b5a8c17b1033d02714863ca3014e502;hpb=6c1d00ed78efe4029b67d179bb6871c924f98129;p=vlc diff --git a/modules/control/gestures.c b/modules/control/gestures.c index 149206f25b..a9358f3702 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -1,8 +1,8 @@ /***************************************************************************** - * geatures.c: control vlc with mouse gestures + * gestures.c: control vlc with mouse gestures ***************************************************************************** - * Copyright (C) 2002 VideoLAN - * $Id: gestures.c,v 1.3 2003/03/08 01:55:28 sigmunau Exp $ + * Copyright (C) 2004 the VideoLAN team + * $Id$ * * Authors: Sigmund Augdal * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -26,14 +26,14 @@ *****************************************************************************/ #include /* malloc(), free() */ #include -#include #include #include #include -#include "stream_control.h" -#include "input_ext-intf.h" +#ifdef HAVE_UNISTD_H +# include +#endif /***************************************************************************** * intf_sys_t: description and status of interface @@ -74,23 +74,27 @@ static void RunIntf ( intf_thread_t *p_intf ); /***************************************************************************** * Module descriptor *****************************************************************************/ -#define THRESHOLD_TEXT N_( "Motion threshold" ) +#define THRESHOLD_TEXT N_( "Motion threshold (10-100)" ) #define THRESHOLD_LONGTEXT N_( \ - "the amount of movement required for a mouse" \ - " gesture to be recorded" ) + "Amount of movement required for a mouse" \ + " gesture to be recorded." ) -#define BUTTON_TEXT N_( "Mouse button" ) +#define BUTTON_TEXT N_( "Trigger button" ) #define BUTTON_LONGTEXT N_( \ - "the mouse button to be held down during mouse gestures" ) + "You can set the trigger button for mouse gestures here." ) -static char *button_list[] = { "left", "middle", "right", NULL }; +static char *button_list[] = { "left", "middle", "right" }; +static char *button_list_text[] = { N_("Left"), N_("Middle"), N_("Right") }; vlc_module_begin(); - add_category_hint( N_( "Gestures" ), NULL, VLC_FALSE ); + set_shortname( _("Gestures")); + set_category( CAT_INTERFACE ); + set_subcategory( SUBCAT_INTERFACE_CONTROL ); add_integer( "gestures-threshold", 30, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE ); - add_string_from_list( "gestures-button", "right", button_list, NULL, - BUTTON_TEXT, BUTTON_LONGTEXT, VLC_FALSE ); - set_description( _("mouse gestures control module") ); + add_string( "gestures-button", "right", NULL, + BUTTON_TEXT, BUTTON_LONGTEXT, VLC_FALSE ); + change_string_list( button_list, button_list_text, 0 ); + set_description( _("Mouse gestures control interface") ); set_capability( "interface", 0 ); set_callbacks( E_(Open), E_(Close) ); @@ -193,11 +197,11 @@ static void RunIntf( intf_thread_t *p_intf ) } break; case GESTURE(DOWN,RIGHT,NONE,NONE): + /* FIXME: Should close the vout!"*/ p_intf->p_vlc->b_die = VLC_TRUE; - msg_Dbg(p_intf, "Should close the vout!" ); break; case GESTURE(DOWN,LEFT,UP,RIGHT): - msg_Dbg(p_intf, "A square!" ); + msg_Dbg(p_intf, "a square!" ); break; default: break;