Skip to content
Browse files

1st commit.

  • Loading branch information...
0 parents commit d9569d459415bff3ce0815c9f8c9e6ecd804047d @atsusy committed Sep 24, 2011
Showing with 9,490 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. +2 −0 Classes/.gitignore
  3. +13 −0 Classes/JpMsmcGesturerecognizerModule.h
  4. +106 −0 Classes/JpMsmcGesturerecognizerModule.m
  5. +9 −0 Classes/JpMsmcGesturerecognizerModuleAssets.h
  6. +15 −0 Classes/JpMsmcGesturerecognizerModuleAssets.m
  7. +13 −0 Classes/TiUIView+GestureRecognizer.h
  8. +104 −0 Classes/TiUIView+GestureRecognizer.m
  9. +4 −0 JpMsmcGesturerecognizer_Prefix.pch
  10. +22 −0 LICENSE
  11. +151 −0 README
  12. +6 −0 assets/README
  13. +195 −0 build.py
  14. +48 −0 documentation/index.md
  15. +27 −0 documentation/index.md~
  16. +48 −0 example/app.js
  17. +48 −0 example/app.js~
  18. BIN example/lena_std.jpg
  19. +336 −0 gesturerecognizer.xcodeproj/project.pbxproj
  20. +7 −0 gesturerecognizer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  21. +7,996 −0 ...gnizer.xcodeproj/project.xcworkspace/xcuserdata/atsusy.xcuserdatad/UserInterfaceState.xcuserstate
  22. +5 −0 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  23. +54 −0 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/Build & Test.xcscheme
  24. +54 −0 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/gesturerecognizer.xcscheme
  25. +32 −0 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/xcschememanagement.plist
  26. +1 −0 hooks/README
  27. +35 −0 hooks/add.py
  28. +19 −0 hooks/install.py
  29. +34 −0 hooks/remove.py
  30. +18 −0 hooks/uninstall.py
  31. +17 −0 manifest
  32. +28 −0 module.xcconfig
  33. +3 −0 platform/README
  34. +11 −0 timodule.xml
  35. +19 −0 titanium.xcconfig
10 .gitignore
@@ -0,0 +1,10 @@
+*.pbxuser
+*.perspective
+*.perspectivev3
+*.mode1v3
+project.xcworkspace
+xcuserdata
+tmp
+bin
+build
+*.zip
2 Classes/.gitignore
@@ -0,0 +1,2 @@
+JpMsmcGesturerecognizer.h
+JpMsmcGesturerecognizer.m
13 Classes/JpMsmcGesturerecognizerModule.h
@@ -0,0 +1,13 @@
+/**
+ * Your Copyright Here
+ *
+ * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc.
+ * and licensed under the Apache Public License (version 2)
+ */
+#import "TiModule.h"
+
+@interface JpMsmcGesturerecognizerModule : TiModule
+{
+}
+
+@end
106 Classes/JpMsmcGesturerecognizerModule.m
@@ -0,0 +1,106 @@
+/**
+ * Your Copyright Here
+ *
+ * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc.
+ * and licensed under the Apache Public License (version 2)
+ */
+#import "JpMsmcGesturerecognizerModule.h"
+#import "TiBase.h"
+#import "TiHost.h"
+#import "TiUtils.h"
+
+@implementation JpMsmcGesturerecognizerModule
+
+#pragma mark Internal
+
+// this is generated for your module, please do not change it
+-(id)moduleGUID
+{
+ return @"feebd8e2-d709-4a4d-afb4-2c996535b0bb";
+}
+
+// this is generated for your module, please do not change it
+-(NSString*)moduleId
+{
+ return @"jp.msmc.gesturerecognizer";
+}
+
+#pragma mark Lifecycle
+
+-(void)startup
+{
+ // this method is called when the module is first loaded
+ // you *must* call the superclass
+ [super startup];
+
+ NSLog(@"[INFO] %@ loaded",self);
+}
+
+-(void)shutdown:(id)sender
+{
+ // this method is called when the module is being unloaded
+ // typically this is during shutdown. make sure you don't do too
+ // much processing here or the app will be quit forceably
+
+ // you *must* call the superclass
+ [super shutdown:sender];
+}
+
+#pragma mark Cleanup
+
+-(void)dealloc
+{
+ // release any resources that have been retained by the module
+ [super dealloc];
+}
+
+#pragma mark Internal Memory Management
+
+-(void)didReceiveMemoryWarning:(NSNotification*)notification
+{
+ // optionally release any resources that can be dynamically
+ // reloaded once memory is available - such as caches
+ [super didReceiveMemoryWarning:notification];
+}
+
+#pragma mark Listener Notifications
+
+-(void)_listenerAdded:(NSString *)type count:(int)count
+{
+ if (count == 1 && [type isEqualToString:@"my_event"])
+ {
+ // the first (of potentially many) listener is being added
+ // for event named 'my_event'
+ }
+}
+
+-(void)_listenerRemoved:(NSString *)type count:(int)count
+{
+ if (count == 0 && [type isEqualToString:@"my_event"])
+ {
+ // the last listener called for event named 'my_event' has
+ // been removed, we can optionally clean up any resources
+ // since no body is listening at this point for that event
+ }
+}
+
+#pragma Public APIs
+
+-(id)example:(id)args
+{
+ // example method
+ return @"hello world";
+}
+
+-(id)exampleProp
+{
+ // example property getter
+ return @"hello world";
+}
+
+-(void)exampleProp:(id)value
+{
+ // example property setter
+}
+
+@end
9 Classes/JpMsmcGesturerecognizerModuleAssets.h
@@ -0,0 +1,9 @@
+/**
+ * This is a generated file. Do not edit or your changes will be lost
+ */
+
+@interface JpMsmcGesturerecognizerModuleAssets : NSObject
+{
+}
+- (NSData*) moduleAsset;
+@end
15 Classes/JpMsmcGesturerecognizerModuleAssets.m
@@ -0,0 +1,15 @@
+/**
+ * This is a generated file. Do not edit or your changes will be lost
+ */
+#import "JpMsmcGesturerecognizerModuleAssets.h"
+
+extern NSData * dataWithHexString (NSString * hexString);
+
+@implementation JpMsmcGesturerecognizerModuleAssets
+
+- (NSData*) moduleAsset
+{
+ return nil;
+}
+
+@end
13 Classes/TiUIView+GestureRecognizer.h
@@ -0,0 +1,13 @@
+//
+// TiUIView+GestureRecognizer.h
+// gesturerecognizer
+//
+// Created by KATAOKA,Atsushi on 11/09/24.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+#import "TiUIView.h"
+
+@interface TiUIView (TiUIView_GestureRecognizer)
+- (void)setRotateGesture_:(id)value;
+- (void)setPinchGesture_:(id)value;
+@end
104 Classes/TiUIView+GestureRecognizer.m
@@ -0,0 +1,104 @@
+//
+// TiUIView+GestureRecognizer.m
+// gesturerecognizer
+//
+// Created by KATAOKA,Atsushi on 11/09/24.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+#import "TiUtils.h"
+#import "TiUIView+GestureRecognizer.h"
+
+@implementation TiUIView (TiUIView_GestureRecognizer)
+
+- (void)handleRotationGesture:(UIRotationGestureRecognizer *)sender
+{
+ NSDictionary *args = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithFloat:[sender rotation]], @"rotation",
+ [NSNumber numberWithFloat:[sender velocity]], @"velocity", nil];
+ if([self.proxy _hasListeners:@"rotate"]){
+ [self.proxy fireEvent:@"rotate" withObject:args];
+ }
+
+ if(sender.state == UIGestureRecognizerStateEnded &&
+ [self.proxy _hasListeners:@"rotateend"]){
+ [self.proxy fireEvent:@"rotateend"];
+ }
+}
+
+- (void)setRotateGesture_:(id)value
+{
+ ENSURE_SINGLE_ARG(value, NSNumber);
+ BOOL value_ = [value boolValue];
+
+ if(value_){
+ for(UIGestureRecognizer *gesure in self.gestureRecognizers){
+ if([gesure isKindOfClass:[UIRotationGestureRecognizer class]]){
+ return;
+ }
+ }
+
+ UIRotationGestureRecognizer *rotationGesture =[[UIRotationGestureRecognizer alloc] initWithTarget:self
+ action:@selector(handleRotationGesture:)];
+ [self addGestureRecognizer:rotationGesture];
+
+ [rotationGesture release];
+ } else{
+ UIGestureRecognizer *rotationGesture = nil;
+ for(UIGestureRecognizer *gesure in self.gestureRecognizers){
+ if([gesure isKindOfClass:[UIRotationGestureRecognizer class]]){
+ rotationGesture = gesure;
+ break;
+ }
+ }
+ if(rotationGesture){
+ [self removeGestureRecognizer:rotationGesture];
+ }
+ }
+}
+
+- (void)handlePinchGesture:(UIPinchGestureRecognizer *)sender
+{
+ NSDictionary *args = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithFloat:[sender scale]], @"scale",
+ [NSNumber numberWithFloat:[sender velocity]], @"velocity", nil];
+ if([self.proxy _hasListeners:@"pinch"]){
+ [self.proxy fireEvent:@"pinch" withObject:args];
+ }
+
+ if(sender.state == UIGestureRecognizerStateEnded &&
+ [self.proxy _hasListeners:@"pinchend"]){
+ [self.proxy fireEvent:@"pinchend"];
+ }
+}
+
+- (void)setPinchGesture_:(id)value
+{
+ ENSURE_SINGLE_ARG(value, NSNumber);
+ BOOL value_ = [value boolValue];
+
+ if(value_){
+ for(UIGestureRecognizer *gesure in self.gestureRecognizers){
+ if([gesure isKindOfClass:[UIPinchGestureRecognizer class]]){
+ return;
+ }
+ }
+
+ UIPinchGestureRecognizer *pinchGesture =[[UIPinchGestureRecognizer alloc] initWithTarget:self
+ action:@selector(handlePinchGesture:)];
+ [self addGestureRecognizer:pinchGesture];
+
+ [pinchGesture release];
+ } else{
+ UIGestureRecognizer *pinchGesture = nil;
+ for(UIGestureRecognizer *gesure in self.gestureRecognizers){
+ if([gesure isKindOfClass:[UIPinchGestureRecognizer class]]){
+ pinchGesture = gesure;
+ break;
+ }
+ }
+ if(pinchGesture){
+ [self removeGestureRecognizer:pinchGesture];
+ }
+ }
+}
+@end
4 JpMsmcGesturerecognizer_Prefix.pch
@@ -0,0 +1,4 @@
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
22 LICENSE
@@ -0,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2011 MARSHMALLOW MACHINE.
+
+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.
+
151 README
@@ -0,0 +1,151 @@
+Appcelerator Titanium iPhone Module Project
+===========================================
+
+This is a skeleton Titanium Mobile iPhone module project. Modules can be
+used to extend the functionality of Titanium by providing additional native
+code that is compiled into your application at build time and can expose certain
+APIs into JavaScript.
+
+MODULE NAMING
+--------------
+
+Choose a unique module id for your module. This ID usually follows a namespace
+convention using DNS notation. For example, com.appcelerator.module.test. This
+ID can only be used once by all public modules in Titanium.
+
+
+COMPONENTS
+-----------
+
+Components that are exposed by your module must follow a special naming convention.
+A component (widget, proxy, etc) must be named with the pattern:
+
+ Ti<ModuleName><ComponentName>Proxy
+
+For example, if you component was called Foo, your proxy would be named:
+
+ TiMyfirstFooProxy
+
+For view proxies or widgets, you must create both a view proxy and a view implementation.
+If you widget was named proxy, you would create the following files:
+
+ TiMyfirstFooProxy.h
+ TiMyfirstFooProxy.m
+ TiMyfirstFoo.h
+ TiMyfirstFoo.m
+
+The view implementation is named the same except it does contain the suffix `Proxy`.
+
+View implementations extend the Titanium base class `TiUIView`. View Proxies extend the
+Titanium base class `TiUIViewProxy` or `TiUIWidgetProxy`.
+
+For proxies that are simply native objects that can be returned to JavaScript, you can
+simply extend `TiProxy` and no view implementation is required.
+
+
+GET STARTED
+------------
+
+1. Edit manifest with the appropriate details about your module.
+2. Edit LICENSE to add your license details.
+3. Place any assets (such as PNG files) that are required in the assets folder.
+4. Edit the titanium.xcconfig and make sure you're building for the right Titanium version.
+5. Code and build.
+
+BUILD TIME COMPILER CONFIG
+--------------------------
+
+You can edit the file `module.xcconfig` to include any build time settings that should be
+set during application compilation that your module requires. This file will automatically get `#include` in the main application project.
+
+For more information about this file, please see the Apple documentation at:
+
+<http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html>
+
+
+DOCUMENTATION FOR YOUR MODULE
+-----------------------------
+
+You should provide at least minimal documentation for your module in `documentation` folder using the Markdown syntax.
+
+For more information on the Markdown syntax, refer to this documentation at:
+
+<http://daringfireball.net/projects/markdown/>
+
+
+TEST HARNESS EXAMPLE FOR YOUR MODULE
+------------------------------------
+
+The `example` directory contains a skeleton application test harness that can be
+used for testing and providing an example of usage to the users of your module.
+
+
+INSTALL YOUR MODULE
+--------------------
+
+1. Run `build.py` which creates your distribution
+2. cd to `/Library/Application Support/Titanium`
+3. copy this zip file into the folder of your Titanium SDK
+
+REGISTER YOUR MODULE
+---------------------
+
+Register your module with your application by editing `tiapp.xml` and adding your module.
+Example:
+
+<modules>
+ <module version="0.1">jp.msmc.gesturerecognizer</module>
+</modules>
+
+When you run your project, the compiler will know automatically compile in your module
+dependencies and copy appropriate image assets into the application.
+
+USING YOUR MODULE IN CODE
+-------------------------
+
+To use your module in code, you will need to require it.
+
+For example,
+
+ var my_module = require('jp.msmc.gesturerecognizer');
+ my_module.foo();
+
+WRITING PURE JS NATIVE MODULES
+------------------------------
+
+You can write a pure JavaScript "natively compiled" module. This is nice if you
+want to distribute a JS module pre-compiled.
+
+To create a module, create a file named jp.msmc.gesturerecognizer.js under the assets folder.
+This file must be in the Common JS format. For example:
+
+ exports.echo = function(s)
+ {
+ return s;
+ };
+
+Any functions and properties that are exported will be made available as part of your
+module. All other code inside your JS will be private to your module.
+
+For pure JS module, you don't need to modify any of the Objective-C module code. You
+can leave it as-is and build.
+
+TESTING YOUR MODULE
+-------------------
+
+Run the `titanium.py` script to test your module or test from within XCode.
+To test with the script, execute:
+
+ titanium run --dir=YOURMODULEDIR
+
+
+This will execute the app.js in the example folder as a Titanium application.
+
+
+DISTRIBUTING YOUR MODULE
+-------------------------
+
+Currently, you will need to manually distribution your module distribution zip file directly. However, in the near future, we will make module distribution and sharing built-in to Titanium Developer and in the Titanium Marketplace!
+
+
+Cheers!
6 assets/README
@@ -0,0 +1,6 @@
+Place your assets like PNG files in this directory and they will be packaged with your module.
+
+If you create a file named jp.msmc.gesturerecognizer.js in this directory, it will be
+compiled and used as your module. This allows you to run pure Javascript
+modules that are pre-compiled.
+
195 build.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python
+#
+# Appcelerator Titanium Module Packager
+#
+#
+import os, sys, glob, string
+import zipfile
+from datetime import date
+
+cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
+os.chdir(cwd)
+required_module_keys = ['name','version','moduleid','description','copyright','license','copyright','platform','minsdk']
+module_defaults = {
+ 'description':'My module',
+ 'author': 'Your Name',
+ 'license' : 'Specify your license',
+ 'copyright' : 'Copyright (c) %s by Your Company' % str(date.today().year),
+}
+module_license_default = "TODO: place your license here and we'll include it in the module distribution"
+
+def replace_vars(config,token):
+ idx = token.find('$(')
+ while idx != -1:
+ idx2 = token.find(')',idx+2)
+ if idx2 == -1: break
+ key = token[idx+2:idx2]
+ if not config.has_key(key): break
+ token = token.replace('$(%s)' % key, config[key])
+ idx = token.find('$(')
+ return token
+
+
+def read_ti_xcconfig():
+ contents = open(os.path.join(cwd,'titanium.xcconfig')).read()
+ config = {}
+ for line in contents.splitlines(False):
+ line = line.strip()
+ if line[0:2]=='//': continue
+ idx = line.find('=')
+ if idx > 0:
+ key = line[0:idx].strip()
+ value = line[idx+1:].strip()
+ config[key] = replace_vars(config,value)
+ return config
+
+def generate_doc(config):
+ docdir = os.path.join(cwd,'documentation')
+ if not os.path.exists(docdir):
+ print "Couldn't find documentation file at: %s" % docdir
+ return None
+ sdk = config['TITANIUM_SDK']
+ support_dir = os.path.join(sdk,'module','support')
+ sys.path.append(support_dir)
+ import markdown
+ documentation = []
+ for file in os.listdir(docdir):
+ md = open(os.path.join(docdir,file)).read()
+ html = markdown.markdown(md)
+ documentation.append({file:html});
+ return documentation
+
+def compile_js(manifest,config):
+ js_file = os.path.join(cwd,'assets','jp.msmc.gesturerecognizer.js')
+ if not os.path.exists(js_file): return
+
+ sdk = config['TITANIUM_SDK']
+ iphone_dir = os.path.join(sdk,'iphone')
+ sys.path.insert(0,iphone_dir)
+ from compiler import Compiler
+
+ path = os.path.basename(js_file)
+ metadata = Compiler.make_function_from_file(path,js_file)
+ method = metadata['method']
+ eq = path.replace('.','_')
+ method = ' return %s;' % method
+
+ f = os.path.join(cwd,'Classes','JpMsmcGesturerecognizerModuleAssets.m')
+ c = open(f).read()
+ idx = c.find('return ')
+ before = c[0:idx]
+ after = """
+}
+
+@end
+ """
+ newc = before + method + after
+
+ if newc!=c:
+ x = open(f,'w')
+ x.write(newc)
+ x.close()
+
+def die(msg):
+ print msg
+ sys.exit(1)
+
+def warn(msg):
+ print "[WARN] %s" % msg
+
+def validate_license():
+ c = open(os.path.join(cwd,'LICENSE')).read()
+ if c.find(module_license_default)!=1:
+ warn('please update the LICENSE file with your license text before distributing')
+
+def validate_manifest():
+ path = os.path.join(cwd,'manifest')
+ f = open(path)
+ if not os.path.exists(path): die("missing %s" % path)
+ manifest = {}
+ for line in f.readlines():
+ line = line.strip()
+ if line[0:1]=='#': continue
+ if line.find(':') < 0: continue
+ key,value = line.split(':')
+ manifest[key.strip()]=value.strip()
+ for key in required_module_keys:
+ if not manifest.has_key(key): die("missing required manifest key '%s'" % key)
+ if module_defaults.has_key(key):
+ defvalue = module_defaults[key]
+ curvalue = manifest[key]
+ if curvalue==defvalue: warn("please update the manifest key: '%s' to a non-default value" % key)
+ return manifest,path
+
+ignoreFiles = ['.DS_Store','.gitignore','libTitanium.a','titanium.jar','README','jp.msmc.gesturerecognizer.js']
+ignoreDirs = ['.DS_Store','.svn','.git','CVSROOT']
+
+def zip_dir(zf,dir,basepath,ignore=[]):
+ for root, dirs, files in os.walk(dir):
+ for name in ignoreDirs:
+ if name in dirs:
+ dirs.remove(name) # don't visit ignored directories
+ for file in files:
+ if file in ignoreFiles: continue
+ e = os.path.splitext(file)
+ if len(e)==2 and e[1]=='.pyc':continue
+ from_ = os.path.join(root, file)
+ to_ = from_.replace(dir, basepath, 1)
+ zf.write(from_, to_)
+
+def glob_libfiles():
+ files = []
+ for libfile in glob.glob('build/**/*.a'):
+ if libfile.find('Release-')!=-1:
+ files.append(libfile)
+ return files
+
+def build_module(manifest,config):
+ rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
+ if rc != 0:
+ die("xcodebuild failed")
+ rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
+ if rc != 0:
+ die("xcodebuild failed")
+ # build the merged library using lipo
+ moduleid = manifest['moduleid']
+ libpaths = ''
+ for libfile in glob_libfiles():
+ libpaths+='%s ' % libfile
+
+ os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
+
+def package_module(manifest,mf,config):
+ name = manifest['name'].lower()
+ moduleid = manifest['moduleid'].lower()
+ version = manifest['version']
+ modulezip = '%s-iphone-%s.zip' % (moduleid,version)
+ if os.path.exists(modulezip): os.remove(modulezip)
+ zf = zipfile.ZipFile(modulezip, 'w', zipfile.ZIP_DEFLATED)
+ modulepath = 'modules/iphone/%s/%s' % (moduleid,version)
+ zf.write(mf,'%s/manifest' % modulepath)
+ libname = 'lib%s.a' % moduleid
+ zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname))
+ docs = generate_doc(config)
+ if docs!=None:
+ for doc in docs:
+ for file, html in doc.iteritems():
+ filename = string.replace(file,'.md','.html')
+ zf.writestr('%s/documentation/%s'%(modulepath,filename),html)
+ for dn in ('assets','example','platform'):
+ if os.path.exists(dn):
+ zip_dir(zf,dn,'%s/%s' % (modulepath,dn),['README'])
+ zf.write('LICENSE','%s/LICENSE' % modulepath)
+ zf.write('module.xcconfig','%s/module.xcconfig' % modulepath)
+ zf.close()
+
+
+if __name__ == '__main__':
+ manifest,mf = validate_manifest()
+ validate_license()
+ config = read_ti_xcconfig()
+ compile_js(manifest,config)
+ build_module(manifest,config)
+ package_module(manifest,mf,config)
+ sys.exit(0)
+
48 documentation/index.md
@@ -0,0 +1,48 @@
+# GestureReognizer Module
+
+## Description
+
+This module extends rotateGesture and pinchGesture property to your view.
+
+## Accessing the repeatedbackgroundimage Module
+
+Append inside <modules> tag <module version="1.0">jp.msmc.gesturerecognizer</module>.
+
+## Reference
+
+This module has no property and function.
+
+## Usage
+
+var image = Ti.UI.createImageView({
+ rotateGesture:true,
+ pinchGesture:true
+});
+
+// callback on rotation gesture.
+image.addEventListener('rotate', function(e){
+ e.rotation; // this is rotation angle(radian)
+ e.velocity; // this is gesture speed
+});
+
+// callback on rotation gesture finished.
+image.addEventListner('rotateend', function(e){
+});
+
+// callback on pinch gesture.
+image.addEventListener('pinch', function(e){
+ e.scale; // this is scale
+ e.velocity; // this is gesture speed
+});
+
+// callback on pinch gesture finished.
+image.addEventListener('pinchend', function(e){
+});
+
+## Author
+
+KATAOKA,Atsushi <atsushi.kataoka@msmc.jp>
+
+## License
+
+MIT License
27 documentation/index.md~
@@ -0,0 +1,27 @@
+# repeatedbackgroundimage Module
+
+## Description
+
+This module extends repeatedBackgroundImage property to your view.
+
+## Accessing the repeatedbackgroundimage Module
+
+Append <module></module> tag to your tiapp.xml.
+
+## Reference
+
+This module has no property and function.
+
+## Usage
+
+var view = Ti.UI.createView({
+ repeatedBackgroundImage:'hoge.png'
+});
+
+## Author
+
+KATAOKA,Atsushi <atsushi.kataoka@msmc.jp>
+
+## License
+
+MIT License
48 example/app.js
@@ -0,0 +1,48 @@
+// This is a test harness for your module
+// You should do something interesting in this harness
+// to test out the module and to provide instructions
+// to users on how to use it by example.
+
+
+// open a single window
+var window = Ti.UI.createWindow({
+});
+
+var image = Ti.UI.createImageView({
+ image:"lena_std.jpg",
+ rotateGesture:true,
+ pinchGesture:true
+});
+var lastAngle = 0.0;
+var currentAngle = 0.0;
+
+var lastScale = 1.0;
+var currentScale = 1.0;
+
+image.addEventListener('rotate', function(e){
+ currentAngle = e.rotation / Math.PI * 180.0;
+ image.transform = Ti.UI.create2DMatrix()
+ .scale(lastScale*currentScale)
+ .rotate(lastAngle+currentAngle);
+});
+
+image.addEventListener('rotateend', function(e){
+ lastAngle = (lastAngle + currentAngle) % 360.0;
+ currentAngle = 0.0;
+});
+
+image.addEventListener('pinch', function(e){
+ currentScale = e.scale;
+ image.transform = Ti.UI.create2DMatrix()
+ .scale(lastScale*currentScale)
+ .rotate(lastAngle+currentAngle);
+});
+
+image.addEventListener('pinchend', function(e){
+ lastScale = (lastScale * currentScale);
+ currentScale = 1.0;
+});
+
+window.add(image);
+window.open();
+
48 example/app.js~
@@ -0,0 +1,48 @@
+// This is a test harness for your module
+// You should do something interesting in this harness
+// to test out the module and to provide instructions
+// to users on how to use it by example.
+
+
+// open a single window
+var window = Ti.UI.createWindow({
+});
+
+var image = Ti.UI.createImageView({
+ image:"lena_std.jpg",
+ rotationGesture:true,
+ pinchGesture:true
+});
+var lastAngle = 0.0;
+var currentAngle = 0.0;
+
+var lastScale = 1.0;
+var currentScale = 1.0;
+
+image.addEventListener('rotate', function(e){
+ currentAngle = e.rotation / Math.PI * 180.0;
+ image.transform = Ti.UI.create2DMatrix()
+ .scale(lastScale*currentScale)
+ .rotate(lastAngle+currentAngle);
+});
+
+image.addEventListener('rotateend', function(e){
+ lastAngle = (lastAngle + currentAngle) % 360.0;
+ currentAngle = 0.0;
+});
+
+image.addEventListener('pinch', function(e){
+ currentScale = e.scale;
+ image.transform = Ti.UI.create2DMatrix()
+ .scale(lastScale*currentScale)
+ .rotate(lastAngle+currentAngle);
+});
+
+image.addEventListener('pinchend', function(e){
+ lastScale = (lastScale * currentScale);
+ currentScale = 1.0;
+});
+
+window.add(image);
+window.open();
+
BIN example/lena_std.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
336 gesturerecognizer.xcodeproj/project.pbxproj
@@ -0,0 +1,336 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXAggregateTarget section */
+ 24416B8111C4CA220047AFDD /* Build & Test */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 24416B8A11C4CA520047AFDD /* Build configuration list for PBXAggregateTarget "Build & Test" */;
+ buildPhases = (
+ 24416B8011C4CA220047AFDD /* ShellScript */,
+ );
+ dependencies = (
+ 24416B8511C4CA280047AFDD /* PBXTargetDependency */,
+ );
+ name = "Build & Test";
+ productName = "Build & test";
+ };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+ 24DD6CF91134B3F500162E58 /* JpMsmcGesturerecognizerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DD6CF71134B3F500162E58 /* JpMsmcGesturerecognizerModule.h */; };
+ 24DD6CFA1134B3F500162E58 /* JpMsmcGesturerecognizerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* JpMsmcGesturerecognizerModule.m */; };
+ 24DE9E1111C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9E0F11C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.h */; };
+ 24DE9E1211C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DE9E1011C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.m */; };
+ 31BFD3B2142D742A00215288 /* TiUIView+GestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31BFD3B0142D742A00215288 /* TiUIView+GestureRecognizer.h */; };
+ 31BFD3B3142D742A00215288 /* TiUIView+GestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 31BFD3B1142D742A00215288 /* TiUIView+GestureRecognizer.m */; };
+ AA747D9F0F9514B9006C5449 /* JpMsmcGesturerecognizer_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* JpMsmcGesturerecognizer_Prefix.pch */; };
+ AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
+ remoteInfo = gesturerecognizer;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 24DD6CF71134B3F500162E58 /* JpMsmcGesturerecognizerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JpMsmcGesturerecognizerModule.h; path = Classes/JpMsmcGesturerecognizerModule.h; sourceTree = "<group>"; };
+ 24DD6CF81134B3F500162E58 /* JpMsmcGesturerecognizerModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JpMsmcGesturerecognizerModule.m; path = Classes/JpMsmcGesturerecognizerModule.m; sourceTree = "<group>"; };
+ 24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = "<group>"; };
+ 24DE9E0F11C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JpMsmcGesturerecognizerModuleAssets.h; path = Classes/JpMsmcGesturerecognizerModuleAssets.h; sourceTree = "<group>"; };
+ 24DE9E1011C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JpMsmcGesturerecognizerModuleAssets.m; path = Classes/JpMsmcGesturerecognizerModuleAssets.m; sourceTree = "<group>"; };
+ 31BFD3B0142D742A00215288 /* TiUIView+GestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TiUIView+GestureRecognizer.h"; path = "Classes/TiUIView+GestureRecognizer.h"; sourceTree = "<group>"; };
+ 31BFD3B1142D742A00215288 /* TiUIView+GestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "TiUIView+GestureRecognizer.m"; path = "Classes/TiUIView+GestureRecognizer.m"; sourceTree = "<group>"; };
+ AA747D9E0F9514B9006C5449 /* JpMsmcGesturerecognizer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JpMsmcGesturerecognizer_Prefix.pch; sourceTree = SOURCE_ROOT; };
+ AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ D2AAC07E0554694100DB518D /* libJpMsmcGesturerecognizer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJpMsmcGesturerecognizer.a; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ D2AAC07C0554694100DB518D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DFFF38A50411DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ D2AAC07E0554694100DB518D /* libJpMsmcGesturerecognizer.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* gesturerecognizer */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
+ 0867D69AFE84028FC02AAC07 /* Frameworks */,
+ 034768DFFF38A50411DB9C8B /* Products */,
+ );
+ name = gesturerecognizer;
+ sourceTree = "<group>";
+ };
+ 0867D69AFE84028FC02AAC07 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ AACBBE490F95108600F1A2B1 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 24DE9E0F11C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.h */,
+ 24DE9E1011C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.m */,
+ 24DD6CF71134B3F500162E58 /* JpMsmcGesturerecognizerModule.h */,
+ 24DD6CF81134B3F500162E58 /* JpMsmcGesturerecognizerModule.m */,
+ 31BFD3B0142D742A00215288 /* TiUIView+GestureRecognizer.h */,
+ 31BFD3B1142D742A00215288 /* TiUIView+GestureRecognizer.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ AA747D9E0F9514B9006C5449 /* JpMsmcGesturerecognizer_Prefix.pch */,
+ 24DD6D1B1134B66800162E58 /* titanium.xcconfig */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ D2AAC07A0554694100DB518D /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AA747D9F0F9514B9006C5449 /* JpMsmcGesturerecognizer_Prefix.pch in Headers */,
+ 24DD6CF91134B3F500162E58 /* JpMsmcGesturerecognizerModule.h in Headers */,
+ 24DE9E1111C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.h in Headers */,
+ 31BFD3B2142D742A00215288 /* TiUIView+GestureRecognizer.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ D2AAC07D0554694100DB518D /* gesturerecognizer */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "gesturerecognizer" */;
+ buildPhases = (
+ D2AAC07A0554694100DB518D /* Headers */,
+ D2AAC07B0554694100DB518D /* Sources */,
+ D2AAC07C0554694100DB518D /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = gesturerecognizer;
+ productName = gesturerecognizer;
+ productReference = D2AAC07E0554694100DB518D /* libJpMsmcGesturerecognizer.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "gesturerecognizer" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 0867D691FE84028FC02AAC07 /* gesturerecognizer */;
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ D2AAC07D0554694100DB518D /* gesturerecognizer */,
+ 24416B8111C4CA220047AFDD /* Build & Test */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 24416B8011C4CA220047AFDD /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\n\npython \"${TITANIUM_SDK}/titanium.py\" run --dir=\"${PROJECT_DIR}\"\nexit $?\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ D2AAC07B0554694100DB518D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 24DD6CFA1134B3F500162E58 /* JpMsmcGesturerecognizerModule.m in Sources */,
+ 24DE9E1211C5FE74003F90F6 /* JpMsmcGesturerecognizerModuleAssets.m in Sources */,
+ 31BFD3B3142D742A00215288 /* TiUIView+GestureRecognizer.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 24416B8511C4CA280047AFDD /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = D2AAC07D0554694100DB518D /* gesturerecognizer */;
+ targetProxy = 24416B8411C4CA280047AFDD /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB921F08733DC00010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ COPY_PHASE_STRIP = NO;
+ DSTROOT = /tmp/JpMsmcGesturerecognizer.dst;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = JpMsmcGesturerecognizer_Prefix.pch;
+ INSTALL_PATH = /usr/local/lib;
+ PRODUCT_NAME = JpMsmcGesturerecognizer;
+ };
+ name = Debug;
+ };
+ 1DEB922008733DC00010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ DSTROOT = /tmp/JpMsmcGesturerecognizer.dst;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = JpMsmcGesturerecognizer_Prefix.pch;
+ INSTALL_PATH = /usr/local/lib;
+ PRODUCT_NAME = JpMsmcGesturerecognizer;
+ };
+ name = Release;
+ };
+ 1DEB922308733DC00010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_LDFLAGS = "";
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.0;
+ };
+ name = Debug;
+ };
+ 1DEB922408733DC00010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_LDFLAGS = "";
+ PREBINDING = NO;
+ SDKROOT = iphoneos4.0;
+ };
+ name = Release;
+ };
+ 24416B8211C4CA220047AFDD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = "Build & test";
+ };
+ name = Debug;
+ };
+ 24416B8311C4CA220047AFDD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = "Build & test";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "gesturerecognizer" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB921F08733DC00010E9CD /* Debug */,
+ 1DEB922008733DC00010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "gesturerecognizer" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB922308733DC00010E9CD /* Debug */,
+ 1DEB922408733DC00010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 24416B8A11C4CA520047AFDD /* Build configuration list for PBXAggregateTarget "Build & Test" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 24416B8211C4CA220047AFDD /* Debug */,
+ 24416B8311C4CA220047AFDD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
7 gesturerecognizer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:gesturerecognizer.xcodeproj">
+ </FileRef>
+</Workspace>
7,996 ...codeproj/project.xcworkspace/xcuserdata/atsusy.xcuserdatad/UserInterfaceState.xcuserstate
7,996 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
5 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+</Bucket>
54 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/Build & Test.xcscheme
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "24416B8111C4CA220047AFDD"
+ BuildableName = "Build &amp; Test"
+ BlueprintName = "Build &amp; Test"
+ ReferencedContainer = "container:gesturerecognizer.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
54 ...rerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/gesturerecognizer.xcscheme
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D2AAC07D0554694100DB518D"
+ BuildableName = "libJpMsmcGesturerecognizer.a"
+ BlueprintName = "gesturerecognizer"
+ ReferencedContainer = "container:gesturerecognizer.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
32 gesturerecognizer.xcodeproj/xcuserdata/atsusy.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Build &amp; Test.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ <key>gesturerecognizer.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>1</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>24416B8111C4CA220047AFDD</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>D2AAC07D0554694100DB518D</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
1 hooks/README
@@ -0,0 +1 @@
+These files are not yet supported as of 1.4.0 but will be in a near future release.
35 hooks/add.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+#
+# This is the module project add hook that will be
+# called when your module is added to a project
+#
+import os, sys
+
+def dequote(s):
+ if s[0:1] == '"':
+ return s[1:-1]
+ return s
+
+def main(args,argc):
+ # You will get the following command line arguments
+ # in the following order:
+ #
+ # project_dir = the full path to the project root directory
+ # project_type = the type of project (desktop, mobile, ipad)
+ # project_name = the name of the project
+ #
+ project_dir = dequote(os.path.expanduser(args[1]))
+ project_type = dequote(args[2])
+ project_name = dequote(args[3])
+
+ # TODO: write your add hook here (optional)
+
+
+ # exit
+ sys.exit(0)
+
+
+
+if __name__ == '__main__':
+ main(sys.argv,len(sys.argv))
+
19 hooks/install.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+#
+# This is the module install hook that will be
+# called when your module is first installed
+#
+import os, sys
+
+def main(args,argc):
+
+ # TODO: write your install hook here (optional)
+
+ # exit
+ sys.exit(0)
+
+
+
+if __name__ == '__main__':
+ main(sys.argv,len(sys.argv))
+
34 hooks/remove.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+#
+# This is the module project remove hook that will be
+# called when your module is remove from a project
+#
+import os, sys
+
+def dequote(s):
+ if s[0:1] == '"':
+ return s[1:-1]
+ return s
+
+def main(args,argc):
+ # You will get the following command line arguments
+ # in the following order:
+ #
+ # project_dir = the full path to the project root directory
+ # project_type = the type of project (desktop, mobile, ipad)
+ # project_name = the name of the project
+ #
+ project_dir = dequote(os.path.expanduser(args[1]))
+ project_type = dequote(args[2])
+ project_name = dequote(args[3])
+
+ # TODO: write your remove hook here (optional)
+
+ # exit
+ sys.exit(0)
+
+
+
+if __name__ == '__main__':
+ main(sys.argv,len(sys.argv))
+
18 hooks/uninstall.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+#
+# This is the module uninstall hook that will be
+# called when your module is uninstalled
+#
+import os, sys
+
+def main(args,argc):
+
+ # TODO: write your uninstall hook here (optional)
+
+ # exit
+ sys.exit(0)
+
+
+if __name__ == '__main__':
+ main(sys.argv,len(sys.argv))
+
17 manifest
@@ -0,0 +1,17 @@
+#
+# this is your module manifest and used by Titanium
+# during compilation, packaging, distribution, etc.
+#
+version: 1.0
+description: Support Rotate and Pinch-in/out gesture to View.
+author: KATAOKA,Atsushi
+license: MIT License
+copyright: Copyright (c) 2011 by MARSHMALLOW MACHINE
+
+
+# these should not be edited
+name: gesturerecognizer
+moduleid: jp.msmc.gesturerecognizer
+guid: feebd8e2-d709-4a4d-afb4-2c996535b0bb
+platform: iphone
+minsdk: 1.7.2
28 module.xcconfig
@@ -0,0 +1,28 @@
+//
+// PLACE ANY BUILD DEFINITIONS IN THIS FILE AND THEY WILL BE
+// PICKED UP DURING THE APP BUILD FOR YOUR MODULE
+//
+// see the following webpage for instructions on the settings
+// for this file:
+// http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html
+//
+
+//
+// How to add a Framework (example)
+//
+// OTHER_LDFLAGS=$(inherited) -framework Foo
+//
+// Adding a framework for a specific version(s) of iPhone:
+//
+// OTHER_LDFLAGS[sdk=iphoneos4*]=$(inherited) -framework Foo
+// OTHER_LDFLAGS[sdk=iphonesimulator4*]=$(inherited) -framework Foo
+//
+//
+// How to add a compiler define:
+//
+// OTHER_CFLAGS=$(inherited) -DFOO=1
+//
+//
+// IMPORTANT NOTE: always use $(inherited) in your overrides
+//
+OTHER_LDFLAGS=$(inherited) -all_load
3 platform/README
@@ -0,0 +1,3 @@
+You can place platform-specific files here in sub-folders named "android" and/or "iphone", just as you can with normal Titanium Mobile SDK projects. Any folders and files you place here will be merged with the platform-specific files in a Titanium Mobile project that uses this module.
+
+When a Titanium Mobile project that uses this module is built, the files from this platform/ folder will be treated the same as files (if any) from the Titanium Mobile project's platform/ folder.
11 timodule.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ti:module xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android">
+ <!--
+ Similar to tiapp.xml, but contains module/platform specific
+ configuration in <iphone> and <android> sections
+ -->
+ <iphone>
+ </iphone>
+ <android xmlns:android="http://schemas.android.com/apk/res/android">
+ </android>
+</ti:module>
19 titanium.xcconfig
@@ -0,0 +1,19 @@
+//
+//
+// CHANGE THESE VALUES TO REFLECT THE VERSION (AND LOCATION IF DIFFERENT)
+// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
+//
+//
+TITANIUM_SDK_VERSION = 1.7.2
+
+
+//
+// THESE SHOULD BE OK GENERALLY AS-IS
+//
+TITANIUM_SDK = /Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)
+TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
+TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
+HEADER_SEARCH_PATHS= $(TITANIUM_BASE_SDK) $(TITANIUM_BASE_SDK2)
+
+
+

0 comments on commit d9569d4

Please sign in to comment.
Something went wrong with that request. Please try again.