From 7aba50aec5e7d8267a9ed15c9b9cc6207f0d5c4d Mon Sep 17 00:00:00 2001 From: Mathew Huusko V Date: Sun, 7 Dec 2014 00:22:54 -0500 Subject: [PATCH] Refactor/re-write, and podify --- .gitignore | 11 +- .../project.pbxproj | 298 -- ... Mac Multitouch Support Wrapper.xccheckout | 41 - .../WorkspaceSettings.xcsettings | 10 - .../UserInterfaceState.xcuserstate | Bin 29870 -> 0 bytes .../WorkspaceSettings.xcsettings | 10 - ...oa Mac Multitouch Support Wrapper.xcscheme | 86 - .../xcschemes/xcschememanagement.plist | 22 - .../xcdebugger/Breakpoints.xcbkptlist | 20 - ...oa Mac Multitouch Support Wrapper.xcscheme | 86 - .../xcschemes/xcschememanagement.plist | 22 - .../AppDelegate.h | 8 - .../AppDelegate.m | 15 - ... Mac Multitouch Support Wrapper-Prefix.pch | 3 - .../MultitouchEvent.h | 13 - .../MultitouchEvent.m | 20 - .../MultitouchListener.h | 13 - .../MultitouchListener.m | 23 - .../MultitouchManager.h | 18 - .../MultitouchManager.m | 186 - .../MultitouchSupport.h | 63 - .../MultitouchTouch.h | 20 - .../MultitouchTouch.m | 26 - .../en.lproj/MainMenu.xib | 3128 ----------------- Cocoa Mac Multitouch Support Wrapper/main.m | 5 - LICENSE | 26 +- M5MultitouchSupport.podspec | 30 + M5MultitouchSupport.xcodeproj/project.pbxproj | 391 +++ .../contents.xcworkspacedata | 2 +- .../Info.plist | 22 +- M5MultitouchSupport/M5MTDefinesInternal.h | 71 + M5MultitouchSupport/M5MultitouchEvent.h | 24 + M5MultitouchSupport/M5MultitouchEvent.m | 21 + .../M5MultitouchEventInternal.h | 22 + M5MultitouchSupport/M5MultitouchListener.h | 19 + M5MultitouchSupport/M5MultitouchListener.m | 76 + .../M5MultitouchListenerInternal.h | 25 + M5MultitouchSupport/M5MultitouchManager.h | 26 + M5MultitouchSupport/M5MultitouchManager.m | 207 ++ .../M5MultitouchManagerInternal.h | 17 + M5MultitouchSupport/M5MultitouchSupport.h | 17 + M5MultitouchSupport/M5MultitouchTouch.h | 36 + M5MultitouchSupport/M5MultitouchTouch.m | 42 + .../M5MultitouchTouchInternal.h | 29 + README.md | 15 +- 45 files changed, 1089 insertions(+), 4176 deletions(-) mode change 100644 => 100755 .gitignore delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.pbxproj delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcshareddata/Cocoa Mac Multitouch Support Wrapper.xccheckout delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko.xcuserdatad/WorkspaceSettings.xcsettings delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/WorkspaceSettings.xcsettings delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme delete mode 100644 Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 Cocoa Mac Multitouch Support Wrapper/AppDelegate.h delete mode 100644 Cocoa Mac Multitouch Support Wrapper/AppDelegate.m delete mode 100644 Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.h delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.m delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchListener.h delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchListener.m delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchManager.h delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchManager.m delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchSupport.h delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.h delete mode 100755 Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.m delete mode 100644 Cocoa Mac Multitouch Support Wrapper/en.lproj/MainMenu.xib delete mode 100644 Cocoa Mac Multitouch Support Wrapper/main.m create mode 100644 M5MultitouchSupport.podspec create mode 100644 M5MultitouchSupport.xcodeproj/project.pbxproj rename {Cocoa Mac Multitouch Support Wrapper.xcodeproj => M5MultitouchSupport.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (60%) rename Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist => M5MultitouchSupport/Info.plist (58%) create mode 100644 M5MultitouchSupport/M5MTDefinesInternal.h create mode 100644 M5MultitouchSupport/M5MultitouchEvent.h create mode 100644 M5MultitouchSupport/M5MultitouchEvent.m create mode 100644 M5MultitouchSupport/M5MultitouchEventInternal.h create mode 100644 M5MultitouchSupport/M5MultitouchListener.h create mode 100644 M5MultitouchSupport/M5MultitouchListener.m create mode 100644 M5MultitouchSupport/M5MultitouchListenerInternal.h create mode 100644 M5MultitouchSupport/M5MultitouchManager.h create mode 100644 M5MultitouchSupport/M5MultitouchManager.m create mode 100644 M5MultitouchSupport/M5MultitouchManagerInternal.h create mode 100644 M5MultitouchSupport/M5MultitouchSupport.h create mode 100644 M5MultitouchSupport/M5MultitouchTouch.h create mode 100644 M5MultitouchSupport/M5MultitouchTouch.m create mode 100644 M5MultitouchSupport/M5MultitouchTouchInternal.h mode change 100644 => 100755 README.md diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 2dc992d..0a15653 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,11 @@ +.DS_Store -Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko.xcuserdatad/UserInterfaceState.xcuserstate +*.xcuserstate +*.xccheckout +*.xcscheme +*.xcsettings + +xcuserdata/ + +Pods/ +Podfile.lock diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.pbxproj b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.pbxproj deleted file mode 100644 index 7a2f4f7..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.pbxproj +++ /dev/null @@ -1,298 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 006D1DBB184FD3DD0052A238 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0F9EC1B17E5119300224B34 /* Cocoa.framework */; }; - D00D5F1D17E55DFA00639814 /* MultitouchListener.m in Sources */ = {isa = PBXBuildFile; fileRef = D00D5F1C17E55DFA00639814 /* MultitouchListener.m */; }; - D0F9EC2817E5119300224B34 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F9EC2717E5119300224B34 /* main.m */; }; - D0F9EC2F17E5119400224B34 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F9EC2E17E5119400224B34 /* AppDelegate.m */; }; - D0F9EC3217E5119400224B34 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0F9EC3017E5119400224B34 /* MainMenu.xib */; }; - D0F9EC3917E5134600224B34 /* MultitouchSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0F9EC3817E5134600224B34 /* MultitouchSupport.framework */; }; - D0F9EC4217E51DEF00224B34 /* MultitouchTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F9EC4117E51DEF00224B34 /* MultitouchTouch.m */; }; - D0F9EC4517E5268000224B34 /* MultitouchManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F9EC4417E5268000224B34 /* MultitouchManager.m */; }; - D0F9EC4817E5393100224B34 /* MultitouchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F9EC4717E5393100224B34 /* MultitouchEvent.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - D00D5F1B17E55DF900639814 /* MultitouchListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultitouchListener.h; sourceTree = ""; }; - D00D5F1C17E55DFA00639814 /* MultitouchListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultitouchListener.m; sourceTree = ""; }; - D0F9EC1817E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Cocoa Mac Multitouch Support Wrapper.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - D0F9EC1B17E5119300224B34 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - D0F9EC1E17E5119300224B34 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - D0F9EC1F17E5119300224B34 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - D0F9EC2017E5119300224B34 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - D0F9EC2317E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Cocoa Mac Multitouch Support Wrapper-Info.plist"; sourceTree = ""; }; - D0F9EC2717E5119300224B34 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - D0F9EC2917E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Cocoa Mac Multitouch Support Wrapper-Prefix.pch"; sourceTree = ""; }; - D0F9EC2D17E5119400224B34 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - D0F9EC2E17E5119400224B34 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - D0F9EC3117E5119400224B34 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - D0F9EC3817E5134600224B34 /* MultitouchSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MultitouchSupport.framework; path = /System/Library/PrivateFrameworks/MultitouchSupport.framework; sourceTree = ""; }; - D0F9EC3B17E51D4200224B34 /* MultitouchSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultitouchSupport.h; sourceTree = ""; }; - D0F9EC4017E51DEF00224B34 /* MultitouchTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultitouchTouch.h; sourceTree = ""; }; - D0F9EC4117E51DEF00224B34 /* MultitouchTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultitouchTouch.m; sourceTree = ""; }; - D0F9EC4317E5268000224B34 /* MultitouchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultitouchManager.h; sourceTree = ""; }; - D0F9EC4417E5268000224B34 /* MultitouchManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultitouchManager.m; sourceTree = ""; }; - D0F9EC4617E5393100224B34 /* MultitouchEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultitouchEvent.h; sourceTree = ""; }; - D0F9EC4717E5393100224B34 /* MultitouchEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultitouchEvent.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D0F9EC1517E5119300224B34 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 006D1DBB184FD3DD0052A238 /* Cocoa.framework in Frameworks */, - D0F9EC3917E5134600224B34 /* MultitouchSupport.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D0F9EC0F17E5119300224B34 = { - isa = PBXGroup; - children = ( - D0F9EC2117E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper */, - D0F9EC1A17E5119300224B34 /* Frameworks */, - D0F9EC1917E5119300224B34 /* Products */, - ); - sourceTree = ""; - }; - D0F9EC1917E5119300224B34 /* Products */ = { - isa = PBXGroup; - children = ( - D0F9EC1817E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper.app */, - ); - name = Products; - sourceTree = ""; - }; - D0F9EC1A17E5119300224B34 /* Frameworks */ = { - isa = PBXGroup; - children = ( - D0F9EC3817E5134600224B34 /* MultitouchSupport.framework */, - D0F9EC1B17E5119300224B34 /* Cocoa.framework */, - D0F9EC1D17E5119300224B34 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - D0F9EC1D17E5119300224B34 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - D0F9EC1E17E5119300224B34 /* AppKit.framework */, - D0F9EC1F17E5119300224B34 /* CoreData.framework */, - D0F9EC2017E5119300224B34 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - D0F9EC2117E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper */ = { - isa = PBXGroup; - children = ( - D0F9EC3C17E51D5900224B34 /* Multitouch Support Wrapper */, - D0F9EC3A17E51D2400224B34 /* Example */, - D0F9EC2217E5119300224B34 /* Supporting Files */, - ); - path = "Cocoa Mac Multitouch Support Wrapper"; - sourceTree = ""; - }; - D0F9EC2217E5119300224B34 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - D0F9EC2317E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper-Info.plist */, - D0F9EC2717E5119300224B34 /* main.m */, - D0F9EC2917E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - D0F9EC3A17E51D2400224B34 /* Example */ = { - isa = PBXGroup; - children = ( - D0F9EC2D17E5119400224B34 /* AppDelegate.h */, - D0F9EC2E17E5119400224B34 /* AppDelegate.m */, - D0F9EC3017E5119400224B34 /* MainMenu.xib */, - ); - name = Example; - sourceTree = ""; - }; - D0F9EC3C17E51D5900224B34 /* Multitouch Support Wrapper */ = { - isa = PBXGroup; - children = ( - D0F9EC3B17E51D4200224B34 /* MultitouchSupport.h */, - D0F9EC4017E51DEF00224B34 /* MultitouchTouch.h */, - D0F9EC4117E51DEF00224B34 /* MultitouchTouch.m */, - D0F9EC4617E5393100224B34 /* MultitouchEvent.h */, - D0F9EC4717E5393100224B34 /* MultitouchEvent.m */, - D00D5F1B17E55DF900639814 /* MultitouchListener.h */, - D00D5F1C17E55DFA00639814 /* MultitouchListener.m */, - D0F9EC4317E5268000224B34 /* MultitouchManager.h */, - D0F9EC4417E5268000224B34 /* MultitouchManager.m */, - ); - name = "Multitouch Support Wrapper"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D0F9EC1717E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper */ = { - isa = PBXNativeTarget; - buildConfigurationList = D0F9EC3517E5119400224B34 /* Build configuration list for PBXNativeTarget "Cocoa Mac Multitouch Support Wrapper" */; - buildPhases = ( - D0F9EC1417E5119300224B34 /* Sources */, - D0F9EC1517E5119300224B34 /* Frameworks */, - D0F9EC1617E5119300224B34 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Cocoa Mac Multitouch Support Wrapper"; - productName = "Cocoa Mac Multitouch Support Wrapper"; - productReference = D0F9EC1817E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D0F9EC1017E5119300224B34 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - ORGANIZATIONNAME = "Mathew Huusko V"; - }; - buildConfigurationList = D0F9EC1317E5119300224B34 /* Build configuration list for PBXProject "Cocoa Mac Multitouch Support Wrapper" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = D0F9EC0F17E5119300224B34; - productRefGroup = D0F9EC1917E5119300224B34 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D0F9EC1717E5119300224B34 /* Cocoa Mac Multitouch Support Wrapper */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D0F9EC1617E5119300224B34 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D0F9EC3217E5119400224B34 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D0F9EC1417E5119300224B34 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D0F9EC2817E5119300224B34 /* main.m in Sources */, - D0F9EC2F17E5119400224B34 /* AppDelegate.m in Sources */, - D0F9EC4217E51DEF00224B34 /* MultitouchTouch.m in Sources */, - D0F9EC4517E5268000224B34 /* MultitouchManager.m in Sources */, - D0F9EC4817E5393100224B34 /* MultitouchEvent.m in Sources */, - D00D5F1D17E55DFA00639814 /* MultitouchListener.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - D0F9EC3017E5119400224B34 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - D0F9EC3117E5119400224B34 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - D0F9EC3317E5119400224B34 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx10.8; - }; - name = Debug; - }; - D0F9EC3417E5119400224B34 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx10.8; - }; - name = Release; - }; - D0F9EC3617E5119400224B34 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch"; - INFOPLIST_FILE = "Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - D0F9EC3717E5119400224B34 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch"; - INFOPLIST_FILE = "Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D0F9EC1317E5119300224B34 /* Build configuration list for PBXProject "Cocoa Mac Multitouch Support Wrapper" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D0F9EC3317E5119400224B34 /* Debug */, - D0F9EC3417E5119400224B34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D0F9EC3517E5119400224B34 /* Build configuration list for PBXNativeTarget "Cocoa Mac Multitouch Support Wrapper" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D0F9EC3617E5119400224B34 /* Debug */, - D0F9EC3717E5119400224B34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D0F9EC1017E5119300224B34 /* Project object */; -} diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcshareddata/Cocoa Mac Multitouch Support Wrapper.xccheckout b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcshareddata/Cocoa Mac Multitouch Support Wrapper.xccheckout deleted file mode 100644 index b1bd23f..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcshareddata/Cocoa Mac Multitouch Support Wrapper.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 35A90839-A812-4D1E-9C9F-7D9EB010A7D8 - IDESourceControlProjectName - Cocoa Mac Multitouch Support Wrapper - IDESourceControlProjectOriginsDictionary - - F1D42F3E-9015-412B-8092-CCE971D1ABE1 - https://github.com/mhuusko5/Cocoa-Mac-Multitouch-Support-Wrapper.git - - IDESourceControlProjectPath - Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - F1D42F3E-9015-412B-8092-CCE971D1ABE1 - ../.. - - IDESourceControlProjectURL - https://github.com/mhuusko5/Cocoa-Mac-Multitouch-Support-Wrapper.git - IDESourceControlProjectVersion - 110 - IDESourceControlProjectWCCIdentifier - F1D42F3E-9015-412B-8092-CCE971D1ABE1 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - F1D42F3E-9015-412B-8092-CCE971D1ABE1 - IDESourceControlWCCName - Cocoa-Mac-Multitouch-Support-Wrapper - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko.xcuserdatad/WorkspaceSettings.xcsettings b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index bfffcfe..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges - - SnapshotAutomaticallyBeforeSignificantChanges - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/UserInterfaceState.xcuserstate b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 0791f94f9a6d243973ad4af29d906140a6253823..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29870 zcmdUY2V7J~_voFuZ7IT17nUkT>99+;(xokJ*Jg=IvS9IkK_4!`fy7EDl_;IdRLrtwU0VXV7 zYX#pTSVBbD5VnLJ;Y;`t{zL!~NCXkVLE zh`q$e#3AAsagsPoTp%tH-w@Y{8^jO9kHk;J&&0351egLdU=F$f3t$PvzzVnkSKtQR zL08}bJb@SJ4gx_Khy*=AZx91wK_W;3=^zUzfd=G(SHNIU1%`lXPy=egP%s>f0Iz}9 z!FVtgOapI$>0kz!2j+u!!9uVEw18D$HCP9>f$d-i*a>!l1K=R|1RMj$!5835a1ne3 zz6O`UHSity9{d1)1CPLC2q6h6XbLT%1Uf)R*cE!f02l~^U@(k@aWEbxz(kk?`@v+G z0yAM2R6`Ba!ZKJ6YhW!L3Wvina2%Wjr^7jLK71FhgX`f2xDjrGo8cC?6>fvu;SRVP z?t=&5A$SBHhiBjy@Cv*NzlGn!JMb=i03X6%;cujvv?8rZ8`74vBkf5E=|DP?QqqU? zCH+W$GJp&uL&-=oicBCA$t1ELnM~%8N-~#Jk@;jX*`KT;hmh4|4OvSLCF{s~ayU7P z98GfM1adMtg`7jqCEp?Ek?)c3lZ(k!?UXj|HWcBEZs zSK5R2q`T8TbO0Sl%V;?rK}XU(>0WdU9ZM(DNpvcmMrYDlbS|x;^XUS*KV3qX(-rg} zx{@A3SJQQLJw2QrL64@#(1;#OPoO8#Q|PJm40sECT26Uh1tq% zV-7F}nNOHQ%%{v@<_L41`JB1HTw|^?H<+K8pP65n2P|MAOR^LzX02Fj)|GW*-Px|J z2kXgtu_3ICm9wF2Up9t~Wfg1&o5^OeMQkzKpDkervsLU6wwisF9mS4j$FP&w$?Oz% zDm#yz&%VnpW0$il*p=*Nb_=_e-Nx=`KVc8CN7-ZSN%j@yJ|0wPu<5}Al>M7AP3k-f-8)LrBw@)h}s{6ztxKvAS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zsPOl~XGKhrNs)PxWsy};LQzT4h$2)pxoBF^jG|dZbBpE`EiL+>Xl>DkqRmCSiuM-m zFFIIssOX1c*W%P-WwENbuy{~$O>tduWATXM*Nev%zft^V@#NxJ#dC{y7au7;ReZMi z^WrayuM}S^zFGWT@txua#lQEb`*$g=Ev+vdT{^jRX6d}rrKKB6H~pOFu9Dvh?fH%cb9zUe}sxgSGkEaoVZcIogHVW!jb64chJ6J=(L{^V)B;SGCu) zH?;T5s4}+9w5&^+xXh-^zRa=Axy-H1qs*&JRu)_MEQvS1BV8rUH||9 diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/WorkspaceSettings.xcsettings b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index bfffcfe..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/xcuserdata/mhuusko5.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges - - SnapshotAutomaticallyBeforeSignificantChanges - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme deleted file mode 100644 index 0266dae..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/xcschememanagement.plist b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 8f096d0..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - Cocoa Mac Multitouch Support Wrapper.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - D0F9EC1717E5119300224B34 - - primary - - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist deleted file mode 100644 index 6b2badb..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme deleted file mode 100644 index ab1ae15..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/Cocoa Mac Multitouch Support Wrapper.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/xcschememanagement.plist b/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 8f096d0..0000000 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/xcuserdata/mhuusko5.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - Cocoa Mac Multitouch Support Wrapper.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - D0F9EC1717E5119300224B34 - - primary - - - - - diff --git a/Cocoa Mac Multitouch Support Wrapper/AppDelegate.h b/Cocoa Mac Multitouch Support Wrapper/AppDelegate.h deleted file mode 100644 index bb69105..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/AppDelegate.h +++ /dev/null @@ -1,8 +0,0 @@ -#import -#import "MultitouchManager.h" - -@interface AppDelegate : NSObject - -- (void)doSomethingWithMultitouchEvent:(MultitouchEvent *)event; - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/AppDelegate.m b/Cocoa Mac Multitouch Support Wrapper/AppDelegate.m deleted file mode 100644 index 863561c..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/AppDelegate.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "AppDelegate.h" - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - [[MultitouchManager sharedMultitouchManager] addMultitouchListenerWithTarget:self callback:@selector(doSomethingWithMultitouchEvent:) andThread:nil]; - - NSLog(@"System is%@ multitouch capable.", [MultitouchManager systemIsMultitouchCapable] ? @"" : @" not"); -} - -- (void)doSomethingWithMultitouchEvent:(MultitouchEvent *)event { - NSLog(@"%@", [event description]); -} - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch b/Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch deleted file mode 100644 index 00e8847..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Prefix.pch +++ /dev/null @@ -1,3 +0,0 @@ -#ifdef __OBJC__ -#import -#endif diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.h b/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.h deleted file mode 100755 index 33cdace..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.h +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import "MultitouchTouch.h" - -@interface MultitouchEvent : NSObject - -@property NSNumber *deviceIdentifier; -@property NSNumber *frameIdentifier; -@property double timestamp; -@property NSArray *touches; - -- (id)initWithDeviceIdentifier:(int)deviceId frameIdentifier:(int)frameId timestamp:(double)timestamp andTouches:(NSArray *)touches; - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.m b/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.m deleted file mode 100755 index f58d637..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchEvent.m +++ /dev/null @@ -1,20 +0,0 @@ -#import "MultitouchEvent.h" - -@implementation MultitouchEvent - -- (id)initWithDeviceIdentifier:(int)deviceId frameIdentifier:(int)frameId timestamp:(double)timestamp andTouches:(NSArray *)touches { - self = [super init]; - - _deviceIdentifier = @(deviceId); - _frameIdentifier = @(frameId); - _timestamp = timestamp; - _touches = touches; - - return self; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"Device: %i, Frame: %i, Time: %f, Touches: %@", [_deviceIdentifier intValue], [_frameIdentifier intValue], _timestamp, [_touches description]]; -} - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.h b/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.h deleted file mode 100755 index 9048f3f..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.h +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import "MultitouchEvent.h" - -@interface MultitouchListener : NSObject - -@property id target; -@property SEL callback; -@property NSThread *thread; - -- (id)initWithTarget:(id)target callback:(SEL)callback andThread:(NSThread *)thread; -- (void)sendMultitouchEvent:(MultitouchEvent *)event; - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.m b/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.m deleted file mode 100755 index e66d35c..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchListener.m +++ /dev/null @@ -1,23 +0,0 @@ -#import "MultitouchListener.h" - -@implementation MultitouchListener - -- (id)initWithTarget:(id)target callback:(SEL)callback andThread:(NSThread *)thread { - self = [super init]; - - if (!thread) { - thread = [NSThread currentThread]; - } - - _target = target; - _callback = callback; - _thread = thread; - - return self; -} - -- (void)sendMultitouchEvent:(MultitouchEvent *)event { - [_target performSelector:_callback onThread:_thread withObject:event waitUntilDone:NO]; -} - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.h b/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.h deleted file mode 100755 index e824c15..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.h +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import "MultitouchSupport.h" -#import "MultitouchTouch.h" -#import "MultitouchEvent.h" -#import "MultitouchListener.h" - -@interface MultitouchManager : NSObject - -@property (readonly) BOOL forwardingMultitouchEventsToListeners; - -- (void)startForwardingMultitouchEventsToListeners; -- (void)stopForwardingMultitouchEventsToListeners; -- (void)removeMultitouchListenersWithTarget:(id)target andCallback:(SEL)callback; -- (void)addMultitouchListenerWithTarget:(id)target callback:(SEL)callback andThread:(NSThread *)thread; -+ (BOOL)systemIsMultitouchCapable; -+ (MultitouchManager *)sharedMultitouchManager; - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.m b/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.m deleted file mode 100755 index 2ee8026..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchManager.m +++ /dev/null @@ -1,186 +0,0 @@ -#import "MultitouchManager.h" - -@interface MultitouchManager () - -@property NSMutableArray *multitouchListeners; -@property NSMutableArray *multitouchDevices; -@property BOOL forwardingMultitouchEventsToListeners; -@property NSTimer *multitouchHardwareCheckTimer; - -@end - -@implementation MultitouchManager - -static BOOL laptopLidClosed = NO; -- (void)checkMultitouchHardware { - CGDirectDisplayID builtInDisplay = 0; - CGDirectDisplayID activeDisplays[10]; - uint32_t numActiveDisplays; - CGGetActiveDisplayList(10, activeDisplays, &numActiveDisplays); - - while (numActiveDisplays-- > 0) { - if (CGDisplayIsBuiltin(activeDisplays[numActiveDisplays])) { - builtInDisplay = activeDisplays[numActiveDisplays]; - break; - } - } - - laptopLidClosed = (builtInDisplay == 0); - - NSArray *mtDevices = (NSArray *)CFBridgingRelease(MTDeviceCreateList()); - - int mtDeviceCount = (int)mtDevices.count; - if (mtDeviceCount != _multitouchDevices.count) { - [_multitouchHardwareCheckTimer invalidate]; - _multitouchHardwareCheckTimer = nil; - - [self restartMultitouchEventForwardingAfterWake:nil]; - } -} - -- (void)handleMultitouchEvent:(MultitouchEvent *)event { - if (_forwardingMultitouchEventsToListeners) { - int multitouchListenerCount = (int)_multitouchListeners.count; - while (multitouchListenerCount-- > 0) { - MultitouchListener *multitouchListenerToForwardEvent = _multitouchListeners[multitouchListenerCount]; - [multitouchListenerToForwardEvent sendMultitouchEvent:event]; - } - } -} - -- (void)startForwardingMultitouchEventsToListeners { - if ([[NSThread currentThread] isMainThread]) { - if (!_forwardingMultitouchEventsToListeners && [MultitouchManager systemIsMultitouchCapable]) { - NSArray *mtDevices = (NSArray *)CFBridgingRelease(MTDeviceCreateList()); - - int mtDeviceCount = (int)mtDevices.count; - while (mtDeviceCount-- > 0) { - id device = mtDevices[mtDeviceCount]; - - @try { - MTDeviceRef mtDevice = (__bridge MTDeviceRef)device; - MTRegisterContactFrameCallback(mtDevice, mtEventHandler); - MTDeviceStart(mtDevice, 0); - } - @catch (NSException *exception) - { - } - - [_multitouchDevices addObject:device]; - } - - _multitouchHardwareCheckTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(checkMultitouchHardware) userInfo:nil repeats:YES]; - - _forwardingMultitouchEventsToListeners = YES; - } - } - else { - [self performSelectorOnMainThread:@selector(startForwardingMultitouchEventsToListeners) withObject:nil waitUntilDone:NO]; - } -} - -- (void)stopForwardingMultitouchEventsToListeners { - if ([[NSThread currentThread] isMainThread]) { - if (_forwardingMultitouchEventsToListeners) { - [_multitouchHardwareCheckTimer invalidate]; - _multitouchHardwareCheckTimer = nil; - - int multitouchDeviceCount = (int)_multitouchDevices.count; - while (multitouchDeviceCount-- > 0) { - id device = _multitouchDevices[multitouchDeviceCount]; - - [_multitouchDevices removeObject:device]; - - @try { - MTDeviceRef mtDevice = (__bridge MTDeviceRef)device; - MTUnregisterContactFrameCallback(mtDevice, mtEventHandler); - MTDeviceStop(mtDevice); - MTDeviceRelease(mtDevice); - } - @catch (NSException *exception) - { - } - } - - _forwardingMultitouchEventsToListeners = NO; - } - } - else { - [self performSelectorOnMainThread:@selector(stopForwardingMultitouchEventsToListeners) withObject:nil waitUntilDone:NO]; - } -} - -- (void)restartMultitouchEventForwardingAfterWake:(NSNotification *)wakeNotification { - if ([[NSThread currentThread] isMainThread]) { - [self stopForwardingMultitouchEventsToListeners]; - [self startForwardingMultitouchEventsToListeners]; - } - else { - [self performSelectorOnMainThread:@selector(restartMultitouchEventForwardingAfterWake:) withObject:wakeNotification waitUntilDone:NO]; - } -} - -- (void)removeMultitouchListenersWithTarget:(id)target andCallback:(SEL)callback { - int multitouchListenerCount = (int)_multitouchListeners.count; - while (multitouchListenerCount-- > 0) { - MultitouchListener *multitouchListenerToRemove = _multitouchListeners[multitouchListenerCount]; - if ([multitouchListenerToRemove.target isEqual:target] && (!callback || multitouchListenerToRemove.callback == callback)) { - [_multitouchListeners removeObject:multitouchListenerToRemove]; - } - } -} - -- (void)addMultitouchListenerWithTarget:(id)target callback:(SEL)callback andThread:(NSThread *)thread { - [self removeMultitouchListenersWithTarget:target andCallback:callback]; - - [_multitouchListeners addObject:[[MultitouchListener alloc] initWithTarget:target callback:callback andThread:thread]]; - - [self startForwardingMultitouchEventsToListeners]; -} - -static void mtEventHandler(MTDeviceRef mtEventDevice, MTTouch mtEventTouches[], int mtEventTouchesNum, double mtEventTimestamp, int mtEventFrameId) { - if (MTDeviceIsBuiltIn && MTDeviceIsBuiltIn(mtEventDevice) && laptopLidClosed) { - /*When a Mac laptop lid is closed, it can cause the trackpad to send random - multitouch input (insane, I know!). Obviously we want to ignore that input.*/ - return; - } - - NSMutableArray *multitouchTouches = [[NSMutableArray alloc] initWithCapacity:mtEventTouchesNum]; - for (int i = 0; i < mtEventTouchesNum; i++) { - MultitouchTouch *multitouchTouch = [[MultitouchTouch alloc] initWithMTTouch:&mtEventTouches[i]]; - multitouchTouches[i] = multitouchTouch; - } - - MultitouchEvent *multitouchEvent = [[MultitouchEvent alloc] initWithDeviceIdentifier:(int)mtEventDevice frameIdentifier:mtEventFrameId timestamp:mtEventTimestamp andTouches:multitouchTouches]; - - [[MultitouchManager sharedMultitouchManager] handleMultitouchEvent:multitouchEvent]; -} - -- (id)init { - self = [super init]; - - _multitouchListeners = [NSMutableArray array]; - _multitouchDevices = [NSMutableArray array]; - - [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(restartMultitouchEventForwardingAfterWake:) name:NSWorkspaceDidWakeNotification object:nil]; - - return self; -} - -+ (BOOL)systemIsMultitouchCapable { - return MTDeviceIsAvailable(); -} - -static MultitouchManager *sharedMultitouchManager = nil; - -+ (void)initialize { - if (!sharedMultitouchManager && self == [MultitouchManager class]) { - sharedMultitouchManager = [[self alloc] init]; - } -} - -+ (MultitouchManager *)sharedMultitouchManager { - return sharedMultitouchManager; -} - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchSupport.h b/Cocoa Mac Multitouch Support Wrapper/MultitouchSupport.h deleted file mode 100755 index 5df5fa5..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchSupport.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct { - float x; - float y; - } MTPoint; - - typedef struct { - MTPoint position; - MTPoint velocity; - } MTVector; - - enum { - MTTouchStateNotTracking = 0, - MTTouchStateStartInRange = 1, - MTTouchStateHoverInRange = 2, - MTTouchStateMakeTouch = 3, - MTTouchStateTouching = 4, - MTTouchStateBreakTouch = 5, - MTTouchStateLingerInRange = 6, - MTTouchStateOutOfRange = 7 - }; - typedef int MTTouchState; - - typedef struct { - int frame; - double timestamp; - int identifier; - MTTouchState state; - int fingerId; - int handId; - MTVector normalizedPosition; - float size; - int field9; - float angle; - float majorAxis; - float minorAxis; - MTVector absolutePosition; - int field14; - int field15; - float density; - } MTTouch; - - typedef void *MTDeviceRef; - - typedef void (*MTFrameCallbackFunction)(MTDeviceRef device, MTTouch touches[], int numTouches, double timestamp, int frame); - - bool MTDeviceIsAvailable(); - CFMutableArrayRef MTDeviceCreateList(); - bool MTDeviceIsBuiltIn(MTDeviceRef) __attribute__((weak_import)); - - void MTRegisterContactFrameCallback(MTDeviceRef, MTFrameCallbackFunction); - void MTUnregisterContactFrameCallback(MTDeviceRef, MTFrameCallbackFunction); - - void MTDeviceStart(MTDeviceRef, int); - void MTDeviceStop(MTDeviceRef); - void MTDeviceRelease(MTDeviceRef); - -#ifdef __cplusplus -} -#endif diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.h b/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.h deleted file mode 100755 index be06ce1..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.h +++ /dev/null @@ -1,20 +0,0 @@ -#import -#import "MultitouchSupport.h" -@class MultitouchEvent; - -@interface MultitouchTouch : NSObject - -@property NSNumber *identifier; -@property int state; -@property float x; -@property float y; -@property float minorAxis; -@property float majorAxis; -@property float angle; -@property float size; -@property float velX; -@property float velY; - -- (id)initWithMTTouch:(MTTouch *)touch; - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.m b/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.m deleted file mode 100755 index dbf3e09..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/MultitouchTouch.m +++ /dev/null @@ -1,26 +0,0 @@ -#import "MultitouchTouch.h" - -@implementation MultitouchTouch - -- (id)initWithMTTouch:(MTTouch *)touch { - self = [super init]; - - _identifier = @(touch->identifier); - _state = touch->state; - _x = touch->normalizedPosition.position.x; - _y = touch->normalizedPosition.position.y; - _minorAxis = touch->minorAxis; - _majorAxis = touch->majorAxis; - _angle = touch->angle; - _size = touch->size; - _velX = touch->normalizedPosition.velocity.x; - _velY = touch->normalizedPosition.velocity.y; - - return self; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"Id: %i, State: %i, X: %f, Y: %f, MinorAxis: %f, MajorAxis: %f, Angle: %f, Size: %f, VelocityX: %f, VelocityY: %f", [_identifier intValue], _state, _x, _y, _minorAxis, _majorAxis, _angle, _size, _velX, _velY]; -} - -@end diff --git a/Cocoa Mac Multitouch Support Wrapper/en.lproj/MainMenu.xib b/Cocoa Mac Multitouch Support Wrapper/en.lproj/MainMenu.xib deleted file mode 100644 index cbf5c7b..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/en.lproj/MainMenu.xib +++ /dev/null @@ -1,3128 +0,0 @@ - - - - 1080 - 12E55 - 3084 - 1187.39 - 626.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 3084 - - - NSCustomObject - NSMenu - NSMenuItem - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - - - Cocoa Mac Multitouch Support Wrapper - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - Cocoa Mac Multitouch Support Wrapper - - - - About Cocoa Mac Multitouch Support Wrapper - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide Cocoa Mac Multitouch Support Wrapper - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit Cocoa Mac Multitouch Support Wrapper - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save… - s - 1048576 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find and Replace… - f - 1572864 - 2147483647 - - - 12 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - - - Font - - 2147483647 - - - submenuAction: - - Font - - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligatures - - 2147483647 - - - submenuAction: - - Ligatures - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - - - Cocoa Mac Multitouch Support Wrapper Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - AppDelegate - - - NSFontManager - - - - - - - terminate: - - - - 449 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - delegate - - - - 495 - - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - performFindPanelAction: - - - - 535 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - - - - - - - - - - - - 19 - - - - - - - - 56 - - - - - - - - 217 - - - - - - - - 83 - - - - - - - - 81 - - - - - - - - - - - - - - - - - 75 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - - - - - - 126 - - - - - 205 - - - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - - - - - - 216 - - - - - - - - 200 - - - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - - - - - - 296 - - - - - - - - - 297 - - - - - 298 - - - - - 211 - - - - - - - - 212 - - - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - - - - - - 349 - - - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 375 - - - - - - - - 376 - - - - - - - - - 377 - - - - - - - - 388 - - - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - - - - - - 398 - - - - - - - - 399 - - - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - - - - - - 451 - - - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - - - - - - 491 - - - - - - - - 492 - - - - - 494 - - - - - 496 - - - - - - - - 497 - - - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 534 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 535 - - - 0 - IBCocoaFramework - YES - 3 - - {11, 11} - {10, 3} - - YES - - diff --git a/Cocoa Mac Multitouch Support Wrapper/main.m b/Cocoa Mac Multitouch Support Wrapper/main.m deleted file mode 100644 index b8af31f..0000000 --- a/Cocoa Mac Multitouch Support Wrapper/main.m +++ /dev/null @@ -1,5 +0,0 @@ -#import - -int main(int argc, char *argv[]) { - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/LICENSE b/LICENSE index 6a268dd..0e55745 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,22 @@ The MIT License (MIT) -Copyright (c) 2013 Mathew Huusko V +Copyright (c) 2014 Mathew Huusko V -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -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. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER 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. + diff --git a/M5MultitouchSupport.podspec b/M5MultitouchSupport.podspec new file mode 100644 index 0000000..506c022 --- /dev/null +++ b/M5MultitouchSupport.podspec @@ -0,0 +1,30 @@ +Pod::Spec.new do |s| + s.name = 'M5MultitouchSupport' + s.version = '1.0.0' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.summary = 'Easily and (thread/memory) safely consume global OSX multitouch (trackpad, Magic Mouse) events.' + s.homepage = 'https://github.com/mhuusko5/M5MultitouchSupport' + s.social_media_url = 'https://twitter.com/mhuusko5' + s.authors = { 'Mathew Huusko V' => 'mhuusko5@gmail.com' } + s.source = { :git => 'https://github.com/mhuusko5/M5MultitouchSupport.git', :tag => s.version.to_s } + + s.platform = :osx + s.osx.deployment_target = '10.8' + s.requires_arc = true + s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '/System/Library/PrivateFrameworks/' } + s.frameworks = 'Cocoa', 'MultitouchSupport' + + s.source_files = 'M5MultitouchSupport/M5MultitouchSupport.h' + + s.subspec 'Public' do |ss| + ss.source_files = 'M5MultitouchSupport/*.h' + ss.exclude_files = 'M5MultitouchSupport/*Internal.h', 'M5MultitouchSupport/M5MultitouchSupport.h' + end + + s.subspec 'Internal' do |ss| + ss.source_files = 'M5MultitouchSupport/*Internal.h', 'M5MultitouchSupport/*.m' + ss.private_header_files = 'M5MultitouchSupport/*Internal.h' + end + + s.default_subspecs = 'Public', 'Internal' +end \ No newline at end of file diff --git a/M5MultitouchSupport.xcodeproj/project.pbxproj b/M5MultitouchSupport.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d031455 --- /dev/null +++ b/M5MultitouchSupport.xcodeproj/project.pbxproj @@ -0,0 +1,391 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D0E13B6B1A33DCE300D90096 /* M5MultitouchSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B6A1A33DCE300D90096 /* M5MultitouchSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0E13B821A33E0BC00D90096 /* M5MTDefinesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B811A33E07000D90096 /* M5MTDefinesInternal.h */; }; + D0E13B851A33E0DE00D90096 /* M5MultitouchListener.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B831A33E0DE00D90096 /* M5MultitouchListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0E13B861A33E0DE00D90096 /* M5MultitouchListener.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E13B841A33E0DE00D90096 /* M5MultitouchListener.m */; }; + D0E13B891A33E0F700D90096 /* M5MultitouchTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B871A33E0F700D90096 /* M5MultitouchTouch.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0E13B8A1A33E0F700D90096 /* M5MultitouchTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E13B881A33E0F700D90096 /* M5MultitouchTouch.m */; }; + D0E13B8D1A33E10400D90096 /* M5MultitouchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B8B1A33E10400D90096 /* M5MultitouchEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0E13B8E1A33E10400D90096 /* M5MultitouchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E13B8C1A33E10400D90096 /* M5MultitouchEvent.m */; }; + D0E13B911A33E11800D90096 /* M5MultitouchManager.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B8F1A33E11800D90096 /* M5MultitouchManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0E13B921A33E11800D90096 /* M5MultitouchManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D0E13B901A33E11800D90096 /* M5MultitouchManager.m */; }; + D0E13B971A33E1A800D90096 /* MultitouchSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0E13B961A33E1A800D90096 /* MultitouchSupport.framework */; }; + D0E13B981A33E1AB00D90096 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0E13B931A33E16C00D90096 /* Cocoa.framework */; }; + D0E13B9D1A33EB9E00D90096 /* M5MultitouchEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B991A33EB9E00D90096 /* M5MultitouchEventInternal.h */; }; + D0E13B9E1A33EB9E00D90096 /* M5MultitouchListenerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B9A1A33EB9E00D90096 /* M5MultitouchListenerInternal.h */; }; + D0E13B9F1A33EB9E00D90096 /* M5MultitouchManagerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B9B1A33EB9E00D90096 /* M5MultitouchManagerInternal.h */; }; + D0E13BA01A33EB9E00D90096 /* M5MultitouchTouchInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E13B9C1A33EB9E00D90096 /* M5MultitouchTouchInternal.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D0E13B651A33DCE300D90096 /* M5MultitouchSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = M5MultitouchSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D0E13B691A33DCE300D90096 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D0E13B6A1A33DCE300D90096 /* M5MultitouchSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = M5MultitouchSupport.h; sourceTree = ""; }; + D0E13B811A33E07000D90096 /* M5MTDefinesInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = M5MTDefinesInternal.h; sourceTree = ""; }; + D0E13B831A33E0DE00D90096 /* M5MultitouchListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchListener.h; sourceTree = ""; }; + D0E13B841A33E0DE00D90096 /* M5MultitouchListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M5MultitouchListener.m; sourceTree = ""; }; + D0E13B871A33E0F700D90096 /* M5MultitouchTouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchTouch.h; sourceTree = ""; }; + D0E13B881A33E0F700D90096 /* M5MultitouchTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M5MultitouchTouch.m; sourceTree = ""; }; + D0E13B8B1A33E10400D90096 /* M5MultitouchEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchEvent.h; sourceTree = ""; }; + D0E13B8C1A33E10400D90096 /* M5MultitouchEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M5MultitouchEvent.m; sourceTree = ""; }; + D0E13B8F1A33E11800D90096 /* M5MultitouchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchManager.h; sourceTree = ""; }; + D0E13B901A33E11800D90096 /* M5MultitouchManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M5MultitouchManager.m; sourceTree = ""; }; + D0E13B931A33E16C00D90096 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + D0E13B961A33E1A800D90096 /* MultitouchSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MultitouchSupport.framework; path = ../../../../System/Library/PrivateFrameworks/MultitouchSupport.framework; sourceTree = ""; }; + D0E13B991A33EB9E00D90096 /* M5MultitouchEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchEventInternal.h; sourceTree = ""; }; + D0E13B9A1A33EB9E00D90096 /* M5MultitouchListenerInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchListenerInternal.h; sourceTree = ""; }; + D0E13B9B1A33EB9E00D90096 /* M5MultitouchManagerInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchManagerInternal.h; sourceTree = ""; }; + D0E13B9C1A33EB9E00D90096 /* M5MultitouchTouchInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M5MultitouchTouchInternal.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D0E13B611A33DCE300D90096 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D0E13B971A33E1A800D90096 /* MultitouchSupport.framework in Frameworks */, + D0E13B981A33E1AB00D90096 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D0E13B5B1A33DCE300D90096 = { + isa = PBXGroup; + children = ( + D0E13B671A33DCE300D90096 /* M5MultitouchSupport */, + D0E13B951A33E17100D90096 /* Frameworks */, + D0E13B661A33DCE300D90096 /* Products */, + ); + sourceTree = ""; + }; + D0E13B661A33DCE300D90096 /* Products */ = { + isa = PBXGroup; + children = ( + D0E13B651A33DCE300D90096 /* M5MultitouchSupport.framework */, + ); + name = Products; + sourceTree = ""; + }; + D0E13B671A33DCE300D90096 /* M5MultitouchSupport */ = { + isa = PBXGroup; + children = ( + D0E13B6A1A33DCE300D90096 /* M5MultitouchSupport.h */, + D0E13BA31A33EBD000D90096 /* [M5MultitouchManager] */, + D0E13BA21A33EBB200D90096 /* [M5MultitouchListener] */, + D0E13BA11A33EBA300D90096 /* [M5MultitouchEvent] */, + D0E13BA41A33EBE000D90096 /* [M5MultitouchTouch] */, + D0E13B811A33E07000D90096 /* M5MTDefinesInternal.h */, + D0E13B681A33DCE300D90096 /* Supporting Files */, + ); + path = M5MultitouchSupport; + sourceTree = ""; + }; + D0E13B681A33DCE300D90096 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D0E13B691A33DCE300D90096 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D0E13B951A33E17100D90096 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D0E13B961A33E1A800D90096 /* MultitouchSupport.framework */, + D0E13B931A33E16C00D90096 /* Cocoa.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + D0E13BA11A33EBA300D90096 /* [M5MultitouchEvent] */ = { + isa = PBXGroup; + children = ( + D0E13B8B1A33E10400D90096 /* M5MultitouchEvent.h */, + D0E13B991A33EB9E00D90096 /* M5MultitouchEventInternal.h */, + D0E13B8C1A33E10400D90096 /* M5MultitouchEvent.m */, + ); + name = "[M5MultitouchEvent]"; + sourceTree = ""; + }; + D0E13BA21A33EBB200D90096 /* [M5MultitouchListener] */ = { + isa = PBXGroup; + children = ( + D0E13B831A33E0DE00D90096 /* M5MultitouchListener.h */, + D0E13B9A1A33EB9E00D90096 /* M5MultitouchListenerInternal.h */, + D0E13B841A33E0DE00D90096 /* M5MultitouchListener.m */, + ); + name = "[M5MultitouchListener]"; + sourceTree = ""; + }; + D0E13BA31A33EBD000D90096 /* [M5MultitouchManager] */ = { + isa = PBXGroup; + children = ( + D0E13B8F1A33E11800D90096 /* M5MultitouchManager.h */, + D0E13B9B1A33EB9E00D90096 /* M5MultitouchManagerInternal.h */, + D0E13B901A33E11800D90096 /* M5MultitouchManager.m */, + ); + name = "[M5MultitouchManager]"; + sourceTree = ""; + }; + D0E13BA41A33EBE000D90096 /* [M5MultitouchTouch] */ = { + isa = PBXGroup; + children = ( + D0E13B871A33E0F700D90096 /* M5MultitouchTouch.h */, + D0E13B9C1A33EB9E00D90096 /* M5MultitouchTouchInternal.h */, + D0E13B881A33E0F700D90096 /* M5MultitouchTouch.m */, + ); + name = "[M5MultitouchTouch]"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D0E13B621A33DCE300D90096 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D0E13B6B1A33DCE300D90096 /* M5MultitouchSupport.h in Headers */, + D0E13B911A33E11800D90096 /* M5MultitouchManager.h in Headers */, + D0E13B851A33E0DE00D90096 /* M5MultitouchListener.h in Headers */, + D0E13B8D1A33E10400D90096 /* M5MultitouchEvent.h in Headers */, + D0E13B891A33E0F700D90096 /* M5MultitouchTouch.h in Headers */, + D0E13B9F1A33EB9E00D90096 /* M5MultitouchManagerInternal.h in Headers */, + D0E13B9E1A33EB9E00D90096 /* M5MultitouchListenerInternal.h in Headers */, + D0E13B9D1A33EB9E00D90096 /* M5MultitouchEventInternal.h in Headers */, + D0E13BA01A33EB9E00D90096 /* M5MultitouchTouchInternal.h in Headers */, + D0E13B821A33E0BC00D90096 /* M5MTDefinesInternal.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D0E13B641A33DCE300D90096 /* M5MultitouchSupport */ = { + isa = PBXNativeTarget; + buildConfigurationList = D0E13B7B1A33DCE300D90096 /* Build configuration list for PBXNativeTarget "M5MultitouchSupport" */; + buildPhases = ( + D0E13B601A33DCE300D90096 /* Sources */, + D0E13B611A33DCE300D90096 /* Frameworks */, + D0E13B621A33DCE300D90096 /* Headers */, + D0E13B631A33DCE300D90096 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = M5MultitouchSupport; + productName = M5MultitouchSupport; + productReference = D0E13B651A33DCE300D90096 /* M5MultitouchSupport.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D0E13B5C1A33DCE300D90096 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = "Mathew Huusko V"; + TargetAttributes = { + D0E13B641A33DCE300D90096 = { + CreatedOnToolsVersion = 6.1.1; + }; + }; + }; + buildConfigurationList = D0E13B5F1A33DCE300D90096 /* Build configuration list for PBXProject "M5MultitouchSupport" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D0E13B5B1A33DCE300D90096; + productRefGroup = D0E13B661A33DCE300D90096 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D0E13B641A33DCE300D90096 /* M5MultitouchSupport */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D0E13B631A33DCE300D90096 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D0E13B601A33DCE300D90096 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D0E13B921A33E11800D90096 /* M5MultitouchManager.m in Sources */, + D0E13B861A33E0DE00D90096 /* M5MultitouchListener.m in Sources */, + D0E13B8E1A33E10400D90096 /* M5MultitouchEvent.m in Sources */, + D0E13B8A1A33E0F700D90096 /* M5MultitouchTouch.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D0E13B791A33DCE300D90096 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D0E13B7A1A33DCE300D90096 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D0E13B7C1A33DCE300D90096 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = M5MultitouchSupport/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + D0E13B7D1A33DCE300D90096 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = M5MultitouchSupport/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D0E13B5F1A33DCE300D90096 /* Build configuration list for PBXProject "M5MultitouchSupport" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D0E13B791A33DCE300D90096 /* Debug */, + D0E13B7A1A33DCE300D90096 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D0E13B7B1A33DCE300D90096 /* Build configuration list for PBXNativeTarget "M5MultitouchSupport" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D0E13B7C1A33DCE300D90096 /* Debug */, + D0E13B7D1A33DCE300D90096 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = D0E13B5C1A33DCE300D90096 /* Project object */; +} diff --git a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/M5MultitouchSupport.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 60% rename from Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to M5MultitouchSupport.xcodeproj/project.xcworkspace/contents.xcworkspacedata index d2de923..5d22013 100644 --- a/Cocoa Mac Multitouch Support Wrapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/M5MultitouchSupport.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:M5MultitouchSupport.xcodeproj"> diff --git a/Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist b/M5MultitouchSupport/Info.plist similarity index 58% rename from Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist rename to M5MultitouchSupport/Info.plist index 065982b..54501ae 100644 --- a/Cocoa Mac Multitouch Support Wrapper/Cocoa Mac Multitouch Support Wrapper-Info.plist +++ b/M5MultitouchSupport/Info.plist @@ -5,30 +5,24 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - + $(EXECUTABLE_NAME) CFBundleIdentifier - com.mhuusko5.${PRODUCT_NAME:rfc1034identifier} + com.mhuusko5.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType - APPL + FMWK CFBundleShortVersionString - 1.0 + 1.0.0 CFBundleSignature ???? CFBundleVersion - 1.0 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} + $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright - Copyright © 2013 Mathew Huusko V. All rights reserved. - NSMainNibFile - MainMenu + Copyright © 2014 Mathew Huusko V. All rights reserved. NSPrincipalClass - NSApplication + diff --git a/M5MultitouchSupport/M5MTDefinesInternal.h b/M5MultitouchSupport/M5MTDefinesInternal.h new file mode 100644 index 0000000..0b7bcf2 --- /dev/null +++ b/M5MultitouchSupport/M5MTDefinesInternal.h @@ -0,0 +1,71 @@ +// +// M5MTDefinesInternal.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + float x; + float y; +} MTPoint; + +typedef struct { + MTPoint position; + MTPoint velocity; +} MTVector; + +enum { + MTTouchStateNotTracking = 0, + MTTouchStateStartInRange = 1, + MTTouchStateHoverInRange = 2, + MTTouchStateMakeTouch = 3, + MTTouchStateTouching = 4, + MTTouchStateBreakTouch = 5, + MTTouchStateLingerInRange = 6, + MTTouchStateOutOfRange = 7 +}; +typedef int MTTouchState; + +typedef struct { + int frame; + double timestamp; + int identifier; + MTTouchState state; + int fingerId; + int handId; + MTVector normalizedPosition; + float size; + int field9; + float angle; + float majorAxis; + float minorAxis; + MTVector absolutePosition; + int field14; + int field15; + float density; +} MTTouch; + +typedef void *MTDeviceRef; + +typedef void (*MTFrameCallbackFunction)(MTDeviceRef device, MTTouch touches[], int numTouches, double timestamp, int frame); + +bool MTDeviceIsAvailable(); +CFMutableArrayRef MTDeviceCreateList(); +bool MTDeviceIsBuiltIn(MTDeviceRef) __attribute__((weak_import)); + +void MTRegisterContactFrameCallback(MTDeviceRef, MTFrameCallbackFunction); +void MTUnregisterContactFrameCallback(MTDeviceRef, MTFrameCallbackFunction); + +void MTDeviceStart(MTDeviceRef, int); +void MTDeviceStop(MTDeviceRef); +void MTDeviceRelease(MTDeviceRef); + +#ifdef __cplusplus +} +#endif diff --git a/M5MultitouchSupport/M5MultitouchEvent.h b/M5MultitouchSupport/M5MultitouchEvent.h new file mode 100644 index 0000000..0a4e580 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchEvent.h @@ -0,0 +1,24 @@ +// +// M5MultitouchEvent.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import + +@interface M5MultitouchEvent : NSObject + +#pragma mark - M5MultitouchEvent - + +@property (strong, nonatomic, readonly) NSArray *touches; +@property (assign, nonatomic, readonly) int deviceID; +@property (assign, nonatomic, readonly) int frameID; +@property (assign, nonatomic, readonly) double timestamp; + +#pragma mark - + +@end + +typedef void (^M5MultitouchEventCallback)(M5MultitouchEvent *event); \ No newline at end of file diff --git a/M5MultitouchSupport/M5MultitouchEvent.m b/M5MultitouchSupport/M5MultitouchEvent.m new file mode 100644 index 0000000..26d5586 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchEvent.m @@ -0,0 +1,21 @@ +// +// M5MultitouchEvent.m +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchEventInternal.h" + +@implementation M5MultitouchEvent + +#pragma mark - M5MultitouchEvent Private - + +- (NSString *)description { + return [NSString stringWithFormat:@"Touches: %@, Device ID: %i, Frame ID: %i, Timestamp: %f", _touches.description, _deviceID, _frameID, _timestamp]; +} + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchEventInternal.h b/M5MultitouchSupport/M5MultitouchEventInternal.h new file mode 100644 index 0000000..d166cc2 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchEventInternal.h @@ -0,0 +1,22 @@ +// +// M5MultitouchEventInternal.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchEvent.h" + +@interface M5MultitouchEvent () + +#pragma mark - M5MultitouchEvent Internal - + +@property (strong, nonatomic, readwrite) NSArray *touches; +@property (assign, nonatomic, readwrite) int deviceID; +@property (assign, nonatomic, readwrite) int frameID; +@property (assign, nonatomic, readwrite) double timestamp; + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchListener.h b/M5MultitouchSupport/M5MultitouchListener.h new file mode 100644 index 0000000..301835c --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchListener.h @@ -0,0 +1,19 @@ +// +// M5MultitouchListener.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import + +@interface M5MultitouchListener : NSObject + +#pragma mark - M5MultitouchListener - + +@property (assign, nonatomic, readwrite) BOOL listening; + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchListener.m b/M5MultitouchSupport/M5MultitouchListener.m new file mode 100644 index 0000000..38b5b58 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchListener.m @@ -0,0 +1,76 @@ +// +// M5MultitouchListener.m +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchListenerInternal.h" + +@implementation M5MultitouchListener { + @private + M5MultitouchEventCallback _callback; + __weak id _target; + SEL _selector; + NSThread *_thread; +} + +#pragma mark - M5MultitouchListener Internal - + +- (instancetype)init { + if (self = [super init]) { + _listening = YES; + _thread = NSThread.currentThread; + } + + return self; +} + +- (instancetype)initWithCallback:(M5MultitouchEventCallback)callback { + if (self = [self init]) { + _callback = callback; + } + + return self; +} + +- (instancetype)initWithTarget:(id)target selector:(SEL)selector { + if (self = [self init]) { + _target = target; + _selector = selector; + } + + return self; +} + +- (void)listenToEvent:(M5MultitouchEvent *)event { + if (!self.alive || !self.listening) { + return; + } + + NSThread *thread = _thread && _thread.isExecuting ? _thread : NSThread.mainThread; + + if (![thread isEqual:NSThread.currentThread]) { + [self performSelector:@selector(listenToEvent:) onThread:thread withObject:event waitUntilDone:NO]; + return; + } + + if (_callback) { + _callback(event); + return; + } + + if (_target) { + [_target performSelector:_selector withObject:event]; + return; + } +} + +- (BOOL)alive { + return (_callback || (_target && _selector && [_target respondsToSelector:_selector])); +} + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchListenerInternal.h b/M5MultitouchSupport/M5MultitouchListenerInternal.h new file mode 100644 index 0000000..9bd6eb3 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchListenerInternal.h @@ -0,0 +1,25 @@ +// +// M5MultitouchListenerInternal.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchListener.h" + +#import "M5MultitouchEvent.h" + +@interface M5MultitouchListener () + +#pragma mark - M5MultitouchListener Internal - + +- (instancetype)initWithCallback:(M5MultitouchEventCallback)callback; +- (instancetype)initWithTarget:(id)target selector:(SEL)selector; +- (void)listenToEvent:(M5MultitouchEvent *)event; + +- (BOOL)alive; + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchManager.h b/M5MultitouchSupport/M5MultitouchManager.h new file mode 100644 index 0000000..e52b9dd --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchManager.h @@ -0,0 +1,26 @@ +// +// M5MultitouchManager.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import +#import "M5MultitouchListener.h" +#import "M5MultitouchEvent.h" + +@interface M5MultitouchManager : NSObject + +#pragma mark - M5MultitouchManager - + +- (void)removeListener:(M5MultitouchListener *)listener; +- (M5MultitouchListener *)addListenerWithCallback:(M5MultitouchEventCallback)callback; +- (M5MultitouchListener *)addListenerWithTarget:(id)target selector:(SEL)selector; //e.g. @selector(handleMultitouchEvent:) + ++ (BOOL)systemSupportsMultitouch; ++ (M5MultitouchManager *)sharedManager; + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchManager.m b/M5MultitouchSupport/M5MultitouchManager.m new file mode 100644 index 0000000..142827c --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchManager.m @@ -0,0 +1,207 @@ +// +// M5MultitouchManager.m +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchManagerInternal.h" + +#import +#import "M5MTDefinesInternal.h" +#import "M5MultitouchListenerInternal.h" +#import "M5MultitouchTouchInternal.h" +#import "M5MultitouchEventInternal.h" + +@implementation M5MultitouchManager { + @private + NSMutableArray *_multitouchListeners, *_multitouchDevices; + NSTimer *_multitouchHardwareCheckTimer; +} + +#pragma mark - M5MultitouchManager - + +- (void)removeListener:(M5MultitouchListener *)listener { + [_multitouchListeners removeObject:listener]; + + if (!_multitouchListeners.count) { + [self stopHandlingMultitouchEvents]; + } +} + +- (M5MultitouchListener *)addListenerWithCallback:(M5MultitouchEventCallback)callback { + if (![self.class systemSupportsMultitouch]) { + return nil; + } + + M5MultitouchListener *listener = [[M5MultitouchListener alloc] initWithCallback:callback]; + + [_multitouchListeners addObject:listener]; + + [self startHandlingMultitouchEvents]; + + return listener; +} + +- (M5MultitouchListener *)addListenerWithTarget:(id)target selector:(SEL)selector { + if (![self.class systemSupportsMultitouch]) { + return nil; + } + + M5MultitouchListener *listener = [[M5MultitouchListener alloc] initWithTarget:target selector:selector]; + + [_multitouchListeners addObject:listener]; + + [self startHandlingMultitouchEvents]; + + return listener; +} + ++ (BOOL)systemSupportsMultitouch { + return MTDeviceIsAvailable(); +} + ++ (M5MultitouchManager *)sharedManager { + static M5MultitouchManager *sharedManager = nil; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedManager = self.new; + }); + + return sharedManager; +} + +#pragma mark - + +#pragma mark - M5MultitouchManager Private - + +- (instancetype)init { + if (self = [super init]) { + _multitouchListeners = NSMutableArray.new; + _multitouchDevices = NSMutableArray.new; + + [NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(restartHandlingMultitouchEvents:) name:NSWorkspaceDidWakeNotification object:nil]; + } + + return self; +} + +static void mtEventHandler(MTDeviceRef mtEventDevice, MTTouch mtEventTouches[], int mtEventTouchesNum, double mtEventTimestamp, int mtEventFrameId) { + if (MTDeviceIsBuiltIn && MTDeviceIsBuiltIn(mtEventDevice) && laptopLidClosed) { + return; + } + + NSMutableArray *multitouchTouches = [[NSMutableArray alloc] initWithCapacity:mtEventTouchesNum]; + for (int i = 0; i < mtEventTouchesNum; i++) { + M5MultitouchTouch *multitouchTouch = [[M5MultitouchTouch alloc] initWithMTTouch:&mtEventTouches[i]]; + multitouchTouches[i] = multitouchTouch; + } + + M5MultitouchEvent *multitouchEvent = M5MultitouchEvent.new; + multitouchEvent.touches = multitouchTouches; + multitouchEvent.deviceID = (int)mtEventDevice; + multitouchEvent.frameID = mtEventFrameId; + multitouchEvent.timestamp = mtEventTimestamp; + + [[M5MultitouchManager sharedManager] handleMultitouchEvent:multitouchEvent]; +} + +static BOOL laptopLidClosed; + +- (void)checkMultitouchHardware { + CGDirectDisplayID builtInDisplay = 0; + CGDirectDisplayID activeDisplays[10]; + uint32_t numActiveDisplays; + CGGetActiveDisplayList(10, activeDisplays, &numActiveDisplays); + + int activeDisplayCount = (int)numActiveDisplays; + while (--activeDisplayCount >= 0) { + if (CGDisplayIsBuiltin(activeDisplays[activeDisplayCount])) { + builtInDisplay = activeDisplays[activeDisplayCount]; + break; + } + } + laptopLidClosed = (builtInDisplay == 0); + + NSArray *mtDevices = (NSArray *)CFBridgingRelease(MTDeviceCreateList()); + if (_multitouchDevices.count && _multitouchDevices.count != (int)mtDevices.count) { + [self restartHandlingMultitouchEvents:nil]; + } +} + +- (void)handleMultitouchEvent:(M5MultitouchEvent *)event { + int listenerCount = (int)_multitouchListeners.count; + while (--listenerCount >= 0) { + M5MultitouchListener *listener = _multitouchListeners[listenerCount]; + + if (!listener.alive) { + [self removeListener:listener]; + continue; + } + + if (!listener.listening) { + continue; + } + + [listener listenToEvent:event]; + } +} + +- (void)startHandlingMultitouchEvents { + if (_multitouchDevices.count) { + return; + } + + NSArray *mtDevices = (NSArray *)CFBridgingRelease(MTDeviceCreateList()); + + int mtDeviceCount = (int)mtDevices.count; + while (--mtDeviceCount >= 0) { + id device = mtDevices[mtDeviceCount]; + + @try { + MTDeviceRef mtDevice = (__bridge MTDeviceRef)device; + MTRegisterContactFrameCallback(mtDevice, mtEventHandler); + MTDeviceStart(mtDevice, 0); + } @catch (NSException *exception) {} + + [_multitouchDevices addObject:device]; + } + + _multitouchHardwareCheckTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(checkMultitouchHardware) userInfo:nil repeats:YES]; +} + +- (void)stopHandlingMultitouchEvents { + if (_multitouchHardwareCheckTimer) { + [_multitouchHardwareCheckTimer invalidate]; + _multitouchHardwareCheckTimer = nil; + } + + if (!_multitouchDevices.count) { + return; + } + + int deviceCount = (int)_multitouchDevices.count; + while (--deviceCount >= 0) { + id device = _multitouchDevices[deviceCount]; + + [_multitouchDevices removeObject:device]; + + @try { + MTDeviceRef mtDevice = (__bridge MTDeviceRef)device; + MTUnregisterContactFrameCallback(mtDevice, mtEventHandler); + MTDeviceStop(mtDevice); + MTDeviceRelease(mtDevice); + } @catch (NSException *exception) {} + } +} + +- (void)restartHandlingMultitouchEvents:(NSNotification *)note { + [self stopHandlingMultitouchEvents]; + [self startHandlingMultitouchEvents]; +} + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchManagerInternal.h b/M5MultitouchSupport/M5MultitouchManagerInternal.h new file mode 100644 index 0000000..0fd315e --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchManagerInternal.h @@ -0,0 +1,17 @@ +// +// M5MultitouchManagerInternal.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchManager.h" + +@interface M5MultitouchManager () + +#pragma mark - M5MultitouchManager Internal - + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchSupport.h b/M5MultitouchSupport/M5MultitouchSupport.h new file mode 100644 index 0000000..8b6c828 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchSupport.h @@ -0,0 +1,17 @@ +// +// M5MultitouchSupport.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import + +FOUNDATION_EXPORT double M5MultitouchSupportVersionNumber; +FOUNDATION_EXPORT const unsigned char M5MultitouchSupportVersionString[]; + +#import "M5MultitouchManager.h" +#import "M5MultitouchListener.h" +#import "M5MultitouchEvent.h" +#import "M5MultitouchTouch.h" \ No newline at end of file diff --git a/M5MultitouchSupport/M5MultitouchTouch.h b/M5MultitouchSupport/M5MultitouchTouch.h new file mode 100644 index 0000000..fee2b90 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchTouch.h @@ -0,0 +1,36 @@ +// +// M5MultitouchTouch.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import + +typedef NS_ENUM(NSUInteger, M5MultitouchTouchState) { + M5MultitouchTouchStateNotTouching = 0, + M5MultitouchTouchStateStarting, + M5MultitouchTouchStateHovering, + M5MultitouchTouchStateMaking, + M5MultitouchTouchStateTouching, + M5MultitouchTouchStateBreaking, + M5MultitouchTouchStateLingering, + M5MultitouchTouchStateLeaving +}; + +@interface M5MultitouchTouch : NSObject + +#pragma mark - M5MultitouchTouch - + +@property (assign, nonatomic, readonly) int identifier; +@property (assign, nonatomic, readonly) M5MultitouchTouchState state; +@property (assign, nonatomic, readonly) float posX, posY; +@property (assign, nonatomic, readonly) float velX, velY; +@property (assign, nonatomic, readonly) float minorAxis, majorAxis; +@property (assign, nonatomic, readonly) float angle; +@property (assign, nonatomic, readonly) float size; + +#pragma makr - + +@end diff --git a/M5MultitouchSupport/M5MultitouchTouch.m b/M5MultitouchSupport/M5MultitouchTouch.m new file mode 100644 index 0000000..7d4baec --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchTouch.m @@ -0,0 +1,42 @@ +// +// M5MultitouchTouch.m +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchTouchInternal.h" + +@implementation M5MultitouchTouch + +#pragma mark - M5MultitouchTouch Internal - + +- (id)initWithMTTouch:(MTTouch *)touch { + if (self = [super init]) { + _identifier = touch->identifier; + _state = touch->state; + _posX = touch->normalizedPosition.position.x; + _posY = touch->normalizedPosition.position.y; + _velX = touch->normalizedPosition.velocity.x; + _velY = touch->normalizedPosition.velocity.y; + _minorAxis = touch->minorAxis; + _majorAxis = touch->majorAxis; + _angle = touch->angle; + _size = touch->size; + } + + return self; +} + +#pragma mark - + +#pragma mark - M5MultitouchTouch Private - + +- (NSString *)description { + return [NSString stringWithFormat:@"ID: %i, State: %lu, Position: [%f, %f], Velocity: [%f, %f], Minor Axis: %f, Major Axis: %f, Angle: %f, Size: %f", _identifier, _state, _posX, _posY, _velX, _velY, _minorAxis, _majorAxis, _angle, _size]; +} + +#pragma mark - + +@end diff --git a/M5MultitouchSupport/M5MultitouchTouchInternal.h b/M5MultitouchSupport/M5MultitouchTouchInternal.h new file mode 100644 index 0000000..d1917a2 --- /dev/null +++ b/M5MultitouchSupport/M5MultitouchTouchInternal.h @@ -0,0 +1,29 @@ +// +// M5MultitouchTouchInternal.h +// M5MultitouchSupport +// +// Created by Mathew Huusko V on 12/6/14. +// Copyright (c) 2014 Mathew Huusko V. All rights reserved. +// + +#import "M5MultitouchTouch.h" + +#import "M5MTDefinesInternal.h" + +@interface M5MultitouchTouch () + +#pragma mark - M5MultitouchTouch Internal - + +@property (assign, nonatomic, readwrite) int identifier; +@property (assign, nonatomic, readwrite) M5MultitouchTouchState state; +@property (assign, nonatomic, readwrite) float posX, posY; +@property (assign, nonatomic, readwrite) float velX, velY; +@property (assign, nonatomic, readwrite) float minorAxis, majorAxis; +@property (assign, nonatomic, readwrite) float angle; +@property (assign, nonatomic, readwrite) float size; + +- (id)initWithMTTouch:(MTTouch *)touch; + +#pragma mark - + +@end diff --git a/README.md b/README.md old mode 100644 new mode 100755 index d485dd0..7477efd --- a/README.md +++ b/README.md @@ -1,12 +1,3 @@ -Cocoa Mac Multitouch Support Wrapper -==================================== - -Wrapper for the MultitouchSupport.framework private Cocoa framework under Mac OS X. Drop-in solution to easily receive and respond to system-wide multitouch events in a Cocoa application. - -Listening to system wide multitouch events from all devices, in a Obj-C manner is now as easy as: - -\#import "MultitouchManager.h" - -[[MultitouchManager sharedMultitouchManager] addMultitouchListenerWithTarget:self callback:@selector(doSomethingWithMultitouchEvent:) andThread:nil]; - -Sent to the designated method is a "MultitouchEvent" with a Device ID, Frame ID, Timestamp, and array of "MultitouchTouch"s, which have a unique (per device) ID, State, normalized X and Y location (from 0 to 1), Angle, Size, X Velocity and Y Velocity. +M5MultitouchSupport +===== +Easily and (thread/memory) safely consume global OSX multitouch (trackpad, Magic Mouse) events.