Fixed x11 compile bugs.
authorjimtla
Thu, 22 Jul 2010 08:12:28 +0400
changeset 4669 62e6a6e9720b
parent 4668 a8ef4c3a5d8e
child 4670 ad4f32e874ee
Fixed x11 compile bugs.
Xcode/SDL/SDL.xcodeproj/project.pbxproj
configure.in
src/video/cocoa/SDL_cocoaevents.m
src/video/x11/SDL_eventtouch.c
src/video/x11/SDL_x11events.c
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Sat Jul 17 23:16:57 2010 -0400
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Thu Jul 22 08:12:28 2010 +0400
@@ -476,6 +476,16 @@
 		04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; };
 		04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; };
+		8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */; };
+		8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */; };
+		8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */; };
+		8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */; };
+		8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */; };
+		8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */; };
+		8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */; };
+		8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */; };
+		8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */; };
+		8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */; };
 		BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; };
 		BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; };
 		BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; };
@@ -864,6 +874,16 @@
 		0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; };
 		0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; };
 		0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; };
+		8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11clipboard.c; sourceTree = "<group>"; };
+		8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11clipboard.h; sourceTree = "<group>"; };
+		8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_gesture.h; path = ../../include/SDL_gesture.h; sourceTree = SOURCE_ROOT; };
+		8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_touch.h; path = ../../include/SDL_touch.h; sourceTree = SOURCE_ROOT; };
+		8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; };
+		8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; };
+		8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch_c.h; sourceTree = "<group>"; };
+		8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
+		8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_eventtouch.c; sourceTree = "<group>"; };
+		8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_eventtouch.h; sourceTree = "<group>"; };
 		B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; };
 		B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; };
 		B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; };
@@ -1108,6 +1128,10 @@
 		00CFA719106B498B00758660 /* x11 */ = {
 			isa = PBXGroup;
 			children = (
+				8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */,
+				8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */,
+				8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */,
+				8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */,
 				00CFA71A106B498B00758660 /* imKStoUCS.c */,
 				00CFA71B106B498B00758660 /* imKStoUCS.h */,
 				00CFA71C106B498B00758660 /* SDL_x11dyn.c */,
@@ -1353,6 +1377,10 @@
 		01538367006D79147F000001 /* events */ = {
 			isa = PBXGroup;
 			children = (
+				8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */,
+				8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */,
+				8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */,
+				8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */,
 				0420497411E6F052007E7EC9 /* blank_cursor.h */,
 				0420497511E6F052007E7EC9 /* default_cursor.h */,
 				0420497611E6F052007E7EC9 /* scancodes_darwin.h */,
@@ -1470,6 +1498,8 @@
 		0153844A006D81B07F000001 /* Public Headers */ = {
 			isa = PBXGroup;
 			children = (
+				8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */,
+				8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */,
 				0C5AF5E501191D2B7F000001 /* begin_code.h */,
 				0C5AF5E601191D2B7F000001 /* close_code.h */,
 				0C5AF5FF01191D2B7F000001 /* SDL.h */,
@@ -1805,6 +1835,12 @@
 				0420497D11E6F052007E7EC9 /* scancodes_linux.h in Headers */,
 				0420497E11E6F052007E7EC9 /* scancodes_win32.h in Headers */,
 				0420497F11E6F052007E7EC9 /* scancodes_xfree86.h in Headers */,
+				8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */,
+				8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */,
+				8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */,
+				8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */,
+				8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */,
+				8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2277,6 +2313,10 @@
 				04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */,
 				04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */,
 				0420496211E6EFD3007E7EC9 /* SDL_clipboardevents.c in Sources */,
+				8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */,
+				8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */,
+				8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */,
+				8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
--- a/configure.in	Sat Jul 17 23:16:57 2010 -0400
+++ b/configure.in	Thu Jul 22 08:12:28 2010 +0400
@@ -285,6 +285,8 @@
     AC_DEFINE(uintptr_t, unsigned long)
 fi
 
+AC_CHECK_HEADER(Linux/input.h,AC_DEFINE(HAVE_LINUX_INPUT_H))
+
 # Standard C sources
 SOURCES="$SOURCES $srcdir/src/*.c"
 SOURCES="$SOURCES $srcdir/src/audio/*.c"
--- a/src/video/cocoa/SDL_cocoaevents.m	Sat Jul 17 23:16:57 2010 -0400
+++ b/src/video/cocoa/SDL_cocoaevents.m	Thu Jul 22 08:12:28 2010 +0400
@@ -217,6 +217,8 @@
             if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
                [NSApp sendEvent: event];
             break;
+		case NSBeginTouch:
+			printf("Touch Event Received\n");
         default:
             [NSApp sendEvent:event];
             break;
--- a/src/video/x11/SDL_eventtouch.c	Sat Jul 17 23:16:57 2010 -0400
+++ b/src/video/x11/SDL_eventtouch.c	Thu Jul 22 08:12:28 2010 +0400
@@ -24,12 +24,15 @@
 #include "SDL_eventtouch.h"
 #include "../../events/SDL_touch_c.h"
 
+#ifdef HAVE_LINUX_INPUT_H
 #include <linux/input.h>
 #include <fcntl.h>
+#endif
 
 void
 X11_InitTouch(_THIS)
 {
+#ifdef HAVE_LINUX_INPUT_H
   printf("Initializing touch...\n");
 
   FILE *fd;
@@ -109,6 +112,7 @@
   }
   
   close(fd);
+#endif
 }
 
 void
--- a/src/video/x11/SDL_x11events.c	Sat Jul 17 23:16:57 2010 -0400
+++ b/src/video/x11/SDL_x11events.c	Thu Jul 22 08:12:28 2010 +0400
@@ -37,10 +37,11 @@
 
 #include <stdio.h>
 
+#ifdef HAVE_LINUX_INPUT_H
 //Touch Input/event* includes
 #include <linux/input.h>
 #include <fcntl.h>
-
+#endif
 /*#define DEBUG_XEVENTS*/
 
 static void
@@ -401,7 +402,7 @@
         X11_DispatchEvent(_this);
     }
 
-
+#ifdef HAVE_LINUX_INPUT_H
     /* Process Touch events - TODO When X gets touch support, use that instead*/
     int i = 0,rd;
     char name[256];
@@ -472,6 +473,7 @@
 	    }
 	}
     }
+#endif
 }
 
 /* This is so wrong it hurts */