]> git.sesse.net Git - vlc/blobdiff - modules/control/gestures.c
* modules/control/http.c: Added two new RPN functions : playlist_add and
[vlc] / modules / control / gestures.c
index 149206f25b5a8c17b1033d02714863ca3014e502..a9358f3702d3e2e9613e5934bc68a533faf66254 100644 (file)
@@ -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 <sigmunau@idi.ntnu.no>
  *
@@ -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
  *****************************************************************************/
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
-#include <unistd.h>
 
 #include <vlc/vlc.h>
 #include <vlc/intf.h>
 #include <vlc/vout.h>
 
-#include "stream_control.h"
-#include "input_ext-intf.h"
+#ifdef HAVE_UNISTD_H
+#    include <unistd.h>
+#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;