[PATCH synaptics 09/10] Move synaptics.h leftovers to synapticsstr.h, drop synaptics.h

Peter Hutterer peter.hutterer at who-t.net
Tue May 8 22:34:37 PDT 2012


This leaves us with a duplicated define for the maxbuttons but I'll live
with that for now.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 include/Makefile.am   |    2 +-
 include/synaptics.h   |   19 -------------------
 src/alpscomm.c        |    1 -
 src/eventcomm.c       |    1 -
 src/properties.c      |    1 -
 src/ps2comm.c         |    1 -
 src/psmcomm.c         |    1 -
 src/synaptics.c       |    1 -
 src/synapticsstr.h    |   20 ++++++++++++++++++++
 src/synproto.c        |    1 -
 test/eventcomm-test.c |    1 -
 tools/synclient.c     |    3 ++-
 tools/syndaemon.c     |    1 -
 13 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/include/Makefile.am b/include/Makefile.am
index f078e5e..8234020 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -18,4 +18,4 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-sdk_HEADERS = synaptics.h synaptics-properties.h
+sdk_HEADERS = synaptics-properties.h
diff --git a/include/synaptics.h b/include/synaptics.h
index 9ea3ced..c954e85 100644
--- a/include/synaptics.h
+++ b/include/synaptics.h
@@ -28,24 +28,5 @@
  *		Public definitions.
  *			Used by driver and the shared memory configurator
  *****************************************************************************/
-typedef enum {
-    RT_TAP = 0,                 /* Right top corner */
-    RB_TAP,                     /* Right bottom corner */
-    LT_TAP,                     /* Left top corner */
-    LB_TAP,                     /* Left bottom corner */
-    F1_TAP,                     /* Non-corner tap, one finger */
-    F2_TAP,                     /* Non-corner tap, two fingers */
-    F3_TAP,                     /* Non-corner tap, three fingers */
-    MAX_TAP
-} TapEvent;
-
-typedef enum {
-    F1_CLICK1 = 0,              /* Click left, one finger */
-    F2_CLICK1,                  /* Click left, two fingers */
-    F3_CLICK1,                  /* Click left, three fingers */
-    MAX_CLICK
-} ClickFingerEvent;
-
-#define SYN_MAX_BUTTONS 12      /* Max number of mouse buttons */
 
 #endif /* _SYNAPTICS_H_ */
diff --git a/src/alpscomm.c b/src/alpscomm.c
index 0bf0447..c565636 100644
--- a/src/alpscomm.c
+++ b/src/alpscomm.c
@@ -34,7 +34,6 @@
 
 #include <xorg-server.h>
 #include "synproto.h"
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "ps2comm.h"
 #include <xf86.h>
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 4025eee..d9430e1 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -39,7 +39,6 @@
 #include <string.h>
 #include <stdio.h>
 #include "synproto.h"
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include <xf86.h>
 #include <mtdev.h>
diff --git a/src/properties.c b/src/properties.c
index 49eb6c0..0cbca09 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -35,7 +35,6 @@
 #include <xf86Xinput.h>
 #include <exevents.h>
 
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "synaptics-properties.h"
 
diff --git a/src/ps2comm.c b/src/ps2comm.c
index f88b5cb..7c8e631 100644
--- a/src/ps2comm.c
+++ b/src/ps2comm.c
@@ -38,7 +38,6 @@
 
 #include <xorg-server.h>
 #include "synproto.h"
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "ps2comm.h"
 #include <xf86.h>
diff --git a/src/psmcomm.c b/src/psmcomm.c
index 478202a..4086aba 100644
--- a/src/psmcomm.c
+++ b/src/psmcomm.c
@@ -45,7 +45,6 @@
 #include <errno.h>
 #include <string.h>
 #include "synproto.h"
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "ps2comm.h"            /* ps2_print_ident() */
 #include <xf86.h>
diff --git a/src/synaptics.c b/src/synaptics.c
index cb0467b..7881926 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -74,7 +74,6 @@
 #include <xserver-properties.h>
 #include <ptrveloc.h>
 
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "synaptics-properties.h"
 
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 3a1fd3d..4bc2ed5 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -46,6 +46,26 @@
  *****************************************************************************/
 #define SYNAPTICS_MOVE_HISTORY	5
 #define SYNAPTICS_MAX_TOUCHES	10
+#define SYN_MAX_BUTTONS 12      /* Max number of mouse buttons */
+
+typedef enum {
+    RT_TAP = 0,                 /* Right top corner */
+    RB_TAP,                     /* Right bottom corner */
+    LT_TAP,                     /* Left top corner */
+    LB_TAP,                     /* Left bottom corner */
+    F1_TAP,                     /* Non-corner tap, one finger */
+    F2_TAP,                     /* Non-corner tap, two fingers */
+    F3_TAP,                     /* Non-corner tap, three fingers */
+    MAX_TAP
+} TapEvent;
+
+typedef enum {
+    F1_CLICK1 = 0,              /* Click left, one finger */
+    F2_CLICK1,                  /* Click left, two fingers */
+    F3_CLICK1,                  /* Click left, three fingers */
+    MAX_CLICK
+} ClickFingerEvent;
+
 
 typedef struct _SynapticsMoveHist {
     int x, y;
diff --git a/src/synproto.c b/src/synproto.c
index adec615..d3f05ca 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -22,7 +22,6 @@
  */
 
 #include "synproto.h"
-#include "synaptics.h"
 #include "synapticsstr.h"
 
 static int
diff --git a/test/eventcomm-test.c b/test/eventcomm-test.c
index d471e98..144d6dc 100644
--- a/test/eventcomm-test.c
+++ b/test/eventcomm-test.c
@@ -31,7 +31,6 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include "synaptics.h"
 #include "synapticsstr.h"
 #include "eventcomm.h"
 
diff --git a/tools/synclient.c b/tools/synclient.c
index 74eb504..4623728 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -43,13 +43,14 @@
 #include <X11/Xatom.h>
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XInput.h>
-#include "synaptics.h"
 #include "synaptics-properties.h"
 
 #ifndef XATOM_FLOAT
 #define XATOM_FLOAT "FLOAT"
 #endif
 
+#define SYN_MAX_BUTTONS 12
+
 union flong {                   /* Xlibs 64-bit property handling madness */
     long l;
     float f;
diff --git a/tools/syndaemon.c b/tools/syndaemon.c
index 5109052..d24f09c 100644
--- a/tools/syndaemon.c
+++ b/tools/syndaemon.c
@@ -45,7 +45,6 @@
 #include <sys/time.h>
 #include <sys/stat.h>
 
-#include "synaptics.h"
 #include "synaptics-properties.h"
 
 typedef enum {
-- 
1.7.10.1



More information about the xorg-devel mailing list