First Release
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
xcuserdata/
|
BIN
ActiveGS_iOS/Default-568h@2x.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
ActiveGS_iOS/Default.png
Normal file
After Width: | Height: | Size: 12 KiB |
10
ActiveGS_iOS/Entitlements.plist
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?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>application-identifier</key>
|
||||||
|
<string>SQ9T3Q7RV4.com.freetoolsassociation.activegs</string>
|
||||||
|
<key>get-task-allow</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
455
ActiveGS_iOS/Resources-iPad/MainWindow-iPad.xib
Normal file
@ -0,0 +1,455 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1056</int>
|
||||||
|
<string key="IBDocument.SystemVersion">10F569</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">804</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">131</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="841351856">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="427554174">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUICustomObject" id="664661524">
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIViewController" id="943309135">
|
||||||
|
<string key="IBUINibName">activegsViewController</string>
|
||||||
|
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||||
|
<int key="interfaceOrientation">1</int>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
<bool key="IBUIHorizontal">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIWindow" id="117978783">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrameSize">{768, 1004}</string>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||||
|
</object>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||||
|
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
|
||||||
|
<int key="IBUIStatusBarStyle">2</int>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
<bool key="IBUIResizesToFullScreen">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="841351856"/>
|
||||||
|
<reference key="destination" ref="664661524"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">4</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">viewController</string>
|
||||||
|
<reference key="source" ref="664661524"/>
|
||||||
|
<reference key="destination" ref="943309135"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">11</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">window</string>
|
||||||
|
<reference key="source" ref="664661524"/>
|
||||||
|
<reference key="destination" ref="117978783"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">14</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="841351856"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3</int>
|
||||||
|
<reference key="object" ref="664661524"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">activegs App Delegate</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="427554174"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">10</int>
|
||||||
|
<reference key="object" ref="943309135"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">12</int>
|
||||||
|
<reference key="object" ref="117978783"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-1.CustomClassName</string>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>10.CustomClassName</string>
|
||||||
|
<string>10.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>10.IBPluginDependency</string>
|
||||||
|
<string>12.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>12.IBLastUsedUIStatusBarStylesToTargetRuntimesMap</string>
|
||||||
|
<string>12.IBPluginDependency</string>
|
||||||
|
<string>3.CustomClassName</string>
|
||||||
|
<string>3.IBPluginDependency</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>UIApplication</string>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>activegsViewController</string>
|
||||||
|
<string>{{512, 351}, {320, 480}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>{{525, 346}, {320, 480}}</string>
|
||||||
|
<object class="NSMutableDictionary">
|
||||||
|
<string key="NS.key.0">IBCocoaTouchFramework</string>
|
||||||
|
<integer value="0" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>activegsAppDelegate</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">14</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>viewController</string>
|
||||||
|
<string>window</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>activegsViewController</string>
|
||||||
|
<string>UIWindow</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>viewController</string>
|
||||||
|
<string>window</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">viewController</string>
|
||||||
|
<string key="candidateClassName">activegsViewController</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">window</string>
|
||||||
|
<string key="candidateClassName">UIWindow</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">Classes/activegsAppDelegate.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBUserSource</string>
|
||||||
|
<string key="minorKey"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsViewController</string>
|
||||||
|
<string key="superclassName">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">Classes/activegsViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="661858013">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIApplication</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIResponder</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<reference key="sourceIdentifier" ref="661858013"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UISearchBar</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UISearchDisplayController</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIWindow</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||||
|
<integer value="1056" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<string key="IBDocument.LastKnownRelativeProjectPath">activegs.xcodeproj</string>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">131</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
46
ActiveGS_iOS/activegs.plist
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?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>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>ActiveGS</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleIconFiles</key>
|
||||||
|
<array>
|
||||||
|
<string>icon.png</string>
|
||||||
|
<string>icon72.png</string>
|
||||||
|
<string>icon@2x.png</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>ActiveGS</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.40</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIAppFonts</key>
|
||||||
|
<array>
|
||||||
|
<string>ShastonHi640.ttf</string>
|
||||||
|
</array>
|
||||||
|
<key>UIFileSharingEnabled</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIStatusBarHidden</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIStatusBarHidden~ipad</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
1582
ActiveGS_iOS/activegs.xcodeproj/project.pbxproj
Normal file
7
ActiveGS_iOS/activegs.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:activegs.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
8
ActiveGS_iOS/activegs_Prefix.pch
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// Prefix header for all source files of the 'activegs' target in the 'activegs' project
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef __OBJC__
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#endif
|
BIN
ActiveGS_iOS/iTunesArtwork
Normal file
After Width: | Height: | Size: 228 KiB |
BIN
ActiveGS_iOS/icon.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
ActiveGS_iOS/icon72.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
ActiveGS_iOS/icon@2x.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
ActiveGS_iOS/icon_APPLE 2.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
ActiveGS_iOS/icon_APPLE 2GS.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
ActiveGS_iOS/icone72.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
923
ActiveGS_iOS/infoViewController-ipad.xib
Normal file
@ -0,0 +1,923 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1552</int>
|
||||||
|
<string key="IBDocument.SystemVersion">13F34</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">6254</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1265.21</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">698.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">6247</string>
|
||||||
|
</object>
|
||||||
|
<array key="IBDocument.IntegratedClassDependencies">
|
||||||
|
<string>IBProxyObject</string>
|
||||||
|
<string>IBUIButton</string>
|
||||||
|
<string>IBUIImageView</string>
|
||||||
|
<string>IBUILabel</string>
|
||||||
|
<string>IBUIView</string>
|
||||||
|
</array>
|
||||||
|
<array key="IBDocument.PluginDependencies">
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</array>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||||
|
<integer value="1" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="975951072">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="191373211">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="IBUIImageView" id="208073000">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{344, 336}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="272079427"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSCustomResource" key="IBUIImage" id="629254366">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">ActiveGS.png</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="994056094">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{333, 727}, {101, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="850712689"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor" id="261874939">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUIHighlightedTitleColor" id="681515851">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
</object>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy!</string>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleShadowColor" id="757478349">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC41AA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="839905589">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">15</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="400967680">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">15</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="411852784">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{224, 297}, {320, 44}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="208073000"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<object class="NSColor" key="IBUITextColor" id="424898793">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||||
|
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
|
||||||
|
</object>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="746842340">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">36</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="583743090">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">36</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="272079427">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{270, 416}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="79579024"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="51328994">
|
||||||
|
<int key="type">1</int>
|
||||||
|
<double key="pointSize">17</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="60422809">
|
||||||
|
<string key="NSName">HelveticaNeue</string>
|
||||||
|
<double key="NSSize">17</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="850712689">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{274, 789}, {219, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="103537343"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">For support and/or feedback, please visit</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="176548636">
|
||||||
|
<string key="name">Helvetica</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">0</int>
|
||||||
|
<double key="pointSize">12</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="624365055">
|
||||||
|
<string key="NSName">Helvetica</string>
|
||||||
|
<double key="NSSize">12</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<double key="preferredMaxLayoutWidth">219</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="79579024">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{244, 533}, {280, 132}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="123117463"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="176548636"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">280</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="123117463">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{303, 506}, {162, 57}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="994056094"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="218152929">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">17</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="1005788977">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">17</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<double key="preferredMaxLayoutWidth">162</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="103537343">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{368, 819}, {32, 32}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="621673545"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">Facebook</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<object class="NSCustomResource" key="IBUINormalImage" id="700529322">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">facebook-logo.png</string>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIFontDescription" ref="839905589"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="621673545">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{233, 876}, {311, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(Dedicated to Benzebut, ActiveGS chief bug hunter!)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="176548636"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">311</double>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrameSize">{768, 1024}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="411852784"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace" id="797851977">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics" id="734084207">
|
||||||
|
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
|
||||||
|
<string key="IBUIDisplayName">Freeform</string>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="199126390">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="IBUIImageView" id="910411407">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{472, 237}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<reference key="IBUIImage" ref="629254366"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="19372993">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">265</int>
|
||||||
|
<string key="NSFrame">{{461, 544}, {101, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<reference key="IBUINormalTitleColor" ref="261874939"/>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy!</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<reference key="IBUIFontDescription" ref="839905589"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="991466487">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{379, 191}, {265, 38}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="746842340"/>
|
||||||
|
<reference key="IBUIFont" ref="583743090"/>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="281938637">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{397, 322}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="51328994"/>
|
||||||
|
<reference key="IBUIFont" ref="60422809"/>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="649273201">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{406, 598}, {219, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">For support and/or feedback, please visit</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="176548636"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">219</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="859023805">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{371, 389}, {280, 134}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="176548636"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">280</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="1030381761">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{431, 389}, {162, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="218152929"/>
|
||||||
|
<reference key="IBUIFont" ref="1005788977"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">162</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="845674304">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{495, 628}, {32, 32}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="686037229"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">Facebook</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<reference key="IBUINormalImage" ref="700529322"/>
|
||||||
|
<reference key="IBUIFontDescription" ref="839905589"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="686037229">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{353, 676}, {317, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(Dedicated to Benzebut, ActiveGS chief bug hunter!)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="176548636"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">317</double>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrameSize">{1024, 768}</string>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<reference key="NSCustomColorSpace" ref="797851977"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||||
|
<int key="IBUIInterfaceOrientation">3</int>
|
||||||
|
<int key="interfaceOrientation">3</int>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUISimulatedDestinationMetrics" ref="734084207"/>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<array key="connectionRecords">
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">view</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUI</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="272079427"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">12</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">landscapeView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">33</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">portraitView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">34</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUILandscape</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="281938637"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">35</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="994056094"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">9</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="19372993"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">31</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="103537343"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">1</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">42</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="845674304"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">1</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">45</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<array key="orderedObjects">
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<array key="object" id="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1</int>
|
||||||
|
<reference key="object" ref="191373211"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="411852784"/>
|
||||||
|
<reference ref="272079427"/>
|
||||||
|
<reference ref="208073000"/>
|
||||||
|
<reference ref="79579024"/>
|
||||||
|
<reference ref="123117463"/>
|
||||||
|
<reference ref="850712689"/>
|
||||||
|
<reference ref="994056094"/>
|
||||||
|
<reference ref="103537343"/>
|
||||||
|
<reference ref="621673545"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="975951072"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">4</int>
|
||||||
|
<reference key="object" ref="208073000"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">5</int>
|
||||||
|
<reference key="object" ref="994056094"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">10</int>
|
||||||
|
<reference key="object" ref="411852784"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">11</int>
|
||||||
|
<reference key="object" ref="272079427"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">13</int>
|
||||||
|
<reference key="object" ref="850712689"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">23</int>
|
||||||
|
<reference key="object" ref="199126390"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="910411407"/>
|
||||||
|
<reference ref="991466487"/>
|
||||||
|
<reference ref="281938637"/>
|
||||||
|
<reference ref="1030381761"/>
|
||||||
|
<reference ref="859023805"/>
|
||||||
|
<reference ref="649273201"/>
|
||||||
|
<reference ref="19372993"/>
|
||||||
|
<reference ref="845674304"/>
|
||||||
|
<reference ref="686037229"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">ViewLandscape</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">24</int>
|
||||||
|
<reference key="object" ref="281938637"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">25</int>
|
||||||
|
<reference key="object" ref="19372993"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">27</int>
|
||||||
|
<reference key="object" ref="991466487"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">28</int>
|
||||||
|
<reference key="object" ref="649273201"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">29</int>
|
||||||
|
<reference key="object" ref="910411407"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">36</int>
|
||||||
|
<reference key="object" ref="79579024"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">37</int>
|
||||||
|
<reference key="object" ref="859023805"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">38</int>
|
||||||
|
<reference key="object" ref="1030381761"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">39</int>
|
||||||
|
<reference key="object" ref="123117463"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">40</int>
|
||||||
|
<reference key="object" ref="103537343"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">41</int>
|
||||||
|
<reference key="object" ref="621673545"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">43</int>
|
||||||
|
<reference key="object" ref="845674304"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">44</int>
|
||||||
|
<reference key="object" ref="686037229"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<string key="-1.CustomClassName">infoViewController</string>
|
||||||
|
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="-2.CustomClassName">UIResponder</string>
|
||||||
|
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="37.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="38.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="39.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="40.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="41.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="43.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="44.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">45</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">infoViewController</string>
|
||||||
|
<string key="superclassName">UIVIEWCONTROLLERROOT</string>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
|
<string key="doneButton:">id</string>
|
||||||
|
<string key="emailButton:">id</string>
|
||||||
|
<string key="parametersButton:">id</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
|
<object class="IBActionInfo" key="doneButton:">
|
||||||
|
<string key="name">doneButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="emailButton:">
|
||||||
|
<string key="name">emailButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="parametersButton:">
|
||||||
|
<string key="name">parametersButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="outlets">
|
||||||
|
<string key="landscapeView">UIView</string>
|
||||||
|
<string key="portraitView">UIView</string>
|
||||||
|
<string key="versionUI">UILabel</string>
|
||||||
|
<string key="versionUILandscape">UILabel</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<object class="IBToOneOutletInfo" key="landscapeView">
|
||||||
|
<string key="name">landscapeView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="portraitView">
|
||||||
|
<string key="name">portraitView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="versionUI">
|
||||||
|
<string key="name">versionUI</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="versionUILandscape">
|
||||||
|
<string key="name">versionUILandscape</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../../Common.iphone/infoViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">infoViewController</string>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
|
<string key="doneButton:">id</string>
|
||||||
|
<string key="emailButton:">id</string>
|
||||||
|
<string key="parametersButton:">id</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
|
<object class="IBActionInfo" key="doneButton:">
|
||||||
|
<string key="name">doneButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="emailButton:">
|
||||||
|
<string key="name">emailButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="parametersButton:">
|
||||||
|
<string key="name">parametersButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../../Common.iphone/infoViewController.mm</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIButton</string>
|
||||||
|
<string key="superclassName">UIControl</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIControl</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIGestureRecognizer</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIGestureRecognizer.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIImageView</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UILabel</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIResponder</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="4600" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||||
|
<string key="ActiveGS.png">{80, 80}</string>
|
||||||
|
<string key="facebook-logo.png">{128, 128}</string>
|
||||||
|
</dictionary>
|
||||||
|
</data>
|
||||||
|
</archive>
|
931
ActiveGS_iOS/infoViewController.xib
Normal file
@ -0,0 +1,931 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1552</int>
|
||||||
|
<string key="IBDocument.SystemVersion">13F34</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">6254</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1265.21</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">698.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">6247</string>
|
||||||
|
</object>
|
||||||
|
<array key="IBDocument.IntegratedClassDependencies">
|
||||||
|
<string>IBProxyObject</string>
|
||||||
|
<string>IBUIButton</string>
|
||||||
|
<string>IBUIImageView</string>
|
||||||
|
<string>IBUILabel</string>
|
||||||
|
<string>IBUIView</string>
|
||||||
|
</array>
|
||||||
|
<array key="IBDocument.PluginDependencies">
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</array>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||||
|
<integer value="1" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="975951072">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="191373211">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="IBUIImageView" id="208073000">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{120, 59}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="272079427"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSCustomResource" key="IBUIImage" id="629254366">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">ActiveGS.png</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="994056094">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{109, 339}, {101, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="850712689"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor" id="891060432">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUIHighlightedTitleColor" id="681515851">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
</object>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy!</string>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleShadowColor" id="757478349">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC41AA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="936153339">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">15</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="400967680">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">15</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="411852784">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{0, 20}, {320, 43}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="208073000"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<object class="NSColor" key="IBUITextColor" id="424898793">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||||
|
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
|
||||||
|
</object>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="161176566">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">36</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="583743090">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">36</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="272079427">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{46, 139}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="465416657"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="500353937">
|
||||||
|
<int key="type">1</int>
|
||||||
|
<double key="pointSize">17</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="313657317">
|
||||||
|
<string key="NSName">HelveticaNeue</string>
|
||||||
|
<double key="NSSize">17</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="850712689">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{76, 392}, {180, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="828079104"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">For support and/or feedback, visit</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="490482017">
|
||||||
|
<string key="name">Helvetica</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">0</int>
|
||||||
|
<double key="pointSize">12</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="624365055">
|
||||||
|
<string key="NSName">Helvetica</string>
|
||||||
|
<double key="NSSize">12</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<double key="preferredMaxLayoutWidth">180</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="465416657">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{23, 191}, {280, 134}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="467084606"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="490482017"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">280</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="467084606">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{79, 186}, {162, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="994056094"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="462874504">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">17</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="110190536">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">17</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<double key="preferredMaxLayoutWidth">162</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="1022903398">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{143, 417}, {32, 32}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">Facebook</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<object class="NSCustomResource" key="IBUINormalImage" id="1053865150">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">facebook-logo.png</string>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIFontDescription" ref="936153339"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="828079104">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{15, 444}, {290, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="1022903398"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(Dedicated to Benzebut, ActiveGS chief bug hunter!)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="490482017"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">290</double>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrameSize">{320, 480}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="NSNextKeyView" ref="411852784"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace" id="797851977">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics" id="592748493">
|
||||||
|
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
|
||||||
|
<string key="IBUIDisplayName">Freeform</string>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="199126390">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<array class="NSMutableArray" key="NSSubviews">
|
||||||
|
<object class="IBUIImageView" id="910411407">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{120, 20}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="991466487"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<reference key="IBUIImage" ref="629254366"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="19372993">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">265</int>
|
||||||
|
<string key="NSFrame">{{359, 256}, {101, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<reference key="IBUINormalTitleColor" ref="891060432"/>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy!</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<reference key="IBUIFontDescription" ref="936153339"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="991466487">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{208, 52}, {265, 38}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="281938637"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<reference key="IBUIFontDescription" ref="161176566"/>
|
||||||
|
<reference key="IBUIFont" ref="583743090"/>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="281938637">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{126, 93}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="809359447"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="500353937"/>
|
||||||
|
<reference key="IBUIFont" ref="313657317"/>
|
||||||
|
<bool key="useAutomaticPreferredMaxLayoutWidth">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="649273201">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{20, 261}, {180, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="609857989"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">For support and/or feedback, visit</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="490482017"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">180</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="609857989">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{100, 131}, {280, 134}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="792767964"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="490482017"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">280</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="809359447">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{159, 131}, {162, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="649273201"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="462874504"/>
|
||||||
|
<reference key="IBUIFont" ref="110190536"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">162</double>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="503480324">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{213, 259}, {32, 32}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="19372993"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<string key="IBUINormalTitle">Facebook</string>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
<reference key="IBUINormalImage" ref="1053865150"/>
|
||||||
|
<reference key="IBUIFontDescription" ref="936153339"/>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="792767964">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{93, 290}, {294, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSNextKeyView" ref="503480324"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(Dedicated to Benzebut, ActiveGS chief bug hunter!)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="490482017"/>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<double key="preferredMaxLayoutWidth">294</double>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<string key="NSFrameSize">{480, 320}</string>
|
||||||
|
<reference key="NSNextKeyView" ref="910411407"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<reference key="NSCustomColorSpace" ref="797851977"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||||
|
<int key="IBUIInterfaceOrientation">3</int>
|
||||||
|
<int key="interfaceOrientation">3</int>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUISimulatedDestinationMetrics" ref="592748493"/>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<array key="connectionRecords">
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">view</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUI</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="272079427"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">12</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">landscapeView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">33</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">portraitView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">34</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUILandscape</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="281938637"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">35</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="994056094"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">9</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="19372993"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">31</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="1022903398"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">1</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">50</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="503480324"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">1</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">51</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<array key="orderedObjects">
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<array key="object" id="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1</int>
|
||||||
|
<reference key="object" ref="191373211"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="411852784"/>
|
||||||
|
<reference ref="272079427"/>
|
||||||
|
<reference ref="208073000"/>
|
||||||
|
<reference ref="465416657"/>
|
||||||
|
<reference ref="467084606"/>
|
||||||
|
<reference ref="850712689"/>
|
||||||
|
<reference ref="994056094"/>
|
||||||
|
<reference ref="1022903398"/>
|
||||||
|
<reference ref="828079104"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="975951072"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">4</int>
|
||||||
|
<reference key="object" ref="208073000"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">5</int>
|
||||||
|
<reference key="object" ref="994056094"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">10</int>
|
||||||
|
<reference key="object" ref="411852784"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">11</int>
|
||||||
|
<reference key="object" ref="272079427"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">13</int>
|
||||||
|
<reference key="object" ref="850712689"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">23</int>
|
||||||
|
<reference key="object" ref="199126390"/>
|
||||||
|
<array class="NSMutableArray" key="children">
|
||||||
|
<reference ref="910411407"/>
|
||||||
|
<reference ref="281938637"/>
|
||||||
|
<reference ref="991466487"/>
|
||||||
|
<reference ref="609857989"/>
|
||||||
|
<reference ref="809359447"/>
|
||||||
|
<reference ref="19372993"/>
|
||||||
|
<reference ref="503480324"/>
|
||||||
|
<reference ref="649273201"/>
|
||||||
|
<reference ref="792767964"/>
|
||||||
|
</array>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">ViewLandscape</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">24</int>
|
||||||
|
<reference key="object" ref="281938637"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">25</int>
|
||||||
|
<reference key="object" ref="19372993"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">27</int>
|
||||||
|
<reference key="object" ref="991466487"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">28</int>
|
||||||
|
<reference key="object" ref="649273201"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">29</int>
|
||||||
|
<reference key="object" ref="910411407"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">36</int>
|
||||||
|
<reference key="object" ref="609857989"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">37</int>
|
||||||
|
<reference key="object" ref="465416657"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">38</int>
|
||||||
|
<reference key="object" ref="467084606"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">39</int>
|
||||||
|
<reference key="object" ref="809359447"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">44</int>
|
||||||
|
<reference key="object" ref="1022903398"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">45</int>
|
||||||
|
<reference key="object" ref="828079104"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">47</int>
|
||||||
|
<reference key="object" ref="503480324"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">48</int>
|
||||||
|
<reference key="object" ref="792767964"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<string key="-1.CustomClassName">infoViewController</string>
|
||||||
|
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="-2.CustomClassName">UIResponder</string>
|
||||||
|
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="37.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="38.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="39.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="44.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="45.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="48.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">51</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">infoViewController</string>
|
||||||
|
<string key="superclassName">UIVIEWCONTROLLERROOT</string>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
|
<string key="doneButton:">id</string>
|
||||||
|
<string key="emailButton:">id</string>
|
||||||
|
<string key="parametersButton:">id</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
|
<object class="IBActionInfo" key="doneButton:">
|
||||||
|
<string key="name">doneButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="emailButton:">
|
||||||
|
<string key="name">emailButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="parametersButton:">
|
||||||
|
<string key="name">parametersButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="outlets">
|
||||||
|
<string key="landscapeView">UIView</string>
|
||||||
|
<string key="portraitView">UIView</string>
|
||||||
|
<string key="versionUI">UILabel</string>
|
||||||
|
<string key="versionUILandscape">UILabel</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<object class="IBToOneOutletInfo" key="landscapeView">
|
||||||
|
<string key="name">landscapeView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="portraitView">
|
||||||
|
<string key="name">portraitView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="versionUI">
|
||||||
|
<string key="name">versionUI</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo" key="versionUILandscape">
|
||||||
|
<string key="name">versionUILandscape</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../../Common.iphone/infoViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">infoViewController</string>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actions">
|
||||||
|
<string key="doneButton:">id</string>
|
||||||
|
<string key="emailButton:">id</string>
|
||||||
|
<string key="parametersButton:">id</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||||
|
<object class="IBActionInfo" key="doneButton:">
|
||||||
|
<string key="name">doneButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="emailButton:">
|
||||||
|
<string key="name">emailButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo" key="parametersButton:">
|
||||||
|
<string key="name">parametersButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
</dictionary>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../../Common.iphone/infoViewController.mm</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIButton</string>
|
||||||
|
<string key="superclassName">UIControl</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIControl</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIGestureRecognizer</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIGestureRecognizer.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIImageView</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UILabel</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIResponder</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="4600" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||||
|
<string key="ActiveGS.png">{80, 80}</string>
|
||||||
|
<string key="facebook-logo.png">{128, 128}</string>
|
||||||
|
</dictionary>
|
||||||
|
</data>
|
||||||
|
</archive>
|
17
ActiveGS_iOS/main.mm
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
// int retVal = UIApplicationMain(argc, argv, nil, nil);
|
||||||
|
int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([activegsAppDelegate class]));
|
||||||
|
[pool release];
|
||||||
|
return retVal;
|
||||||
|
}
|
893
ActiveGS_iOS/mainViewController.xib
Normal file
@ -0,0 +1,893 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1056</int>
|
||||||
|
<string key="IBDocument.SystemVersion">10F569</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">823</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">132</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="975951072">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="191373211">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<object class="NSMutableArray" key="NSSubviews">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBUIImageView" id="208073000">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{120, 59}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSCustomResource" key="IBUIImage" id="629254366">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">ActiveGS.png</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="994056094">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{112, 392}, {96, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="400967680">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">15</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy</string>
|
||||||
|
<object class="NSColor" key="IBUIHighlightedTitleColor" id="681515851">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleShadowColor" id="757478349">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC41AA</bytes>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="411852784">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{0, 20}, {320, 43}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="583743090">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">36</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUITextColor" id="424898793">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="272079427">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{46, 139}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="850712689">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{88, 425}, {150, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Please, send feedback to</string>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="624365055">
|
||||||
|
<string key="NSName">Helvetica</string>
|
||||||
|
<double key="NSSize">12</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="551522634">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{73, 452}, {180, 18}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<reference key="IBUIBackgroundColor" ref="681515851"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="1003266931">
|
||||||
|
<string key="NSName">Helvetica-Oblique</string>
|
||||||
|
<double key="NSSize">10</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<string key="IBUINormalTitle">activegs@freetoolsassociation.com</string>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="465416657">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{23, 208}, {280, 134}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="467084606">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{79, 203}, {162, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="110190536">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">17</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="NSFrameSize">{320, 480}</string>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace" id="797851977">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="199126390">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<object class="NSMutableArray" key="NSSubviews">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBUIImageView" id="910411407">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{120, 20}, {80, 77}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<reference key="IBUIImage" ref="629254366"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="19372993">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">265</int>
|
||||||
|
<string key="NSFrame">{{364, 263}, {96, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<reference key="IBUIFont" ref="400967680"/>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<string key="IBUINormalTitle">I'm Happy</string>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="991466487">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{208, 52}, {265, 38}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">ActiveGS</string>
|
||||||
|
<reference key="IBUIFont" ref="583743090"/>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<reference key="IBUIShadowColor" ref="681515851"/>
|
||||||
|
<string key="IBUIShadowOffset">{2, 2}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="281938637">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{126, 93}, {228, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">(version)</string>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="649273201">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{35, 255}, {150, 30}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Please, send feedback to</string>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIButton" id="199310403">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{20, 282}, {180, 18}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<reference key="IBUIBackgroundColor" ref="681515851"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<reference key="IBUIFont" ref="1003266931"/>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<string key="IBUINormalTitle">activegs@freetoolsassociation.com</string>
|
||||||
|
<reference key="IBUIHighlightedTitleColor" ref="681515851"/>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||||
|
</object>
|
||||||
|
<reference key="IBUINormalTitleShadowColor" ref="757478349"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="609857989">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{100, 131}, {280, 134}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string type="base64-UTF8" key="IBUIText">c3dpcGUgZG93biBmb3IgcnVuLXRpbWUgbWVudQpzd2lwZSB1cCBmb3Iga2V5Ym9hcmQKc3dpcGUgdXAg
|
||||||
|
Zm9yIGpveXBhZCAod2hpbGUga2V5Ym9hcmQgaXMgc2hvd24pCmRvdWJsZSB0YXAgZm9yIG1vdXNlIGNs
|
||||||
|
aWNrCnRyaXBsZSB0YXAgZm9yIG1vdXNlIGRvdWJsZS1jbGljawpzd2lwZSBsZWZ0L3JpZ2h0IG9uIHRv
|
||||||
|
cCBzY3JlZW4gZm9yIHNob3J0Y3V0IHRvIGJyb3dzZQo</string>
|
||||||
|
<reference key="IBUIFont" ref="624365055"/>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<string key="IBUIShadowOffset">{0, 0}</string>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">4</float>
|
||||||
|
<int key="IBUINumberOfLines">0</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
<int key="IBUILineBreakMode">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="809359447">
|
||||||
|
<reference key="NSNextResponder" ref="199126390"/>
|
||||||
|
<int key="NSvFlags">317</int>
|
||||||
|
<string key="NSFrame">{{159, 131}, {162, 17}}</string>
|
||||||
|
<reference key="NSSuperview" ref="199126390"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Commands:</string>
|
||||||
|
<reference key="IBUIFont" ref="110190536"/>
|
||||||
|
<reference key="IBUITextColor" ref="424898793"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUINumberOfLines">3</int>
|
||||||
|
<int key="IBUITextAlignment">1</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="NSFrameSize">{480, 320}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<reference key="NSCustomColorSpace" ref="797851977"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||||
|
<int key="interfaceOrientation">3</int>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">view</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">3</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="994056094"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">9</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUI</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="272079427"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">12</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="551522634"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">22</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">doneButton:</string>
|
||||||
|
<reference key="source" ref="19372993"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">31</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">emailButton:</string>
|
||||||
|
<reference key="source" ref="199310403"/>
|
||||||
|
<reference key="destination" ref="975951072"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">32</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">landscapeView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">33</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">portraitView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">34</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">versionUILandscape</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="281938637"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">35</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1</int>
|
||||||
|
<reference key="object" ref="191373211"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="551522634"/>
|
||||||
|
<reference ref="850712689"/>
|
||||||
|
<reference ref="411852784"/>
|
||||||
|
<reference ref="994056094"/>
|
||||||
|
<reference ref="272079427"/>
|
||||||
|
<reference ref="208073000"/>
|
||||||
|
<reference ref="465416657"/>
|
||||||
|
<reference ref="467084606"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="975951072"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">4</int>
|
||||||
|
<reference key="object" ref="208073000"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">5</int>
|
||||||
|
<reference key="object" ref="994056094"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">10</int>
|
||||||
|
<reference key="object" ref="411852784"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">11</int>
|
||||||
|
<reference key="object" ref="272079427"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">13</int>
|
||||||
|
<reference key="object" ref="850712689"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">21</int>
|
||||||
|
<reference key="object" ref="551522634"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">23</int>
|
||||||
|
<reference key="object" ref="199126390"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="19372993"/>
|
||||||
|
<reference ref="199310403"/>
|
||||||
|
<reference ref="649273201"/>
|
||||||
|
<reference ref="910411407"/>
|
||||||
|
<reference ref="281938637"/>
|
||||||
|
<reference ref="991466487"/>
|
||||||
|
<reference ref="609857989"/>
|
||||||
|
<reference ref="809359447"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">ViewLandscape</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">24</int>
|
||||||
|
<reference key="object" ref="281938637"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">25</int>
|
||||||
|
<reference key="object" ref="19372993"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">27</int>
|
||||||
|
<reference key="object" ref="991466487"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">28</int>
|
||||||
|
<reference key="object" ref="649273201"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">29</int>
|
||||||
|
<reference key="object" ref="910411407"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">30</int>
|
||||||
|
<reference key="object" ref="199310403"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">36</int>
|
||||||
|
<reference key="object" ref="609857989"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">37</int>
|
||||||
|
<reference key="object" ref="465416657"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">38</int>
|
||||||
|
<reference key="object" ref="467084606"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">39</int>
|
||||||
|
<reference key="object" ref="809359447"/>
|
||||||
|
<reference key="parent" ref="199126390"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-1.CustomClassName</string>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>1.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>1.IBPluginDependency</string>
|
||||||
|
<string>1.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>10.IBPluginDependency</string>
|
||||||
|
<string>11.IBPluginDependency</string>
|
||||||
|
<string>11.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>13.IBPluginDependency</string>
|
||||||
|
<string>21.IBPluginDependency</string>
|
||||||
|
<string>23.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>23.IBPluginDependency</string>
|
||||||
|
<string>23.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>24.IBPluginDependency</string>
|
||||||
|
<string>24.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>25.IBPluginDependency</string>
|
||||||
|
<string>25.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>27.IBPluginDependency</string>
|
||||||
|
<string>27.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>28.IBPluginDependency</string>
|
||||||
|
<string>28.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>29.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>30.IBPluginDependency</string>
|
||||||
|
<string>30.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>36.IBPluginDependency</string>
|
||||||
|
<string>36.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>37.IBPluginDependency</string>
|
||||||
|
<string>37.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>38.IBPluginDependency</string>
|
||||||
|
<string>38.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>39.IBPluginDependency</string>
|
||||||
|
<string>39.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>4.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>5.IBPluginDependency</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>infoViewController</string>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>{{403, 267}, {320, 480}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw+8AAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABCOAAAww4AAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>{{549, 358}, {480, 320}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw+8AAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABC/AAAwtQAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDuYAAw5UAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDHgAAwrAAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABCDAAAw42AAA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDSAAAwpYAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDHAAAw5oAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAADCaAAAwykAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAADClgAAw3AAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAADBwAAAwwQAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAADCGAAAwrgAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABC8AAAwvAAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">39</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/GTMUIView+SubtreeDescription.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">infoViewController</string>
|
||||||
|
<string key="superclassName">UIViewController</string>
|
||||||
|
<object class="NSMutableDictionary" key="actions">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>doneButton:</string>
|
||||||
|
<string>emailButton:</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>id</string>
|
||||||
|
<string>id</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>doneButton:</string>
|
||||||
|
<string>emailButton:</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBActionInfo">
|
||||||
|
<string key="name">doneButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBActionInfo">
|
||||||
|
<string key="name">emailButton:</string>
|
||||||
|
<string key="candidateClassName">id</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>landscapeView</string>
|
||||||
|
<string>portraitView</string>
|
||||||
|
<string>versionUI</string>
|
||||||
|
<string>versionUILandscape</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>UIView</string>
|
||||||
|
<string>UIView</string>
|
||||||
|
<string>UILabel</string>
|
||||||
|
<string>UILabel</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>landscapeView</string>
|
||||||
|
<string>portraitView</string>
|
||||||
|
<string>versionUI</string>
|
||||||
|
<string>versionUILandscape</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">landscapeView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">portraitView</string>
|
||||||
|
<string key="candidateClassName">UIView</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">versionUI</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBToOneOutletInfo">
|
||||||
|
<string key="name">versionUILandscape</string>
|
||||||
|
<string key="candidateClassName">UILabel</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/infoViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||||
|
<integer value="1056" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<string key="IBDocument.LastKnownRelativeProjectPath">activegs.xcodeproj</string>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||||
|
<string key="NS.key.0">ActiveGS.png</string>
|
||||||
|
<string key="NS.object.0">{80, 80}</string>
|
||||||
|
</object>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">132</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
61
Common.iphone/ActiveGSZoomEmulatorView.h
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "emulatorView.h"
|
||||||
|
|
||||||
|
struct orientationVar
|
||||||
|
{
|
||||||
|
float scale;
|
||||||
|
CGPoint p;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
typedef struct orientationVar orientationVar;
|
||||||
|
|
||||||
|
@interface zoomEmulatorView : UIScrollView<UIScrollViewDelegate>
|
||||||
|
{
|
||||||
|
|
||||||
|
float dpiRatio;
|
||||||
|
CGSize viewSize;
|
||||||
|
|
||||||
|
CGPoint initialPoint;
|
||||||
|
double initialTimer;
|
||||||
|
int mouseDown;
|
||||||
|
int zoomDisabled;
|
||||||
|
orientationVar orientationVars[4];
|
||||||
|
|
||||||
|
float kbdScale;
|
||||||
|
|
||||||
|
UIPanGestureRecognizer* panGR;
|
||||||
|
UIPinchGestureRecognizer* pinchGR;
|
||||||
|
CGPoint lastMousePos;
|
||||||
|
BOOL allowInput;
|
||||||
|
BOOL startNewPhase;
|
||||||
|
@public
|
||||||
|
UIImageView* _crt ;
|
||||||
|
emulatorView * _ew ;
|
||||||
|
UITouch* _useTouch;
|
||||||
|
UITouch* _secondTouch;
|
||||||
|
int curOrientation;
|
||||||
|
}
|
||||||
|
@property (retain,nonatomic) emulatorView* ew ;
|
||||||
|
@property (retain,nonatomic) UIImageView* crt ;
|
||||||
|
@property (retain,nonatomic) UITouch* useTouch ;
|
||||||
|
@property (retain,nonatomic) UITouch* secondTouch ;
|
||||||
|
|
||||||
|
-(void)updateFrame:(CGRect)frame kbdRect:(CGRect)kbdRect;
|
||||||
|
-(void)updateScreen:(CGRect)frame ratio:(float)ratio;
|
||||||
|
- (void)switchOrientation:(int)orientation;
|
||||||
|
-(void)disableZoom;
|
||||||
|
-(void)enableZoom;
|
||||||
|
-(void)enableInput;
|
||||||
|
-(void)disableInput;
|
||||||
|
-(void)mouseUp;
|
||||||
|
-(void)mouseDown;
|
||||||
|
-(void)setRatioToOne;
|
||||||
|
-(CGPoint)rotateTouch:(UITouch*) _touch;
|
||||||
|
- (id)initWithFrame:(CGRect)frame ratio:(float)ratio;
|
||||||
|
@end
|
870
Common.iphone/ActiveGSZoomEmulatorView.mm
Normal file
@ -0,0 +1,870 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../Src/defc.h"
|
||||||
|
#include "../Src/sim65816.h"
|
||||||
|
#include "../Src/adb.h"
|
||||||
|
#import "zoomEmulatorView.h"
|
||||||
|
/*
|
||||||
|
#import "../../common.iphone/activegsAppDelegate.h"
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(VIDEO_DOUBLEVLINE)
|
||||||
|
# define HEIGHT_MULTIPLY 1
|
||||||
|
#else
|
||||||
|
# define HEIGHT_MULTIPLY 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef debug_printf
|
||||||
|
#define debug_printf(...)
|
||||||
|
//#define debug_printf printf
|
||||||
|
//#define SHOW_COLOR
|
||||||
|
|
||||||
|
@implementation zoomEmulatorView
|
||||||
|
@synthesize ew = _ew;
|
||||||
|
@synthesize crt = _crt;
|
||||||
|
@synthesize useTouch = _useTouch;
|
||||||
|
@synthesize secondTouch = _secondTouch;
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame ratio:(float)ratio
|
||||||
|
{
|
||||||
|
|
||||||
|
if (self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
|
||||||
|
self->dpiRatio = ratio;
|
||||||
|
self->viewSize = frame.size;
|
||||||
|
|
||||||
|
debug_printf("ratio:%f width:%f height:%f",self->dpiRatio,self->viewSize.width,self->viewSize.height);
|
||||||
|
|
||||||
|
CGRect r = CGRectMake(0.0,0.0,X_A2_WINDOW_WIDTH/self->dpiRatio ,X_A2_WINDOW_HEIGHT/self->dpiRatio );
|
||||||
|
|
||||||
|
self.contentSize = CGSizeMake(r.size.width,r.size.height);
|
||||||
|
|
||||||
|
self.ew = [[[emulatorView alloc] initWithFrame:r] autorelease];
|
||||||
|
[self.ew setUserInteractionEnabled:TRUE];
|
||||||
|
|
||||||
|
CGColorSpaceRef innerColorSpace = CGColorSpaceCreateDeviceRGB();
|
||||||
|
CGContextRef icontext = CGBitmapContextCreate(nil, X_A2_WINDOW_WIDTH,X_A2_WINDOW_HEIGHT*2, 8, X_A2_WINDOW_WIDTH*4,innerColorSpace,kCGImageAlphaPremultipliedLast);
|
||||||
|
|
||||||
|
CGContextSetRGBFillColor(icontext,0,0,0,0.0); // transparent
|
||||||
|
CGContextFillRect(icontext,CGRectMake(0,0,X_A2_WINDOW_WIDTH,X_A2_WINDOW_HEIGHT*2));
|
||||||
|
for(int h=0;h<X_A2_WINDOW_HEIGHT;h++)
|
||||||
|
{
|
||||||
|
CGRect rr = CGRectMake(0,h*2,X_A2_WINDOW_WIDTH,1);
|
||||||
|
CGContextSetRGBFillColor(icontext,0,0,0,0.5); // transparent
|
||||||
|
CGContextFillRect(icontext,rr);
|
||||||
|
}
|
||||||
|
CGImageRef innerImageRef = CGBitmapContextCreateImage(icontext);
|
||||||
|
UIImage* img = [UIImage imageWithCGImage:innerImageRef];
|
||||||
|
self.crt = [[[UIImageView alloc]initWithImage:img] autorelease];
|
||||||
|
self.crt.transform = CGAffineTransformMakeScale(1,0.5);
|
||||||
|
[self.crt setFrame:CGRectMake(0,0,r.size.width,r.size.height)];
|
||||||
|
[self.crt setBounds:CGRectMake(0,0,r.size.width,r.size.height*2)];
|
||||||
|
|
||||||
|
self.crt.hidden = (r_sim65816.get_video_fx()==VIDEOFX_CRT?0:1);
|
||||||
|
|
||||||
|
[self.ew addSubview:self.crt];
|
||||||
|
CFRelease(icontext);
|
||||||
|
CFRelease(innerImageRef);
|
||||||
|
|
||||||
|
self.maximumZoomScale = 3.0;
|
||||||
|
self.minimumZoomScale = 0.25;
|
||||||
|
|
||||||
|
self.delegate = self;
|
||||||
|
|
||||||
|
self.scrollEnabled = FALSE;
|
||||||
|
|
||||||
|
self.canCancelContentTouches = NO; // interdiction d'annuler une fois que la vue a commencé a récupéré les infs
|
||||||
|
|
||||||
|
// Recherche les Gestures
|
||||||
|
for (UIGestureRecognizer *gestureRecognizer in self.gestureRecognizers) {
|
||||||
|
if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]])
|
||||||
|
panGR = (UIPanGestureRecognizer *) gestureRecognizer;
|
||||||
|
else
|
||||||
|
if ([gestureRecognizer isKindOfClass:[UIPinchGestureRecognizer class]])
|
||||||
|
pinchGR = (UIPinchGestureRecognizer *) gestureRecognizer;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
panGR.minimumNumberOfTouches = 2;
|
||||||
|
|
||||||
|
self.scrollEnabled = TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
self.pagingEnabled = NO;
|
||||||
|
self.bounces = YES;
|
||||||
|
self.clipsToBounds = YES;
|
||||||
|
self.showsHorizontalScrollIndicator = NO;
|
||||||
|
self.showsVerticalScrollIndicator = NO;
|
||||||
|
// self.canCancelContentTouches = NO; // interdiction d'annuler une fois que la vue a commencé a récupéré les infs
|
||||||
|
|
||||||
|
[self setBackgroundColor:[UIColor blackColor]];
|
||||||
|
[self.ew setBackgroundColor:[UIColor blackColor]];
|
||||||
|
|
||||||
|
|
||||||
|
CGAffineTransform mat = CGAffineTransformIdentity;
|
||||||
|
#ifdef VIDEO_SINGLEVLINE
|
||||||
|
mat = CGAffineTransformScale(mat,1,-2);
|
||||||
|
#else
|
||||||
|
#error
|
||||||
|
mat = CGAffineTransformScale(mat,1,-1);
|
||||||
|
#endif
|
||||||
|
NSLog(@"mat: %f %f %f %f - %f %f",self.transform.a,self.transform.b,self.transform.c,self.transform.d,self.transform.tx,self.transform.ty);
|
||||||
|
// self.transform = mat;
|
||||||
|
NSLog(@"mat: %f %f %f %f - %f %f",self.transform.a,self.transform.b,self.transform.c,self.transform.d,self.transform.tx,self.transform.ty);
|
||||||
|
[self addSubview:self.ew];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int inCran=0;
|
||||||
|
float refScale=0.5f;
|
||||||
|
float refScalePortrait;
|
||||||
|
float refScaleLandscape;
|
||||||
|
|
||||||
|
-(void)updateScreen:(CGRect)frame ratio:(float)ratio
|
||||||
|
{
|
||||||
|
// [self updateFrame:frame];
|
||||||
|
// [self setBounds:frame];
|
||||||
|
|
||||||
|
self->viewSize = frame.size;
|
||||||
|
self->dpiRatio = ratio;
|
||||||
|
|
||||||
|
CGRect r = CGRectMake(0.0,0.0,X_A2_WINDOW_WIDTH/self->dpiRatio ,X_A2_WINDOW_HEIGHT/self->dpiRatio );
|
||||||
|
|
||||||
|
self.contentSize = CGSizeMake(r.size.width,r.size.height);
|
||||||
|
[self.ew setFrame:r];
|
||||||
|
|
||||||
|
[self.crt setFrame:CGRectMake(0,0,r.size.width,r.size.height)];
|
||||||
|
[self.crt setBounds:CGRectMake(0,0,r.size.width,r.size.height*2)];
|
||||||
|
|
||||||
|
[self setRatioToOne];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)updateFrame:(CGRect)frame kbdRect:(CGRect)kbdRect
|
||||||
|
{
|
||||||
|
|
||||||
|
// adapte la vue pour que le clavier ne cache pas l'écran
|
||||||
|
CGRect scrollSize = self.bounds ;
|
||||||
|
|
||||||
|
|
||||||
|
float ref = kbdRect.size.height;
|
||||||
|
|
||||||
|
if ( (-scrollSize.origin.y) < ref)
|
||||||
|
{
|
||||||
|
// centre par rapport à la hauteur restante
|
||||||
|
float hremaining = frame.size.height - ref;
|
||||||
|
frame.origin.y = - kbdRect.size.height- ( hremaining - scrollSize.size.height*HEIGHT_MULTIPLY ) /2 ;
|
||||||
|
// TODO : ajuster le zoom!
|
||||||
|
}
|
||||||
|
|
||||||
|
// NSLog(@"Frame %f,%f %f,%f",frame.origin.x,frame.origin.y,frame.size.width,frame.size.height);
|
||||||
|
|
||||||
|
[self setFrame:frame];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-(void)setRatioToOne
|
||||||
|
{
|
||||||
|
|
||||||
|
int w = (int)viewSize.width;
|
||||||
|
int h = (int)viewSize.height;
|
||||||
|
|
||||||
|
debug_printf("apprect %d x %d\n",w,h);
|
||||||
|
|
||||||
|
#define ZOOM_CLAMP 0.25 // calcul un zoom par multiple *.25
|
||||||
|
|
||||||
|
|
||||||
|
for(int i=0;i<4;i++)
|
||||||
|
{
|
||||||
|
if (!(i&1))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// prend le plus petit des zooms possible
|
||||||
|
|
||||||
|
float r = w*dpiRatio / A2_WINDOW_WIDTH;
|
||||||
|
r = r/ZOOM_CLAMP;
|
||||||
|
if (r<1.0)
|
||||||
|
r = 1.0;
|
||||||
|
int ir = (int)r;
|
||||||
|
float zoomw = (float)ir*ZOOM_CLAMP;
|
||||||
|
|
||||||
|
r = h*dpiRatio / (A2_WINDOW_HEIGHT*HEIGHT_MULTIPLY);
|
||||||
|
r = r/ZOOM_CLAMP;
|
||||||
|
if (r<1.0)
|
||||||
|
r = 1.0;
|
||||||
|
ir = (int)r;
|
||||||
|
float zoomh = (float)ir*ZOOM_CLAMP;
|
||||||
|
|
||||||
|
float zoom = zoomh < zoomw ? zoomh : zoomw ;
|
||||||
|
|
||||||
|
orientationVars[i].scale = zoom;
|
||||||
|
|
||||||
|
|
||||||
|
float realew =(X_A2_WINDOW_WIDTH - A2_WINDOW_WIDTH)*zoom;
|
||||||
|
float realw = w*dpiRatio;
|
||||||
|
float posw = realw - A2_WINDOW_WIDTH*zoom;
|
||||||
|
float x = (posw - realew)/2; // pour centrer
|
||||||
|
|
||||||
|
|
||||||
|
float realeh =(X_A2_WINDOW_HEIGHT - A2_WINDOW_HEIGHT)*HEIGHT_MULTIPLY*zoom;
|
||||||
|
float realh = h*dpiRatio;
|
||||||
|
float posh = realh - A2_WINDOW_HEIGHT*HEIGHT_MULTIPLY*zoom;
|
||||||
|
float y = (posh - realeh)/2; // pour centrer
|
||||||
|
|
||||||
|
orientationVars[i].p = CGPointMake(-x/dpiRatio,-y/dpiRatio/HEIGHT_MULTIPLY);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
float r = h*dpiRatio / A2_WINDOW_WIDTH;
|
||||||
|
r = r/ZOOM_CLAMP;
|
||||||
|
if (r<1.0)
|
||||||
|
r = 1.0;
|
||||||
|
int ir = (int)r;
|
||||||
|
float zoomw = (float)ir*ZOOM_CLAMP;
|
||||||
|
|
||||||
|
r = w*dpiRatio / ( A2_WINDOW_HEIGHT * HEIGHT_MULTIPLY );
|
||||||
|
r = r/ZOOM_CLAMP;
|
||||||
|
if (r<1.0)
|
||||||
|
r = 1.0;
|
||||||
|
ir = (int)r;
|
||||||
|
float zoomh = (float)ir*ZOOM_CLAMP;
|
||||||
|
|
||||||
|
float zoom = zoomh < zoomw ? zoomh : zoomw ;
|
||||||
|
|
||||||
|
float realew =(X_A2_WINDOW_WIDTH - A2_WINDOW_WIDTH)*zoom;
|
||||||
|
float realw = h*dpiRatio;
|
||||||
|
float posw = realw - A2_WINDOW_WIDTH*zoom;
|
||||||
|
float x = (posw - realew)/2;
|
||||||
|
|
||||||
|
|
||||||
|
float realeh =(X_A2_WINDOW_HEIGHT - A2_WINDOW_HEIGHT)*HEIGHT_MULTIPLY*zoom;
|
||||||
|
float realh = w*dpiRatio;
|
||||||
|
float posh = realh - A2_WINDOW_HEIGHT*HEIGHT_MULTIPLY*zoom;
|
||||||
|
float y = (posh - realeh)/2; // pour centrer
|
||||||
|
|
||||||
|
orientationVars[i].scale = zoom;
|
||||||
|
orientationVars[i].p = CGPointMake(-x/dpiRatio,-y/dpiRatio/2);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
debug_printf("orientation:%d = %f , p = %f,%f\n",i, orientationVars[i].scale,orientationVars[i].p.x,orientationVars[i].p.y);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseDown = 0;
|
||||||
|
allowInput = TRUE;
|
||||||
|
zoomDisabled = FALSE;
|
||||||
|
refScalePortrait = orientationVars[0].scale;
|
||||||
|
refScaleLandscape = orientationVars[1].scale;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)switchOrientation:(int)orientation
|
||||||
|
{
|
||||||
|
|
||||||
|
curOrientation = -1;
|
||||||
|
float s = orientationVars[orientation].scale;
|
||||||
|
CGPoint p = orientationVars[orientation].p;
|
||||||
|
debug_printf("**** about to switchOrientation: (%d) scale:%f offset %f,%f\n",orientation,s,p.x,p.y);
|
||||||
|
|
||||||
|
self.zoomScale = s ;
|
||||||
|
[self setContentOffset:p];
|
||||||
|
curOrientation = orientation;
|
||||||
|
|
||||||
|
s = orientationVars[orientation].scale;
|
||||||
|
p = orientationVars[orientation].p;
|
||||||
|
debug_printf("**** done switching (%d) scale:%f offset %f,%f\n",orientation,s,p.x,p.y);
|
||||||
|
|
||||||
|
inCran = false;
|
||||||
|
|
||||||
|
if (orientation & 1)
|
||||||
|
refScale = refScaleLandscape;
|
||||||
|
else
|
||||||
|
refScale = refScalePortrait;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)setContentOffset:(CGPoint)p /*animated:(BOOL)animated*/
|
||||||
|
{
|
||||||
|
if (p.x == 0.0f || p.y == 0.0)
|
||||||
|
{
|
||||||
|
debug_printf("ignoring %f,%f\n",p.x,p.y);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
// appelé par [super initWithFrame:frame] alors que ew n'est pas encore initialisé
|
||||||
|
if(self.ew != nil )
|
||||||
|
{
|
||||||
|
|
||||||
|
CGSize vs = self.ew.frame.size;
|
||||||
|
CGSize scrollSize = self.bounds.size;
|
||||||
|
|
||||||
|
static float realScale=0.0f;
|
||||||
|
|
||||||
|
|
||||||
|
if (!inCran)
|
||||||
|
{
|
||||||
|
if ( fabs(self.zoomScale - refScale) < 0.05 )
|
||||||
|
{
|
||||||
|
inCran = true;
|
||||||
|
realScale = self.zoomScale;
|
||||||
|
self.zoomScale = refScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
realScale += self.zoomScale - refScale;
|
||||||
|
if (fabs(realScale - refScale) > 0.10 )
|
||||||
|
{
|
||||||
|
// à faire avant le sef.zoomScale= sinon on tombe dans une boucle infinie!
|
||||||
|
inCran = false;
|
||||||
|
self.zoomScale = realScale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
self.zoomScale = refScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// recentre la fenetre si elle tient totalement en hauteur ou en largeur
|
||||||
|
|
||||||
|
|
||||||
|
if (scrollSize.width >= vs.width || inCran )
|
||||||
|
p.x = - (scrollSize.width - abs(vs.width)) / 2.0;
|
||||||
|
if (scrollSize.height >= vs.height || inCran )
|
||||||
|
p.y = - (scrollSize.height - abs(vs.height)) / 2.0;
|
||||||
|
|
||||||
|
|
||||||
|
if (curOrientation!=-1)
|
||||||
|
{
|
||||||
|
debug_printf("saving scale (%d) %f %f,%f\n",curOrientation,self.zoomScale,p.x,p.y);
|
||||||
|
orientationVars[curOrientation].scale = self.zoomScale ; // / kbdScale;
|
||||||
|
orientationVars[curOrientation].p = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
debug_printf("********** offset : %f %f\n",p.x,p.y);
|
||||||
|
[super setContentOffset:p];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
|
||||||
|
{
|
||||||
|
return self.ew;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
|
||||||
|
// Drawing code
|
||||||
|
CGContextRef g = UIGraphicsGetCurrentContext();
|
||||||
|
|
||||||
|
//fill background with blue
|
||||||
|
#ifdef SHOW_COLOR
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor blueColor].CGColor);
|
||||||
|
#else
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor blackColor].CGColor);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CGContextFillRect(g, rect);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(CGPoint)rotateTouch:(UITouch*) _touch
|
||||||
|
{
|
||||||
|
CGPoint pt;
|
||||||
|
// float scale = [pManager dpiRatio]/self.zoomScale;
|
||||||
|
float scale = self->dpiRatio/self.zoomScale;
|
||||||
|
|
||||||
|
if (g_adb.g_warp_pointer==WARP_TOUCHSCREEN)
|
||||||
|
{
|
||||||
|
pt = [_touch locationInView:self.ew];
|
||||||
|
pt.x *= self->dpiRatio; //[pManager dpiRatio];
|
||||||
|
pt.y *= self->dpiRatio; //[pManager dpiRatio];
|
||||||
|
|
||||||
|
pt.y = (X_A2_WINDOW_HEIGHT - pt.y);
|
||||||
|
pt.y *=2;
|
||||||
|
pt.x -= BASE_MARGIN_LEFT;
|
||||||
|
pt.y -= BASE_MARGIN_TOP*2;
|
||||||
|
|
||||||
|
return pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pt = [_touch locationInView:self];
|
||||||
|
int height = self.contentSize.height;
|
||||||
|
|
||||||
|
if (r_sim65816.is_emulator_in_640mode())
|
||||||
|
{
|
||||||
|
// current scale for 640 mode
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// otherwise reduce the speed of the mouse
|
||||||
|
scale /= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
pt.y = (height - pt.y)*scale;
|
||||||
|
pt.x *= scale;
|
||||||
|
|
||||||
|
return pt;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(BOOL)touchesShouldCancelInContentView:(UIView *)view
|
||||||
|
{
|
||||||
|
debug_printf("touchesShouldCancelInContentView\n");
|
||||||
|
return !zoomDisabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)enableInput
|
||||||
|
{
|
||||||
|
allowInput = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)disableInput
|
||||||
|
{
|
||||||
|
allowInput = FALSE;
|
||||||
|
if (self.useTouch)
|
||||||
|
self.useTouch = nil;
|
||||||
|
|
||||||
|
if (self.secondTouch)
|
||||||
|
{
|
||||||
|
self.secondTouch = nil;
|
||||||
|
printf("*** secondtouch set in disableinput --- should never appear");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)disableZoom
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("disableZoom\n");
|
||||||
|
|
||||||
|
// BUG!!!!
|
||||||
|
// Sometimes, offset is being reset when gestures are disabled!
|
||||||
|
// Workaround = save the former offset and restore it afterwards
|
||||||
|
CGPoint offset = self.contentOffset;
|
||||||
|
|
||||||
|
pinchGR.enabled = FALSE;
|
||||||
|
panGR.enabled = FALSE;
|
||||||
|
self.scrollEnabled = FALSE;
|
||||||
|
zoomDisabled= TRUE;
|
||||||
|
|
||||||
|
// REstoring the offset
|
||||||
|
self.contentOffset = offset;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)enableZoom
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("enableZoom\n");
|
||||||
|
|
||||||
|
pinchGR.enabled = TRUE;
|
||||||
|
panGR.enabled = TRUE;
|
||||||
|
|
||||||
|
self.scrollEnabled = TRUE;
|
||||||
|
|
||||||
|
zoomDisabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view
|
||||||
|
{
|
||||||
|
debug_printf("scrollViewWillBeginZooming\n");
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
// le zoom a démarré : anule les timers pour que le zoom ne soit pas interrompu
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:(MODE_ALL + MODE_EMULATOR & ~MODE_ZOOM)];
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:MODE_ZOOM color:[UIColor grayColor]];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
|
||||||
|
{
|
||||||
|
debug_printf("scrollViewDidEndZooming\n");
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
// zoom terminé => on peut réactiver les gestures immédiatement
|
||||||
|
[[pManager getEmulatorView].contentView reenableAllGestures];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||||
|
{
|
||||||
|
// NSLog(@" Offset = %@ ",NSStringFromCGPoint(scrollView.contentOffset));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)scrollViewDidZoom:(UIScrollView *)scrollView
|
||||||
|
{
|
||||||
|
// printf("scrollViewDidZoom");
|
||||||
|
// [ew directDraw:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) mouseDown
|
||||||
|
{
|
||||||
|
if (!mouseDown)
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("mouseDown %f %f\n",lastMousePos.x,lastMousePos.y);
|
||||||
|
mouseDown = 1;
|
||||||
|
add_event_mouse(lastMousePos.x,lastMousePos.y,1,1);
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:MODE_MOUSEBUTTON color:[UIColor redColor]];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) mouseUp
|
||||||
|
{
|
||||||
|
if (mouseDown)
|
||||||
|
{
|
||||||
|
add_event_mouse(lastMousePos.x,lastMousePos.y,0,1);
|
||||||
|
mouseDown = 0;
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:MODE_MOUSEBUTTON color:[UIColor greenColor]];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
if ([[pManager getEmulatorView].kbdc myTouchesBegan:touches])
|
||||||
|
{
|
||||||
|
debug_printf("pad activated");
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:MODE_PAD color:[UIColor grayColor]];
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:(MODE_ALL+MODE_EMULATOR & ~MODE_PAD)];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// prend la première touche
|
||||||
|
UITouch *touch = [[touches allObjects] objectAtIndex:0];
|
||||||
|
|
||||||
|
|
||||||
|
// if (!runningOnIOS_3_2)
|
||||||
|
{
|
||||||
|
// simule les swipes
|
||||||
|
initialPoint = [touch locationInView:nil];
|
||||||
|
initialTimer = [[NSDate date] timeIntervalSince1970];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!allowInput)
|
||||||
|
{
|
||||||
|
debug_printf("input disabled");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([touches count] > 1)
|
||||||
|
{
|
||||||
|
debug_printf("multiple - disabling input");
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:MODE_EMULATOR];
|
||||||
|
#endif
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (self.useTouch)
|
||||||
|
{
|
||||||
|
if (!self.secondTouch && zoomDisabled)
|
||||||
|
{
|
||||||
|
if (!mouseDown)
|
||||||
|
{
|
||||||
|
debug_printf("second touch mouse Down\n");
|
||||||
|
[self mouseDown];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("second touch\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
self.secondTouch = touch;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (zoomDisabled)
|
||||||
|
{
|
||||||
|
debug_printf("third or more touch ignore");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("ignoring second touch - too soon, must be a gestures");
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:MODE_EMULATOR];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.useTouch = touch;
|
||||||
|
|
||||||
|
lastMousePos = [self rotateTouch:touch];
|
||||||
|
|
||||||
|
add_event_mouse(lastMousePos.x,lastMousePos.y,0,-1);
|
||||||
|
|
||||||
|
if (self.secondTouch)
|
||||||
|
{
|
||||||
|
// mouseDown déjà enclenchée -> on a fini
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nbtap = [touch tapCount];
|
||||||
|
if (nbtap==1)
|
||||||
|
{
|
||||||
|
// prépare la désactivation des gestures
|
||||||
|
//[[pManager getEmulatorView].contentView scheduleDisableAllGestures];
|
||||||
|
startNewPhase=TRUE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(DRIVER_DONTSIMULATESPACE)
|
||||||
|
if (nbtap==2)
|
||||||
|
{
|
||||||
|
extern void simulate_space_event();
|
||||||
|
simulate_space_event();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (nbtap>=2 || g_adb.g_warp_pointer==WARP_TOUCHSCREEN)
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("*** multi-tap\n");
|
||||||
|
|
||||||
|
[self mouseUp];
|
||||||
|
|
||||||
|
[self mouseDown];
|
||||||
|
|
||||||
|
// Désactive immédiatement les gestures
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
if (g_adb.g_warp_pointer!=WARP_TOUCHSCREEN)
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:MODE_ALL];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("touchesEnded : %d",[touches count]);
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
if (! [[pManager getEmulatorView].kbdc myTouchesEnded:touches])
|
||||||
|
{
|
||||||
|
// le pad n'est plus actif - reactive les input si elles étaient disabled
|
||||||
|
if (!allowInput)
|
||||||
|
[[pManager getEmulatorView].contentView reenableAllGestures];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (!runningOnIOS_3_2)
|
||||||
|
{
|
||||||
|
// simule les swipes
|
||||||
|
|
||||||
|
// prend la première touche
|
||||||
|
UITouch *touch = [[touches allObjects] objectAtIndex:0];
|
||||||
|
|
||||||
|
|
||||||
|
CGPoint point = [touch locationInView:nil];
|
||||||
|
double t = [[NSDate date] timeIntervalSince1970] - initialTimer ;
|
||||||
|
debug_printf("swipe time:%f",t);
|
||||||
|
if (t < 1.0)
|
||||||
|
{
|
||||||
|
float diffX = point.x - initialPoint.x;
|
||||||
|
float diffY = point.y - initialPoint.y;
|
||||||
|
printf("diffX: %f diffY: %f",diffX,diffY);
|
||||||
|
|
||||||
|
int angle = [pManager getAngle];
|
||||||
|
BOOL isPortrait = ( abs(angle) == 90 ) ;
|
||||||
|
if (!isPortrait)
|
||||||
|
{
|
||||||
|
double swap = diffX;
|
||||||
|
diffX = diffY;
|
||||||
|
diffY = swap;
|
||||||
|
}
|
||||||
|
if (angle>0) diffY = -diffY;
|
||||||
|
|
||||||
|
if (abs(diffX) < 40.0 && abs(diffY)> 150.0)
|
||||||
|
{
|
||||||
|
// swipeY
|
||||||
|
if (diffY<0)
|
||||||
|
// swipe up
|
||||||
|
[[pManager getEmulatorView].kbdc swipeUp];
|
||||||
|
else
|
||||||
|
[[pManager getEmulatorView].kbdc swipeDown];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!allowInput)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
if ( [touches containsObject:self.useTouch]
|
||||||
|
&& [touches containsObject:self.secondTouch])
|
||||||
|
{
|
||||||
|
debug_printf("both keys ended at the sametime");
|
||||||
|
|
||||||
|
[self mouseUp];
|
||||||
|
|
||||||
|
self.useTouch = nil;
|
||||||
|
self.secondTouch = nil;
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
// vérifie les gestures
|
||||||
|
customView* cv = [pManager getEmulatorView].contentView;
|
||||||
|
[cv processGesturesOnTouchesEnded];
|
||||||
|
#endif
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([touches containsObject:self.useTouch])
|
||||||
|
{
|
||||||
|
debug_printf("contains useTouch");
|
||||||
|
|
||||||
|
if (self.secondTouch)
|
||||||
|
{
|
||||||
|
// libère useTouch mais ne fait rien d'autre - maintien la touche enclenchée
|
||||||
|
|
||||||
|
debug_printf("maintaining mouseDown - secondTouch ");
|
||||||
|
self.useTouch = nil;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("touchesEnded\n");
|
||||||
|
|
||||||
|
[self mouseUp];
|
||||||
|
self.useTouch = nil;
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
// vérifie les gestures
|
||||||
|
customView* cv = [pManager getEmulatorView].contentView;
|
||||||
|
[cv processGesturesOnTouchesEnded];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([touches containsObject:self.secondTouch])
|
||||||
|
{
|
||||||
|
// correspond à un mouseUp
|
||||||
|
[self mouseUp];
|
||||||
|
self.secondTouch = nil;
|
||||||
|
debug_printf("secondTouch ended");
|
||||||
|
|
||||||
|
if (!self.useTouch)
|
||||||
|
{
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
// aucune touche n'est plus appuyée : réactive les gestures
|
||||||
|
[[pManager getEmulatorView].contentView scheduleEnableAllGestures];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
// on est ici car lez zoom a démarré => théoriquement, il ne doit y avoir aucun useTouch, secondTouch, ou mouseDown
|
||||||
|
|
||||||
|
if ([touches containsObject:self.useTouch])
|
||||||
|
{
|
||||||
|
debug_printf("touchesCancelled useTouch\n");
|
||||||
|
self.useTouch = nil;
|
||||||
|
}
|
||||||
|
if ([touches containsObject:self.secondTouch])
|
||||||
|
{
|
||||||
|
debug_printf("touchesCancelled secondTouch\n");
|
||||||
|
self.secondTouch = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEBUG INFO
|
||||||
|
if (mouseDown)
|
||||||
|
{
|
||||||
|
printf("mouseDown in touchesCancelled***");
|
||||||
|
[self mouseUp];
|
||||||
|
}
|
||||||
|
|
||||||
|
//[[pManager getEmulatorView].contentView reenableAllGestures];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
if ([[pManager getEmulatorView].kbdc myTouchesMoved:touches])
|
||||||
|
return ;
|
||||||
|
#endif
|
||||||
|
if (!allowInput)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
if (startNewPhase)
|
||||||
|
{
|
||||||
|
debug_printf("first finger moved");
|
||||||
|
startNewPhase = FALSE;
|
||||||
|
#ifdef ACTIVEGS
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:MODE_ZOOM]; // à faire avant le schedule
|
||||||
|
[[pManager getEmulatorView].contentView scheduleDisableAllGestures];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!self.useTouch) return ;
|
||||||
|
if ([touches containsObject:self.useTouch])
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
CGPoint pt = [useTouch locationInView:self];
|
||||||
|
lastMousePos = rotateTouch(self,pt,[pManager getAngle]);
|
||||||
|
*/
|
||||||
|
lastMousePos = [self rotateTouch:self.useTouch];
|
||||||
|
add_event_mouse(lastMousePos.x,lastMousePos.y,mouseDown,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
|
||||||
|
self.delegate = nil;
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
53
Common.iphone/GTMUIView+SubtreeDescription.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//
|
||||||
|
// GTMUIView+SubtreeDescription.h
|
||||||
|
//
|
||||||
|
// Copyright 2009 Google Inc.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
// use this file except in compliance with the License. You may obtain a copy
|
||||||
|
// of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
// License for the specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
//
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
// This entire file, and the corresponding .m is DEBUG only.
|
||||||
|
// But you can define INCLUDE_UIVIEW_SUBTREE_DESCRIPTION to no-zero to override.
|
||||||
|
#if DEBUG || INCLUDE_UIVIEW_SUBTREE_DESCRIPTION
|
||||||
|
|
||||||
|
// Example, in debugger, pause the program, then type:
|
||||||
|
// po [[[UIApplication sharedApplication] keyWindow] subtreeDescription]
|
||||||
|
|
||||||
|
@interface UIView (SubtreeDescription)
|
||||||
|
|
||||||
|
// Returns one line, without leading indent, but with a trailing newline,
|
||||||
|
// describing the view.
|
||||||
|
// If you define a |myViewDescriptionLine| method in your own UIView classes,
|
||||||
|
// this will append that result to its description.
|
||||||
|
- (NSString *)gtm_subtreeDescriptionLine;
|
||||||
|
|
||||||
|
// For debugging. Returns a nicely indented representation of this view's
|
||||||
|
// subview hierarchy, each with frame and isHidden.
|
||||||
|
- (NSString *)subtreeDescription;
|
||||||
|
|
||||||
|
// For debugging. Returns a nicely indented representation of this view's
|
||||||
|
// layer hierarchy, with frames and isHidden.
|
||||||
|
// Requires QuartzCore to be useful, but your app will still link without it.
|
||||||
|
// TODO: should there be an analog of myViewDescriptionLine for layers?
|
||||||
|
- (NSString *)sublayersDescription;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol GTMUIViewSubtreeDescription
|
||||||
|
// A UIView can implement this and it can add it's own custom description
|
||||||
|
// in gtm_subtreeDescriptionLine.
|
||||||
|
- (NSString *)myViewDescriptionLine;
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif // DEBUG
|
184
Common.iphone/GTMUIView+SubtreeDescription.m
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
//
|
||||||
|
// GTMUIView+SubtreeDescription.m
|
||||||
|
//
|
||||||
|
// Copyright 2009 Google Inc.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
// use this file except in compliance with the License. You may obtain a copy
|
||||||
|
// of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
// License for the specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
//
|
||||||
|
#import "GTMUIView+SubtreeDescription.h"
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
static void AppendLabelFloat(NSMutableString *s, NSString *label, float f) {
|
||||||
|
[s appendString:label];
|
||||||
|
// Respects gcc warning about using == with floats.
|
||||||
|
if (fabs(f - floor(f)) < 1.0e-8) { // Essentially integer.
|
||||||
|
int d = f;
|
||||||
|
// Respects gcc warning about casting floats to ints.
|
||||||
|
[s appendFormat:@"%d", d];
|
||||||
|
} else {
|
||||||
|
[s appendFormat:@"%3.1f", f];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSMutableString *SublayerDescriptionLine(CALayer *layer) {
|
||||||
|
NSMutableString *result = [NSMutableString string];
|
||||||
|
[result appendFormat:@"%@ %p {", [layer class], layer];
|
||||||
|
CGRect frame = [layer frame];
|
||||||
|
if (!CGRectIsEmpty(frame)) {
|
||||||
|
AppendLabelFloat(result, @"x:", frame.origin.x);
|
||||||
|
AppendLabelFloat(result, @" y:", frame.origin.y);
|
||||||
|
AppendLabelFloat(result, @" w:", frame.size.width);
|
||||||
|
AppendLabelFloat(result, @" h:", frame.size.height);
|
||||||
|
}
|
||||||
|
CGRect bounds = [layer bounds];
|
||||||
|
if (!CGRectIsEmpty(bounds))
|
||||||
|
{
|
||||||
|
AppendLabelFloat(result, @"bounds x:", bounds.origin.x);
|
||||||
|
AppendLabelFloat(result, @" y:", bounds.origin.y);
|
||||||
|
AppendLabelFloat(result, @" w:", bounds.size.width);
|
||||||
|
AppendLabelFloat(result, @" h:", bounds.size.height);
|
||||||
|
}
|
||||||
|
[result appendFormat:@"}"];
|
||||||
|
if ([layer isHidden]) {
|
||||||
|
[result appendString:@" hid"];
|
||||||
|
}
|
||||||
|
[result appendString:@"\n"];
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// |sublayersDescription| has a guard so we'll only call this if it is safe
|
||||||
|
// to call.
|
||||||
|
static NSMutableString *SublayerDescriptionAtLevel(CALayer *layer, int level) {
|
||||||
|
NSMutableString *result = [NSMutableString string];
|
||||||
|
for (int i = 0; i < level; ++i) {
|
||||||
|
[result appendString:@" "];
|
||||||
|
}
|
||||||
|
[result appendString:SublayerDescriptionLine(layer)];
|
||||||
|
// |sublayers| is defined in the QuartzCore framework, which isn't guaranteed
|
||||||
|
// to be linked to this program. (So we don't include the header.)
|
||||||
|
NSArray *layers = [layer performSelector:NSSelectorFromString(@"sublayers")];
|
||||||
|
for (CALayer *l in layers) {
|
||||||
|
[result appendString:SublayerDescriptionAtLevel(l, level+1)];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@implementation UIView (SubtreeDescription)
|
||||||
|
|
||||||
|
// TODO: Consider flagging things which might help in debugging:
|
||||||
|
// - alpha < 10%
|
||||||
|
// - origin not zero
|
||||||
|
// - non-opaque
|
||||||
|
// - transform if not identity
|
||||||
|
// - view not entirely within ancestor views
|
||||||
|
// - (possibly) tag==0
|
||||||
|
- (NSString *)gtm_subtreeDescriptionLine {
|
||||||
|
NSMutableString *result = [NSMutableString string];
|
||||||
|
[result appendFormat:@"%@ %p {", [self class], self];
|
||||||
|
CGRect frame = [self frame];
|
||||||
|
|
||||||
|
|
||||||
|
if (!CGRectIsEmpty(frame)) {
|
||||||
|
AppendLabelFloat(result, @"x:", frame.origin.x);
|
||||||
|
AppendLabelFloat(result, @" y:", frame.origin.y);
|
||||||
|
AppendLabelFloat(result, @" w:", frame.size.width);
|
||||||
|
AppendLabelFloat(result, @" h:", frame.size.height);
|
||||||
|
}
|
||||||
|
CGRect bounds = [self bounds];
|
||||||
|
if (!CGRectIsEmpty(bounds))
|
||||||
|
{
|
||||||
|
AppendLabelFloat(result, @"-- bounds x:", bounds.origin.x);
|
||||||
|
AppendLabelFloat(result, @" y:", bounds.origin.y);
|
||||||
|
AppendLabelFloat(result, @" w:", bounds.size.width);
|
||||||
|
AppendLabelFloat(result, @" h:", bounds.size.height);
|
||||||
|
}
|
||||||
|
[result appendString:@"}"];
|
||||||
|
|
||||||
|
CGAffineTransform t = [self transform];
|
||||||
|
if (!CGAffineTransformIsIdentity(t))
|
||||||
|
{
|
||||||
|
AppendLabelFloat(result, @"-- matrix 11:", t.a);
|
||||||
|
AppendLabelFloat(result, @" 12:", t.b);
|
||||||
|
AppendLabelFloat(result, @" 21:", t.c);
|
||||||
|
AppendLabelFloat(result, @" 22:", t.d);
|
||||||
|
AppendLabelFloat(result, @" tx:", t.tx);
|
||||||
|
AppendLabelFloat(result, @" ty:", t.ty);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([self isKindOfClass:[UIScrollView class]])
|
||||||
|
{
|
||||||
|
UIScrollView* sv = (UIScrollView*)self;
|
||||||
|
float scale = sv.zoomScale;
|
||||||
|
AppendLabelFloat(result, @" scale:", scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AppendLabelFloat(result, @" alpha:", self.alpha);
|
||||||
|
if ([self isHidden]) {
|
||||||
|
[result appendString:@" hid"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([self respondsToSelector:@selector(myViewDescriptionLine)]) {
|
||||||
|
NSString *customDescription =
|
||||||
|
[self performSelector:@selector(myViewDescriptionLine)];
|
||||||
|
if (customDescription != nil) {
|
||||||
|
[result appendFormat:@" %@", customDescription];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[result appendString:@"\n"];
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)gtm_subtreeDescriptionAtLevel:(int)level {
|
||||||
|
NSMutableString *result = [NSMutableString string];
|
||||||
|
for (int i = 0; i < level; ++i) {
|
||||||
|
[result appendString:@" "];
|
||||||
|
}
|
||||||
|
[result appendString:[self gtm_subtreeDescriptionLine]];
|
||||||
|
for (UIView *v in [self subviews]) {
|
||||||
|
[result appendString:[v gtm_subtreeDescriptionAtLevel:level+1]];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)subtreeDescription {
|
||||||
|
NSMutableString *result =
|
||||||
|
[[[self gtm_subtreeDescriptionLine] mutableCopy] autorelease];
|
||||||
|
for (UIView *v in [self subviews]) {
|
||||||
|
[result appendString:[v gtm_subtreeDescriptionAtLevel:1]];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for debugging dump the layer hierarchy, frames and isHidden.
|
||||||
|
- (NSString *)sublayersDescription {
|
||||||
|
CALayer *layer = [self layer];
|
||||||
|
SEL sublayers = NSSelectorFromString(@"sublayers");
|
||||||
|
if (![layer respondsToSelector:sublayers]) {
|
||||||
|
return @"*** Sorry: This app is not linked with the QuartzCore framework.";
|
||||||
|
}
|
||||||
|
NSMutableString *result = SublayerDescriptionLine(layer);
|
||||||
|
NSArray *layers = [layer performSelector:sublayers];
|
||||||
|
for (CALayer *l in layers) {
|
||||||
|
[result appendString:SublayerDescriptionAtLevel(l, 1)];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif // DEBUG
|
||||||
|
|
||||||
|
|
187
Common.iphone/KBDController.h
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
LOCKZOOM_AUTO=0,
|
||||||
|
LOCKZOOM_ON=1,
|
||||||
|
LOCKZOOM_ARCADE=2
|
||||||
|
};
|
||||||
|
|
||||||
|
@interface KBDController : UIViewController <UITextFieldDelegate>
|
||||||
|
{
|
||||||
|
|
||||||
|
CGRect keyboardDelta;
|
||||||
|
float keyboardScale;
|
||||||
|
BOOL bMenuBarVisibility;
|
||||||
|
BOOL bLoading;
|
||||||
|
BOOL padEnabled;
|
||||||
|
CGPoint posPad;
|
||||||
|
float diskAngle ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int inputMode;
|
||||||
|
|
||||||
|
UITextField* _textField;
|
||||||
|
UIButton* _menuButton;
|
||||||
|
UIBarButtonItem* _optionButton ;
|
||||||
|
UIImageView* _diskView;
|
||||||
|
UIImageView* _diskLoadingView;
|
||||||
|
NSMutableArray* _diskIcons;
|
||||||
|
UILabel* _loaderLabel;
|
||||||
|
UILabel* _debugIndicator;
|
||||||
|
UILabel* _swipeIndicator;
|
||||||
|
UILabel* _zoomIndicator;
|
||||||
|
UILabel* _padIndicator;
|
||||||
|
UILabel* _mouseButtonIndicator;
|
||||||
|
UILabel* _inputIndicator;
|
||||||
|
|
||||||
|
UIActivityIndicatorView* _loader;
|
||||||
|
NSTimer* _loaderTimer;
|
||||||
|
#ifdef GRAPHICAL_PAD
|
||||||
|
UIImageView* _padBackground;
|
||||||
|
UIImageView* _padButton1Down;
|
||||||
|
UIImageView* _padButton2Down;
|
||||||
|
UIImageView* _padStick;
|
||||||
|
#endif
|
||||||
|
UIImageView* _padCircleOutter;
|
||||||
|
UIImageView* _padCircleInner;
|
||||||
|
UIImageView* _oaButtonView;
|
||||||
|
UIImageView* _caButtonView;
|
||||||
|
UITouch* _padTouch;
|
||||||
|
UITouch* _oaButtonTouch;
|
||||||
|
UITouch* _caButtonTouch;
|
||||||
|
UINavigationItem* _emulatorNavItem;
|
||||||
|
UINavigationBar* _runtimeView;
|
||||||
|
UIView* _interfaceView;
|
||||||
|
NSTimer* _hardwarekbdDetectionTimer;
|
||||||
|
NSTimer* _animateDiskTimer;
|
||||||
|
|
||||||
|
UIImageView* _runtimeControls;
|
||||||
|
UIView* _runtimeControlsOptions;
|
||||||
|
|
||||||
|
UIImageView* _diskSelection;
|
||||||
|
UIView* _diskSelectionOptions;
|
||||||
|
UIScrollView* _uit;
|
||||||
|
UIScrollView* _uitb;
|
||||||
|
UIView* _accessView;
|
||||||
|
UIButton* _leftAccessView;
|
||||||
|
UIButton* _rightAccessView;
|
||||||
|
UINavigationBar* _barView;
|
||||||
|
UINavigationBar* _specialView;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (nonatomic,retain) UITextField* textField;
|
||||||
|
|
||||||
|
@property (nonatomic,retain) UIButton *menuButton;
|
||||||
|
@property (nonatomic,retain) UIBarButtonItem* optionButton ;
|
||||||
|
@property (nonatomic,retain) UIImageView* diskView;
|
||||||
|
@property (nonatomic,retain) UIImageView* diskLoadingView;
|
||||||
|
@property (nonatomic,retain) NSMutableArray* diskIcons;
|
||||||
|
@property (nonatomic,retain) UILabel * loaderLabel;
|
||||||
|
@property (nonatomic,retain) UILabel* debugIndicator;
|
||||||
|
@property (nonatomic,retain) UILabel* swipeIndicator;
|
||||||
|
@property (nonatomic,retain) UILabel* zoomIndicator;
|
||||||
|
@property (nonatomic,retain) UILabel* padIndicator;
|
||||||
|
@property (nonatomic,retain) UILabel* mouseButtonIndicator;
|
||||||
|
@property (nonatomic,retain) UILabel* inputIndicator;
|
||||||
|
@property (nonatomic,retain) UIActivityIndicatorView* loader;
|
||||||
|
@property (nonatomic,retain) NSTimer* loaderTimer;
|
||||||
|
#ifdef GRAPHICAL_PAD
|
||||||
|
@property (nonatomic,retain) UIImageView* padBackground;
|
||||||
|
@property (nonatomic,retain) UIImageView* padButton1Down;
|
||||||
|
@property (nonatomic,retain) UIImageView* padButton2Down;
|
||||||
|
@property (nonatomic,retain) UIImageView* padStick;
|
||||||
|
#endif
|
||||||
|
@property (nonatomic,retain) UIImageView* padCircleOutter;
|
||||||
|
@property (nonatomic,retain) UIImageView* padCircleInner;
|
||||||
|
@property (nonatomic,retain) UIImageView* oaButtonView;
|
||||||
|
@property (nonatomic,retain) UIImageView* caButtonView;
|
||||||
|
@property (nonatomic,retain) UITouch* padTouch;
|
||||||
|
@property (nonatomic,retain) UITouch* oaButtonTouch;
|
||||||
|
@property (nonatomic,retain) UITouch* caButtonTouch;
|
||||||
|
@property (nonatomic,retain) UINavigationItem* emulatorNavItem;
|
||||||
|
@property (nonatomic,retain) UINavigationBar* runtimeView;
|
||||||
|
@property (nonatomic,retain) UIView* interfaceView;
|
||||||
|
@property (nonatomic,retain) NSTimer* animateDiskTimer;
|
||||||
|
@property (nonatomic,retain) NSTimer* hardwarekbdDetectionTimer;
|
||||||
|
@property (nonatomic,retain) UIImageView* runtimeControls;
|
||||||
|
@property (nonatomic,retain) UIView* runtimeControlsOptions;
|
||||||
|
@property (nonatomic,retain) UIImageView* diskSelection;
|
||||||
|
@property (nonatomic,retain) UIView* diskSelectionOptions;
|
||||||
|
@property (nonatomic,retain) UIScrollView* uit;
|
||||||
|
@property (nonatomic,retain) UIScrollView* uitb;
|
||||||
|
@property (nonatomic,retain) UIView* accessView;
|
||||||
|
@property (nonatomic,retain) UIButton* leftAccessView;
|
||||||
|
@property (nonatomic,retain) UIButton* rightAccessView;
|
||||||
|
@property (nonatomic,retain) UINavigationBar* barView;
|
||||||
|
@property (nonatomic,retain) UINavigationBar* specialView;
|
||||||
|
//@property (assign,getter=inputMode) int inputMode;
|
||||||
|
|
||||||
|
|
||||||
|
-(void)updateSpecialButtonView:(UIButton*)_b state:(int)_state;
|
||||||
|
-(void)addSpecialKeys;
|
||||||
|
-(void)addRuntimeControls;
|
||||||
|
-(void)resetSpecialKeys;
|
||||||
|
-(void)unloadSpecialKeys;
|
||||||
|
- (void) animateDisk:(id)_id ;
|
||||||
|
-(void)refreshControls:(id)sender;
|
||||||
|
- (void) detectHardwareKeyboard:(id)_id ;
|
||||||
|
- (void)setLoading:(NSNumber*)_nsvisible;
|
||||||
|
-(void)setiCadeMode:(BOOL)_mode;
|
||||||
|
-(void)OnScreenKeyboard:(BOOL)_enabled;
|
||||||
|
-(void)enableKeyboard:(int)_enable;
|
||||||
|
-(void)restoreInput;
|
||||||
|
|
||||||
|
//#define INPUTMODE_NONE 0
|
||||||
|
#define INPUTMODE_PAD 1
|
||||||
|
#define INPUTMODE_KBD 2
|
||||||
|
#define INPUTMODE_ACCESS 4
|
||||||
|
#define INPUTMODE_MINIACCESS 8
|
||||||
|
#define INPUTMODE_ARCADE 16
|
||||||
|
#define INPUTMODE_CUSTOMKEYS 32
|
||||||
|
#define INPUTMODE_KBDFORCED 64
|
||||||
|
|
||||||
|
#define INPUTMODE_ALL (INPUTMODE_KBD + INPUTMODE_PAD + INPUTMODE_ACCESS)
|
||||||
|
#define INPUTMODE_HIDDEN 128
|
||||||
|
|
||||||
|
|
||||||
|
-(int)isInputVisible:(int) _im;
|
||||||
|
-(void)hideInput;
|
||||||
|
-(void)cycleInput;
|
||||||
|
-(void) updateSpecialKey:(CGRect)rv3;
|
||||||
|
- (void)setInputMode:(int)_mode;
|
||||||
|
- (void)setMenuBarVisibility:(int)_visible;
|
||||||
|
//- (void)toggleMenuBarVisibility ;
|
||||||
|
- (void)setEmulatorTitle:(const char*)_name ;
|
||||||
|
- (void)swapButton:(id)sender;
|
||||||
|
- (void)updateView:(CGRect)_rect;
|
||||||
|
- (void)swipeUp;
|
||||||
|
- (void)swipeDown;
|
||||||
|
-(void)setGestureIndicatorVisibility:(int)_mode color:(UIColor*)_color;
|
||||||
|
-(void)setDebugIndicatorText:(const char*)_text;
|
||||||
|
-(void)showDebug:(BOOL)_visible;
|
||||||
|
- (void)hideLoader:(id)_id;
|
||||||
|
-(void)updatePadView;
|
||||||
|
-(void)centerPad:(id)center;
|
||||||
|
|
||||||
|
-(void)enablePad:(BOOL)_enable;
|
||||||
|
-(UIImageView*)createCircle:(float)_radius red:(float)_red green:(float)_green blue:(float)_blue alpha:(float)_alpha;
|
||||||
|
- (BOOL) myTouchesBegan:(NSSet *)touches ;
|
||||||
|
- (BOOL) myTouchesMoved:(NSSet *)touches ;
|
||||||
|
- (BOOL) myTouchesEnded:(NSSet *)touches ;
|
||||||
|
-(CGFloat) getEmulatorScale;
|
||||||
|
-(CGRect) getEmulatorDelta;
|
||||||
|
- (void)updateViewForKeyboard:(int)_height;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
2789
Common.iphone/KBDController.mm
Normal file
226
Common.iphone/MainWindow-iPad.xib
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1056</int>
|
||||||
|
<string key="IBDocument.SystemVersion">10F569</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">823</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">132</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="841351856">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="427554174">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUICustomObject" id="664661524">
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIWindow" id="117978783">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrameSize">{768, 1024}</string>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4wMDUxMDIwNDA4MTYgMC4wMDUxMDIwNDA4MTYgMC4wMDUxMDIwNDA4MTYAA</bytes>
|
||||||
|
</object>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
<bool key="IBUIResizesToFullScreen">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="841351856"/>
|
||||||
|
<reference key="destination" ref="664661524"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">4</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">window</string>
|
||||||
|
<reference key="source" ref="664661524"/>
|
||||||
|
<reference key="destination" ref="117978783"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">15</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="841351856"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3</int>
|
||||||
|
<reference key="object" ref="664661524"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">activegs App Delegate</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="427554174"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">12</int>
|
||||||
|
<reference key="object" ref="117978783"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-1.CustomClassName</string>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>12.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>12.IBPluginDependency</string>
|
||||||
|
<string>3.CustomClassName</string>
|
||||||
|
<string>3.IBPluginDependency</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>UIApplication</string>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>{{525, 346}, {320, 480}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>activegsAppDelegate</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">16</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/GTMUIView+SubtreeDescription.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
|
<string key="NS.key.0">window</string>
|
||||||
|
<string key="NS.object.0">UIWindow</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<string key="NS.key.0">window</string>
|
||||||
|
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||||
|
<string key="name">window</string>
|
||||||
|
<string key="candidateClassName">UIWindow</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/activegsAppDelegate.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBUserSource</string>
|
||||||
|
<string key="minorKey"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||||
|
<integer value="1056" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<string key="IBDocument.LastKnownRelativeProjectPath">../activegs_iphone2/activegs.xcodeproj</string>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">132</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
418
Common.iphone/MainWindow.xib
Normal file
@ -0,0 +1,418 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1024</int>
|
||||||
|
<string key="IBDocument.SystemVersion">10F569</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">788</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">117</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="841351856">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="427554174">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUICustomObject" id="664661524">
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIWindow" id="117978783">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrameSize">{320, 480}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<reference key="NSWindow"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4wMDUxMDIwNDA4MTYgMC4wMDUxMDIwNDA4MTYgMC4wMDUxMDIwNDA4MTYAA</bytes>
|
||||||
|
</object>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUICustomObject" id="6732122">
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="841351856"/>
|
||||||
|
<reference key="destination" ref="664661524"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">4</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">window</string>
|
||||||
|
<reference key="source" ref="664661524"/>
|
||||||
|
<reference key="destination" ref="117978783"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">15</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="841351856"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3</int>
|
||||||
|
<reference key="object" ref="664661524"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">activegs App Delegate</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="427554174"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">12</int>
|
||||||
|
<reference key="object" ref="117978783"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">16</int>
|
||||||
|
<reference key="object" ref="6732122"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-1.CustomClassName</string>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>12.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>12.IBPluginDependency</string>
|
||||||
|
<string>16.CustomClassName</string>
|
||||||
|
<string>16.IBPluginDependency</string>
|
||||||
|
<string>3.CustomClassName</string>
|
||||||
|
<string>3.IBPluginDependency</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>UIApplication</string>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>{{525, 346}, {320, 480}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>activegsAppDelegate</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>activegsAppDelegate</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">16</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/GTMUIView+SubtreeDescription.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
|
<string key="NS.key.0">window</string>
|
||||||
|
<string key="NS.object.0">UIWindow</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||||
|
<string key="NS.key.0">window</string>
|
||||||
|
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||||
|
<string key="name">window</string>
|
||||||
|
<string key="candidateClassName">UIWindow</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">../Common.iphone/activegsAppDelegate.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">activegsAppDelegate</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBUserSource</string>
|
||||||
|
<string key="minorKey"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="247981964">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIApplication</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIResponder</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<reference key="sourceIdentifier" ref="247981964"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UISearchBar</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UISearchDisplayController</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIView</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIViewController</string>
|
||||||
|
<string key="superclassName">UIResponder</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">UIWindow</string>
|
||||||
|
<string key="superclassName">UIView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||||
|
<integer value="1024" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<string key="IBDocument.LastKnownRelativeProjectPath">../ActiveBestOfFTA/activebestoffta.xcodeproj</string>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">117</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
BIN
Common.iphone/Tab2GS.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
Common.iphone/Tab2GS@2x.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
Common.iphone/Tab2_32.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Common.iphone/TabFTA.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
Common.iphone/TabFTA@2x.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Common.iphone/TabFTA_32.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Common.iphone/Tab][.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
Common.iphone/Tab][@2x.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
79
Common.iphone/UICustomKey.h
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
enum enum_key_type
|
||||||
|
{
|
||||||
|
KEYTYPE_KEYBOARD=66,
|
||||||
|
KEYTYPE_BUTTON
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_align
|
||||||
|
{
|
||||||
|
LEFT_ALIGN = 0x100,
|
||||||
|
RIGHT_ALIGN =0x200,
|
||||||
|
SAME_LINE = 0x400,
|
||||||
|
SAME_COL = 0x800,
|
||||||
|
TOP_ALIGN = 0x1000,
|
||||||
|
BOTTOM_ALIGN = 0x2000,
|
||||||
|
BOTTOM_BORDER=0x4000,
|
||||||
|
LEFT_BORDER=0x8000,
|
||||||
|
RIGHT_BORDER =0x10000,
|
||||||
|
VERTICAL_CENTER = 0x20000,
|
||||||
|
LEFTCENTER_ALIGN = 0x40000,
|
||||||
|
MIDDLE_BOTTOM = 0x80000
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct key_type
|
||||||
|
{
|
||||||
|
enum enum_key_type type;
|
||||||
|
NSString* str;
|
||||||
|
int code;
|
||||||
|
|
||||||
|
int status;
|
||||||
|
int halign;
|
||||||
|
int valign;
|
||||||
|
int mode;
|
||||||
|
int vfactor;
|
||||||
|
int hfactor;
|
||||||
|
UILabel* view;
|
||||||
|
UIColor* bgcolor_off;
|
||||||
|
UIColor* bgcolor_on;
|
||||||
|
UIColor* bgcolor_over;
|
||||||
|
key_type()
|
||||||
|
{
|
||||||
|
mode = 0;
|
||||||
|
bgcolor_on = [UIColor colorWithRed:0.5f green:0.5f blue:0.5f alpha:0.5f];
|
||||||
|
bgcolor_off = [UIColor colorWithRed:0.5f green:0.5f blue:0.5f alpha:0.0f];
|
||||||
|
bgcolor_over = [UIColor colorWithRed:0.8f green:0.8f blue:0.8f alpha:0.5f];
|
||||||
|
vfactor=1;
|
||||||
|
hfactor=1;
|
||||||
|
};
|
||||||
|
} ;
|
||||||
|
|
||||||
|
#define MAX_CUSTOM_KEYS 32
|
||||||
|
extern key_type custom_keys[MAX_CUSTOM_KEYS];
|
||||||
|
extern void show_custom_keys(CGRect _rv, int _mode,int _centery);
|
||||||
|
//extern void hide_custom_keys();
|
||||||
|
extern void fade_custom_keys(float _alpha);
|
||||||
|
extern void init_custom_keys();
|
||||||
|
|
||||||
|
extern void touch_begin_custom_key(CGPoint p,int nbtap);
|
||||||
|
extern void touch_end_custom_key();
|
||||||
|
extern void toggle_custom_keys(int _mode, int _hide);
|
||||||
|
|
||||||
|
extern float CUSTOM_KEY_WIDTH ;
|
||||||
|
extern float CUSTOM_KEY_HEIGHT ;
|
||||||
|
|
||||||
|
@interface UICustomKey : UIView
|
||||||
|
|
||||||
|
@end
|
370
Common.iphone/UICustomKey.mm
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "activegsAppDelegate.h"
|
||||||
|
#include"../ActiveGS_Karateka/KaratekaKBDController.h"
|
||||||
|
#import "UICustomKey.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@implementation UICustomKey
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
self = [super initWithFrame:frame];
|
||||||
|
if (self) {
|
||||||
|
// Initialization code
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#define CUSTOM_KEY_WIDTH_DEFAULT 64.0f
|
||||||
|
#define CUSTOM_KEY_HEIGHT_DEFAULT 64.0f
|
||||||
|
|
||||||
|
float CUSTOM_KEY_WIDTH ;
|
||||||
|
float CUSTOM_KEY_HEIGHT ;
|
||||||
|
|
||||||
|
int nb_custom_keys = 0;
|
||||||
|
key_type custom_keys[MAX_CUSTOM_KEYS];
|
||||||
|
|
||||||
|
|
||||||
|
void init_custom_keys()
|
||||||
|
{
|
||||||
|
custom_keys[0].mode = INPUTMODE_LEFTRIGHTKEY;
|
||||||
|
custom_keys[0].str = @"←";
|
||||||
|
custom_keys[0].code = 0x3B;
|
||||||
|
custom_keys[0].halign = LEFT_BORDER ;
|
||||||
|
// custom_keys[0].valign = MIDDLE_BOTTOM+ 3 ;
|
||||||
|
custom_keys[0].valign = SAME_LINE + 4 ;
|
||||||
|
custom_keys[0].hfactor = 1 ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[1].mode = INPUTMODE_LEFTRIGHTKEY;
|
||||||
|
custom_keys[1].str = @"→";
|
||||||
|
custom_keys[1].code = 0x3C;
|
||||||
|
custom_keys[1].halign = LEFT_ALIGN + 0;
|
||||||
|
custom_keys[1].valign = SAME_LINE + 0;
|
||||||
|
custom_keys[1].hfactor = 1 ;
|
||||||
|
|
||||||
|
custom_keys[8].mode = INPUTMODE_LEFTRIGHTKEY;
|
||||||
|
custom_keys[8].str = @"SPC";
|
||||||
|
custom_keys[8].code = 0x31;
|
||||||
|
custom_keys[8].halign = LEFT_BORDER /*LEFTCENTER_ALIGN*/ + 0;
|
||||||
|
custom_keys[8].valign = TOP_ALIGN + 0;
|
||||||
|
// custom_keys[8].valign = BOTTOM_ALIGN + 0;
|
||||||
|
custom_keys[8].hfactor = 2 ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[2].mode = INPUTMODE_PUNCHKEY + INPUTMODE_PUNCHLEFTRIGHT;
|
||||||
|
custom_keys[2].str = @"W"; //@"Q";
|
||||||
|
custom_keys[2].halign = RIGHT_ALIGN + RIGHT_BORDER;
|
||||||
|
custom_keys[2].valign = TOP_ALIGN + 3;
|
||||||
|
custom_keys[2].code = 0x0D; //0x0C;
|
||||||
|
|
||||||
|
custom_keys[3].mode = INPUTMODE_PUNCHKEY + INPUTMODE_PUNCHLEFTRIGHT;
|
||||||
|
custom_keys[3].str = @"S"; //@"A";
|
||||||
|
custom_keys[3].halign = RIGHT_ALIGN + RIGHT_BORDER;
|
||||||
|
custom_keys[3].valign = VERTICAL_CENTER;
|
||||||
|
custom_keys[3].code = 0x01; //0x00;
|
||||||
|
|
||||||
|
custom_keys[4].mode = INPUTMODE_PUNCHKEY + INPUTMODE_PUNCHLEFTRIGHT;
|
||||||
|
custom_keys[4].str = @"X"; //@"Z";
|
||||||
|
custom_keys[4].halign = RIGHT_ALIGN + RIGHT_BORDER;
|
||||||
|
custom_keys[4].valign = BOTTOM_ALIGN +3;
|
||||||
|
custom_keys[4].code = 0x07; //0x06;
|
||||||
|
|
||||||
|
custom_keys[5].mode = INPUTMODE_PUNCHKEY ;
|
||||||
|
custom_keys[5].str = @"Q"; //@"W";
|
||||||
|
custom_keys[5].code = 0x0C; //0x0D;
|
||||||
|
custom_keys[5].halign = RIGHT_ALIGN + 2;
|
||||||
|
custom_keys[5].valign = SAME_LINE + 2;
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[6].mode = INPUTMODE_PUNCHKEY ;
|
||||||
|
custom_keys[6].str = @"A"; //@"S";
|
||||||
|
custom_keys[6].code = 0x00; //0x01;
|
||||||
|
custom_keys[6].halign = SAME_COL + 5;
|
||||||
|
custom_keys[6].valign = BOTTOM_ALIGN + 5;
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[7].mode = INPUTMODE_PUNCHKEY ;
|
||||||
|
custom_keys[7].str = @"Z"; //@"X";
|
||||||
|
custom_keys[7].code = 0x06; //0x07;
|
||||||
|
custom_keys[7].halign = SAME_COL + 6;
|
||||||
|
custom_keys[7].valign = BOTTOM_ALIGN + 6;
|
||||||
|
|
||||||
|
custom_keys[9].mode = INPUTMODE_SPACEKEY ;
|
||||||
|
custom_keys[9].str = @"SPC";
|
||||||
|
custom_keys[9].code = 0x31;
|
||||||
|
custom_keys[9].halign = RIGHT_ALIGN + RIGHT_BORDER;
|
||||||
|
custom_keys[9].valign = VERTICAL_CENTER;
|
||||||
|
custom_keys[9].vfactor = 2;
|
||||||
|
custom_keys[9].hfactor = 2;
|
||||||
|
|
||||||
|
custom_keys[10].mode = INPUTMODE_PUNCHLEFTRIGHT ;
|
||||||
|
custom_keys[10].str = @"W";
|
||||||
|
custom_keys[10].code = 0x0D;
|
||||||
|
custom_keys[10].halign = LEFT_ALIGN + LEFT_BORDER;
|
||||||
|
custom_keys[10].valign = SAME_LINE + 2;
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[11].mode = INPUTMODE_PUNCHLEFTRIGHT ;
|
||||||
|
custom_keys[11].str = @"S";
|
||||||
|
custom_keys[11].code = 0x01;
|
||||||
|
custom_keys[11].halign = LEFT_ALIGN + LEFT_BORDER;
|
||||||
|
custom_keys[11].valign = BOTTOM_ALIGN + 5;
|
||||||
|
|
||||||
|
|
||||||
|
custom_keys[12].mode = INPUTMODE_PUNCHLEFTRIGHT ;
|
||||||
|
custom_keys[12].str = @"X";
|
||||||
|
custom_keys[12].code = 0x07;
|
||||||
|
custom_keys[12].halign = LEFT_ALIGN + LEFT_BORDER;
|
||||||
|
custom_keys[12].valign = BOTTOM_ALIGN + 6;
|
||||||
|
|
||||||
|
nb_custom_keys = 13;
|
||||||
|
|
||||||
|
float res = [pManager resolutionRatio];
|
||||||
|
CUSTOM_KEY_HEIGHT = CUSTOM_KEY_HEIGHT_DEFAULT*res;
|
||||||
|
CUSTOM_KEY_WIDTH = CUSTOM_KEY_WIDTH_DEFAULT*res;
|
||||||
|
|
||||||
|
|
||||||
|
for (int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
//if (custom_keys[i].enabled)
|
||||||
|
{
|
||||||
|
UILabel* v = [[UILabel alloc]initWithFrame:CGRectMake(-1,-1,
|
||||||
|
CUSTOM_KEY_WIDTH*custom_keys[i].hfactor-2.0,
|
||||||
|
CUSTOM_KEY_HEIGHT*custom_keys[i].vfactor-2.0)];
|
||||||
|
// v.text = custom_keys[i].str;
|
||||||
|
v.backgroundColor = custom_keys[i].bgcolor_off;
|
||||||
|
v.layer.borderColor = custom_keys[i].bgcolor_on.CGColor;
|
||||||
|
v.layer.borderWidth = 1.0;
|
||||||
|
// v.textColor = [UIColor redColor];
|
||||||
|
KBDController *pKbd = [pManager getEmulatorView].kbdc;
|
||||||
|
v.textAlignment = UITextAlignmentCenter;
|
||||||
|
[v.layer setCornerRadius:6];
|
||||||
|
[pKbd.view addSubview:v];
|
||||||
|
custom_keys[i].view=v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void fade_custom_keys(float _alpha)
|
||||||
|
{
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
if (custom_keys[i].view)
|
||||||
|
custom_keys[i].view.alpha = _alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void touch_begin_custom_key(CGPoint p, int nbtap)
|
||||||
|
{
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
UILabel* v = custom_keys[i].view;
|
||||||
|
if (custom_keys[i].view.hidden == true )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CGRect r =v.frame;
|
||||||
|
if (CGRectContainsPoint(r,p))
|
||||||
|
{
|
||||||
|
// j'interromps le déplacement
|
||||||
|
if (inputMode & INPUTMODE_PAD)
|
||||||
|
{
|
||||||
|
setLeft(UP);
|
||||||
|
setRight(UP);
|
||||||
|
}
|
||||||
|
|
||||||
|
int code = custom_keys[i].code & 0xFF;
|
||||||
|
// printf("code %x down nbtap:%d\n",code,nbtap);
|
||||||
|
|
||||||
|
|
||||||
|
if (nbtap==2 && inputMode & INPUTMODE_BOWONDOUBLETAP)
|
||||||
|
{
|
||||||
|
if ( is_player_standing() || is_player_about_to_stand() )
|
||||||
|
{
|
||||||
|
// printf("about to bow\n");
|
||||||
|
setSpace(UP);
|
||||||
|
setB(DOWN); // Up is automatic
|
||||||
|
continue ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code==0x31)
|
||||||
|
setSpace(DOWN);
|
||||||
|
else
|
||||||
|
add_event_key(code ,0);
|
||||||
|
|
||||||
|
// v.backgroundColor = custom_keys[i].bgcolor_over;
|
||||||
|
v.layer.borderColor = custom_keys[i].bgcolor_over.CGColor;
|
||||||
|
custom_keys[i].status = 1;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void touch_end_custom_key()
|
||||||
|
{
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
if (!custom_keys[i].status )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
[UIView beginAnimations:nil context:NULL];
|
||||||
|
[UIView setAnimationDuration:0.2];
|
||||||
|
// custom_keys[i].view.backgroundColor=custom_keys[i].bgcolor_off;
|
||||||
|
custom_keys[i].view.layer.borderColor = custom_keys[i].bgcolor_on.CGColor;
|
||||||
|
[UIView commitAnimations];
|
||||||
|
|
||||||
|
int code = custom_keys[i].code & 0xFF;
|
||||||
|
|
||||||
|
if (code==0x31)
|
||||||
|
setSpace(UP);
|
||||||
|
else
|
||||||
|
add_event_key(code,1);
|
||||||
|
|
||||||
|
custom_keys[i].status = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggle_custom_keys(int _mode, int _hide)
|
||||||
|
{
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
if (custom_keys[i].mode & _mode)
|
||||||
|
custom_keys[i].view.hidden = _hide;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void show_custom_keys(CGRect _rv, int _mode, int _centery)
|
||||||
|
{
|
||||||
|
|
||||||
|
// KBDController *pKbd = [pManager getEmulatorView].kbdc;
|
||||||
|
CGSize screen = _rv.size;
|
||||||
|
|
||||||
|
// reset la position
|
||||||
|
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
if (!(custom_keys[i].mode & _mode))
|
||||||
|
custom_keys[i].view.hidden = true;
|
||||||
|
else
|
||||||
|
custom_keys[i].view.hidden = false;
|
||||||
|
|
||||||
|
|
||||||
|
UILabel* v = custom_keys[i].view;
|
||||||
|
CGRect r = v.frame;
|
||||||
|
r.origin.x = -1;
|
||||||
|
r.origin.y = -1;
|
||||||
|
[v setFrame:r];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int done;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
done = 1;
|
||||||
|
|
||||||
|
for(int i=0;i<nb_custom_keys;i++)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
if (!(custom_keys[i].mode & _mode))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
|
UILabel* v = custom_keys[i].view;
|
||||||
|
CGRect r = v.frame;
|
||||||
|
if (r.origin.x != -1 && r.origin.y != -1 )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
float refx=-1;
|
||||||
|
float refy=-1;
|
||||||
|
|
||||||
|
int ihref = -1;
|
||||||
|
if (custom_keys[i].halign & LEFT_BORDER)
|
||||||
|
refx = 0;
|
||||||
|
else
|
||||||
|
if (custom_keys[i].halign & RIGHT_BORDER)
|
||||||
|
refx = screen.width;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ihref= custom_keys[i].halign&0xFF;
|
||||||
|
refx = custom_keys[ihref].view.frame.origin.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ivref = -1;
|
||||||
|
if (custom_keys[i].valign & BOTTOM_BORDER)
|
||||||
|
refy = screen.height;
|
||||||
|
else
|
||||||
|
if (custom_keys[i].valign & VERTICAL_CENTER)
|
||||||
|
{
|
||||||
|
refy = _centery - CUSTOM_KEY_HEIGHT*custom_keys[i].vfactor/2;
|
||||||
|
/*
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
|
||||||
|
refy = screen.height ;
|
||||||
|
else
|
||||||
|
refy = (screen.height - CUSTOM_KEY_HEIGHT*custom_keys[i].vfactor)/2;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ivref= custom_keys[i].valign&0xFF;
|
||||||
|
refy = custom_keys[ivref].view.frame.origin.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (custom_keys[i].halign & LEFT_ALIGN && refx!=-1)
|
||||||
|
refx += CUSTOM_KEY_WIDTH*custom_keys[ihref].hfactor;
|
||||||
|
|
||||||
|
if (custom_keys[i].halign & LEFTCENTER_ALIGN && refx!=-1)
|
||||||
|
refx += CUSTOM_KEY_WIDTH*custom_keys[ihref].hfactor*0.5;
|
||||||
|
|
||||||
|
if (custom_keys[i].halign & RIGHT_ALIGN && refx!=-1)
|
||||||
|
refx -= CUSTOM_KEY_WIDTH*custom_keys[i].hfactor;
|
||||||
|
|
||||||
|
if (custom_keys[i].valign & TOP_ALIGN && refy!=-1)
|
||||||
|
refy -= CUSTOM_KEY_HEIGHT*custom_keys[i].vfactor;
|
||||||
|
if (custom_keys[i].valign & BOTTOM_ALIGN && refy!=-1)
|
||||||
|
refy += CUSTOM_KEY_HEIGHT*custom_keys[ivref].vfactor;
|
||||||
|
if (custom_keys[i].valign & MIDDLE_BOTTOM && refy!=-1)
|
||||||
|
refy += CUSTOM_KEY_HEIGHT*custom_keys[ivref].vfactor/2;
|
||||||
|
|
||||||
|
int mod=0;
|
||||||
|
if (refx!=-1 && r.origin.x ==-1)
|
||||||
|
{
|
||||||
|
mod = 1;
|
||||||
|
r.origin.x = refx;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (refy!=-1 && r.origin.y ==-1)
|
||||||
|
{
|
||||||
|
mod = 1;
|
||||||
|
r.origin.y = refy;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( mod )
|
||||||
|
{
|
||||||
|
// NSLog(@"key:%d ->x:%f, y:%f",i,refx,refy);
|
||||||
|
[v setFrame:r];
|
||||||
|
}
|
||||||
|
|
||||||
|
done = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (!done);
|
||||||
|
|
||||||
|
}
|
181
Common.iphone/activegsAppDelegate.h
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <QuartzCore/CAAnimation.h>
|
||||||
|
#include "../Common.osx/CEmulatorCtrlMac.h"
|
||||||
|
|
||||||
|
#define IPHONETHUMB "thumb"
|
||||||
|
|
||||||
|
#ifdef USE_CAPPTAIN
|
||||||
|
#import "../Libraries/CapptainSDK/Headers/CapptainAgent.h"
|
||||||
|
#import "../Libraries/CapptainSDK/Headers/CapptainViewController.h"
|
||||||
|
#define UIVIEWCONTROLLERROOT CapptainViewController
|
||||||
|
#else
|
||||||
|
#define UIVIEWCONTROLLERROOT UIViewController
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@interface ActiveGSBaseViewController : UIViewController
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//- (void) update;
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
//#import "activegsList.h"
|
||||||
|
#import "activegsEmulatorController.h"
|
||||||
|
|
||||||
|
|
||||||
|
//#import "activegsViewController.h"
|
||||||
|
#import "infoViewController.h"
|
||||||
|
#import "detailViewController.h"
|
||||||
|
|
||||||
|
#ifdef USE_GOOGLEANALYTICS
|
||||||
|
#import "../Libraries/GoogleAnalytics/GAI.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#import "activeGSViewController.h"
|
||||||
|
#define ACTIVEGS_LAUNCHVIEWCONTROLLER activegsViewController
|
||||||
|
|
||||||
|
#ifdef BESTOFFTA
|
||||||
|
#define ACTIVEGS_TITLE "ActiveGS - Best Of FTA"
|
||||||
|
#define ACTIVEGS_CAPPTAINAPP "act384142"
|
||||||
|
#define ACTIVEGS_CAPPTAINKEY "376e71d41db2422c88e1486a8a31e25b"
|
||||||
|
#define ACTIVEGS_BACKGROUNDIMAGE "Default"
|
||||||
|
#define ACTIVEGS_FIRSTTABLIST "list"
|
||||||
|
#define ACTIVEGS_FIRSTTABTITLE "Best Of FTA"
|
||||||
|
#define ACTIVEGS_FIRSTTABTRACKER "BestOfFta"
|
||||||
|
#define ACTIVEGS_FIRSTTABICON "BestOfFta"
|
||||||
|
#define ACTIVEGS_SINGLETAB // Une seule liste sera affichée
|
||||||
|
#define ACTIVEGS_IMAGEREQUIRED // On ne peut pas lancer l'émulateur sans image
|
||||||
|
#define ACTIVEGS_NOAPPLEBRANDING // Eliminer les logos Apple 2 & Apple 2GS
|
||||||
|
#define ACTIVEGS_NOHARDWAREKEYBOARDETECTION // Pour passer la soumission Appstore
|
||||||
|
#define ACTIVEGS_NOTIFICATION
|
||||||
|
#define HANDLE_URL
|
||||||
|
|
||||||
|
#elif ACTIVEGSKARATEKA
|
||||||
|
#error unsupported
|
||||||
|
|
||||||
|
#elif BESTOF
|
||||||
|
#define ACTIVEGS_TITLE "ActiveGS - BestOf"
|
||||||
|
#define ACTIVEGS_CAPPTAINAPP "act037442"
|
||||||
|
#define ACTIVEGS_CAPPTAINKEY "881708d1abb44dbb97fcb0620b3f4ef0"
|
||||||
|
#define ACTIVEGS_BACKGROUNDIMAGE "karatekalaunch"
|
||||||
|
#define ACTIVEGS_FIRSTTABLIST "bestof"
|
||||||
|
#define ACTIVEGS_FIRSTTABTITLE "Jordan's"
|
||||||
|
#define ACTIVEGS_FIRSTTABICON "Tab2GS"
|
||||||
|
#define ACTIVEGS_FIRSTTABTRACKER "JM"
|
||||||
|
|
||||||
|
#else
|
||||||
|
// Default ACTIVEGS
|
||||||
|
#define ACTIVEGS_TITLE "ActiveGS"
|
||||||
|
#define ACTIVEGS_CAPTAINAPP "act651309"
|
||||||
|
#define ACTIVEGS_CAPTAINKEY "26ae7a388bf74c8c993d78bebb63fc41"
|
||||||
|
#undef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
#define ACTIVEGS_ENABLE_DOCUMENT
|
||||||
|
#define ACTIVEGS_NOTIFICATION
|
||||||
|
//#define ACTIVEGS_MANUAL_ROM
|
||||||
|
#define ACTIVEGS_SAVELASTTAB
|
||||||
|
#define ACTIVEGS_FIRSTTABLIST "list"
|
||||||
|
#define ACTIVEGS_FIRSTTABTITLE "Best Of FTA"
|
||||||
|
#define ACTIVEGS_FIRSTTABTRACKER "BestOfFta"
|
||||||
|
#define ACTIVEGS_FIRSTTABICON "TabFTA"
|
||||||
|
#define HANDLE_URL
|
||||||
|
#define ACTIVEGS_NOHARDWAREKEYBOARDETECTION // Pour passer la soumission Appstore
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define BARVIEW_HEIGHT 44
|
||||||
|
|
||||||
|
//extern UIView* backgroundView;
|
||||||
|
//extern UIImageView* backgroundImageView;
|
||||||
|
|
||||||
|
extern CEmulatorMac* pMac;
|
||||||
|
extern CEmulatorConfig config;
|
||||||
|
|
||||||
|
enum machineSpecsEnum
|
||||||
|
{
|
||||||
|
SPEC_DEFAULT=0,
|
||||||
|
FPS_60HZ = 1,
|
||||||
|
AUDIO_44KHZ = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
extern enum machineSpecsEnum machineSpecs;
|
||||||
|
|
||||||
|
@interface activegsAppDelegate : NSObject <UIApplicationDelegate,UIAlertViewDelegate> {
|
||||||
|
UIWindow *_window;
|
||||||
|
UIWindow *_secondaryWindow;
|
||||||
|
|
||||||
|
UILabel* _notificationView;
|
||||||
|
UIViewController* _primaryViewController ;
|
||||||
|
UIViewController* _secondaryViewController ;
|
||||||
|
UIView* _backgroundView;
|
||||||
|
UIImageView* _backgroundImageView ;
|
||||||
|
|
||||||
|
|
||||||
|
//controllers
|
||||||
|
activegsEmulatorController* _emulatorController;
|
||||||
|
ACTIVEGS_LAUNCHVIEWCONTROLLER* _viewController;
|
||||||
|
infoViewController* _infoController;
|
||||||
|
detailViewController* _detailController ;
|
||||||
|
float _currentRawReading;
|
||||||
|
float _dpiRatio ;
|
||||||
|
float _resolutionRatio;
|
||||||
|
NSTimer* _notificationTimer;
|
||||||
|
UIScreen* _secondaryScreen;
|
||||||
|
UIScreen* _primaryScreen;
|
||||||
|
UIDeviceOrientation curOrientation;
|
||||||
|
@public
|
||||||
|
MyString firstTabXML;
|
||||||
|
#ifdef USE_GOOGLEANALYTICS
|
||||||
|
id<GAITracker> GAITrackerActiveGS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void) screenDidConnect:(NSNotification *)notification;
|
||||||
|
-(void) initSecondaryScreen:(UIScreen*) _screen;
|
||||||
|
-(bool) hasSecondary;
|
||||||
|
-(void)setSecondaryInputMode;
|
||||||
|
|
||||||
|
|
||||||
|
- (void) doStateChange:(UIViewController*)_viewController type:(NSString*)_type sens:(NSString*)_sens;
|
||||||
|
-(void)launchDiskImage:(ActiveGSElement*)_element pathname:(const char*)_pathname trackername:(const char*)_trackername;
|
||||||
|
- (void) didRotate:(NSNotification *)notification;
|
||||||
|
-(void)firstLaunch:(NSTimer*)timer;
|
||||||
|
-(void)setNotificationText:(NSString*) _text;
|
||||||
|
-(void)updateNotificationView:(CGRect) newRect;
|
||||||
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
|
||||||
|
@property(nonatomic,retain,getter=getEmulatorView) activegsEmulatorController* emulatorController;
|
||||||
|
@property(nonatomic,retain,getter=getBrowserView) ACTIVEGS_LAUNCHVIEWCONTROLLER* viewController;
|
||||||
|
@property(nonatomic,retain,getter=getInfoView) infoViewController* infoController;
|
||||||
|
@property(nonatomic,retain,getter=getDetailView) detailViewController* detailController;
|
||||||
|
@property(nonatomic,retain) UIViewController* primaryViewController;
|
||||||
|
@property(nonatomic,retain) UIViewController* secondaryViewController;
|
||||||
|
@property(nonatomic,retain) UIView* backgroundView;
|
||||||
|
@property(nonatomic,retain) UIImageView* backgroundImageView ;
|
||||||
|
@property(nonatomic,retain) UIScreen* secondaryScreen ;
|
||||||
|
@property(nonatomic,retain) UIScreen* primaryScreen ;
|
||||||
|
|
||||||
|
@property(nonatomic,retain) NSTimer* notificationTimer;
|
||||||
|
@property(nonatomic,retain) UILabel* notificationView;
|
||||||
|
@property(assign,getter=getAngle) float currentRawReading;
|
||||||
|
@property (nonatomic, retain)/* IBOutlet*/ UIWindow *window;
|
||||||
|
@property (nonatomic, retain) UIWindow *secondaryWindow;
|
||||||
|
@property(assign) float dpiRatio;
|
||||||
|
@property(assign) float resolutionRatio;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
extern activegsAppDelegate* pManager;
|
902
Common.iphone/activegsAppDelegate.mm
Normal file
@ -0,0 +1,902 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#include "../Common/svnversion.h"
|
||||||
|
#include "../Kegs/Src/adb.h"
|
||||||
|
#include "../Kegs/Src/sim65816.h"
|
||||||
|
#include "../Kegs/Src/driver.h"
|
||||||
|
#include "../Common/ki.h"
|
||||||
|
#import <AudioToolbox/AudioToolbox.h>
|
||||||
|
#include "asynccommand.h"
|
||||||
|
#import <sys/utsname.h>
|
||||||
|
|
||||||
|
// Application Singleton
|
||||||
|
activegsAppDelegate* pManager = nil;
|
||||||
|
|
||||||
|
//int runningOnIOS_3_2 = 0;
|
||||||
|
enum machineSpecsEnum machineSpecs = SPEC_DEFAULT;
|
||||||
|
|
||||||
|
CEmulatorMac* pMac = NULL;
|
||||||
|
CEmulatorConfig config;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
// #define TEST_HANDLE_URL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ENABLE_AIRPLAY
|
||||||
|
|
||||||
|
MyString resourcesPath;
|
||||||
|
|
||||||
|
int padAlreadyDisplayedOnce = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// mets à jour le framerate
|
||||||
|
extern char estimatedSpeed[256];
|
||||||
|
extern int getFrameRate(int _id);
|
||||||
|
void x_update_framerate()
|
||||||
|
{
|
||||||
|
char str[256];
|
||||||
|
sprintf(str,"req:%d fps:%d speed:%s",getFrameRate(1),getFrameRate(0),estimatedSpeed);
|
||||||
|
[[pManager getEmulatorView].kbdc setDebugIndicatorText:str];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void activegs_apply_default_options(void* _config)
|
||||||
|
{
|
||||||
|
namevalue* options = ((COption*)_config)->options;
|
||||||
|
|
||||||
|
if (machineSpecs & FPS_60HZ)
|
||||||
|
options[OPTION_FRAMERATE].intvalue = 60;
|
||||||
|
else
|
||||||
|
options[OPTION_FRAMERATE].intvalue = 20;
|
||||||
|
|
||||||
|
|
||||||
|
if (machineSpecs & AUDIO_44KHZ)
|
||||||
|
options[OPTION_AUDIORATE].intvalue = 44100;
|
||||||
|
else
|
||||||
|
options[OPTION_AUDIORATE].intvalue = 22050;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void x_notify_eject()
|
||||||
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
[[pManager getEmulatorView].kbdc performSelectorOnMainThread:@selector(animateDiskEjection:) withObject:nil waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void x_set_video_fx(videofxenum _vfx)
|
||||||
|
{
|
||||||
|
[pManager getEmulatorView].zv.crt.hidden = (_vfx==VIDEOFX_CRT?0:1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void x_notify_paddle(int _on)
|
||||||
|
{
|
||||||
|
|
||||||
|
// only once per view
|
||||||
|
if (padAlreadyDisplayedOnce)
|
||||||
|
return;
|
||||||
|
|
||||||
|
printf("x_notify_paddle");
|
||||||
|
padAlreadyDisplayedOnce = 1;
|
||||||
|
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
[[pManager getEmulatorView].kbdc performSelectorOnMainThread:@selector(notifyPaddle:) withObject:nil waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void x_notify_download_failure(const char*_url)
|
||||||
|
{
|
||||||
|
printf("download failed : %s\n",_url);
|
||||||
|
x_display_alert(0,"Downloading Failed" ,"Check your Internet Connection!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void x_loadinginprogress(int _on,int _s,int _d)
|
||||||
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
|
||||||
|
_d --;
|
||||||
|
int param = (_s==5 ? _d : _d +2 );
|
||||||
|
if (_on) param |= 0x80;
|
||||||
|
|
||||||
|
NSNumber* b = [NSNumber numberWithInt:param] ;
|
||||||
|
[[pManager getEmulatorView].kbdc performSelectorOnMainThread:@selector(setLoading:) withObject:b waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
}
|
||||||
|
|
||||||
|
void x_refresh_panel(int _panel)
|
||||||
|
{
|
||||||
|
if (!_panel & PANEL_RUNTIME) return ;
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
[[pManager getEmulatorView].kbdc performSelectorOnMainThread:@selector(refreshControls:) withObject:nil waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
}
|
||||||
|
|
||||||
|
void x_downloadinginprogress(int _percent)
|
||||||
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
NSNumber* b = [NSNumber numberWithInt:_percent];
|
||||||
|
[[pManager getEmulatorView].kbdc performSelectorOnMainThread:@selector(setDownLoading:) withObject:b waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
}
|
||||||
|
|
||||||
|
int alertAbort;
|
||||||
|
MyString alertTitle;
|
||||||
|
MyString alertMessage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void x_init_persistent_path(MyString& hp)
|
||||||
|
{
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
NSArray *paths= NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||||
|
NSString *dir = [paths objectAtIndex:0];
|
||||||
|
const char *bar = [dir UTF8String];
|
||||||
|
CFStringRef sd = __CFStringMakeConstantString(bar);
|
||||||
|
hp= CFStringGetCStringPtr(sd,CFStringGetSystemEncoding());
|
||||||
|
|
||||||
|
[pool release];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@implementation ActiveGSBaseViewController
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation activegsAppDelegate
|
||||||
|
|
||||||
|
@synthesize emulatorController = _emulatorController;
|
||||||
|
@synthesize viewController = _viewController;
|
||||||
|
@synthesize infoController = _infoController;
|
||||||
|
@synthesize detailController = _detailController;
|
||||||
|
@synthesize currentRawReading = _currentRawReading;
|
||||||
|
@synthesize window = _window;
|
||||||
|
@synthesize secondaryWindow = _secondaryWindow;
|
||||||
|
@synthesize dpiRatio = _dpiRatio;
|
||||||
|
@synthesize resolutionRatio = _resolutionRatio;
|
||||||
|
@synthesize notificationTimer = _notificationTimer;
|
||||||
|
@synthesize notificationView = _notificationView;
|
||||||
|
@synthesize primaryViewController = _primaryViewController;
|
||||||
|
@synthesize secondaryViewController = _secondaryViewController;
|
||||||
|
@synthesize primaryScreen = _primaryScreen;
|
||||||
|
@synthesize secondaryScreen = _secondaryScreen;
|
||||||
|
@synthesize backgroundView = _backgroundView;
|
||||||
|
@synthesize backgroundImageView = _backgroundImageView;
|
||||||
|
|
||||||
|
|
||||||
|
- (void)displayAlert:(id)sender {
|
||||||
|
|
||||||
|
NSString* strMsg = [NSString stringWithUTF8String:alertMessage.c_str()];
|
||||||
|
NSString* strTitle = [NSString stringWithUTF8String:alertTitle.c_str()];
|
||||||
|
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:strTitle message:strMsg delegate:self cancelButtonTitle:@"Done" otherButtonTitles:nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||||
|
{
|
||||||
|
if (!alertAbort)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
// quite l'émulateur & revient au menu principal
|
||||||
|
if (pMac)
|
||||||
|
{
|
||||||
|
delete pMac;
|
||||||
|
pMac = NULL;
|
||||||
|
}
|
||||||
|
[self doStateChange:[self getBrowserView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
|
{
|
||||||
|
CDownload::initPersistentPath();
|
||||||
|
|
||||||
|
MyString dir ;
|
||||||
|
dir = CDownload::getPersistentPath();
|
||||||
|
dir += ACTIVEGS_DIRECTORY_SEPARATOR;
|
||||||
|
dir += IPHONETHUMB;
|
||||||
|
CDownload::createDirectory(dir.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
NSString* resource = [[NSBundle mainBundle] pathForResource:@ACTIVEGS_FIRSTTABLIST ofType:@"activegsxml"] ;
|
||||||
|
self->firstTabXML = [resource UTF8String];
|
||||||
|
|
||||||
|
#define THEVER "/"ACTIVEGS_TITLE "_" TOSTRING(ACTIVEGSMAJOR) "." TOSTRING(ACTIVEGSMINOR) "." TOSTRING(ACTIVEGSBUILD)
|
||||||
|
|
||||||
|
NSString* ver = [NSString stringWithUTF8String:THEVER];
|
||||||
|
NSLog(@"%@",ver);
|
||||||
|
NSString* resPath = [[NSBundle mainBundle] resourcePath];
|
||||||
|
resourcesPath =[resPath UTF8String];
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_GOOGLEANALYTICS
|
||||||
|
// static const NSInteger kGANDispatchPeriodSec = 10;
|
||||||
|
GAITrackerActiveGS = [[GAI sharedInstance ]trackerWithTrackingId:@"UA-89449-3"] ;
|
||||||
|
[GAITrackerActiveGS sendView:ver];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_CAPPTAIN
|
||||||
|
[CapptainAgent registerApp:@ACTIVEGS_CAPTAINAPP identifiedBy:@ACTIVEGS_CAPTAINKEY];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_MANUAL_ROM
|
||||||
|
// setup the rom path (in the main thread)
|
||||||
|
{
|
||||||
|
extern void initRomPath();
|
||||||
|
initRomPath();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Modify global variables to tweak the emulator on iphone
|
||||||
|
g_adb.g_warp_pointer = WARP_POINTER;
|
||||||
|
config.bootslot=7;
|
||||||
|
|
||||||
|
CGRect physicalRect = [[UIScreen mainScreen] bounds];
|
||||||
|
self.window = [[UIWindow alloc] initWithFrame:physicalRect];
|
||||||
|
|
||||||
|
[[UIApplication sharedApplication] setStatusBarHidden:TRUE];
|
||||||
|
|
||||||
|
CGFloat screenScale;
|
||||||
|
|
||||||
|
NSString* systemVer = [[UIDevice currentDevice] systemVersion];
|
||||||
|
NSLog(@"iOS version : %@",systemVer);
|
||||||
|
printf("Min SDK Version : " TOSTRING(__IPHONE_OS_VERSION_MIN_REQUIRED));
|
||||||
|
printf("Max SDK Version : " TOSTRING(__IPHONE_OS_VERSION_MAX_ALLOWED));
|
||||||
|
printf("%f x %f",physicalRect.size.width,physicalRect.size.height);
|
||||||
|
|
||||||
|
struct utsname systemInfo;
|
||||||
|
uname(&systemInfo);
|
||||||
|
|
||||||
|
NSString* platformVer = [NSString stringWithCString:systemInfo.machine
|
||||||
|
encoding:NSUTF8StringEncoding];
|
||||||
|
NSLog(@"iOS platform : %@",platformVer);
|
||||||
|
|
||||||
|
screenScale = [[UIScreen mainScreen] scale];
|
||||||
|
self.dpiRatio = screenScale;
|
||||||
|
|
||||||
|
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
|
||||||
|
self.resolutionRatio = 1.6; // pour que la liste prenne toute la hauteur de l'ipad
|
||||||
|
else
|
||||||
|
self.resolutionRatio = 1.0;
|
||||||
|
|
||||||
|
machineSpecs = SPEC_DEFAULT;
|
||||||
|
|
||||||
|
if (self.resolutionRatio != 1.0 || screenScale != 1.0f)
|
||||||
|
{
|
||||||
|
printf("fps set to 60hz");
|
||||||
|
machineSpecs = (machineSpecsEnum)(machineSpecs | FPS_60HZ);
|
||||||
|
}
|
||||||
|
if ( [platformVer compare:@"iPhone5"]==NSOrderedDescending
|
||||||
|
|| [platformVer compare:@"iPad3"]==NSOrderedDescending )
|
||||||
|
{
|
||||||
|
printf("audio set to 44 khz");
|
||||||
|
machineSpecs = (machineSpecsEnum)(machineSpecs | AUDIO_44KHZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
self.currentRawReading = -90; // default mode = portrait
|
||||||
|
pManager = self;
|
||||||
|
|
||||||
|
|
||||||
|
extern void activegs_driver();
|
||||||
|
g_driver.init(activegs_driver);
|
||||||
|
g_driver.x_apply_default_options = activegs_apply_default_options;
|
||||||
|
option.initOptions();
|
||||||
|
|
||||||
|
self.emulatorController = [[activegsEmulatorController alloc] init ] ; // =retain
|
||||||
|
self.detailController = [[detailViewController alloc] init] ; // =retain
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NSString* infoXB = @"infoViewController";
|
||||||
|
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
|
||||||
|
infoXB = [infoXB stringByAppendingString:@"-ipad"];
|
||||||
|
|
||||||
|
NSLog(@"Trying to load %@",infoXB);
|
||||||
|
self.infoController = [[infoViewController alloc] initWithNibName:infoXB bundle:nil ]; // =retain
|
||||||
|
|
||||||
|
self.viewController = [[ACTIVEGS_LAUNCHVIEWCONTROLLER alloc] init ]; // =retain
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(didRotate:)
|
||||||
|
name:@"UIDeviceOrientationDidChangeNotification" object:nil];
|
||||||
|
|
||||||
|
// ajoute la détection de l"
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(screenDidConnect:)
|
||||||
|
name:@"UIScreenDidConnectNotification" object:nil];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(screenDidDisconnect:)
|
||||||
|
name:@"UIScreenDidDisconnectNotification" object:nil];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
NSString* imgPath = @ACTIVEGS_BACKGROUNDIMAGE;
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
|
||||||
|
imgPath = [imgPath stringByAppendingString:@"-ipad"];
|
||||||
|
|
||||||
|
NSString *backgroundPath = [[NSBundle mainBundle] pathForResource:imgPath ofType:@"png"];
|
||||||
|
UIImage* background = [UIImage imageWithContentsOfFile: backgroundPath] ;
|
||||||
|
self.backgroundImageView = [[UIImageView alloc ]initWithImage:background];
|
||||||
|
CGRect r = [UIScreen mainScreen].applicationFrame;
|
||||||
|
|
||||||
|
self.backgroundView = [[UIView alloc ] initWithFrame:r];
|
||||||
|
self.backgroundView.backgroundColor = [UIColor whiteColor];
|
||||||
|
[self.backgroundView addSubview:self.backgroundImageView];
|
||||||
|
[self.window addSubview:self.backgroundView];
|
||||||
|
;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
self.notificationView = [[[UILabel alloc] initWithFrame:CGRectMake(8,48,200,32)] autorelease];
|
||||||
|
|
||||||
|
|
||||||
|
self.notificationView.alpha=0.0;
|
||||||
|
self.notificationView.textColor =[UIColor blackColor];
|
||||||
|
self.notificationView.backgroundColor = [UIColor grayColor];
|
||||||
|
self.notificationView.layer.borderColor = [[UIColor whiteColor] CGColor];
|
||||||
|
self.notificationView.layer.borderWidth = 1;
|
||||||
|
self.notificationView.layer.cornerRadius = 5;
|
||||||
|
self.notificationView.font = [UIFont systemFontOfSize:16];
|
||||||
|
self.notificationView.textAlignment = UITextAlignmentCenter;
|
||||||
|
|
||||||
|
[[pManager getBrowserView] updateView ];
|
||||||
|
|
||||||
|
[self.window makeKeyAndVisible];
|
||||||
|
|
||||||
|
#ifdef HANDLE_URL
|
||||||
|
|
||||||
|
# ifdef TEST_HANDLE_URL
|
||||||
|
[self application:nil openURL:nil sourceApplication:nil annotation:nil];
|
||||||
|
return YES;
|
||||||
|
# else
|
||||||
|
NSURL* url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
|
||||||
|
if (url)
|
||||||
|
{
|
||||||
|
printf("will launch url %@",url);
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
|
||||||
|
//pour laisser le temps à ma view "splashscreen" de s'afficher
|
||||||
|
[self performSelectorOnMainThread:@selector(firstLaunch:) withObject:nil waitUntilDone:NO];
|
||||||
|
#else
|
||||||
|
|
||||||
|
[self firstLaunch:nil];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ready to accept option
|
||||||
|
return NO;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)firstLaunch:(NSTimer*)timer
|
||||||
|
{
|
||||||
|
[self doStateChange:[self getBrowserView] type:kCATransitionFade sens:kCATransitionFromRight];
|
||||||
|
|
||||||
|
self.primaryScreen = [UIScreen mainScreen];
|
||||||
|
self.secondaryScreen =[UIScreen mainScreen];
|
||||||
|
|
||||||
|
NSUInteger nbscreen =[[UIScreen screens] count];
|
||||||
|
printf("nbscreen:%d\n",nbscreen);
|
||||||
|
if (nbscreen>1)
|
||||||
|
{
|
||||||
|
[self initSecondaryScreen:[[UIScreen screens]objectAtIndex:1]];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)launchDiskImage:(ActiveGSElement*)_element pathname:(const char*)_pathname trackername:(const char*)_trackername;
|
||||||
|
{
|
||||||
|
|
||||||
|
// détruit l'émulateur pour qu'il redémarre
|
||||||
|
if (pMac)
|
||||||
|
{
|
||||||
|
pMac->terminateEmulator();
|
||||||
|
delete pMac ;
|
||||||
|
pMac = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
config.resetConfig(); // remets les valeur par défault
|
||||||
|
|
||||||
|
|
||||||
|
// config.xmlconfig = pt.c_str();
|
||||||
|
getdir(_pathname,config.baseURL);
|
||||||
|
config.pXML = _element->pXML;
|
||||||
|
config.visibleName = _element->name.c_str();
|
||||||
|
|
||||||
|
//is2GS = _element->is2GS;
|
||||||
|
|
||||||
|
NSString* ntr = [NSString stringWithUTF8String:_trackername];
|
||||||
|
NSString* nid = [NSString stringWithUTF8String:_element->theid.c_str()];
|
||||||
|
|
||||||
|
// statistique sur les images
|
||||||
|
NSString* track = [NSString stringWithFormat:@"/%@/%@",ntr,nid];
|
||||||
|
NSLog(@"Launching : %@",track);
|
||||||
|
#ifdef USE_CAPPTAIN
|
||||||
|
[[pManager getEmulatorView] setTrackerName:track];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_GOOGLEANALYTICS
|
||||||
|
[pManager->GAITrackerActiveGS sendView:track];
|
||||||
|
#endif
|
||||||
|
// affichera le pad si une application le demande
|
||||||
|
padAlreadyDisplayedOnce=0;
|
||||||
|
|
||||||
|
|
||||||
|
// redémarre l'émulateur
|
||||||
|
[pManager doStateChange:[pManager getEmulatorView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void) doStateChange:(ACTIVEGS_LAUNCHVIEWCONTROLLER*)_newViewController type:(NSString*)_type sens:(NSString*)_sens
|
||||||
|
{
|
||||||
|
debug_printf("changing view\n");
|
||||||
|
|
||||||
|
if ([self.window rootViewController ] == _newViewController)
|
||||||
|
{
|
||||||
|
printf("same root");
|
||||||
|
[_newViewController viewWillAppear:FALSE];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// set up an animation for the transition between the views on 1 screen configuration
|
||||||
|
if (1)// [self hasSecondary]==false || _newViewController != (UIViewController*)[pManager getEmulatorView])
|
||||||
|
{
|
||||||
|
|
||||||
|
CATransition *animation = [CATransition animation];
|
||||||
|
[animation setDuration:0.3];
|
||||||
|
[animation setType:_type /*kCATransitionPush*/];
|
||||||
|
|
||||||
|
|
||||||
|
if (self.primaryViewController)
|
||||||
|
[self.primaryViewController.view removeFromSuperview];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (self.backgroundView)
|
||||||
|
[self.backgroundView removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.notificationView removeFromSuperview];
|
||||||
|
[_newViewController.view addSubview:self.notificationView];
|
||||||
|
|
||||||
|
[self.window setRootViewController:_newViewController];
|
||||||
|
|
||||||
|
// required for IOS4.3
|
||||||
|
[self.window makeKeyAndVisible];
|
||||||
|
|
||||||
|
|
||||||
|
self.primaryViewController = _newViewController;
|
||||||
|
|
||||||
|
|
||||||
|
debug_printf("finalizing view\n");
|
||||||
|
if (self.primaryViewController == (UIViewController*)[pManager getEmulatorView])
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// enleve toute l'interface
|
||||||
|
[[pManager getEmulatorView].kbdc hideInput];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Réajuste le sens de l'animation en fonction de l'orientation du mobile
|
||||||
|
//UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
|
||||||
|
switch(curOrientation)
|
||||||
|
{
|
||||||
|
case UIDeviceOrientationPortrait:
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationPortraitUpsideDown:
|
||||||
|
if (_sens == kCATransitionFromRight)
|
||||||
|
_sens = kCATransitionFromLeft;
|
||||||
|
else
|
||||||
|
_sens = kCATransitionFromRight;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationLandscapeLeft:
|
||||||
|
if (_sens == kCATransitionFromRight)
|
||||||
|
_sens = kCATransitionFromTop;
|
||||||
|
else
|
||||||
|
_sens = kCATransitionFromBottom;
|
||||||
|
break;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationLandscapeRight:
|
||||||
|
if (_sens != kCATransitionFromRight)
|
||||||
|
_sens = kCATransitionFromTop;
|
||||||
|
else
|
||||||
|
_sens = kCATransitionFromBottom;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
[animation setSubtype:_sens];
|
||||||
|
[[self.window layer] addAnimation:animation forKey:@"SwitchToView1"];
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// setting up the secondary screen
|
||||||
|
if (self.secondaryViewController)
|
||||||
|
[self.secondaryViewController.view removeFromSuperview];
|
||||||
|
self.secondaryViewController = _newViewController;
|
||||||
|
[self.secondaryWindow addSubview:_newViewController.view];
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
printf("manual rotate");
|
||||||
|
[self didRotate:nil];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)updateNotificationView:(CGRect) newRect
|
||||||
|
{
|
||||||
|
#define NOTIFICATION_WIDTH 240.0f
|
||||||
|
#define NOTIFICATION_HEIGHT 32.0f
|
||||||
|
|
||||||
|
CGRect r ;
|
||||||
|
|
||||||
|
|
||||||
|
r = CGRectMake(
|
||||||
|
(newRect.size.width-NOTIFICATION_WIDTH)/2,
|
||||||
|
(newRect.size.height-NOTIFICATION_HEIGHT)/2,
|
||||||
|
NOTIFICATION_WIDTH,
|
||||||
|
NOTIFICATION_HEIGHT
|
||||||
|
);
|
||||||
|
|
||||||
|
[self.notificationView setFrame:r];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)setNotificationText:(NSString*) _text
|
||||||
|
{
|
||||||
|
|
||||||
|
NSLog(@"### %@",_text);
|
||||||
|
#ifdef ACTIVEGS_NOTIFICATION
|
||||||
|
|
||||||
|
[self.notificationView.layer removeAllAnimations];
|
||||||
|
[self.notificationTimer invalidate];
|
||||||
|
|
||||||
|
self.notificationView.text = _text;
|
||||||
|
|
||||||
|
[UIView beginAnimations:nil context:NULL];
|
||||||
|
[UIView setAnimationDuration:0.3];
|
||||||
|
self.notificationView.alpha=1.0;
|
||||||
|
[UIView commitAnimations];
|
||||||
|
|
||||||
|
self.notificationTimer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(dismissNotification:) userInfo:nil repeats:NO];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
-(void)dismissNotification:(id)_obj
|
||||||
|
{
|
||||||
|
[UIView beginAnimations:nil context:NULL];
|
||||||
|
[UIView setAnimationDuration:0.3];
|
||||||
|
self.notificationView.alpha=0.0;
|
||||||
|
[UIView commitAnimations];
|
||||||
|
self.notificationTimer= nil;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void) screenDidConnect:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
NSLog(@"Screen did connect");
|
||||||
|
UIScreen* screen = [notification object];
|
||||||
|
[self initSecondaryScreen:screen];
|
||||||
|
|
||||||
|
// revient au menu principal si on ne l'était pas
|
||||||
|
/*
|
||||||
|
if (self.primaryViewController == [pManager getEmulatorView])
|
||||||
|
{
|
||||||
|
|
||||||
|
[self doStateChange:[self getBrowserView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) screenDidDisconnect:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
NSLog(@"screenDidDisconnect");
|
||||||
|
/*
|
||||||
|
UIScreen* screen = [notification object];
|
||||||
|
if (screen == self.secondaryScreen)
|
||||||
|
*/
|
||||||
|
activegsEmulatorController* a = [pManager getEmulatorView];
|
||||||
|
if (a && a->attachedTo == ATTACH_SECONDARY)
|
||||||
|
{
|
||||||
|
NSLog(@"about to detach secondary");
|
||||||
|
|
||||||
|
self.secondaryScreen = self.primaryScreen;
|
||||||
|
self.secondaryWindow.hidden = YES;
|
||||||
|
[self.secondaryWindow release];
|
||||||
|
self.secondaryWindow = nil;
|
||||||
|
|
||||||
|
[a updateView];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self setNotificationText:@"Airplay Disconnected"];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void) initSecondaryScreen:(UIScreen*) _screen
|
||||||
|
{
|
||||||
|
[self setNotificationText:@"Airplay Detected"];
|
||||||
|
|
||||||
|
#ifdef ENABLE_AIRPLAY
|
||||||
|
self.secondaryScreen = _screen;
|
||||||
|
CGRect frame = _screen.bounds;
|
||||||
|
printf("SecondaryScreen size %d x %d",(int)frame.size.width,(int)frame.size.height);
|
||||||
|
|
||||||
|
self.secondaryWindow = [[UIWindow alloc] initWithFrame:frame];
|
||||||
|
[self.secondaryWindow setScreen:_screen];
|
||||||
|
self.secondaryWindow.hidden = NO;
|
||||||
|
#endif
|
||||||
|
activegsEmulatorController* a = [pManager getEmulatorView];
|
||||||
|
[a updateView];
|
||||||
|
// [pManager setSecondaryInputMode];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)setSecondaryInputMode
|
||||||
|
{
|
||||||
|
NSLog(@"setSecondaryInputMode");
|
||||||
|
[[pManager getEmulatorView].kbdc setInputMode:INPUTMODE_ACCESS+INPUTMODE_KBD];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(bool) hasSecondary
|
||||||
|
{
|
||||||
|
return self.secondaryWindow != nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void) didRotate:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
UIViewController *v = self.primaryViewController;
|
||||||
|
if (v==nil)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
|
||||||
|
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
|
||||||
|
/*
|
||||||
|
BOOL valid = [v shouldAutorotateToInterfaceOrientation:orientation];
|
||||||
|
if (valid==NO)
|
||||||
|
{
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
float oldRotate = self.currentRawReading;
|
||||||
|
|
||||||
|
switch(orientation)
|
||||||
|
{
|
||||||
|
case UIDeviceOrientationPortrait:
|
||||||
|
NSLog(@"UIDeviceOrientationPortrait");
|
||||||
|
self.currentRawReading = -90;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationPortraitUpsideDown:
|
||||||
|
NSLog(@"UIDeviceOrientationPortraitUpsideDown");
|
||||||
|
self.currentRawReading = 90;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationLandscapeLeft:
|
||||||
|
NSLog(@"UIDeviceOrientationLandscapeLeft");
|
||||||
|
self.currentRawReading = 180;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationLandscapeRight:
|
||||||
|
NSLog(@"UIDeviceOrientationLandscapeRight");
|
||||||
|
self.currentRawReading = 0;
|
||||||
|
break;
|
||||||
|
case UIDeviceOrientationUnknown:
|
||||||
|
NSLog(@"ignoring UIDeviceOrientationUnknown");
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
NSLog(@"ignoring faceUp or faceDown");
|
||||||
|
// ignore face up or down
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
curOrientation = orientation;
|
||||||
|
NSLog(@"didRotate");
|
||||||
|
|
||||||
|
|
||||||
|
if (self.primaryViewController != [pManager getEmulatorView])
|
||||||
|
{
|
||||||
|
if (self.primaryViewController == [pManager getBrowserView])
|
||||||
|
[[pManager getBrowserView] updateView ];
|
||||||
|
if (self.primaryViewController == [pManager getInfoView])
|
||||||
|
[[pManager getInfoView] updateView:orientation];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Gère manuellement la rotation
|
||||||
|
|
||||||
|
// Mets les interfaces systèmes (UIAlert) dans le bon mode
|
||||||
|
|
||||||
|
if (self.currentRawReading==0)
|
||||||
|
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft];
|
||||||
|
else
|
||||||
|
if (self.currentRawReading==90)
|
||||||
|
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationPortraitUpsideDown];
|
||||||
|
else
|
||||||
|
if (self.currentRawReading==180)
|
||||||
|
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight];
|
||||||
|
else
|
||||||
|
// if (currentRawReading==270)
|
||||||
|
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationPortrait];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Recalcule la zone d'affichage de l'émulateur
|
||||||
|
|
||||||
|
// enleve le clavier si une rotation a eu lieu
|
||||||
|
if (oldRotate != self.currentRawReading )//&& [self hasSecondary]==false)
|
||||||
|
{
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc restoreInput];
|
||||||
|
|
||||||
|
//[[pManager getEmulatorView].kbdc hideInput];
|
||||||
|
// [[pManager getEmulatorView].kbdc enableKeyboard:FALSE];
|
||||||
|
}
|
||||||
|
|
||||||
|
[[pManager getEmulatorView] updateView ];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||||
|
{
|
||||||
|
printf("applicationDidEnterBackground");
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||||
|
{
|
||||||
|
printf("applicationWillEnterForeground");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
|
||||||
|
if (pMac)
|
||||||
|
{
|
||||||
|
pMac->terminateEmulator();
|
||||||
|
delete pMac;
|
||||||
|
pMac = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.viewController = nil;
|
||||||
|
self.emulatorController = nil;
|
||||||
|
self.detailController = nil;
|
||||||
|
self.infoController = nil;
|
||||||
|
self.window = nil;
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||||
|
//- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef HANDLE_URL
|
||||||
|
NSLog(@"Custom Url %@",url);
|
||||||
|
|
||||||
|
|
||||||
|
// NSString* resource = [[NSBundle mainBundle] pathForResource:@ACTIVEGS_FIRSTTABLIST ofType:@"activegsxml"] ;
|
||||||
|
// MyString source = [resource UTF8String];
|
||||||
|
MyString appid;
|
||||||
|
MyString source;
|
||||||
|
|
||||||
|
#ifdef TEST_HANDLE_URL
|
||||||
|
source = "http://www.freetoolsassociation.com/fta/undergroundlist.xml";
|
||||||
|
#else
|
||||||
|
for (NSString *param in [[url query] componentsSeparatedByString:@"&"])
|
||||||
|
{
|
||||||
|
NSArray *elts = [param componentsSeparatedByString:@"="];
|
||||||
|
if([elts count] < 2) continue;
|
||||||
|
if ([[elts objectAtIndex:0] isEqualToString:@"id"])
|
||||||
|
appid=[ [elts objectAtIndex:1] UTF8String];
|
||||||
|
if ([[elts objectAtIndex:0] isEqualToString:@"source"])
|
||||||
|
source =[[elts objectAtIndex:1] UTF8String];
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (source.IsEmpty()==FALSE)
|
||||||
|
{
|
||||||
|
self->firstTabXML= source;
|
||||||
|
activegsViewController* ags = [self getBrowserView];
|
||||||
|
if (ags)
|
||||||
|
{
|
||||||
|
activegsList* l = [ags l0];
|
||||||
|
if (l)
|
||||||
|
{
|
||||||
|
l->listPath = self->firstTabXML;
|
||||||
|
[l reloadData:TRUE];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
ActiveGSElement* element = NULL;
|
||||||
|
ActiveGSList temp;
|
||||||
|
if (appid.IsEmpty()==FALSE)
|
||||||
|
{
|
||||||
|
|
||||||
|
temp.loadFromFile(self->firstTabXML.c_str());
|
||||||
|
for(int i =0;i<temp.elements.size();i++)
|
||||||
|
{
|
||||||
|
if (temp.elements.at(i).theid == appid)
|
||||||
|
{
|
||||||
|
element = &temp.elements.at(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (element)
|
||||||
|
{
|
||||||
|
|
||||||
|
[self launchDiskImage:element pathname:temp.pathName.c_str() trackername:temp.trackerName.c_str()];
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self doStateChange:[self getBrowserView] type:kCATransitionFade sens:kCATransitionFromRight];
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
void x_display_alert(int _abort, const char* _title, const char* _message)
|
||||||
|
{
|
||||||
|
alertAbort = _abort;
|
||||||
|
alertTitle = _title;
|
||||||
|
alertMessage = _message;
|
||||||
|
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
[pManager performSelectorOnMainThread:@selector(displayAlert:) withObject:nil waitUntilDone:NO];
|
||||||
|
[pool release];
|
||||||
|
|
||||||
|
}
|
84
Common.iphone/activegsEmulatorController.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "../kegs/iOS/zoomEmulatorView.h"
|
||||||
|
#import "../kegs/iOS/emulatorView.h"
|
||||||
|
#import "KBDController.h"
|
||||||
|
|
||||||
|
enum gestureModes
|
||||||
|
{
|
||||||
|
|
||||||
|
MODE_PAD = 1,
|
||||||
|
MODE_ZOOM = 2,
|
||||||
|
MODE_SWIPE= 4,
|
||||||
|
MODE_ALL = MODE_PAD+MODE_ZOOM+MODE_SWIPE,
|
||||||
|
MODE_MOUSEBUTTON=8,
|
||||||
|
MODE_EMULATOR=16,
|
||||||
|
};
|
||||||
|
|
||||||
|
@interface customView : UIView
|
||||||
|
{
|
||||||
|
double possibleSwipeLeftTime ;
|
||||||
|
double possibleSwipeRightTime ;
|
||||||
|
double possibleSwipeUpTime ;
|
||||||
|
double possibleSwipeDownTime ;
|
||||||
|
|
||||||
|
UISwipeGestureRecognizer* _grswipeup;
|
||||||
|
UISwipeGestureRecognizer* _grswipedown;
|
||||||
|
UISwipeGestureRecognizer* _grswipeleft;
|
||||||
|
UISwipeGestureRecognizer* _grswiperight;
|
||||||
|
NSTimer* enableTimer;
|
||||||
|
NSTimer* disableTimer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (retain,nonatomic) UISwipeGestureRecognizer* grswipeup;
|
||||||
|
@property (retain,nonatomic) UISwipeGestureRecognizer* grswipedown;
|
||||||
|
@property (retain,nonatomic) UISwipeGestureRecognizer* grswipeleft;
|
||||||
|
@property (retain,nonatomic) UISwipeGestureRecognizer* grswiperight;
|
||||||
|
|
||||||
|
-(void)disableGestures:(int)_mode ;
|
||||||
|
-(void)enableGestures:(int)_mode ;
|
||||||
|
-(void)disableAllGestures;
|
||||||
|
-(void)reenableAllGestures ;
|
||||||
|
-(void)processGesturesOnTouchesEnded ;
|
||||||
|
-(void)scheduleDisableAllGestures;
|
||||||
|
-(void)scheduleEnableAllGestures;
|
||||||
|
-(void)invalidateTimers;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
enum attachMode
|
||||||
|
{
|
||||||
|
ATTACH_NONE,
|
||||||
|
ATTACH_PRIMARY,
|
||||||
|
ATTACH_SECONDARY
|
||||||
|
};
|
||||||
|
|
||||||
|
@interface activegsEmulatorController : UIVIEWCONTROLLERROOT
|
||||||
|
{
|
||||||
|
NSString* _trackerName;
|
||||||
|
customView* _contentView;
|
||||||
|
zoomEmulatorView* _zv;
|
||||||
|
KBDController* _kbdc ;
|
||||||
|
@public
|
||||||
|
int attachedTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef USE_CAPPTAIN
|
||||||
|
-(NSString*)getCapptainActivityName;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-(void) updateView;
|
||||||
|
|
||||||
|
@property (assign) customView* contentView;
|
||||||
|
@property (assign) zoomEmulatorView* zv;
|
||||||
|
@property (assign) KBDController* kbdc ;
|
||||||
|
@property (nonatomic, retain) NSString* trackerName ;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
682
Common.iphone/activegsEmulatorController.mm
Normal file
@ -0,0 +1,682 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#include "../kegs/src/protos_macdriver.h"
|
||||||
|
#include "../kegs/src/sim65816.h"
|
||||||
|
|
||||||
|
#define TIME_BEFORE_REENABLING_GESTURES 1.0
|
||||||
|
#define TIME_BEFORE_DISABLING_GESTURES 0.5
|
||||||
|
#define DELAY_TO_EXECUTE_SWIPE 0.4
|
||||||
|
#define SWIPENBTOUCHES 1
|
||||||
|
|
||||||
|
|
||||||
|
#undef debug_printf
|
||||||
|
#define debug_printf(X,...)
|
||||||
|
|
||||||
|
int x_lock_zoom = 0;
|
||||||
|
|
||||||
|
@implementation customView
|
||||||
|
|
||||||
|
@synthesize grswipedown = _grswipedown;
|
||||||
|
@synthesize grswipeleft = _grswipeleft;
|
||||||
|
@synthesize grswiperight = _grswiperight;
|
||||||
|
@synthesize grswipeup = _grswipeup;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (UIView *)hitTest:(CGPoint)_point withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
KBDController *pKbd = [pManager getEmulatorView].kbdc;
|
||||||
|
UIView* curHit;
|
||||||
|
CGPoint p;
|
||||||
|
|
||||||
|
if (!pKbd.runtimeControls.hidden && pKbd.runtimeControls.alpha!=0.0)
|
||||||
|
{
|
||||||
|
|
||||||
|
p = [self convertPoint:_point toView:pKbd.runtimeControls];
|
||||||
|
|
||||||
|
curHit= [pKbd.runtimeControls hitTest:p withEvent:event];
|
||||||
|
if ( [curHit isDescendantOfView:pKbd.runtimeControls])
|
||||||
|
{
|
||||||
|
return curHit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!pKbd.diskSelection.hidden && pKbd.diskSelection.alpha!=0.0)
|
||||||
|
{
|
||||||
|
|
||||||
|
p = [self convertPoint:_point toView:pKbd.diskSelection];
|
||||||
|
|
||||||
|
curHit= [pKbd.diskSelection hitTest:p withEvent:event];
|
||||||
|
if ( [curHit isDescendantOfView:pKbd.diskSelection])
|
||||||
|
{
|
||||||
|
return curHit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!pKbd.barView.hidden)
|
||||||
|
{
|
||||||
|
|
||||||
|
p = [self convertPoint:_point toView:pKbd.barView];
|
||||||
|
curHit= [pKbd.barView hitTest:p withEvent:event];
|
||||||
|
|
||||||
|
if ( [curHit isDescendantOfView:pKbd.barView])
|
||||||
|
{
|
||||||
|
// debug_printf("intercepting event : barview\n");
|
||||||
|
return curHit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([pKbd isInputVisible:(INPUTMODE_ACCESS+INPUTMODE_MINIACCESS)])
|
||||||
|
{
|
||||||
|
|
||||||
|
p = [self convertPoint:_point toView:pKbd.accessView];
|
||||||
|
curHit= [pKbd.accessView hitTest:p withEvent:event];
|
||||||
|
|
||||||
|
// regarde si on tape dans la barview
|
||||||
|
if ( !curHit.hidden && [curHit isDescendantOfView:pKbd.accessView])
|
||||||
|
{
|
||||||
|
|
||||||
|
return curHit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// renvoie les évenements à l'emulator
|
||||||
|
return [pManager getEmulatorView].zv;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
if (self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
|
||||||
|
// Swipe down to hide keyboard
|
||||||
|
self.grswipeup = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeUp:)] autorelease];
|
||||||
|
self.grswipeup.direction = UISwipeGestureRecognizerDirectionUp ;
|
||||||
|
self.grswipeup.cancelsTouchesInView = NO;
|
||||||
|
self.grswipeup.numberOfTouchesRequired = SWIPENBTOUCHES;
|
||||||
|
[self addGestureRecognizer:self.grswipeup];
|
||||||
|
|
||||||
|
|
||||||
|
// Swipe up to display keyboard
|
||||||
|
self.grswipedown = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeDown:)] autorelease];
|
||||||
|
self.grswipedown.direction = UISwipeGestureRecognizerDirectionDown;
|
||||||
|
self.grswipedown.cancelsTouchesInView = NO;
|
||||||
|
self.grswipedown.numberOfTouchesRequired = SWIPENBTOUCHES;
|
||||||
|
[self addGestureRecognizer:self.grswipedown];
|
||||||
|
|
||||||
|
// Swipe left to go back to browsing
|
||||||
|
self.grswipeleft = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)] autorelease];
|
||||||
|
self.grswipeleft.direction = UISwipeGestureRecognizerDirectionLeft;
|
||||||
|
self.grswipeleft.cancelsTouchesInView = NO;
|
||||||
|
self.grswipeleft.numberOfTouchesRequired = SWIPENBTOUCHES;
|
||||||
|
[self addGestureRecognizer:self.grswipeleft];
|
||||||
|
|
||||||
|
|
||||||
|
// Swipe Right to go back to browsing
|
||||||
|
self.grswiperight = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)] autorelease];
|
||||||
|
self.grswiperight.direction = UISwipeGestureRecognizerDirectionRight;
|
||||||
|
self.grswiperight.cancelsTouchesInView = NO;
|
||||||
|
self.grswiperight.numberOfTouchesRequired = SWIPENBTOUCHES;
|
||||||
|
[self addGestureRecognizer:self.grswiperight];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-(void)invalidateTimers
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if ([enableTimer isValid])
|
||||||
|
{
|
||||||
|
debug_printf("deactivating enable gesture timer");
|
||||||
|
[enableTimer invalidate];
|
||||||
|
enableTimer=nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([disableTimer isValid])
|
||||||
|
{
|
||||||
|
debug_printf("deactivating disable gesture timer");
|
||||||
|
[disableTimer invalidate];
|
||||||
|
disableTimer=nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)scheduleDisableAllGestures
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("scheduleDisableAllGestures");
|
||||||
|
|
||||||
|
[self invalidateTimers];
|
||||||
|
|
||||||
|
disableTimer = [NSTimer scheduledTimerWithTimeInterval:TIME_BEFORE_DISABLING_GESTURES target:self selector:@selector(disableAllGestures) userInfo:nil repeats:NO];
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:MODE_ALL color:[UIColor blueColor]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)scheduleEnableAllGestures
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("scheduleEnableAllGestures");
|
||||||
|
|
||||||
|
|
||||||
|
[self enableGestures:MODE_PAD];
|
||||||
|
[self disableGestures:MODE_SWIPE+MODE_ZOOM];
|
||||||
|
|
||||||
|
enableTimer = [NSTimer scheduledTimerWithTimeInterval:TIME_BEFORE_REENABLING_GESTURES target:self selector:@selector(reenableAllGestures) userInfo:nil repeats:NO];
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:(MODE_SWIPE+MODE_ZOOM) color:[UIColor orangeColor]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)disableAllGestures
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("disableAllGestures\n");
|
||||||
|
[self disableGestures:MODE_ALL];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)disableGestures:(int)_mode
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("disableGestures: %d",_mode);
|
||||||
|
|
||||||
|
[self invalidateTimers];
|
||||||
|
|
||||||
|
if (_mode & MODE_SWIPE)
|
||||||
|
{
|
||||||
|
|
||||||
|
self.grswipeup.enabled = FALSE;
|
||||||
|
self.grswipedown.enabled = FALSE;
|
||||||
|
self.grswipeleft.enabled = FALSE;
|
||||||
|
self.grswiperight.enabled = FALSE;
|
||||||
|
}
|
||||||
|
if (_mode & MODE_PAD)
|
||||||
|
[[pManager getEmulatorView].kbdc enablePad:FALSE];
|
||||||
|
|
||||||
|
if (_mode & MODE_ZOOM)
|
||||||
|
[[pManager getEmulatorView].zv disableZoom];
|
||||||
|
|
||||||
|
if (_mode & MODE_EMULATOR)
|
||||||
|
[[pManager getEmulatorView].zv disableInput];
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:_mode color:[UIColor redColor]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-(void)enableGestures:(int)_mode
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("enableGestures %d\n",_mode);
|
||||||
|
|
||||||
|
if (_mode & MODE_SWIPE)
|
||||||
|
{
|
||||||
|
[self invalidateTimers];
|
||||||
|
|
||||||
|
self.grswipeup.enabled = TRUE;
|
||||||
|
self.grswipedown.enabled = TRUE;
|
||||||
|
self.grswipeleft.enabled = TRUE;
|
||||||
|
self.grswiperight.enabled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_mode & MODE_ZOOM)
|
||||||
|
{
|
||||||
|
if (x_lock_zoom)
|
||||||
|
{
|
||||||
|
// [self disableGestures:MODE_ZOOM];
|
||||||
|
[[pManager getEmulatorView].zv disableZoom];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[[pManager getEmulatorView].zv enableZoom];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_mode & MODE_PAD)
|
||||||
|
[[pManager getEmulatorView].kbdc enablePad:TRUE];
|
||||||
|
if (_mode & MODE_EMULATOR)
|
||||||
|
[[pManager getEmulatorView].zv enableInput];
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc setGestureIndicatorVisibility:_mode color:[UIColor greenColor]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)reenableAllGestures
|
||||||
|
{
|
||||||
|
|
||||||
|
debug_printf("reenableAllGestures");
|
||||||
|
[self enableGestures:(MODE_ALL+MODE_EMULATOR)];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)processGesturesOnTouchesEnded
|
||||||
|
{
|
||||||
|
#if SWIPENBTOUCHES == 1
|
||||||
|
debug_printf("processGesturesOnTouchesEnded");
|
||||||
|
|
||||||
|
// Execute les gestures en attente
|
||||||
|
double curtime = [[NSDate date] timeIntervalSince1970];
|
||||||
|
|
||||||
|
if (possibleSwipeLeftTime > curtime)
|
||||||
|
{
|
||||||
|
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (possibleSwipeRightTime > curtime)
|
||||||
|
{
|
||||||
|
if ([pManager getDetailView]->diskSelected)
|
||||||
|
[pManager doStateChange:[pManager getDetailView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
}
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (possibleSwipeDownTime > curtime)
|
||||||
|
{
|
||||||
|
[[pManager getEmulatorView].kbdc swipeDown];
|
||||||
|
// We remain on the currentView: immediatly turn on gestures
|
||||||
|
[self reenableAllGestures];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (possibleSwipeUpTime > curtime)
|
||||||
|
{
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc swipeUp];
|
||||||
|
// We remain on the currentView: immediatly turn on gestures
|
||||||
|
[self reenableAllGestures];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// no gestures
|
||||||
|
[self scheduleEnableAllGestures];
|
||||||
|
[self enableGestures:MODE_ZOOM]; // pour éviter l'interprétation en click!
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeLeft :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if SWIPENBTOUCHES == 2
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
|
||||||
|
#else
|
||||||
|
if ([_rec locationInView:self].y < 44 * [pManager resolutionRatio])
|
||||||
|
{
|
||||||
|
possibleSwipeLeftTime = [[NSDate date] timeIntervalSince1970] + DELAY_TO_EXECUTE_SWIPE;
|
||||||
|
debug_printf("possibleSwipeLeftTime %f\n",possibleSwipeLeftTime);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeRight :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
#if SWIPENBTOUCHES == 2
|
||||||
|
if ([pManager getDetailView].diskSelected)
|
||||||
|
[pManager doStateChange:[pManager getDetailView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
else
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
#else
|
||||||
|
|
||||||
|
if ([_rec locationInView:self].y < 44 * [pManager resolutionRatio])
|
||||||
|
{
|
||||||
|
possibleSwipeRightTime = [[NSDate date] timeIntervalSince1970] + DELAY_TO_EXECUTE_SWIPE;
|
||||||
|
debug_printf("possibleSwipeRightTime %f\n",possibleSwipeRightTime);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)swipeDown : (UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
debug_printf("swipeDown : %d",_rec.state);
|
||||||
|
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if SWIPENBTOUCHES == 2
|
||||||
|
[[pManager getEmulatorView].kbdc swipeDown];
|
||||||
|
#else
|
||||||
|
possibleSwipeDownTime = [[NSDate date] timeIntervalSince1970] + DELAY_TO_EXECUTE_SWIPE;
|
||||||
|
debug_printf("possibleSwipeDownTime %f\n",possibleSwipeDownTime);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeUp : (UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
debug_printf("swipeUp : %d",_rec.state);
|
||||||
|
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
#if SWIPENBTOUCHES == 2
|
||||||
|
[[pManager getEmulatorView].kbdc swipeUp];
|
||||||
|
#else
|
||||||
|
possibleSwipeUpTime = [[NSDate date] timeIntervalSince1970] + DELAY_TO_EXECUTE_SWIPE;
|
||||||
|
debug_printf("possibleSwipeUpTime %f\n",possibleSwipeUpTime);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
|
||||||
|
self.grswipedown = nil;
|
||||||
|
self.grswipeup = nil;
|
||||||
|
self.grswipeleft = nil;
|
||||||
|
self.grswiperight = nil;
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation activegsEmulatorController
|
||||||
|
|
||||||
|
@synthesize kbdc = _kbdc;
|
||||||
|
@synthesize zv = _zv;
|
||||||
|
@synthesize contentView = _contentView;
|
||||||
|
@synthesize trackerName = _trackerName;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_CAPPTAIN
|
||||||
|
-(NSString*)getCapptainActivityName
|
||||||
|
{
|
||||||
|
NSLog(@"loggin capptain:%@",_trackerName);
|
||||||
|
return _trackerName;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- (void)createZoomEmulatorView
|
||||||
|
{
|
||||||
|
|
||||||
|
CGRect rv = CGRectMake(0,0,100.0,100.0);
|
||||||
|
self.zv = [[[zoomEmulatorView alloc] initWithFrame:rv ratio:1.0] retain];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)loadView
|
||||||
|
{
|
||||||
|
|
||||||
|
attachedTo = ATTACH_NONE;
|
||||||
|
|
||||||
|
CGRect apprect = [[UIScreen mainScreen] applicationFrame];
|
||||||
|
printf("mainScreen apprect %d x %d\n",(int)apprect.size.width,(int)apprect.size.height);
|
||||||
|
|
||||||
|
self.contentView = [[[customView alloc] initWithFrame:apprect] autorelease];
|
||||||
|
#ifdef SHOW_COLOR
|
||||||
|
self.contentView.backgroundColor = [UIColor yellowColor];
|
||||||
|
#else
|
||||||
|
self.contentView.backgroundColor = [UIColor blackColor];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
[self createZoomEmulatorView];
|
||||||
|
|
||||||
|
[self.zv setUserInteractionEnabled:TRUE];
|
||||||
|
|
||||||
|
self.kbdc = [[KBDController alloc] retain];
|
||||||
|
[self.contentView addSubview:self.kbdc.view];
|
||||||
|
|
||||||
|
self.view = self.contentView;
|
||||||
|
|
||||||
|
|
||||||
|
[self.zv disableZoom];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void) updateView
|
||||||
|
{
|
||||||
|
static int inUpdateView=0;
|
||||||
|
if (inUpdateView)
|
||||||
|
return ;
|
||||||
|
inUpdateView++;
|
||||||
|
debug_printf("viewController updateView\n");
|
||||||
|
|
||||||
|
|
||||||
|
// Transforme la fenetre root view
|
||||||
|
|
||||||
|
[UIView beginAnimations:nil context:NULL];
|
||||||
|
[UIView setAnimationDuration:0.3];
|
||||||
|
|
||||||
|
CGAffineTransform matv = CGAffineTransformIdentity;
|
||||||
|
matv = CGAffineTransformRotate (matv,(270-[pManager getAngle])*M_PI/180); //Avec
|
||||||
|
self.contentView.transform = matv;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CGRect emulatorRect; // emulator rect
|
||||||
|
CGRect boundRect; // emulator rect rotate
|
||||||
|
int requiredOrientation = -1 ;
|
||||||
|
CGRect kbddelta = CGRectZero;
|
||||||
|
|
||||||
|
CGAffineTransform mat = CGAffineTransformIdentity;
|
||||||
|
#ifdef VIDEO_SINGLEVLINE
|
||||||
|
mat = CGAffineTransformScale(mat,1,-2);
|
||||||
|
#else
|
||||||
|
mat = CGAffineTransformScale(mat,1,-1);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
self.zv.transform = mat;
|
||||||
|
|
||||||
|
// Mets à jour la taille de la fenetre en fonction de l'affichage du clavier
|
||||||
|
if ([pManager hasSecondary ])
|
||||||
|
{
|
||||||
|
CGRect secondaryapprect = [pManager secondaryScreen].bounds;
|
||||||
|
emulatorRect = CGRectMake(0.0,0.0,secondaryapprect.size.width,secondaryapprect.size.height);
|
||||||
|
|
||||||
|
if (attachedTo != ATTACH_SECONDARY )
|
||||||
|
{
|
||||||
|
printf("attaching to secondary...");
|
||||||
|
|
||||||
|
attachedTo = ATTACH_SECONDARY;
|
||||||
|
|
||||||
|
[self.zv removeFromSuperview];
|
||||||
|
[pManager.secondaryWindow addSubview:self.zv];
|
||||||
|
|
||||||
|
float ratio = [[pManager secondaryScreen] scale];
|
||||||
|
|
||||||
|
// recalcule la vue car la résolution/ratio a changé
|
||||||
|
[self.zv updateScreen:emulatorRect ratio:ratio];
|
||||||
|
|
||||||
|
[self.kbdc setMenuBarVisibility:true];
|
||||||
|
|
||||||
|
[pManager setSecondaryInputMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force L'affichage par défault
|
||||||
|
requiredOrientation = 0;
|
||||||
|
boundRect = emulatorRect;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CGRect primaryapprect = [UIScreen mainScreen].bounds;
|
||||||
|
emulatorRect = CGRectMake(0.0,0.0,primaryapprect.size.width,primaryapprect.size.height);
|
||||||
|
NSLog(@"emulatorRect : %f*%f\n",emulatorRect.size.width,emulatorRect.size.height);
|
||||||
|
if (attachedTo != ATTACH_PRIMARY )
|
||||||
|
{
|
||||||
|
printf("attaching to primay...");
|
||||||
|
attachedTo = ATTACH_PRIMARY;
|
||||||
|
|
||||||
|
[self.zv removeFromSuperview];
|
||||||
|
|
||||||
|
|
||||||
|
float ratio = [[UIScreen mainScreen] scale];
|
||||||
|
|
||||||
|
// recalcule la vue car la résolution/ratio a changé
|
||||||
|
[self.zv updateScreen:emulatorRect ratio:ratio];
|
||||||
|
|
||||||
|
[self.contentView addSubview:self.zv];
|
||||||
|
|
||||||
|
// fait apparaite l'inputr
|
||||||
|
[self.kbdc restoreInput];
|
||||||
|
|
||||||
|
// le remts en premier
|
||||||
|
[self.contentView bringSubviewToFront:self.kbdc.view];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary parameters
|
||||||
|
|
||||||
|
requiredOrientation = ([pManager getAngle]/90)+1;
|
||||||
|
kbddelta = [self.kbdc getEmulatorDelta];
|
||||||
|
|
||||||
|
NSString* systemVer = [[UIDevice currentDevice] systemVersion];
|
||||||
|
if ([systemVer compare:@"8.0"] == NSOrderedDescending)
|
||||||
|
boundRect = emulatorRect;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
boundRect = CGRectApplyAffineTransform(emulatorRect,matv);
|
||||||
|
boundRect.origin.x = 0;
|
||||||
|
boundRect.origin.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[self.contentView setBounds:boundRect];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[self.zv updateFrame: boundRect kbdRect:kbddelta];
|
||||||
|
[self.zv switchOrientation:requiredOrientation]; // a faire après le boundRect
|
||||||
|
|
||||||
|
printf("*** setbound rect %f,%f\n",boundRect.size.width,boundRect.size.height);
|
||||||
|
|
||||||
|
[UIView commitAnimations];
|
||||||
|
|
||||||
|
|
||||||
|
// l'interface est repositionnées mais non animée
|
||||||
|
|
||||||
|
CGRect uirect = [[UIScreen mainScreen] applicationFrame];
|
||||||
|
CGRect uirectrotate = CGRectApplyAffineTransform(uirect,matv);
|
||||||
|
|
||||||
|
uirectrotate.origin.x = 0;
|
||||||
|
uirectrotate.origin.y = 0;
|
||||||
|
|
||||||
|
[self.kbdc updateView:uirectrotate];
|
||||||
|
[pManager updateNotificationView:uirectrotate];
|
||||||
|
|
||||||
|
inUpdateView--;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// IOS 5 Compatibility
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)didReceiveMemoryWarning {
|
||||||
|
// Releases the view if it doesn't have a superview.
|
||||||
|
[super didReceiveMemoryWarning];
|
||||||
|
|
||||||
|
// Release any cached data, images, etc that aren't in use.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)viewWillAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
printf("view will appear");
|
||||||
|
[[pManager getEmulatorView].contentView reenableAllGestures];
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc setEmulatorTitle:config.visibleName.c_str()];
|
||||||
|
|
||||||
|
if ([pManager hasSecondary])
|
||||||
|
{
|
||||||
|
[pManager setSecondaryInputMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pMac)
|
||||||
|
{
|
||||||
|
// réactive l'interface
|
||||||
|
if ([pManager hasSecondary])
|
||||||
|
{
|
||||||
|
// [[pManager getEmulatorView].kbdc restoreInput];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("### unpausing emulator");
|
||||||
|
r_sim65816.resume();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("### starting new emulator instance");
|
||||||
|
|
||||||
|
|
||||||
|
[[pManager getEmulatorView].kbdc resetSpecialKeys];
|
||||||
|
pMac = new CEmulatorMac(NULL,1);
|
||||||
|
config.xmlAlreadyLoaded=0;
|
||||||
|
pMac->setConfig(&config);
|
||||||
|
pMac->launchEmulator();
|
||||||
|
|
||||||
|
// remets un ratio de 1.0
|
||||||
|
[self.zv setRatioToOne];
|
||||||
|
[self.zv switchOrientation:self.zv->curOrientation];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.zv.ew activateEmulatorRefresh:option.getIntValue(OPTION_FRAMERATE)];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewWillDisappear:(BOOL)animated
|
||||||
|
{
|
||||||
|
|
||||||
|
// elimine les gestures (et les timers)
|
||||||
|
[[pManager getEmulatorView].contentView disableGestures:MODE_ALL];
|
||||||
|
if (pMac)
|
||||||
|
{
|
||||||
|
if ([pManager hasSecondary]==false)
|
||||||
|
{
|
||||||
|
debug_printf("### pausing emulator");
|
||||||
|
r_sim65816.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self.zv.ew deactivateEmulatorRefresh];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
|
||||||
|
[self.zv release];
|
||||||
|
self.zv = nil;
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
79
Common.iphone/activegsList.h
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <QuartzCore/CALayer.h>
|
||||||
|
#include "../Common/CEMulatorCtrl.h"
|
||||||
|
#include "../Common/3rdpartylib/simplexml.h"
|
||||||
|
#include "../Common/ActiveGSList.h"
|
||||||
|
|
||||||
|
#define LABELWIDTH 260
|
||||||
|
#define LABELHEIGHT 200
|
||||||
|
|
||||||
|
@interface itemClass : NSObject
|
||||||
|
{
|
||||||
|
@public
|
||||||
|
/*
|
||||||
|
MyString name;
|
||||||
|
MyString desc;
|
||||||
|
MyString company;
|
||||||
|
MyString year;
|
||||||
|
MyString theid;
|
||||||
|
MyString thumb;
|
||||||
|
//#define MAX_SCREENSHOTS 10
|
||||||
|
// MyString screenShots[MAX_SCREENSHOTS];
|
||||||
|
MyString screenShots0;
|
||||||
|
MyString screenShots1;
|
||||||
|
MyString screenShots2;
|
||||||
|
simplexml* pXML;
|
||||||
|
int is2GS;
|
||||||
|
*/
|
||||||
|
ActiveGSElement* element;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface UILabelMargin : UILabel
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
enum { ONLY_APPLE2=1, ONLY_2GS=2, ALL=4, ALL_NO_INDEX=8, DOC_LIST=128 };
|
||||||
|
|
||||||
|
@interface activegsList : UITableViewController <UITableViewDelegate,UITableViewDataSource>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
NSArray *_searchArray ;
|
||||||
|
NSString* _sourceName;
|
||||||
|
NSString* _sourceRevision;
|
||||||
|
UILabelMargin* _warningLabel;
|
||||||
|
NSMutableArray *_listOfItems;
|
||||||
|
int bLoaded;
|
||||||
|
int updateCheckHasBeenDone;
|
||||||
|
// simplexml* pXML;
|
||||||
|
@public
|
||||||
|
ActiveGSList list;
|
||||||
|
|
||||||
|
MyString listPath;
|
||||||
|
MyString versionPath;
|
||||||
|
MyString trackerName;
|
||||||
|
int filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property(nonatomic,retain) NSMutableArray* listOfItems;
|
||||||
|
@property(nonatomic,retain) UILabelMargin* warningLabel;
|
||||||
|
@property(nonatomic,retain) NSString* sourceRevision;
|
||||||
|
@property(nonatomic,retain) NSString* sourceName;
|
||||||
|
@property(nonatomic,retain) NSArray *searchArray ;
|
||||||
|
|
||||||
|
- (simplexml*)addList:(const char*)_listPath;
|
||||||
|
- (void)retrieveDocumentList:(MyString&) tempXML withBaseURL:(MyString&)baseURL;
|
||||||
|
-(void)reloadData:(BOOL)_forceDownload;
|
||||||
|
-(void)checkUpdateCallback:(NSData*)_data;
|
||||||
|
@end
|
766
Common.iphone/activegsList.mm
Normal file
@ -0,0 +1,766 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#import "activegsList.h"
|
||||||
|
#include "../Common/svnversion.h"
|
||||||
|
#import "asyncimageview.h"
|
||||||
|
#import "activegsViewController.h"
|
||||||
|
//#include "../Common/3rdpartylib/tinyxml/tinyxml.h"
|
||||||
|
#include "../kegs/src/sim65816.h"
|
||||||
|
#include "asynccommand.h"
|
||||||
|
|
||||||
|
extern void x_notify_download_failure(const char*_url);
|
||||||
|
|
||||||
|
|
||||||
|
@implementation itemClass
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation UILabelMargin
|
||||||
|
|
||||||
|
- (CGRect)textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines
|
||||||
|
{
|
||||||
|
return [super textRectForBounds:UIEdgeInsetsInsetRect(bounds,UIEdgeInsetsMake(15,15,15,15)) limitedToNumberOfLines:numberOfLines];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)drawTextInRect:(CGRect)rect
|
||||||
|
{
|
||||||
|
CGRect r = [self textRectForBounds:rect limitedToNumberOfLines:self.numberOfLines];
|
||||||
|
[super drawTextInRect:r];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
void xmltostring(simplexml* _this,MyString& _output)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
MyString s;
|
||||||
|
s.Format("<%s",_this->key());
|
||||||
|
_output += s;
|
||||||
|
|
||||||
|
for (keyvalue_rec *ptr = _this->properties(); ptr!=NULL; ptr=ptr->next)
|
||||||
|
{
|
||||||
|
s.Format(" %s=\"%s\"",ptr->key,ptr->value);
|
||||||
|
_output += s;
|
||||||
|
}
|
||||||
|
|
||||||
|
_output +=">\n";
|
||||||
|
const char *v = _this->value();
|
||||||
|
if (v)
|
||||||
|
_output +=v;
|
||||||
|
int nc = _this->number_of_children();
|
||||||
|
for(int i=0;i<nc;i++)
|
||||||
|
xmltostring(_this->child(i),_output);
|
||||||
|
s.Format("</%s>\n",_this->key());
|
||||||
|
_output += s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static UIImage* defaultImage2GS = nil;
|
||||||
|
static UIImage* defaultImageII = nil;
|
||||||
|
|
||||||
|
|
||||||
|
@implementation activegsList
|
||||||
|
|
||||||
|
@synthesize listOfItems = _listOfItems;
|
||||||
|
@synthesize warningLabel = _warningLabel;
|
||||||
|
@synthesize sourceRevision = _sourceRevision;
|
||||||
|
@synthesize sourceName = _sourceName;
|
||||||
|
@synthesize searchArray = _searchArray ;
|
||||||
|
|
||||||
|
|
||||||
|
+(void)initialize
|
||||||
|
{
|
||||||
|
[super initialize];
|
||||||
|
|
||||||
|
float rr = [pManager resolutionRatio];
|
||||||
|
|
||||||
|
NSString *imgSource = [[NSBundle mainBundle] pathForResource:@"logo_apple2gs" ofType:@"png"];
|
||||||
|
if (imgSource)
|
||||||
|
{
|
||||||
|
defaultImage2GS = [UIImage imageWithContentsOfFile: imgSource] ;
|
||||||
|
defaultImage2GS = [AsyncImageView processImage:defaultImage2GS width:64*rr height:40*rr];
|
||||||
|
[defaultImage2GS retain];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
defaultImage2GS = nil;
|
||||||
|
|
||||||
|
NSString *imgSource2 = [[NSBundle mainBundle] pathForResource:@"logo_apple2" ofType:@"png"];
|
||||||
|
if (imgSource2)
|
||||||
|
{
|
||||||
|
defaultImageII = [UIImage imageWithContentsOfFile: imgSource2];
|
||||||
|
defaultImageII = [AsyncImageView processImage:defaultImageII width:64*rr height:40*rr];
|
||||||
|
[defaultImageII retain];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
defaultImageII = nil;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)retrieveDocumentList:(MyString&) tempXML withBaseURL:(MyString&) _baseUrl;
|
||||||
|
{
|
||||||
|
|
||||||
|
tempXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<list version=\"1\">";
|
||||||
|
tempXML += "<source>My 2GS</source>";
|
||||||
|
|
||||||
|
NSArray *dopaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||||
|
NSString *documentsDirectory = [dopaths objectAtIndex:0];
|
||||||
|
NSFileManager *manager = [NSFileManager defaultManager];
|
||||||
|
// NSArray *fileList = [manager directoryContentsAtPath:documentsDirectory];
|
||||||
|
NSError* err;
|
||||||
|
NSArray *fileList = [manager contentsOfDirectoryAtPath:documentsDirectory error:&err];
|
||||||
|
|
||||||
|
MyString ignoreList;
|
||||||
|
|
||||||
|
const char* utf8docdir = [documentsDirectory UTF8String];
|
||||||
|
listPath.Format("%s/LOCAL.ACTIVEGSXML",utf8docdir);
|
||||||
|
_baseUrl =listPath;
|
||||||
|
|
||||||
|
CDownload dl(utf8docdir);
|
||||||
|
dl.bNotifyDownloadFailure = true;
|
||||||
|
|
||||||
|
|
||||||
|
// parse déjà les fichier .activegsxml
|
||||||
|
|
||||||
|
for (NSString *s in fileList)
|
||||||
|
{
|
||||||
|
const char* fn = [s UTF8String];
|
||||||
|
const char* ext = getext(fn);
|
||||||
|
|
||||||
|
if (strcasecmp(ext,"activegsxml"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
MyString fullpathname = utf8docdir;
|
||||||
|
fullpathname += "/";
|
||||||
|
fullpathname += fn;
|
||||||
|
*/
|
||||||
|
MyString path;
|
||||||
|
MyString shortname;
|
||||||
|
|
||||||
|
dl.retrieveFile(fn,path,shortname);
|
||||||
|
FILE* f= fopen(path.c_str(),"rb");
|
||||||
|
if (!f) continue;
|
||||||
|
fseek(f,0,SEEK_END);
|
||||||
|
int si = ftell(f);
|
||||||
|
|
||||||
|
|
||||||
|
fseek(f,0,SEEK_SET);
|
||||||
|
char *buf = new char[si+1];
|
||||||
|
memset(buf,0,si+1);
|
||||||
|
fread(buf,1,si,f);
|
||||||
|
simplexml* p = new simplexml(buf);
|
||||||
|
if (!p)
|
||||||
|
{
|
||||||
|
delete buf;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!strcasecmp(p->key(),"config"))
|
||||||
|
{
|
||||||
|
MyString temp;
|
||||||
|
xmltostring(p,temp);
|
||||||
|
printf("%s",temp.c_str());
|
||||||
|
tempXML += temp.c_str();
|
||||||
|
|
||||||
|
// rajoute les images dans une liste blackliste
|
||||||
|
for(int i=0;i<p->number_of_children();i++)
|
||||||
|
{
|
||||||
|
simplexml* child = p->child(i);
|
||||||
|
if (!strcmp(child->key(),"image"))
|
||||||
|
{
|
||||||
|
int order;
|
||||||
|
MyString path;
|
||||||
|
int isLocal = dl.parseFilenameAndMakeAbsolute(child->value(), order, path);
|
||||||
|
if (isLocal)
|
||||||
|
{
|
||||||
|
ignoreList+="?";
|
||||||
|
ignoreList+=getfile(path);
|
||||||
|
ignoreList+="?";
|
||||||
|
// printf("ignoring:%s",getfile(path.c_str()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete buf;
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse les autres fichiers
|
||||||
|
for (NSString *s in fileList)
|
||||||
|
{
|
||||||
|
const char* fn = [s UTF8String];
|
||||||
|
const char* ext = getext(fn);
|
||||||
|
|
||||||
|
if ( strcasecmp(ext,"zip")
|
||||||
|
&& strcasecmp(ext,"2mg")
|
||||||
|
&& strcasecmp(ext,"raw")
|
||||||
|
&& strcasecmp(ext,"dsk")
|
||||||
|
&& strcasecmp(ext,"po")
|
||||||
|
&& strcasecmp(ext,"do")
|
||||||
|
&& strcasecmp(ext,"nib")
|
||||||
|
&& strcasecmp(ext,"bin"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// si le fichier est dans la liste des blacklistée : ignore
|
||||||
|
MyString pat;
|
||||||
|
pat.Format("?%s?",fn);
|
||||||
|
if (ignoreList.Find(pat)!=-1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
MyString fullpathname = utf8docdir;
|
||||||
|
fullpathname += "/";
|
||||||
|
fullpathname += fn;
|
||||||
|
*/
|
||||||
|
|
||||||
|
MyString path;
|
||||||
|
MyString shortname;
|
||||||
|
// CDownload dl;
|
||||||
|
// dl.bNotifyDownloadFailure = true;
|
||||||
|
dl.retrieveFile(fn,path,shortname);
|
||||||
|
FILE* f= fopen(path.c_str(),"rb");
|
||||||
|
if (!f) continue;
|
||||||
|
fseek(f,0,SEEK_END);
|
||||||
|
int si = ftell(f);
|
||||||
|
|
||||||
|
int slot;
|
||||||
|
if (si < 800*1024)
|
||||||
|
slot = 6;
|
||||||
|
else
|
||||||
|
if (si < 900*1024)
|
||||||
|
slot = 5;
|
||||||
|
else
|
||||||
|
slot = 7;
|
||||||
|
|
||||||
|
tempXML += "<config version=\"2\">";
|
||||||
|
tempXML += "<name>";
|
||||||
|
tempXML += getfilenoext(fn);
|
||||||
|
tempXML += "</name>";
|
||||||
|
|
||||||
|
if (slot==6)
|
||||||
|
tempXML += "<format>APPLE 2</format>";
|
||||||
|
else
|
||||||
|
tempXML += "<format>2GS</format>";
|
||||||
|
|
||||||
|
tempXML += "<pic type=\"thumbnail\">";
|
||||||
|
// tempXML += utf8docdir;
|
||||||
|
// tempXML += "/";
|
||||||
|
tempXML += getfilenoext(fn);
|
||||||
|
tempXML += ".png</pic>";
|
||||||
|
|
||||||
|
tempXML += "<image slot=\"";
|
||||||
|
MyString slotstr;
|
||||||
|
slotstr.Format("%d",slot);
|
||||||
|
tempXML += slotstr;
|
||||||
|
tempXML += "\" disk=\"1\">";
|
||||||
|
tempXML += fn;
|
||||||
|
tempXML += "</image>";
|
||||||
|
tempXML += "<bootslot>";
|
||||||
|
tempXML += slotstr;
|
||||||
|
tempXML += "</bootslot>";
|
||||||
|
tempXML += "</config>";
|
||||||
|
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
tempXML+="</list>";
|
||||||
|
printf(tempXML.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
- (simplexml*)addList:(const char*)_listPath
|
||||||
|
{
|
||||||
|
|
||||||
|
double currTime = [[NSDate date] timeIntervalSince1970];
|
||||||
|
|
||||||
|
MyString path;
|
||||||
|
MyString shortname;
|
||||||
|
// const char* pxmlstring ;
|
||||||
|
// char* s = NULL;
|
||||||
|
MyString xmlString;
|
||||||
|
|
||||||
|
|
||||||
|
list.reset();
|
||||||
|
|
||||||
|
if (!(filter & DOC_LIST))
|
||||||
|
{
|
||||||
|
list.loadFromFile(listPath.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MyString baseURL;
|
||||||
|
[self retrieveDocumentList:xmlString withBaseURL:baseURL];
|
||||||
|
list.pathName = baseURL;
|
||||||
|
list.processString(xmlString.c_str());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NSString* name = [NSString stringWithUTF8String:list.sourceName];
|
||||||
|
NSString* rev = [NSString stringWithUTF8String:list.sourceRevision];
|
||||||
|
self.sourceName=name;
|
||||||
|
self.sourceRevision=rev;
|
||||||
|
|
||||||
|
printf("nb element before filter %d\n",list.elements.size());
|
||||||
|
for(int i=0;i<list.elements.size();i++)
|
||||||
|
{
|
||||||
|
ActiveGSElement* el = &list.elements.at(i);
|
||||||
|
itemClass* ic = [[itemClass alloc] autorelease];
|
||||||
|
// itemClass* ic = [itemClass alloc];
|
||||||
|
|
||||||
|
ic->element = el;
|
||||||
|
if ( (filter & ALL)
|
||||||
|
|| (filter & ALL_NO_INDEX)
|
||||||
|
||(filter & ONLY_APPLE2 && !el->is2GS)
|
||||||
|
|| (filter & ONLY_2GS && el->is2GS) )
|
||||||
|
[self.listOfItems addObject:ic];
|
||||||
|
ic = nil;
|
||||||
|
}
|
||||||
|
double d = [[NSDate date] timeIntervalSince1970] - currTime;
|
||||||
|
printf("loaded %s in %f\n",listPath.c_str(),d);
|
||||||
|
//return pXMLList;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static NSInteger compareImagesUsingSelector(id p1, id p2, void *context)
|
||||||
|
{
|
||||||
|
itemClass* obj1 = p1;
|
||||||
|
itemClass* obj2 = p2;
|
||||||
|
const char* c1 = obj1->element->name.c_str();
|
||||||
|
const char* c2 = obj2->element->name.c_str();
|
||||||
|
int ret = strcasecmp(c1,c2);
|
||||||
|
if (ret>0)
|
||||||
|
return NSOrderedDescending;
|
||||||
|
else
|
||||||
|
if (!ret)
|
||||||
|
return NSOrderedSame;
|
||||||
|
else
|
||||||
|
return NSOrderedAscending;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)addListAsync:(NSTimer*)timer
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[self addList:listPath.c_str()];
|
||||||
|
|
||||||
|
if (!(filter & ALL_NO_INDEX))
|
||||||
|
[self.listOfItems sortUsingFunction:compareImagesUsingSelector context:nil];
|
||||||
|
|
||||||
|
[(activegsViewController*)[pManager getBrowserView] activateLoader:FALSE];
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_ENABLE_DOCUMENT
|
||||||
|
if (( filter & DOC_LIST) && [self.listOfItems count]==0)
|
||||||
|
{
|
||||||
|
CGSize s = self.view.frame.size;
|
||||||
|
|
||||||
|
CGRect r = CGRectMake((s.width-LABELWIDTH)/2,(s.height-LABELHEIGHT)/2,LABELWIDTH,LABELHEIGHT);
|
||||||
|
self.warningLabel = [[[UILabelMargin alloc]initWithFrame:r ] autorelease];
|
||||||
|
self.warningLabel.backgroundColor = [UIColor colorWithWhite:0.8 alpha:0.5];
|
||||||
|
self.warningLabel.lineBreakMode = UILineBreakModeWordWrap;
|
||||||
|
self.warningLabel.numberOfLines = 0;
|
||||||
|
// label.textAlignment = UITextAlignmentCenter;
|
||||||
|
self.warningLabel.font = [UIFont systemFontOfSize:(CGFloat)12.0];
|
||||||
|
self.warningLabel.text = @"To add Apple II/2GS disk images :\n\n1- Connect your device to iTunes\n2- Go the 'Apps' tab\n3- Copy files (.2MG, .DSK, .ZIP, ...) to the ActiveGS Documents directory\n4- Click on the \"Refresh\" button to update the list!\n\nMore info on the ActiveGS website.";
|
||||||
|
/*
|
||||||
|
[[warningLabel layer] setCornerRadius:8];
|
||||||
|
[[warningLabel layer] setMasksToBounds:NO];
|
||||||
|
[[warningLabel layer] setShadowColor:[UIColor blackColor].CGColor];
|
||||||
|
[[warningLabel layer] setShadowOpacity:1.0f];
|
||||||
|
[[warningLabel layer] setShadowRadius:6.0f];
|
||||||
|
[[warningLabel layer] setShadowOffset:CGSizeMake(0, 3)];
|
||||||
|
*/
|
||||||
|
[self.view addSubview:self.warningLabel];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
activegsViewController* v = (activegsViewController*)[pManager getBrowserView];
|
||||||
|
|
||||||
|
if ([self.listOfItems count]==0)
|
||||||
|
[(UIButton*)v.navItem.titleView setTitle:@"Refresh" forState:UIControlStateNormal];
|
||||||
|
else
|
||||||
|
[(UIButton*)v.navItem.titleView setTitle:self.sourceName forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
[(UIButton*)v.navItem.titleView setHidden:NO];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// regarde si on doit raffraichir la liste
|
||||||
|
|
||||||
|
if (!versionPath.IsEmpty())
|
||||||
|
{
|
||||||
|
[[[AsyncCommand alloc] initCommand:versionPath.c_str() withObject:self withSelector:@selector(checkUpdateCallback:)] autorelease];
|
||||||
|
}
|
||||||
|
|
||||||
|
bLoaded = 1;
|
||||||
|
[(UITableView*)self.view reloadData];
|
||||||
|
[self viewWillAppear:FALSE];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)checkUpdateCallback:(NSData*)_data
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
char buffer[1024];
|
||||||
|
memset(buffer,0,1024);
|
||||||
|
[_data getBytes:buffer length:1023];
|
||||||
|
|
||||||
|
NSString* remoteVersion = [[NSString stringWithUTF8String:buffer] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||||
|
// NSString* remoteVersion = @"1.08";
|
||||||
|
|
||||||
|
// vérifie que ca correspond bien à une version
|
||||||
|
if ([remoteVersion characterAtIndex:1] == '.')
|
||||||
|
{
|
||||||
|
NSLog(@"source: %@ current:%@ vs.remote:%@ ",self.sourceName,self.sourceRevision,remoteVersion);
|
||||||
|
|
||||||
|
if (![self.sourceRevision isEqualToString:remoteVersion])
|
||||||
|
{
|
||||||
|
printf("need to upgrade\n");
|
||||||
|
[(activegsViewController*)[pManager getBrowserView] updateDialog:remoteVersion];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf("nothing to update\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf("bad format");
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf("callback failed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
// DOES NOT WORK ON UITABLEVIEW
|
||||||
|
|
||||||
|
-(void)viewWillAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
NSLog(@"viewWillAppear -- activegsList");
|
||||||
|
// change le titre
|
||||||
|
[pManager getBrowserView]->navItem.title = sourceName;
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
-(void)reloadData:(BOOL)_forceDownload
|
||||||
|
{
|
||||||
|
//Initialize the array.
|
||||||
|
self.listOfItems = [[[NSMutableArray alloc] init] autorelease];
|
||||||
|
|
||||||
|
list.reset();
|
||||||
|
// pXML = NULL;
|
||||||
|
|
||||||
|
[(activegsViewController*)[pManager getBrowserView] activateLoader:TRUE];
|
||||||
|
|
||||||
|
//Set the title
|
||||||
|
//self.navigationItem.title = @"IIGS";
|
||||||
|
|
||||||
|
bLoaded = 0;
|
||||||
|
|
||||||
|
// élimine le warning
|
||||||
|
if (self.warningLabel)
|
||||||
|
{
|
||||||
|
[self.warningLabel removeFromSuperview];
|
||||||
|
self.warningLabel= nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
// force le rafraichissement de la liste
|
||||||
|
[(UITableView*)self.view reloadData];
|
||||||
|
|
||||||
|
|
||||||
|
if (_forceDownload)
|
||||||
|
{
|
||||||
|
CDownload dl("***ERR***");
|
||||||
|
if (!(filter & DOC_LIST))
|
||||||
|
{
|
||||||
|
dl.deleteCachedFile(listPath.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
self.tableView.backgroundColor = [UIColor clearColor];
|
||||||
|
self.tableView.opaque = NO;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(addListAsync:) userInfo:nil repeats:NO];
|
||||||
|
|
||||||
|
// [self performSelectorOnMainThread:@selector(addListAsync:)withObject:self waitUntilDone:NO];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
NSLog(@"activeGSList viewWillAppear %@",self);
|
||||||
|
|
||||||
|
|
||||||
|
if (self.sourceName)
|
||||||
|
{
|
||||||
|
#ifndef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
[(UIButton*)[pManager getBrowserView].navItem.titleView setTitle:self.sourceName forState:UIControlStateNormal];
|
||||||
|
#else
|
||||||
|
((UILabel*)[pManager getBrowserView].navItem.titleView).text = self.sourceName;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
|
||||||
|
|
||||||
|
NSLog(@"activeGSList viewDidLoad");
|
||||||
|
|
||||||
|
|
||||||
|
[super viewDidLoad];
|
||||||
|
|
||||||
|
|
||||||
|
// IOS8 ISSUE !!!!! DefaultRawHeight = UITableViewAutomaticDimension
|
||||||
|
|
||||||
|
CGFloat h = 44 * [pManager resolutionRatio];
|
||||||
|
self.tableView.rowHeight = h;
|
||||||
|
self.tableView.delegate = self;
|
||||||
|
self.tableView.dataSource = self;
|
||||||
|
|
||||||
|
|
||||||
|
self.searchArray = [NSArray arrayWithObjects:
|
||||||
|
@"#", @"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", @"J", @"K", @"L",
|
||||||
|
@"M", @"N", @"O", @"P", @"Q", @"R", @"S", @"T", @"U", @"V", @"W", @"X", @"Z",nil];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[self reloadData:NO];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int)findIndexFromRowSection:(int)row section:(char)section
|
||||||
|
{
|
||||||
|
|
||||||
|
if (filter & ALL_NO_INDEX)
|
||||||
|
return row;
|
||||||
|
|
||||||
|
// cherche le premier
|
||||||
|
int count = 0;
|
||||||
|
int index = 0;
|
||||||
|
int nb = [self.listOfItems count];
|
||||||
|
for(int i=0;i<nb;i++)
|
||||||
|
{
|
||||||
|
itemClass* ic = [self.listOfItems objectAtIndex:i];
|
||||||
|
char c = ic->element->name.at(0);
|
||||||
|
|
||||||
|
if (c>='0' && c<='9') c='#';
|
||||||
|
if (c>='a' && c<='z') c+='A'-'a';
|
||||||
|
if (c==section)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (count == row)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
|
{
|
||||||
|
// remets le thumbnail en top priorité
|
||||||
|
[[asyncImageQueue sharedQueue] prioritizeItem:cell.imageView];
|
||||||
|
|
||||||
|
int row = [indexPath row];
|
||||||
|
if (row & 1)
|
||||||
|
cell.backgroundColor = [UIColor colorWithWhite:0.8 alpha:0.6];
|
||||||
|
else
|
||||||
|
cell.backgroundColor = [UIColor colorWithWhite:0.9 alpha:0.6];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
|
{
|
||||||
|
|
||||||
|
NSInteger row = [indexPath row];
|
||||||
|
NSInteger section = [indexPath section];
|
||||||
|
int index = [self findIndexFromRowSection:row section:*[[self.searchArray objectAtIndex:section] UTF8String]];
|
||||||
|
|
||||||
|
NSLog(@"cellForRowAtIndexPath cell %d %d %d",(int)row,(int)section,index);
|
||||||
|
itemClass* ic = [self.listOfItems objectAtIndex:index];
|
||||||
|
NSString* cellValue = [NSString stringWithUTF8String: ic->element->name.c_str()];
|
||||||
|
NSString *CellIdentifier = [NSString stringWithFormat:@"Cell_%@",cellValue];
|
||||||
|
|
||||||
|
UITableViewCell *cell = nil;
|
||||||
|
|
||||||
|
cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
|
||||||
|
if (cell != nil)
|
||||||
|
return cell;
|
||||||
|
|
||||||
|
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
|
||||||
|
|
||||||
|
cell.textLabel.text = cellValue;
|
||||||
|
|
||||||
|
cell.textLabel.font = [UIFont fontWithName:@"ShastonHi640" size:16*[pManager resolutionRatio]];
|
||||||
|
|
||||||
|
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
|
||||||
|
|
||||||
|
if ( ic->element->is2GS)
|
||||||
|
cell.imageView.image = defaultImage2GS;
|
||||||
|
else
|
||||||
|
cell.imageView.image = defaultImageII;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AsyncImageView* asyncImage = [[AsyncImageView alloc] autorelease];
|
||||||
|
float s = [pManager resolutionRatio]*[pManager dpiRatio];
|
||||||
|
[asyncImage initImage:ic->element->thumb.c_str() target:cell.imageView width:64*s height:40*s];
|
||||||
|
// [asyncImage performSelectorOnMainThread:@selector(loadImage:) withObject:nil waitUntilDone:NO];
|
||||||
|
[asyncImage loadImage:self];
|
||||||
|
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
|
{
|
||||||
|
int row = [indexPath row];
|
||||||
|
int section = [indexPath section];
|
||||||
|
int index = [self findIndexFromRowSection:row section:*[[self.searchArray objectAtIndex:section] UTF8String]];
|
||||||
|
itemClass* ic = [self.listOfItems objectAtIndex:index];
|
||||||
|
[pManager launchDiskImage:ic->element pathname:list.pathName.c_str() trackername:list.trackerName.c_str()];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
|
||||||
|
{
|
||||||
|
int row = [indexPath row];
|
||||||
|
int section = [indexPath section];
|
||||||
|
int index = [self findIndexFromRowSection:row section:*[[self.searchArray objectAtIndex:section] UTF8String]];
|
||||||
|
itemClass* ic = [self.listOfItems objectAtIndex:index];
|
||||||
|
detailViewController* dv = [pManager getDetailView];
|
||||||
|
dv->diskSelected = ic->element ;
|
||||||
|
dv->list = &(self->list) ;
|
||||||
|
|
||||||
|
[pManager doStateChange:[pManager getDetailView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
|
||||||
|
|
||||||
|
NSLog(@"sectionIndexTitlesForTableView");
|
||||||
|
|
||||||
|
if (!bLoaded)
|
||||||
|
return nil;
|
||||||
|
else
|
||||||
|
if (filter & ALL_NO_INDEX)
|
||||||
|
return nil;
|
||||||
|
else
|
||||||
|
return self.searchArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {
|
||||||
|
|
||||||
|
NSLog(@"sectionForSectionIndexTitle %d",(int)index);
|
||||||
|
if (!bLoaded)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return index;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||||
|
{
|
||||||
|
NSLog(@"numberOfSectionsInTableView");
|
||||||
|
if (!bLoaded)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
if (filter & ALL_NO_INDEX)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return [self.searchArray count];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
|
||||||
|
{
|
||||||
|
if (!bLoaded)
|
||||||
|
return nil;
|
||||||
|
else
|
||||||
|
if (filter & ALL_NO_INDEX)
|
||||||
|
return nil;
|
||||||
|
else
|
||||||
|
return [self.searchArray objectAtIndex:section];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
|
{
|
||||||
|
NSLog(@"numberOfRowsInSection");
|
||||||
|
|
||||||
|
if (!bLoaded)
|
||||||
|
return 0;
|
||||||
|
if (filter & ALL_NO_INDEX)
|
||||||
|
return [self.listOfItems count];
|
||||||
|
|
||||||
|
const char* search = [[self.searchArray objectAtIndex:section] UTF8String];
|
||||||
|
// cherche le premier
|
||||||
|
int count = 0;
|
||||||
|
NSInteger nb = [self.listOfItems count];
|
||||||
|
|
||||||
|
for(int i=0;i<nb;i++)
|
||||||
|
{
|
||||||
|
itemClass* ic = [self.listOfItems objectAtIndex:i];
|
||||||
|
char c = ic->element->name.at(0);
|
||||||
|
if (c>='0' && c<='9') c='#';
|
||||||
|
if (c>='a' && c<='z') c+='A'-'a';
|
||||||
|
if (c==*search)
|
||||||
|
count++;
|
||||||
|
else
|
||||||
|
if (count)
|
||||||
|
{
|
||||||
|
// printf("count: %s = %d\n",search,count);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
if (pXML)
|
||||||
|
{
|
||||||
|
delete pXML;
|
||||||
|
pXML = NULL;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
list.reset();
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
52
Common.iphone/activegsViewController.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#include "activegsAppDelegate.h"
|
||||||
|
#include "../kegs/iOS/emulatorView.h"
|
||||||
|
#import "activegsList.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
@interface activeUITabBarController : UITabBarController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface activeUINavigationBar : UINavigationBar
|
||||||
|
|
||||||
|
@end
|
||||||
|
*/
|
||||||
|
|
||||||
|
@interface activegsViewController : UIVIEWCONTROLLERROOT <UITabBarControllerDelegate,UIAlertViewDelegate>
|
||||||
|
{
|
||||||
|
|
||||||
|
// NSMutableArray* listViews;
|
||||||
|
UITabBarController* _tabView;
|
||||||
|
UINavigationBar* _navView;
|
||||||
|
UIActivityIndicatorView* _loader;
|
||||||
|
activegsList* _docList; // pour retrouver le label!
|
||||||
|
activegsList* _l0;
|
||||||
|
UINavigationItem* _navItem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (retain,nonatomic) UINavigationItem* navItem;
|
||||||
|
@property (retain,nonatomic) UINavigationBar* navView;
|
||||||
|
@property (retain,nonatomic) UITabBarController* tabView;
|
||||||
|
@property (retain,nonatomic) UIActivityIndicatorView* loader;
|
||||||
|
@property (retain,nonatomic) activegsList* docList;
|
||||||
|
@property (retain,nonatomic) activegsList* l0;
|
||||||
|
|
||||||
|
- (void)loadView;
|
||||||
|
-(void)updateView;
|
||||||
|
-(void)swipeLeft :(UISwipeGestureRecognizer*)_rec ;
|
||||||
|
-(void)swipeRight :(UISwipeGestureRecognizer*)_rec ;
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation ;
|
||||||
|
-(void)activateLoader:(BOOL)_on;
|
||||||
|
//+(void)initialize;
|
||||||
|
-(void)updateDialog:(NSString*) newVersion;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
555
Common.iphone/activegsViewController.mm
Normal file
@ -0,0 +1,555 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#import "activegsViewController.h"
|
||||||
|
#import "activegslist.h"
|
||||||
|
#include "../Kegs/Src/sim65816.h"
|
||||||
|
|
||||||
|
|
||||||
|
@implementation activegsViewController
|
||||||
|
@synthesize navItem = _navItem;
|
||||||
|
@synthesize navView = _navView;
|
||||||
|
@synthesize docList = _docList;
|
||||||
|
@synthesize l0 = _l0;
|
||||||
|
@synthesize loader = _loader;
|
||||||
|
@synthesize tabView = _tabView;
|
||||||
|
|
||||||
|
|
||||||
|
-(void)viewWillAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
NSLog(@"viewWillAppear -- activegsViewController");
|
||||||
|
[self updateView];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)activateLoader:(BOOL)_on
|
||||||
|
{
|
||||||
|
if (_on)
|
||||||
|
{
|
||||||
|
[self.loader startAnimating];
|
||||||
|
self.loader.hidden=false;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self.loader stopAnimating];
|
||||||
|
self.loader.hidden=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (void)UITabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
|
||||||
|
{
|
||||||
|
|
||||||
|
activegsList* l = (activegsList*)viewController;
|
||||||
|
#ifndef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
if (l.sourceName)
|
||||||
|
[(UIButton*)self.navItem.titleView setTitle:l.sourceName forState:UIControlStateNormal];
|
||||||
|
#endif
|
||||||
|
[self updateView];
|
||||||
|
#ifdef ACTIVEGS_SAVELASTTAB
|
||||||
|
// sauve la config
|
||||||
|
option.setIntValue(OPTION_LASTTAB,tabBarController.selectedIndex);
|
||||||
|
option.saveOptions(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//#define WHEELSIZEREF 100
|
||||||
|
//float WHEELSIZE = WHEELSIZEREF ;
|
||||||
|
|
||||||
|
- (void)loadView
|
||||||
|
{
|
||||||
|
NSLog(@"activeGSViewController -- loadView");
|
||||||
|
|
||||||
|
[super loadView];
|
||||||
|
|
||||||
|
CGRect r = [UIScreen mainScreen].applicationFrame;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
float s = [pManager resolutionRatio];
|
||||||
|
WHEELSIZE = WHEELSIZEREF*s;
|
||||||
|
CGRect rl = CGRectMake((self.view.frame.size.width - WHEELSIZE)/2,(self.view.frame.size.height -WHEELSIZE)/2,WHEELSIZE,WHEELSIZE);
|
||||||
|
self.loader = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];
|
||||||
|
|
||||||
|
[self.loader.layer setValue:[NSNumber numberWithFloat:2.0f*s] forKeyPath:@"transform.scale"];
|
||||||
|
self.loader = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
|
||||||
|
|
||||||
|
[self.loader setFrame:rl];
|
||||||
|
|
||||||
|
#endif
|
||||||
|
self.loader = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];
|
||||||
|
|
||||||
|
[self.view addSubview:self.loader];
|
||||||
|
|
||||||
|
[self.loader startAnimating];
|
||||||
|
self.loader.hidden=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.navView = [[[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, r.size.width, BARVIEW_HEIGHT)] autorelease];
|
||||||
|
self.navView.barStyle = UIBarStyleBlack;
|
||||||
|
// self.navView.delegate = self;
|
||||||
|
self.navItem = [[[UINavigationItem alloc] initWithTitle:@ACTIVEGS_TITLE] autorelease];
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_BACKGROUNDIMAGE
|
||||||
|
[self.view addSubview:pManager.backgroundView];
|
||||||
|
UILabel* label = [[[UILabel alloc]initWithFrame:CGRectMake(0,0,r.size.width, BARVIEW_HEIGHT)] autorelease];
|
||||||
|
label.text = @ACTIVEGS_TITLE;
|
||||||
|
label.font = [UIFont systemFontOfSize:(CGFloat)16.0];
|
||||||
|
label.backgroundColor = [UIColor clearColor];
|
||||||
|
label.textColor = [UIColor whiteColor];
|
||||||
|
label.textAlignment = UITextAlignmentCenter;
|
||||||
|
|
||||||
|
self.navItem.titleView=label;
|
||||||
|
#else
|
||||||
|
UIButton* titleButton = [UIButton buttonWithType:(UIButtonType)100];
|
||||||
|
[titleButton addTarget:self action:@selector(titleButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[titleButton setTitle:@ACTIVEGS_TITLE forState:UIControlStateNormal];
|
||||||
|
self.navItem.titleView = titleButton;
|
||||||
|
self.navItem.titleView.hidden=YES;
|
||||||
|
#endif
|
||||||
|
[self.navView pushNavigationItem:self.navItem animated:FALSE];
|
||||||
|
|
||||||
|
// Rectangle
|
||||||
|
#if 0
|
||||||
|
UIBarButtonItem *browseItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered
|
||||||
|
target:self
|
||||||
|
action:@selector(backButton:)] autorelease];
|
||||||
|
#else
|
||||||
|
// left Arrow
|
||||||
|
UIButton* backButton = [UIButton buttonWithType:(UIButtonType)101]; // left-pointing shape!
|
||||||
|
[backButton addTarget:self action:@selector(backButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[backButton setTitle:@"Back" forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
// create button item -- possible because UIButton subclasses UIView!
|
||||||
|
UIBarButtonItem* browseItem = [[[UIBarButtonItem alloc] initWithCustomView:backButton] autorelease];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
self.navItem.leftBarButtonItem = browseItem;
|
||||||
|
|
||||||
|
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
|
||||||
|
[infoButton addTarget:self action:@selector(infoButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
UIBarButtonItem* infoItem = [[[UIBarButtonItem alloc] initWithCustomView:infoButton] autorelease];
|
||||||
|
|
||||||
|
self.navItem.rightBarButtonItem = infoItem;
|
||||||
|
|
||||||
|
[self.view addSubview:self.navView];
|
||||||
|
|
||||||
|
r.origin.y = self.navView.frame.size.height;
|
||||||
|
r.size.height -= r.origin.y;
|
||||||
|
|
||||||
|
self.tabView = [[[UITabBarController alloc] init] autorelease];
|
||||||
|
[self.tabView.view setFrame:r];
|
||||||
|
self.tabView.delegate = self;
|
||||||
|
NSString *imgSource;
|
||||||
|
|
||||||
|
self.l0 = [[activegsList alloc] autorelease];
|
||||||
|
//imgSource = [[NSBundle mainBundle] pathForResource:@ACTIVEGS_FIRSTTABLIST ofType:@"activegsxml"] ;
|
||||||
|
self.l0->listPath = pManager->firstTabXML.c_str();
|
||||||
|
self.l0->filter= ALL_NO_INDEX ;
|
||||||
|
self.l0->trackerName = ACTIVEGS_FIRSTTABTRACKER;
|
||||||
|
imgSource = [[NSBundle mainBundle] pathForResource:@ACTIVEGS_FIRSTTABICON ofType:@"png"];
|
||||||
|
self.l0.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@ACTIVEGS_FIRSTTABTITLE image:[UIImage imageWithContentsOfFile: imgSource] tag:0] autorelease];
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_SINGLETAB
|
||||||
|
[self.l0.view setFrame:r];
|
||||||
|
[self.view addSubview:self.l0.view];
|
||||||
|
#else
|
||||||
|
activegsList* l3 = [[activegsList alloc] autorelease];
|
||||||
|
l3->listPath = "http://www.freetoolsassociation.com/xml/list.activegsxml";
|
||||||
|
l3->versionPath = "http://www.freetoolsassociation.com/xml/version.dat";
|
||||||
|
l3->filter= ALL;
|
||||||
|
l3.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"FTA Website" image:[UIImage imageWithContentsOfFile: imgSource] tag:0] autorelease]; ;
|
||||||
|
l3->trackerName = "FTA";
|
||||||
|
|
||||||
|
activegsList* l1 = [[activegsList alloc] autorelease];
|
||||||
|
l1->listPath = "http://www.virtualapple.org/xmlfiles/list.zip";
|
||||||
|
l1->versionPath = "http://www.virtualapple.org/xmlfiles/version.dat";
|
||||||
|
l1->filter = ONLY_APPLE2 ;
|
||||||
|
l1->trackerName = "VirtualApple2";
|
||||||
|
/*NSString */imgSource = [[NSBundle mainBundle] pathForResource:@"Tab][" ofType:@"png"];
|
||||||
|
l1.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"Apple II" image:[UIImage imageWithContentsOfFile: imgSource] tag:0] autorelease];
|
||||||
|
|
||||||
|
activegsList* l2 = [[activegsList alloc] autorelease];
|
||||||
|
l2->listPath = "http://www.virtualapple.org/xmlfiles/list.zip";;
|
||||||
|
// l2.title = @"Apple IIGS";
|
||||||
|
l2->filter = ONLY_2GS;
|
||||||
|
l2->trackerName = "VirtualApple2GS";
|
||||||
|
imgSource = [[NSBundle mainBundle] pathForResource:@"Tab2GS" ofType:@"png"];
|
||||||
|
l2.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"Apple IIGS" image:[UIImage imageWithContentsOfFile: imgSource] tag:0] autorelease];
|
||||||
|
|
||||||
|
#ifndef ACTIVEGS_ENABLE_DOCUMENT
|
||||||
|
self.docList= nil;
|
||||||
|
#else
|
||||||
|
self.docList = [[activegsList alloc] autorelease];
|
||||||
|
self.docList->listPath.Empty();
|
||||||
|
self.docList->filter = (int)(ALL_NO_INDEX|DOC_LIST);
|
||||||
|
self.docList->trackerName = "My2GS";
|
||||||
|
//docList.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"My 2GS" image:[UIImage imageWithContentsOfFile: imgSource] tag:0] autorelease];
|
||||||
|
self.docList.tabBarItem = [[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:0] autorelease];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[self.tabView setViewControllers:[NSArray arrayWithObjects:self.l0, l3, l1, l2, self.docList,nil]];
|
||||||
|
option.loadOptions();
|
||||||
|
self.tabView.selectedIndex=option.getIntValue(OPTION_LASTTAB);
|
||||||
|
|
||||||
|
[self.view addSubview:self.tabView.view];
|
||||||
|
#endif // SINGLETAB
|
||||||
|
|
||||||
|
|
||||||
|
// Swipe left to go back to browsing
|
||||||
|
UISwipeGestureRecognizer* grswipeleft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)];
|
||||||
|
grswipeleft.direction = UISwipeGestureRecognizerDirectionLeft;
|
||||||
|
[self.view addGestureRecognizer:grswipeleft];
|
||||||
|
[grswipeleft release];
|
||||||
|
|
||||||
|
// Swipe right to go back to browsing
|
||||||
|
UISwipeGestureRecognizer* grswiperight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)];
|
||||||
|
grswiperight.direction = UISwipeGestureRecognizerDirectionRight;
|
||||||
|
[self.view addGestureRecognizer:grswiperight];
|
||||||
|
[grswiperight release];
|
||||||
|
|
||||||
|
// pour etre sur qu'il soit visible
|
||||||
|
[self.view bringSubviewToFront:self.loader];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewDidUnload
|
||||||
|
{
|
||||||
|
|
||||||
|
self.tabView.delegate = nil;
|
||||||
|
self.tabView = nil;
|
||||||
|
self.navItem = nil;
|
||||||
|
self.navView = nil;
|
||||||
|
self.loader = nil;
|
||||||
|
|
||||||
|
[super viewDidUnload];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)updateDialog:(NSString*) newVersion
|
||||||
|
{
|
||||||
|
|
||||||
|
activegsList* l = (activegsList*) self.tabView.selectedViewController;
|
||||||
|
NSString* fmt = [NSString stringWithFormat:@"Database version v%@ is available!\n(current installed version is v%@)\n\nDo you want to update ?",newVersion,l.sourceRevision];
|
||||||
|
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:l.sourceName message:fmt delegate:self cancelButtonTitle:@"Later" otherButtonTitles:@"Update Now",nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)titleButton:(id)sender
|
||||||
|
{
|
||||||
|
|
||||||
|
activegsList* l = (activegsList*) self.tabView.selectedViewController;
|
||||||
|
NSString* fmt = @"No Database present";
|
||||||
|
NSString* title = @"ActiveGS";
|
||||||
|
if (l.sourceName)
|
||||||
|
{
|
||||||
|
fmt = [NSString stringWithFormat:@"Database v%@\n\nPress Refresh to reload the database.",l.sourceRevision];
|
||||||
|
title = l.sourceName;
|
||||||
|
}
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message:fmt delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Refresh",nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||||
|
{
|
||||||
|
if (buttonIndex==1)
|
||||||
|
{
|
||||||
|
|
||||||
|
activegsList* l = (activegsList*) self.tabView.selectedViewController;
|
||||||
|
if (!l) l=self.l0; // BestOfFTA
|
||||||
|
|
||||||
|
// Force redownloading of asset
|
||||||
|
[l reloadData:YES];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)updateView
|
||||||
|
{
|
||||||
|
|
||||||
|
CGRect rv2 = [[UIScreen mainScreen] applicationFrame];
|
||||||
|
if (abs([pManager getAngle])!=90)
|
||||||
|
{
|
||||||
|
float t = rv2.size.width;
|
||||||
|
rv2.size.width = rv2.size.height;
|
||||||
|
rv2.size.height = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajuste la barre de navigation
|
||||||
|
CGRect rc = self.navView.frame;
|
||||||
|
rc.size.width = rv2.size.width;
|
||||||
|
[self.navView setFrame:rc];
|
||||||
|
|
||||||
|
// Ajuste la position du loader
|
||||||
|
CGRect r = self.loader.frame;
|
||||||
|
r = CGRectMake((rv2.size.width - r.size.width)/2,(rv2.size.height -r.size.height)/2,r.size.width,r.size.height);
|
||||||
|
[self.loader setFrame:r];
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_ENABLE_DOCUMENT
|
||||||
|
// ajuste la position du warning
|
||||||
|
if (self.docList.warningLabel)
|
||||||
|
{
|
||||||
|
CGSize s = CGSizeMake(rv2.size.width,rv2.size.height-44.0*2);
|
||||||
|
CGRect r = CGRectMake((s.width-LABELWIDTH)/2,(s.height-LABELHEIGHT)/2,LABELWIDTH,LABELHEIGHT);
|
||||||
|
self.docList.warningLabel.frame = r;
|
||||||
|
[self.docList.warningLabel.superview bringSubviewToFront:self.docList.warningLabel];
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// ajuste la position du background
|
||||||
|
CGRect rb = pManager.backgroundImageView.frame;
|
||||||
|
rb.origin.x = (rv2.size.width - rb.size.width)/2;
|
||||||
|
rb.origin.y = (rv2.size.height - rb.size.height)/2;
|
||||||
|
pManager.backgroundImageView.frame = rb ;
|
||||||
|
pManager.backgroundView.frame = rv2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[pManager updateNotificationView:rv2];
|
||||||
|
|
||||||
|
/*
|
||||||
|
activegsList* l = self ; //(activegsList*)viewController;
|
||||||
|
if (l.sourceName)
|
||||||
|
[(UIButton*)self.navItem.titleView setTitle:l.sourceName forState:UIControlStateNormal];
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)swipeLeft :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
|
||||||
|
[pManager doStateChange:[pManager getEmulatorView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeRight :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getEmulatorView]type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)backButton:(id)sender {
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_IMAGEREQUIRED
|
||||||
|
// vérifie que l'émulateur fonctionne
|
||||||
|
if (!pMac)
|
||||||
|
{
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"ActiveGS" message:@"Select a program in the list first." delegate:nil cancelButtonTitle:@"Done" otherButtonTitles:nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
[pManager doStateChange:[pManager getEmulatorView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)infoButton:(id)sender {
|
||||||
|
|
||||||
|
[pManager doStateChange:[pManager getInfoView] type:kCATransitionFade sens:kCATransitionFromLeft];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// IOS 5 Compatibility
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IOS6
|
||||||
|
- (BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void x_config_load_roms()
|
||||||
|
{
|
||||||
|
extern byte *g_rom_fc_ff_ptr;
|
||||||
|
extern byte *g_rom_fc_ff_ptr;
|
||||||
|
extern unsigned char gsrom01[];
|
||||||
|
extern unsigned char apple2e_rom[];
|
||||||
|
extern unsigned char apple2e_disk[];
|
||||||
|
|
||||||
|
g_sim65816.g_mem_size_base = 256*1024;
|
||||||
|
memset(&g_rom_fc_ff_ptr[0], 0, 2*65536);
|
||||||
|
|
||||||
|
#ifndef ACTIVEGS_MANUAL_ROM
|
||||||
|
|
||||||
|
#ifdef USE_APPLE2_ROM
|
||||||
|
// main
|
||||||
|
memcpy(&g_rom_fc_ff_ptr[4*65536-16*1024], &apple2e_rom[16*1024],16*1024);
|
||||||
|
|
||||||
|
// aux
|
||||||
|
memcpy(&g_rom_fc_ff_ptr[3*65536-16*1024], &apple2e_rom[0],16*1024);
|
||||||
|
|
||||||
|
// disk
|
||||||
|
memcpy(&g_rom_fc_ff_ptr[3*65536+0xC600], &apple2e_disk[0],1*256);
|
||||||
|
g_sim65816.g_rom_version = -2;
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_NOAPPLEBRANDING
|
||||||
|
for(int i =0;i<9;i++)
|
||||||
|
g_rom_fc_ff_ptr[0x03ff0A+i]=0xA0; // Apple //e
|
||||||
|
for(int i =0;i<3;i++)
|
||||||
|
g_rom_fc_ff_ptr[0x03fbe9+i]=0xEA; // System sound
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
extern unsigned char gsrom01[];
|
||||||
|
memcpy(&g_rom_fc_ff_ptr[2*65536], gsrom01,128*1024);
|
||||||
|
|
||||||
|
// Patch la rom
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_NOAPPLEBRANDING
|
||||||
|
|
||||||
|
#define TOGS(MEM,STR) \
|
||||||
|
{ \
|
||||||
|
char* d = (char*)MEM; \
|
||||||
|
const char* s = STR; \
|
||||||
|
char c; \
|
||||||
|
while((c=*s++)!=0) *d++=(c|0x80); \
|
||||||
|
*d=0; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// g_rom_fc_ff_ptr[0x03bb97]=0x60; // Ret == fully disable display
|
||||||
|
g_rom_fc_ff_ptr[0x03bb11]=0x0D; // Number of space
|
||||||
|
TOGS(&g_rom_fc_ff_ptr[0x03bb13],"Please Wait...");
|
||||||
|
g_rom_fc_ff_ptr[0x03bb8e]=0x0B; // Center Line
|
||||||
|
g_rom_fc_ff_ptr[0x03bbb8]=0x60; // Abort display
|
||||||
|
#endif
|
||||||
|
g_sim65816.g_rom_version = 1;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
extern int readROMFromFile();
|
||||||
|
|
||||||
|
int ret = readROMFromFile();
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
fatal_printf("ROM file not found\n");
|
||||||
|
x_fatal_exit("You need to install first a file named \"ROM\" containing a dump of an Apple IIGS™ ROM01 (128KB).\nConnect your device to your computer, and from iTunes, copy the ROM file to MyDevice>Apps\n>ActiveGS>Documents directory.\n\nMore info on the ActiveGS website.");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
g_sim65816.g_rom_version = 1;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_MANUAL_ROM
|
||||||
|
|
||||||
|
MyString romPath;
|
||||||
|
|
||||||
|
void initRomPath()
|
||||||
|
{
|
||||||
|
NSArray *dopaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||||
|
NSString *documentsDirectory = [dopaths objectAtIndex:0];
|
||||||
|
romPath = [documentsDirectory UTF8String];
|
||||||
|
romPath += '/';
|
||||||
|
romPath += "ROM";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* getRomPath()
|
||||||
|
{
|
||||||
|
return romPath.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int readROMFromFile()
|
||||||
|
{
|
||||||
|
|
||||||
|
extern byte* g_rom_fc_ff_ptr;
|
||||||
|
|
||||||
|
const char* rp = getRomPath();
|
||||||
|
if (!rp)
|
||||||
|
{
|
||||||
|
printf("ROM Path missing\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fd = open(rp, O_RDONLY | O_BINARY);
|
||||||
|
if(fd < 0)
|
||||||
|
{
|
||||||
|
printf("Open ROM file %s failed:%d, errno:%d\n",rp , fd, errno);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
struct stat stat_buf;
|
||||||
|
int ret = fstat(fd, &stat_buf);
|
||||||
|
if(ret != 0)
|
||||||
|
{
|
||||||
|
printf("fstat returned %d on fd %d, errno: %d\n",ret, fd, errno);
|
||||||
|
close(fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int len = stat_buf.st_size;
|
||||||
|
if(len != 128*1024)
|
||||||
|
{
|
||||||
|
printf("Only ROM01 is supported\n");
|
||||||
|
close(fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ret = read(fd, &g_rom_fc_ff_ptr[2*65536], len);
|
||||||
|
if(ret != len)
|
||||||
|
{
|
||||||
|
printf("error while reading not ROM: %d\n", errno);
|
||||||
|
close(fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
// calcul un checksum rapide sur
|
||||||
|
int crc=0;
|
||||||
|
int l = 0;
|
||||||
|
const char* ptr = (const char*)&g_rom_fc_ff_ptr[2*65536];
|
||||||
|
int nb = len;
|
||||||
|
while(nb)
|
||||||
|
{
|
||||||
|
crc ^= *ptr << (l%24);
|
||||||
|
ptr++;
|
||||||
|
l+=3;
|
||||||
|
nb--;
|
||||||
|
}
|
||||||
|
if (crc != 0xFE2CE93D)
|
||||||
|
{
|
||||||
|
printf("ROM01 checksum failed : only original ROM01 is supported!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
110
Common.iphone/activegsViewController.xib
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1552</int>
|
||||||
|
<string key="IBDocument.SystemVersion">13F34</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">6254</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1265.21</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">698.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">6247</string>
|
||||||
|
</object>
|
||||||
|
<array key="IBDocument.IntegratedClassDependencies">
|
||||||
|
<string>IBProxyObject</string>
|
||||||
|
<string>IBUIView</string>
|
||||||
|
</array>
|
||||||
|
<array key="IBDocument.PluginDependencies">
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</array>
|
||||||
|
<dictionary class="NSMutableDictionary" key="IBDocument.Metadata"/>
|
||||||
|
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="843779117">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="774585933">
|
||||||
|
<nil key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<string key="NSFrameSize">{320, 460}</string>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC43NQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||||
|
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics">
|
||||||
|
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
|
||||||
|
<string key="IBUIDisplayName">Freeform</string>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<array key="connectionRecords">
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">view</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="774585933"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">7</int>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<array key="orderedObjects">
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<array key="object" id="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="843779117"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">6</int>
|
||||||
|
<reference key="object" ref="774585933"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
</array>
|
||||||
|
</object>
|
||||||
|
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<string key="-1.CustomClassName">activegsViewController</string>
|
||||||
|
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="-2.CustomClassName">UIResponder</string>
|
||||||
|
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">7</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="4600" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
</data>
|
||||||
|
</archive>
|
24
Common.iphone/asynccommand.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|
||||||
|
@interface AsyncCommand : NSObject
|
||||||
|
{
|
||||||
|
NSMutableData* _data;
|
||||||
|
NSURLConnection* _theConnection;
|
||||||
|
NSString *_url;
|
||||||
|
id callbackObj;
|
||||||
|
SEL callbackSel;
|
||||||
|
}
|
||||||
|
@property (retain,nonatomic) NSMutableData* data;
|
||||||
|
@property (retain,nonatomic) NSURLConnection* theConnection;
|
||||||
|
@property (retain,nonatomic) NSString *url;
|
||||||
|
|
||||||
|
- (AsyncCommand*)initCommand: (const char*)url withObject:(id)_obj withSelector:(SEL)_sel;
|
||||||
|
|
||||||
|
@end
|
78
Common.iphone/asynccommand.mm
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "activegsAppDelegate.h"
|
||||||
|
#include "../common/CEmulatorCtrl.h"
|
||||||
|
#include "asynccommand.h"
|
||||||
|
|
||||||
|
@implementation AsyncCommand
|
||||||
|
|
||||||
|
@synthesize theConnection = _theConnection;
|
||||||
|
@synthesize url = _url;
|
||||||
|
@synthesize data = _data;
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
self.data = nil;
|
||||||
|
self.theConnection = nil;
|
||||||
|
self.url = nil;
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (AsyncCommand*)initCommand: (const char*)_myurl withObject:(id)_obj withSelector:(SEL)_sel
|
||||||
|
{
|
||||||
|
|
||||||
|
callbackObj = _obj;
|
||||||
|
callbackSel = _sel;
|
||||||
|
|
||||||
|
self.url = [NSString stringWithUTF8String:_myurl];
|
||||||
|
|
||||||
|
NSURL* urlnoescape = [[[NSURL alloc] initWithString:[self.url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] autorelease];
|
||||||
|
|
||||||
|
NSURLRequest* request = [NSURLRequest requestWithURL:urlnoescape cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0];
|
||||||
|
self.theConnection = [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease];
|
||||||
|
|
||||||
|
|
||||||
|
if (!self.theConnection)
|
||||||
|
{
|
||||||
|
printf("NSURLConnection failed\n");
|
||||||
|
// appelle la callback
|
||||||
|
[callbackObj performSelector:callbackSel withObject:nil];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
[self retain]; // ajoute une référence
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//the URL connection calls this repeatedly as data arrives
|
||||||
|
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)incrementalData {
|
||||||
|
if (self.data==nil) { self.data = [[[NSMutableData alloc] initWithCapacity:2048] autorelease]; }
|
||||||
|
[self.data appendData:incrementalData];
|
||||||
|
}
|
||||||
|
|
||||||
|
//the URL connection calls this once all the data has downloaded
|
||||||
|
- (void)connectionDidFinishLoading:(NSURLConnection*)connection {
|
||||||
|
|
||||||
|
printf("callback received\n");
|
||||||
|
[callbackObj performSelector:callbackSel withObject:self.data];
|
||||||
|
self.data=nil;
|
||||||
|
[self release];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("callback failed\n",[self.url UTF8String]);
|
||||||
|
[callbackObj performSelector:callbackSel withObject:nil];
|
||||||
|
self.data=nil;
|
||||||
|
[self release];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
50
Common.iphone/asyncimageview.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#include "activegsList.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface asyncImageQueue : NSObject
|
||||||
|
{
|
||||||
|
NSURLConnection* _theConnection ;
|
||||||
|
NSMutableArray* _theQueue ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@property (retain,nonatomic) NSURLConnection* theConnection ;
|
||||||
|
@property (retain,nonatomic) NSMutableArray* theQueue ;
|
||||||
|
|
||||||
|
-(void)prioritizeItem:(UIImageView*)_mytarget;
|
||||||
|
+(void) initialize;
|
||||||
|
- (void)nextDownload;
|
||||||
|
+(asyncImageQueue*)sharedQueue;
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface AsyncImageView : NSObject
|
||||||
|
{
|
||||||
|
NSMutableData* _data;
|
||||||
|
UIImageView* _target;
|
||||||
|
NSString *_url;
|
||||||
|
int width,height;
|
||||||
|
MyString thumb;
|
||||||
|
MyString cachedURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (retain,nonatomic) NSMutableData* data;
|
||||||
|
@property (retain,nonatomic) UIImageView* target;
|
||||||
|
@property (retain,nonatomic) NSString *url;
|
||||||
|
|
||||||
|
|
||||||
|
- (void)processDownload;
|
||||||
|
- (void)initImage:(const char*)_thumb /*theCell:(UITableViewCell*)_cell*/ target:(UIImageView*)_target width:(int)_width height:(int)_height;
|
||||||
|
-(void)loadImage:(id)_sender;
|
||||||
|
+(UIImage*)processImage:(UIImage*)_img width:(int)_width height:(int)_height;
|
||||||
|
-(void)setImageForCell:(UIImage*) _img;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
380
Common.iphone/asyncimageview.mm
Normal file
@ -0,0 +1,380 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "activegsAppDelegate.h"
|
||||||
|
#import "AsyncImageView.h"
|
||||||
|
#include "../common/CEmulatorCtrl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static asyncImageQueue* queue = nil;
|
||||||
|
static UIActivityIndicatorView* asyncloader=nil;
|
||||||
|
|
||||||
|
|
||||||
|
@implementation asyncImageQueue
|
||||||
|
|
||||||
|
@synthesize theQueue = _theQueue;
|
||||||
|
@synthesize theConnection = _theConnection;
|
||||||
|
|
||||||
|
|
||||||
|
+(void) initialize{
|
||||||
|
|
||||||
|
// singleton
|
||||||
|
queue = [[asyncImageQueue alloc] init];
|
||||||
|
queue.theQueue = [[[NSMutableArray alloc] init ] autorelease];
|
||||||
|
queue.theConnection = nil;
|
||||||
|
|
||||||
|
asyncloader = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+(asyncImageQueue*)sharedQueue
|
||||||
|
{
|
||||||
|
return queue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
|
||||||
|
// [self.theConnection cancel]; //in case the URL is still downloading
|
||||||
|
self.theConnection = nil;
|
||||||
|
self.theQueue = nil;
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)prioritizeItem:(UIImageView*)_mytarget {
|
||||||
|
|
||||||
|
int nb = [self.theQueue count];
|
||||||
|
for(int i=0;i<nb;i++)
|
||||||
|
{
|
||||||
|
AsyncImageView* o = [self.theQueue objectAtIndex:i];
|
||||||
|
if (o.target==_mytarget)
|
||||||
|
{
|
||||||
|
// le remet au début de la pile = A FAIRE DANS CETTE ORDRE
|
||||||
|
[o retain];
|
||||||
|
[self.theQueue removeObject:o];
|
||||||
|
[self.theQueue addObject:o];
|
||||||
|
[o release];
|
||||||
|
debug_printf("image put on top of the cache %s\n",[o.url UTF8String]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)nextDownload {
|
||||||
|
|
||||||
|
debug_printf("next download");
|
||||||
|
if (self.theConnection)
|
||||||
|
{
|
||||||
|
debug_printf("*wait\n");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AsyncImageView* obj = [self.theQueue lastObject];
|
||||||
|
if (obj)
|
||||||
|
{
|
||||||
|
[obj processDownload];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
debug_printf("*nothing to unqueue*\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
-(void)removeObject:(id)_obj
|
||||||
|
{
|
||||||
|
debug_printf("remove object");
|
||||||
|
[self.theQueue removeObject:_obj];
|
||||||
|
// [self.theConnection release];
|
||||||
|
self.theConnection = nil;
|
||||||
|
[self nextDownload];
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation AsyncImageView
|
||||||
|
|
||||||
|
@synthesize data = _data;
|
||||||
|
@synthesize target = _target;
|
||||||
|
@synthesize url = _url;
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
self.data = nil;
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)processDownload {
|
||||||
|
|
||||||
|
// printf("processDownload (%s)\n",[url UTF8String]);
|
||||||
|
|
||||||
|
[asyncloader removeFromSuperview];
|
||||||
|
|
||||||
|
CGRect r = self.target.frame;
|
||||||
|
CGRect f = asyncloader.frame;
|
||||||
|
f.origin.x = (r.size.width-f.size.width)/2;
|
||||||
|
f.origin.y = (r.size.height-f.size.height)/2;
|
||||||
|
asyncloader.frame = f;
|
||||||
|
[ self.target addSubview:asyncloader];
|
||||||
|
[asyncloader startAnimating];
|
||||||
|
|
||||||
|
NSURL* urlnoescape = [[NSURL alloc] initWithString:[ self.url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] ;
|
||||||
|
|
||||||
|
NSURLRequest* request = [NSURLRequest requestWithURL:urlnoescape cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0] ;
|
||||||
|
|
||||||
|
queue.theConnection = [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease] ;
|
||||||
|
|
||||||
|
if (!queue.theConnection)
|
||||||
|
printf("NSURLConnection failed\n");
|
||||||
|
|
||||||
|
[urlnoescape release];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initImage:(const char*)_thumb target:(UIImageView*)_mytarget width:(int)_width height:(int)_height
|
||||||
|
{
|
||||||
|
thumb = _thumb;
|
||||||
|
width = _width;
|
||||||
|
height = _height;
|
||||||
|
self.target = _mytarget;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//- (void)loadImage:(const char*)_thumb target:(UIImageView*)_target width:(int)_width height:(int)_height
|
||||||
|
- (void)loadImage:(id)_sender
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (thumb.IsEmpty()) return ;
|
||||||
|
NSString* str = [NSString stringWithUTF8String:thumb.c_str()];
|
||||||
|
if ( self.data!=nil)
|
||||||
|
{
|
||||||
|
self.data =nil;
|
||||||
|
}
|
||||||
|
if (!str) return ;
|
||||||
|
|
||||||
|
|
||||||
|
// regarde si l'image générée est dans le cache
|
||||||
|
|
||||||
|
MyString fnoext =getfilenoext(getfile(thumb.c_str()));
|
||||||
|
MyString cache;
|
||||||
|
cache.Format("%s_%d_%d.%s",fnoext.c_str(),width,height,getext(thumb.c_str()));
|
||||||
|
CDownload dl("***ERROR***");
|
||||||
|
dl.getPersistentDirectoryFile(cache.c_str(),IPHONETHUMB,cachedURL);
|
||||||
|
NSString* strc = [NSString stringWithUTF8String:cachedURL.c_str()] ;
|
||||||
|
UIImage* imageView = [UIImage imageWithContentsOfFile:strc] ;
|
||||||
|
if (imageView)
|
||||||
|
{
|
||||||
|
debug_printf("target image loaded from cache %s\n",getfile(cachedURL.c_str()));
|
||||||
|
self.target.image = imageView;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// non : regarde si l'image original a déjà été téléchargé
|
||||||
|
|
||||||
|
if ([str length] > 7 && [[str substringToIndex:7] compare:@"http://"])
|
||||||
|
{
|
||||||
|
NSString *str2;
|
||||||
|
if (thumb.at(0) != '/')
|
||||||
|
{
|
||||||
|
// ressource image
|
||||||
|
str2 = [[NSBundle mainBundle] pathForResource:str ofType:nil];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// absolute path
|
||||||
|
str2 = str ; //[NSString stringWithUTF8String:str];
|
||||||
|
}
|
||||||
|
imageView = [[UIImage imageWithContentsOfFile:str2] retain]; // to mimic init
|
||||||
|
if (!imageView)
|
||||||
|
{
|
||||||
|
printf("init image failed (%s)\n",[str2 UTF8String]);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
debug_printf("image loaded from resource %s\n",getfile([str2 UTF8String]));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.url = str;
|
||||||
|
|
||||||
|
// regarde si l'image est dans le cache
|
||||||
|
|
||||||
|
dl.getPersistentDirectoryFile([self.url UTF8String],IPHONETHUMB,cache);
|
||||||
|
NSString* strcache = [NSString stringWithUTF8String:cache.c_str()];
|
||||||
|
imageView = [[UIImage imageWithContentsOfFile:strcache] retain];
|
||||||
|
if (imageView)
|
||||||
|
{
|
||||||
|
debug_printf("image loaded from cache %s\n",getfile(cache.c_str()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
asyncImageQueue* q = [asyncImageQueue sharedQueue];
|
||||||
|
[q.theQueue addObject:self];
|
||||||
|
[q nextDownload];
|
||||||
|
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[self setImageForCell:imageView];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//the URL connection calls this repeatedly as data arrives
|
||||||
|
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)incrementalData {
|
||||||
|
if (self.data==nil) { self.data = [[[NSMutableData alloc] initWithCapacity:2048] autorelease]; }
|
||||||
|
[self.data appendData:incrementalData];
|
||||||
|
}
|
||||||
|
|
||||||
|
//the URL connection calls this once all the data has downloaded
|
||||||
|
- (void)connectionDidFinishLoading:(NSURLConnection*)connection {
|
||||||
|
|
||||||
|
[asyncloader removeFromSuperview];
|
||||||
|
[asyncloader stopAnimating];
|
||||||
|
|
||||||
|
UIImage* imageView = [[UIImage alloc] initWithData:self.data] ;
|
||||||
|
if (!imageView)
|
||||||
|
{
|
||||||
|
printf("init image failed (%s)\n",[self.url UTF8String]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// process l'image
|
||||||
|
NSData * png = self.data;
|
||||||
|
MyString cache;
|
||||||
|
CDownload dl("***ERROR***");
|
||||||
|
dl.getPersistentDirectoryFile([self.url UTF8String],IPHONETHUMB,cache);
|
||||||
|
FILE* f = fopen(cache.c_str(),"wb");
|
||||||
|
if (f)
|
||||||
|
{
|
||||||
|
fwrite(png.bytes,1,png.length,f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("cannot update cache %s\n",cache.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
debug_printf("image downloaded (%s)\n",getfile([self.url UTF8String]));
|
||||||
|
[self performSelectorOnMainThread:@selector(setImageForCell:) withObject:imageView waitUntilDone:NO];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
self.data=nil;
|
||||||
|
|
||||||
|
[[asyncImageQueue sharedQueue] removeObject:self];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
|
||||||
|
{
|
||||||
|
printf("didFailWithError (%s)\n",[self.url UTF8String]);
|
||||||
|
|
||||||
|
[asyncloader removeFromSuperview];
|
||||||
|
[asyncloader stopAnimating];
|
||||||
|
|
||||||
|
self.data=nil;
|
||||||
|
|
||||||
|
[[asyncImageQueue sharedQueue] removeObject:self];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+(UIImage*)processImage:(UIImage*)_img width:(int)_width height:(int)_height
|
||||||
|
{
|
||||||
|
#define IMAGESCALE 1
|
||||||
|
#define SHADOW 2
|
||||||
|
#define LEFTMARGIN 6
|
||||||
|
#define BOTTOMMARGIN 0
|
||||||
|
#define TOPMARGIN 0
|
||||||
|
|
||||||
|
const float s = [pManager dpiRatio];
|
||||||
|
|
||||||
|
CGRect r = CGRectMake(0,0,_width*s,_height*s);
|
||||||
|
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
|
||||||
|
CGContextRef context = CGBitmapContextCreate(nil, (int)r.size.width,(int)r.size.height, 8, (int)r.size.width*4,colorSpace,kCGImageAlphaPremultipliedLast/*kCGImageAlphaNone*/);
|
||||||
|
|
||||||
|
float ovalWidth=14*s,ovalHeight=14*s;
|
||||||
|
CGContextSaveGState(context);
|
||||||
|
CGContextTranslateCTM (context, CGRectGetMinX(r), CGRectGetMinY(r));
|
||||||
|
CGContextScaleCTM (context, ovalWidth, ovalHeight);
|
||||||
|
float fw = CGRectGetWidth (r) / ovalWidth;
|
||||||
|
float fh = CGRectGetHeight (r) / ovalHeight;
|
||||||
|
CGContextMoveToPoint(context, fw, fh/2);
|
||||||
|
CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
|
||||||
|
CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
|
||||||
|
CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
|
||||||
|
CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
|
||||||
|
CGContextClosePath(context);
|
||||||
|
CGContextRestoreGState(context);
|
||||||
|
CGContextClip(context);
|
||||||
|
//CGContextSetInterpolationQuality(context,kCGInterpolationHigh);
|
||||||
|
CGContextDrawImage(context,r,[_img CGImage]);
|
||||||
|
CGImageRef imageRef2 = CGBitmapContextCreateImage(context);
|
||||||
|
// Crée une nouvelle image pour le shadow
|
||||||
|
CGRect r2 = CGRectMake(0,0,r.size.width+(LEFTMARGIN+SHADOW)*s,r.size.height+(SHADOW*2+BOTTOMMARGIN+TOPMARGIN)*s);
|
||||||
|
CGContextRef context2 = CGBitmapContextCreate(nil,(int)r2.size.width,(int)r2.size.height, 8, (int)r2.size.width*4,colorSpace,kCGImageAlphaPremultipliedLast/*kCGImageAlphaNone*/);
|
||||||
|
|
||||||
|
CGContextSaveGState(context2);
|
||||||
|
CGContextSetShadowWithColor(context2, CGSizeMake(SHADOW*s, -SHADOW*s), 4, [[UIColor grayColor] CGColor]);
|
||||||
|
|
||||||
|
CGRect rdest = r;
|
||||||
|
rdest.origin.x = LEFTMARGIN*s;
|
||||||
|
rdest.origin.y = (BOTTOMMARGIN+SHADOW)*s;
|
||||||
|
//CGContextSetInterpolationQuality(context2,kCGInterpolationHigh);
|
||||||
|
|
||||||
|
CGContextDrawImage(context2,rdest,imageRef2);
|
||||||
|
CGContextRestoreGState(context2);
|
||||||
|
|
||||||
|
CGImageRef imageRef = CGBitmapContextCreateImage(context2);
|
||||||
|
UIImage* newImage = [UIImage imageWithCGImage:imageRef];
|
||||||
|
|
||||||
|
CGColorSpaceRelease(colorSpace);
|
||||||
|
CGContextRelease(context);
|
||||||
|
CFRelease(imageRef);
|
||||||
|
CGContextRelease(context2);
|
||||||
|
CFRelease(imageRef2);
|
||||||
|
|
||||||
|
return newImage;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)setImageForCell:(UIImage*) _img
|
||||||
|
{
|
||||||
|
debug_printf("setImageForCell");
|
||||||
|
|
||||||
|
UIImage* img2 = [AsyncImageView processImage:_img width:width height:height];
|
||||||
|
|
||||||
|
[self.target setNeedsDisplay];
|
||||||
|
|
||||||
|
[UIView beginAnimations:@"ToggleSiblings" context:nil];
|
||||||
|
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft /*UIViewAnimationTransitionCurlUp*/ forView:self.target cache:YES];
|
||||||
|
[UIView setAnimationDuration:1.0];
|
||||||
|
self.target.image = img2;
|
||||||
|
[UIView commitAnimations];
|
||||||
|
|
||||||
|
// sauve dans le cache
|
||||||
|
NSData *png = UIImagePNGRepresentation(img2);
|
||||||
|
|
||||||
|
FILE* f = fopen(cachedURL.c_str(),"wb");
|
||||||
|
if (f)
|
||||||
|
{
|
||||||
|
fwrite(png.bytes,1,png.length,f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("cannot update cache %s\n",cachedURL.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
[_img release];
|
||||||
|
|
||||||
|
}
|
||||||
|
@end
|
62
Common.iphone/detailViewController.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#import "activegsList.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface detailViewController : UIVIEWCONTROLLERROOT <UIWebViewDelegate,UIAlertViewDelegate> {
|
||||||
|
|
||||||
|
NSURL* requestURL ;
|
||||||
|
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
UINavigationItem* _navItem;
|
||||||
|
|
||||||
|
UILabel* _diskName;
|
||||||
|
UILabel* _diskYear;
|
||||||
|
UILabel* _diskCompany;
|
||||||
|
UITextView* _diskDescription;
|
||||||
|
UIImageView* _diskApple2;
|
||||||
|
UIImageView* _diskApple2GS;
|
||||||
|
UIWebView* _diskWebView;
|
||||||
|
UIImageView* _screenShot1;
|
||||||
|
UIImageView* _screenShot2;
|
||||||
|
UIImageView* _screenShot3;
|
||||||
|
UINavigationBar* _navView;
|
||||||
|
/*
|
||||||
|
itemClass* _diskSelected;
|
||||||
|
activegsList* _list;
|
||||||
|
*/
|
||||||
|
@public
|
||||||
|
ActiveGSElement* diskSelected;
|
||||||
|
ActiveGSList* list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@property (nonatomic, retain) IBOutlet UILabel* diskName;
|
||||||
|
@property (nonatomic, retain) IBOutlet UILabel* diskYear;
|
||||||
|
@property (nonatomic, retain) IBOutlet UILabel* diskCompany;
|
||||||
|
@property (nonatomic, retain) IBOutlet UITextView* diskDescription;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIImageView* diskApple2;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIImageView* diskApple2GS;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIWebView* diskWebView;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIImageView* screenShot1;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIImageView* screenShot2;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIImageView* screenShot3;
|
||||||
|
@property (nonatomic, retain) IBOutlet UINavigationBar* navView;
|
||||||
|
/*
|
||||||
|
@property (nonatomic, retain) itemClass* diskSelected;
|
||||||
|
@property (nonatomic, retain) activegsList* list;
|
||||||
|
*/
|
||||||
|
@property (nonatomic, retain) UINavigationItem* navItem;
|
||||||
|
|
||||||
|
|
||||||
|
- (IBAction) launchButton:(id)_sender;
|
||||||
|
|
||||||
|
@end
|
208
Common.iphone/detailViewController.mm
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#import "detailViewController.h"
|
||||||
|
#import "activegsList.h"
|
||||||
|
#include "../Common/svnversion.h"
|
||||||
|
#import "asyncimageview.h"
|
||||||
|
#import "activegsViewController.h"
|
||||||
|
|
||||||
|
|
||||||
|
@implementation detailViewController
|
||||||
|
|
||||||
|
@synthesize diskName=_diskName;
|
||||||
|
@synthesize diskCompany = _diskCompany;
|
||||||
|
@synthesize diskYear=_diskYear;
|
||||||
|
@synthesize diskDescription = _diskDescription;
|
||||||
|
@synthesize diskApple2 = _diskApple2;
|
||||||
|
@synthesize diskApple2GS = _diskApple2GS;
|
||||||
|
@synthesize diskWebView = _diskWebView;
|
||||||
|
@synthesize screenShot1 = _screenShot1;
|
||||||
|
@synthesize screenShot2 = _screenShot2;
|
||||||
|
@synthesize screenShot3 = _screenShot3;
|
||||||
|
@synthesize navView = _navView;
|
||||||
|
@synthesize navItem = _navItem;
|
||||||
|
/*
|
||||||
|
@synthesize diskSelected = _diskSelected;
|
||||||
|
@synthesize list = _list;
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
|
||||||
|
{
|
||||||
|
|
||||||
|
requestURL = [[ request URL ] retain];
|
||||||
|
|
||||||
|
// Check to see what protocol/scheme the requested URL is.
|
||||||
|
if ( ( [ [ requestURL scheme ] isEqualToString: @"http" ]
|
||||||
|
|| [ [ requestURL scheme ] isEqualToString: @"https" ] )
|
||||||
|
&& ( navigationType == UIWebViewNavigationTypeLinkClicked ) ) {
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"iPhone" message:@"Link will open in Safari, continue?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No",nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||||
|
{
|
||||||
|
if (buttonIndex==0)
|
||||||
|
[[ UIApplication sharedApplication ] openURL: requestURL ];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("settitle2:%s\n",self->diskSelected->name.c_str());
|
||||||
|
|
||||||
|
[self.navItem setTitle:[NSString stringWithUTF8String: self->diskSelected->name.c_str()]];
|
||||||
|
self.diskName.text = [NSString stringWithUTF8String: self->diskSelected->name.c_str()];
|
||||||
|
self.diskCompany.text = [NSString stringWithUTF8String: self->diskSelected->publisher.c_str()];
|
||||||
|
NSString* desc = [NSString stringWithUTF8String: self->diskSelected->desc.c_str()];
|
||||||
|
float rr = [pManager resolutionRatio];
|
||||||
|
float fs1 = .9 * rr;
|
||||||
|
float fs2 = 1.5 ;//* rr;
|
||||||
|
NSString* html = [NSString stringWithFormat:@"<HTML><head><style type=\"text/css\">p { font: %fem/%fem helvetica; text-align: justify; } </style></head><body><div id='ContentDiv'><p>%@</p></div></body></HTML>",fs1,fs2,desc];
|
||||||
|
|
||||||
|
[self.diskWebView loadHTMLString:html baseURL:nil];
|
||||||
|
|
||||||
|
self.diskYear.text = [NSString stringWithUTF8String: self->diskSelected->year.c_str()];
|
||||||
|
|
||||||
|
#ifdef ACTIVEGS_NOAPPLEBRANDING
|
||||||
|
self.diskApple2.hidden = TRUE;
|
||||||
|
self.diskApple2GS.hidden = TRUE;
|
||||||
|
#else
|
||||||
|
self.diskApple2.hidden = (self->diskSelected->is2GS);
|
||||||
|
self.diskApple2GS.hidden = !(self->diskSelected->is2GS);
|
||||||
|
#endif
|
||||||
|
self.screenShot1.image = nil;
|
||||||
|
self.screenShot2.image = nil;
|
||||||
|
self.screenShot3.image = nil;
|
||||||
|
|
||||||
|
AsyncImageView* asyncImage1 = [[AsyncImageView alloc] autorelease] ;
|
||||||
|
[asyncImage1 initImage:self->diskSelected->screenShots[0].c_str() target:self.screenShot1 width:128 height:80];
|
||||||
|
[asyncImage1 loadImage:nil];
|
||||||
|
|
||||||
|
AsyncImageView* asyncImage2 = [[AsyncImageView alloc] autorelease];
|
||||||
|
[asyncImage2 initImage:self->diskSelected->screenShots[1].c_str() target:self.screenShot2 width:128 height:80];
|
||||||
|
[asyncImage2 loadImage:nil];
|
||||||
|
|
||||||
|
AsyncImageView* asyncImage3 = [[AsyncImageView alloc] autorelease] ;
|
||||||
|
[asyncImage3 initImage:self->diskSelected->screenShots[2].c_str() target:self.screenShot3 width:128 height:80];
|
||||||
|
[asyncImage3 loadImage:nil];
|
||||||
|
|
||||||
|
self.diskWebView.backgroundColor = [UIColor whiteColor];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)backButton:(id)sender {
|
||||||
|
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)launchButton
|
||||||
|
{
|
||||||
|
|
||||||
|
[pManager launchDiskImage:self->diskSelected pathname:self->list->pathName trackername:self->list->trackerName];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// IOS 5 Compatibility
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IOS6
|
||||||
|
- (BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
|
||||||
|
[requestURL release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-(void)viewDidLoad {
|
||||||
|
|
||||||
|
|
||||||
|
CGRect r = [UIScreen mainScreen].applicationFrame;
|
||||||
|
self.navItem = [[[UINavigationItem alloc] initWithTitle:@"Detail"] autorelease];
|
||||||
|
[self.navView pushNavigationItem:self.navItem animated:FALSE];
|
||||||
|
|
||||||
|
[self.view setFrame:r];
|
||||||
|
|
||||||
|
// Rectangle
|
||||||
|
#if 0
|
||||||
|
UIBarButtonItem *browseItem = [[UIBarButtonItem alloc] initWithTitle:@"DETAIL" style:UIBarButtonItemStyleBordered
|
||||||
|
target:self
|
||||||
|
action:@selector(backButton:)];
|
||||||
|
#else
|
||||||
|
// left Arrow
|
||||||
|
UIButton* backButton = [UIButton buttonWithType:(UIButtonType)101]; // left-pointing shape!
|
||||||
|
[backButton addTarget:self action:@selector(backButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[backButton setTitle:@"List" forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
// create button item -- possible because UIButton subclasses UIView!
|
||||||
|
UIBarButtonItem* browseItem = [[[UIBarButtonItem alloc] initWithCustomView:backButton] autorelease];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
self.navItem.leftBarButtonItem = browseItem;
|
||||||
|
|
||||||
|
// Swipe left to go back to browsing
|
||||||
|
UISwipeGestureRecognizer* grswipeleft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)] ;
|
||||||
|
grswipeleft.direction = UISwipeGestureRecognizerDirectionLeft;
|
||||||
|
grswipeleft.cancelsTouchesInView = NO;
|
||||||
|
[self.view addGestureRecognizer:grswipeleft];
|
||||||
|
[grswipeleft release];
|
||||||
|
|
||||||
|
|
||||||
|
// Swipe Right to launch
|
||||||
|
UISwipeGestureRecognizer* grswiperight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)] ;
|
||||||
|
grswiperight.direction = UISwipeGestureRecognizerDirectionRight;
|
||||||
|
grswiperight.cancelsTouchesInView = NO;
|
||||||
|
[self.view addGestureRecognizer:grswiperight];
|
||||||
|
[grswiperight release];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeRight :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeLeft :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getEmulatorView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (IBAction) launchButton:(id)_sender
|
||||||
|
{
|
||||||
|
|
||||||
|
[pManager launchDiskImage:self->diskSelected pathname:self->list->pathName.c_str() trackername:self->list->trackerName.c_str()];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
517
Common.iphone/detailViewController.xib
Normal file
@ -0,0 +1,517 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1536</int>
|
||||||
|
<string key="IBDocument.SystemVersion">11G63</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1138.51</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">1930</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>IBProxyObject</string>
|
||||||
|
<string>IBUIButton</string>
|
||||||
|
<string>IBUIImageView</string>
|
||||||
|
<string>IBUILabel</string>
|
||||||
|
<string>IBUINavigationBar</string>
|
||||||
|
<string>IBUIView</string>
|
||||||
|
<string>IBUIViewController</string>
|
||||||
|
<string>IBUIWebView</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||||
|
<integer value="1" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="975951072">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="191373211">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">287</int>
|
||||||
|
<object class="NSMutableArray" key="NSSubviews">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBUIButton" id="505468772">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{119, 435}, {78, 37}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<int key="IBUIButtonType">1</int>
|
||||||
|
<string key="IBUINormalTitle">Launch</string>
|
||||||
|
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MC41AA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||||
|
<string key="name">Helvetica-Bold</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">2</int>
|
||||||
|
<double key="pointSize">15</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont">
|
||||||
|
<string key="NSName">Helvetica-Bold</string>
|
||||||
|
<double key="NSSize">15</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIImageView" id="997235069">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{129, 53}, {62, 25}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSCustomResource" key="IBUIImage">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">icon_APPLE 2GS.png</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIImageView" id="711138479">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">293</int>
|
||||||
|
<string key="NSFrame">{{130, 55}, {60, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">4</int>
|
||||||
|
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSCustomResource" key="IBUIImage">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">icon_APPLE 2.png</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="468520213">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{8, 53}, {114, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Company</string>
|
||||||
|
<object class="NSColor" key="IBUITextColor" id="862820717">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||||
|
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
|
||||||
|
</object>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<object class="IBUIFontDescription" key="IBUIFontDescription" id="1030663811">
|
||||||
|
<string key="name">Helvetica</string>
|
||||||
|
<string key="family">Helvetica</string>
|
||||||
|
<int key="traits">0</int>
|
||||||
|
<double key="pointSize">12</double>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="IBUIFont" id="459976830">
|
||||||
|
<string key="NSName">Helvetica</string>
|
||||||
|
<double key="NSSize">12</double>
|
||||||
|
<int key="NSfFlags">16</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="590583998">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">289</int>
|
||||||
|
<string key="NSFrame">{{238, 53}, {73, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">1988</string>
|
||||||
|
<reference key="IBUITextColor" ref="862820717"/>
|
||||||
|
<nil key="IBUIHighlightedColor"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
<int key="IBUITextAlignment">2</int>
|
||||||
|
<reference key="IBUIFontDescription" ref="1030663811"/>
|
||||||
|
<reference key="IBUIFont" ref="459976830"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIWebView" id="243239924">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<string key="NSFrame">{{8, 84}, {303, 278}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIDataDetectorTypes">2</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIImageView" id="873954215">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">268</int>
|
||||||
|
<string key="NSFrame">{{8, 370}, {91, 57}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIImageView" id="83868169">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">269</int>
|
||||||
|
<string key="NSFrame">{{114, 370}, {91, 57}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIImageView" id="476833364">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">265</int>
|
||||||
|
<string key="NSFrame">{{220, 370}, {91, 57}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUINavigationBar" id="5609257">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">290</int>
|
||||||
|
<string key="NSFrameSize">{320, 44}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIBarStyle">1</int>
|
||||||
|
<object class="NSArray" key="IBUIItems" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="NSFrameSize">{320, 480}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIViewController" id="922199909">
|
||||||
|
<string key="IBUINibName">detailViewController</string>
|
||||||
|
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||||
|
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||||
|
<int key="IBUIInterfaceOrientation">1</int>
|
||||||
|
<int key="interfaceOrientation">1</int>
|
||||||
|
</object>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<bool key="IBUIHorizontal">NO</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">view</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">6</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">diskApple2GS</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="997235069"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">13</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">diskApple2</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="711138479"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">14</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">diskCompany</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="468520213"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">19</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">diskYear</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="590583998"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">20</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">diskWebView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="243239924"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">28</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">screenShot1</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="873954215"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">32</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">screenShot2</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="83868169"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">33</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">screenShot3</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="476833364"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">34</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">navView</string>
|
||||||
|
<reference key="source" ref="372490531"/>
|
||||||
|
<reference key="destination" ref="5609257"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">67</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||||
|
<string key="label">launchButton:</string>
|
||||||
|
<reference key="source" ref="505468772"/>
|
||||||
|
<reference key="destination" ref="372490531"/>
|
||||||
|
<int key="IBEventType">7</int>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">9</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="243239924"/>
|
||||||
|
<reference key="destination" ref="372490531"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">27</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1</int>
|
||||||
|
<reference key="object" ref="191373211"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="505468772"/>
|
||||||
|
<reference ref="83868169"/>
|
||||||
|
<reference ref="5609257"/>
|
||||||
|
<reference ref="468520213"/>
|
||||||
|
<reference ref="590583998"/>
|
||||||
|
<reference ref="243239924"/>
|
||||||
|
<reference ref="476833364"/>
|
||||||
|
<reference ref="873954215"/>
|
||||||
|
<reference ref="711138479"/>
|
||||||
|
<reference ref="997235069"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="975951072"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">8</int>
|
||||||
|
<reference key="object" ref="505468772"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">10</int>
|
||||||
|
<reference key="object" ref="997235069"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">11</int>
|
||||||
|
<reference key="object" ref="711138479"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">15</int>
|
||||||
|
<reference key="object" ref="468520213"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">16</int>
|
||||||
|
<reference key="object" ref="590583998"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">24</int>
|
||||||
|
<reference key="object" ref="922199909"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">26</int>
|
||||||
|
<reference key="object" ref="243239924"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">29</int>
|
||||||
|
<reference key="object" ref="873954215"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">30</int>
|
||||||
|
<reference key="object" ref="83868169"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">31</int>
|
||||||
|
<reference key="object" ref="476833364"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">54</int>
|
||||||
|
<reference key="object" ref="5609257"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-1.CustomClassName</string>
|
||||||
|
<string>-1.IBPluginDependency</string>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>-2.IBPluginDependency</string>
|
||||||
|
<string>1.IBPluginDependency</string>
|
||||||
|
<string>10.IBPluginDependency</string>
|
||||||
|
<string>11.IBPluginDependency</string>
|
||||||
|
<string>15.IBPluginDependency</string>
|
||||||
|
<string>16.IBPluginDependency</string>
|
||||||
|
<string>24.CustomClassName</string>
|
||||||
|
<string>24.IBPluginDependency</string>
|
||||||
|
<string>26.IBPluginDependency</string>
|
||||||
|
<string>29.IBPluginDependency</string>
|
||||||
|
<string>30.IBPluginDependency</string>
|
||||||
|
<string>31.IBPluginDependency</string>
|
||||||
|
<string>54.IBPluginDependency</string>
|
||||||
|
<string>8.IBPluginDependency</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>detailViewController</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>detailViewController</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<reference key="dict.values" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<reference key="dict.values" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">67</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||||
|
<real value="1536" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>icon_APPLE 2.png</string>
|
||||||
|
<string>icon_APPLE 2GS.png</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>{62, 23}</string>
|
||||||
|
<string>{62, 25}</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">1930</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
BIN
Common.iphone/disk_35_1.png
Normal file
After Width: | Height: | Size: 305 B |
BIN
Common.iphone/disk_35_2.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Common.iphone/disk_525_1.png
Normal file
After Width: | Height: | Size: 292 B |
BIN
Common.iphone/disk_525_2.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
Common.iphone/fta20-ipad.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
Common.iphone/fta20.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
Common.iphone/fta20@2x.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Common.iphone/fta20_2x.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Common.iphone/icon_APPLE 2.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Common.iphone/icon_APPLE 2GS.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
27
Common.iphone/infoViewController.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface infoViewController : UIVIEWCONTROLLERROOT {
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
UIView* _portraitView;
|
||||||
|
UIView* _landscapeView;
|
||||||
|
UILabel* _versionUI;
|
||||||
|
UILabel* _versionUILandscape;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (nonatomic, retain) IBOutlet UILabel* versionUILandscape;
|
||||||
|
@property (nonatomic, retain) IBOutlet UILabel* versionUI;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIView* portraitView;
|
||||||
|
@property (nonatomic, retain) IBOutlet UIView* landscapeView;
|
||||||
|
|
||||||
|
- (void)updateView:(UIDeviceOrientation)_orientation ;
|
||||||
|
- (IBAction) doneButton:(id)_sender;
|
||||||
|
- (IBAction) parametersButton:(id)_sender;
|
||||||
|
- (IBAction) emailButton:(id)_sender;
|
||||||
|
@end
|
152
Common.iphone/infoViewController.mm
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#import "infoViewController.h"
|
||||||
|
#import "activegsList.h"
|
||||||
|
#include "../Common/svnversion.h"
|
||||||
|
#import "asyncimageview.h"
|
||||||
|
#import "activegsViewController.h"
|
||||||
|
#include "../xcodebuild.h"
|
||||||
|
|
||||||
|
@implementation infoViewController
|
||||||
|
|
||||||
|
@synthesize versionUI=_versionIU;
|
||||||
|
@synthesize versionUILandscape=_versionUILandscape;
|
||||||
|
@synthesize portraitView= _portraitView;
|
||||||
|
@synthesize landscapeView = _landscapeView;
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)viewDidLoad
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
NSString *AppVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
|
||||||
|
NSString *buildVersion = [NSString stringWithUTF8String:xcodebuild];
|
||||||
|
|
||||||
|
|
||||||
|
self.versionUILandscape.text=
|
||||||
|
self.versionUI.text = [NSString stringWithFormat: @"v%@#%@ -- ActiveGS "TOSTRING(ACTIVEGSMAJOR)"."TOSTRING(ACTIVEGSMINOR)"."TOSTRING(ACTIVEGSBUILD)"",AppVersion,buildVersion];
|
||||||
|
|
||||||
|
[self.portraitView setFrame:[[UIScreen mainScreen] bounds] ];
|
||||||
|
[self.landscapeView setFrame:[[UIScreen mainScreen] bounds] ];
|
||||||
|
|
||||||
|
// [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewDidAppear:(BOOL)animated
|
||||||
|
{
|
||||||
|
printf("viewDidAppear");
|
||||||
|
|
||||||
|
|
||||||
|
// Swipe left to go back to browsing
|
||||||
|
UISwipeGestureRecognizer* grswipeleft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)];
|
||||||
|
grswipeleft.direction = UISwipeGestureRecognizerDirectionLeft;
|
||||||
|
grswipeleft.cancelsTouchesInView = NO;
|
||||||
|
[self.view addGestureRecognizer:grswipeleft];
|
||||||
|
[grswipeleft release];
|
||||||
|
|
||||||
|
// Swipe Right to go back to browsing
|
||||||
|
UISwipeGestureRecognizer* grswiperight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)];
|
||||||
|
grswiperight.direction = UISwipeGestureRecognizerDirectionRight;
|
||||||
|
grswiperight.cancelsTouchesInView = NO;
|
||||||
|
[self.view addGestureRecognizer:grswiperight];
|
||||||
|
[grswiperight release];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)updateView:(UIDeviceOrientation)_orientation
|
||||||
|
{
|
||||||
|
debug_printf("updateView infoViewController");
|
||||||
|
|
||||||
|
|
||||||
|
BOOL isPortrait = abs([pManager getAngle])==90.0f ;
|
||||||
|
|
||||||
|
if (isPortrait)
|
||||||
|
self.view = self.portraitView;
|
||||||
|
else
|
||||||
|
self.view = self.landscapeView;
|
||||||
|
|
||||||
|
// self.view = self.portraitView;
|
||||||
|
|
||||||
|
|
||||||
|
CGAffineTransform matv = CGAffineTransformIdentity;
|
||||||
|
matv = CGAffineTransformRotate (matv,(270-[pManager getAngle])*M_PI/180); //Avec
|
||||||
|
self.view.transform = matv;
|
||||||
|
|
||||||
|
CGRect rv2 = [[UIScreen mainScreen] applicationFrame];
|
||||||
|
CGRect rv3 = CGRectApplyAffineTransform(rv2,matv);
|
||||||
|
rv3.origin.x = 0;
|
||||||
|
rv3.origin.y = 0;
|
||||||
|
[self.view setBounds:rv3];
|
||||||
|
|
||||||
|
CGRect rscreen = [[UIScreen mainScreen] applicationFrame];
|
||||||
|
CGRect vscreen = self.view.frame;
|
||||||
|
|
||||||
|
vscreen.origin.x = (rscreen.size.width - self.view.frame.size.width)/2;
|
||||||
|
vscreen.origin.y = (rscreen.size.height-self.view.frame.size.height)/2;
|
||||||
|
[self.view setFrame:vscreen];
|
||||||
|
|
||||||
|
// pour réactiver les gestures
|
||||||
|
[self viewDidAppear:FALSE];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)swipeLeft :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromRight];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)swipeRight :(UISwipeGestureRecognizer*)_rec
|
||||||
|
{
|
||||||
|
if (_rec.state == UIGestureRecognizerStateEnded)
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionPush sens:kCATransitionFromLeft];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction) doneButton:(id)_sender;
|
||||||
|
{
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] type:kCATransitionFade sens:kCATransitionFromLeft];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction) emailButton:(id)_sender;
|
||||||
|
{
|
||||||
|
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.facebook.com/groups/187271854617450/"]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction) parametersButton:(id)_sender
|
||||||
|
{
|
||||||
|
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"ActiveGS" message:@"Not implemented yet" delegate:self cancelButtonTitle:@"Done" otherButtonTitles:nil] autorelease];
|
||||||
|
[alert show];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// IOS 5 Compatibility
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
28
Common.iphone/kbdlayout.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|
||||||
|
@interface kbdlayout : UIView
|
||||||
|
{
|
||||||
|
int iKbd;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface kbdselected : UIView
|
||||||
|
{
|
||||||
|
const char* v;
|
||||||
|
int time;
|
||||||
|
// int iKbd;
|
||||||
|
}
|
||||||
|
//@property(nonatomic,getter=getikbd) int iKbd;
|
||||||
|
|
||||||
|
- (void) setParam: (const char*)_v;
|
||||||
|
+ (kbdselected*) getSelected;
|
||||||
|
@end
|
310
Common.iphone/kbdlayout.mm
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "kbdlayout.h"
|
||||||
|
#import "keyboard.h"
|
||||||
|
#import "activegsAppDelegate.h"
|
||||||
|
#include "../src91/protos_macdriver.h"
|
||||||
|
extern void add_event_key(int,int);
|
||||||
|
|
||||||
|
// http://farm3.static.flickr.com/2448/3825169053_859571c493_o.jpg
|
||||||
|
|
||||||
|
|
||||||
|
#define KBDWIDTH 22
|
||||||
|
#define KBDWIDTHTAB 25
|
||||||
|
#define KBDWIDTHCTRL 30
|
||||||
|
#define KBDWIDTHRET 30
|
||||||
|
#define KBDWIDTHSHIFT 42
|
||||||
|
#define KBDWIDTHAPPLE 30
|
||||||
|
#define KBDWIDTHSPACE 100
|
||||||
|
struct kbdDefinition kbdDefinitions[]=
|
||||||
|
{
|
||||||
|
{ KBDWIDTH,"esc",0x35,0,0 },
|
||||||
|
{ KBDWIDTH,"1",0x12,"!",0 },
|
||||||
|
{ KBDWIDTH,"2",0x13,"@",0 },
|
||||||
|
{ KBDWIDTH,"3",0x14,"#",0 },
|
||||||
|
{ KBDWIDTH,"4",0x15,"$",0 },
|
||||||
|
{ KBDWIDTH,"5",0x17,"%",0 },
|
||||||
|
{ KBDWIDTH,"6",0x16,"^",0 },
|
||||||
|
{ KBDWIDTH,"7",0x1A,"&",0 },
|
||||||
|
{ KBDWIDTH,"8",0x1C,"*",0 },
|
||||||
|
{ KBDWIDTH,"9",0x19,"(",0 },
|
||||||
|
{ KBDWIDTH,"0",0x1D,")",0 },
|
||||||
|
{ KBDWIDTH,"-",0x1B,"_",0 },
|
||||||
|
{ KBDWIDTH,"=",0x18,"+",0 },
|
||||||
|
{ KBDWIDTHTAB,"delete",0x33,0,0 },
|
||||||
|
{ -1,0,0,0,0 },
|
||||||
|
{ KBDWIDTHTAB,"tab",0x30,0,0 },
|
||||||
|
{ KBDWIDTH,"q",0x0C,"Q",0 },
|
||||||
|
{ KBDWIDTH,"w",0x0D,"W",0 },
|
||||||
|
{ KBDWIDTH,"e",0x0E,"E",0 },
|
||||||
|
{ KBDWIDTH,"r",0x0F,"R",0 },
|
||||||
|
{ KBDWIDTH,"t",0x11,"T",0 },
|
||||||
|
{ KBDWIDTH,"y",0x10,"Y",0 },
|
||||||
|
{ KBDWIDTH,"u",0x20,"U",0 },
|
||||||
|
{ KBDWIDTH,"i",0x22,"I",0 },
|
||||||
|
{ KBDWIDTH,"o",0x1F,"O",0 },
|
||||||
|
{ KBDWIDTH,"p",0x23,"P",0 },
|
||||||
|
{ KBDWIDTH,"[",0x21,"{",0 },
|
||||||
|
{ KBDWIDTH,"]",0x1E,"}",0 },
|
||||||
|
{ KBDWIDTHTAB,"menu",-1,0,0 },
|
||||||
|
{ -1,0,0,0,0 },
|
||||||
|
{ KBDWIDTHCTRL,"control",0x36,0,0 },
|
||||||
|
{ KBDWIDTH,"a",0x00,"A",0 },
|
||||||
|
{ KBDWIDTH,"s",0x01,"S",0 },
|
||||||
|
{ KBDWIDTH,"d",0x02,"D",0 },
|
||||||
|
{ KBDWIDTH,"f",0x03,"F",0 },
|
||||||
|
{ KBDWIDTH,"g",0x05,"G",0 },
|
||||||
|
{ KBDWIDTH,"h",0x04,"H",0 },
|
||||||
|
{ KBDWIDTH,"j",0x26,"J",0 },
|
||||||
|
{ KBDWIDTH,"k",0x28,"K",0 },
|
||||||
|
{ KBDWIDTH,"l",0x25,"L",0 },
|
||||||
|
{ KBDWIDTH,";",0x29,":",0 },
|
||||||
|
{ KBDWIDTH,"'",0x27,"\"",0 },
|
||||||
|
{ KBDWIDTHRET,"return",0x24,0,0 },
|
||||||
|
{ -1,0,0,0,0 },
|
||||||
|
{ KBDWIDTHSHIFT,"shift",0x38,0,0 },
|
||||||
|
{ KBDWIDTH,"z",0x06,"Z",0 },
|
||||||
|
{ KBDWIDTH,"x",0x07,"X",0 },
|
||||||
|
{ KBDWIDTH,"c",0x08,"C",0 },
|
||||||
|
{ KBDWIDTH,"v",0x09,"V",0 },
|
||||||
|
{ KBDWIDTH,"b",0x0B,"B",0 },
|
||||||
|
{ KBDWIDTH,"n",0x2D,"N",0 },
|
||||||
|
{ KBDWIDTH,"m",0x2E,"M",0 },
|
||||||
|
{ KBDWIDTH,",",0x2B,"<",0 },
|
||||||
|
{ KBDWIDTH,".",0x2F,">",0 },
|
||||||
|
{ KBDWIDTH,"/",0x2C,"?",0 },
|
||||||
|
{ KBDWIDTHSHIFT,"shift",0x38,0,0 },
|
||||||
|
{ -1,0,0,0,0 },
|
||||||
|
{ KBDWIDTH,"caps",0x39,0,0 },
|
||||||
|
{ KBDWIDTH,"option",0x37,0,0 },
|
||||||
|
{ KBDWIDTHAPPLE,"",0x3A,0,0 },
|
||||||
|
{ KBDWIDTH,"`",0x12,0,0 },
|
||||||
|
{ KBDWIDTHSPACE," ",0x31,0,0 },
|
||||||
|
{ KBDWIDTH,"x",0x13,0,0 },
|
||||||
|
{ KBDWIDTH,"->",0x3C,0,0 },
|
||||||
|
{ KBDWIDTH,"<-",0x3B,0,0 },
|
||||||
|
{ KBDWIDTH,"^",0x5B,0,0 },
|
||||||
|
{ KBDWIDTH,"v",0x13,0,0 },
|
||||||
|
|
||||||
|
{ 0,0,0,0,0 }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static kbdselected* sharedKBDSelected = nil;
|
||||||
|
|
||||||
|
int findCode(const char* _s)
|
||||||
|
{
|
||||||
|
int i =0;
|
||||||
|
while(kbdDefinitions[i].w)
|
||||||
|
{
|
||||||
|
if (kbdDefinitions[i].k1 && !strcmp(kbdDefinitions[i].k1,_s))
|
||||||
|
return kbdDefinitions[i].code1;
|
||||||
|
if (kbdDefinitions[i].k2 && !strcmp(kbdDefinitions[i].k2,_s))
|
||||||
|
return (kbdDefinitions[i].code1 + shiftKey);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@implementation kbdselected
|
||||||
|
|
||||||
|
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
// Drawing code
|
||||||
|
CGContextRef g = UIGraphicsGetCurrentContext();
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor whiteColor].CGColor);
|
||||||
|
CGContextFillRect(g, rect);
|
||||||
|
|
||||||
|
//draw text in black.
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor blackColor].CGColor);
|
||||||
|
int size;
|
||||||
|
NSString* str = [NSString stringWithFormat:@"%s", v];
|
||||||
|
|
||||||
|
if ([str length]==1)
|
||||||
|
size =12;
|
||||||
|
else {
|
||||||
|
size = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
[str drawAtPoint:CGPointMake(2.0, 2.0) withFont:[UIFont systemFontOfSize:size]];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) setParam: (const char*)_v
|
||||||
|
{
|
||||||
|
v = _v;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (kbdselected*)getSelected {
|
||||||
|
return sharedKBDSelected;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation kbdlayout
|
||||||
|
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame {
|
||||||
|
|
||||||
|
if (self = [super initWithFrame:frame]) {
|
||||||
|
// Initialization code
|
||||||
|
|
||||||
|
int y = 1;
|
||||||
|
int x = 0;
|
||||||
|
int i = 0;
|
||||||
|
int w;
|
||||||
|
while( w = kbdDefinitions[i].w )
|
||||||
|
{
|
||||||
|
if (w==-1)
|
||||||
|
{
|
||||||
|
x=0;
|
||||||
|
y+=KBDHEIGHT;
|
||||||
|
}
|
||||||
|
kbdDefinitions[i].posx = x;
|
||||||
|
kbdDefinitions[i].posy = y;
|
||||||
|
|
||||||
|
CGRect r = CGRectMake(x,y,w,KBDHEIGHT);
|
||||||
|
x += w/*+1*/;
|
||||||
|
keyboard * kbd = [[keyboard alloc] initWithFrame:r];
|
||||||
|
[kbd setUserInteractionEnabled:FALSE];
|
||||||
|
[kbd setParam:kbdDefinitions[i].k1];
|
||||||
|
[self addSubview:kbd];
|
||||||
|
[kbd release];
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGRect r = CGRectMake(100,100,32.0,30.0);
|
||||||
|
kbdselected * sel = [[kbdselected alloc] initWithFrame:r];
|
||||||
|
[sel setUserInteractionEnabled:FALSE];
|
||||||
|
sharedKBDSelected = sel;
|
||||||
|
sel.hidden = true;
|
||||||
|
iKbd = 0;
|
||||||
|
[self addSubview:sel];
|
||||||
|
[sel release];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
// Drawing code
|
||||||
|
CGContextRef g = UIGraphicsGetCurrentContext();
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor whiteColor].CGColor);
|
||||||
|
CGContextFillRect(g, rect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
int findKey(int _x,int _y)
|
||||||
|
{
|
||||||
|
int found=0;
|
||||||
|
int posx,posy;
|
||||||
|
// cherche le clavier le plus proche
|
||||||
|
int i = 0;
|
||||||
|
int w;
|
||||||
|
while( w = kbdDefinitions[i].w )
|
||||||
|
{
|
||||||
|
if (w==-1)
|
||||||
|
continue;
|
||||||
|
posx = kbdDefinitions[i].posx ;
|
||||||
|
posy = kbdDefinitions[i].posy ;
|
||||||
|
if (_x>=posx && _x<(posx+w) && _y>=posy && _y<(posy+KBDHEIGHT))
|
||||||
|
{
|
||||||
|
found = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
CGPoint pt = [[touches anyObject] locationInView:self];
|
||||||
|
|
||||||
|
int i = findKey(pt.x,pt.y);
|
||||||
|
if (iKbd && i != iKbd)
|
||||||
|
[self touchesEnded:touches withEvent:event];
|
||||||
|
|
||||||
|
if (!i)
|
||||||
|
{
|
||||||
|
iKbd = 0;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i==iKbd)
|
||||||
|
return ;
|
||||||
|
iKbd= i;
|
||||||
|
|
||||||
|
printf("Down : %s (%X)\n",kbdDefinitions[i].k1,kbdDefinitions[i].code1);
|
||||||
|
if (kbdDefinitions[i].code1==-1)
|
||||||
|
{
|
||||||
|
|
||||||
|
// activegsList* vl = nil;
|
||||||
|
// UIView* vl = [[[pManager getBrowserView]viewList]view];
|
||||||
|
[pManager doStateChange:[pManager getBrowserView] sens:kCATransitionFromRight];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
add_event_key(kbdDefinitions[i].code1,0);
|
||||||
|
|
||||||
|
int posx = kbdDefinitions[i].posx ;
|
||||||
|
int posy = kbdDefinitions[i].posy ;
|
||||||
|
|
||||||
|
// startLocation = pt;
|
||||||
|
kbdselected* sel =[kbdselected getSelected];
|
||||||
|
[[self superview] bringSubviewToFront:sel];
|
||||||
|
CGRect frame = [self frame];
|
||||||
|
CGRect framesel = [sel frame];
|
||||||
|
|
||||||
|
framesel.origin.x =/* frame.origin.x + */posx,0;
|
||||||
|
framesel.origin.y = /*frame.origin.y +*/ posy - 30.0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
framesel.origin.x = pt.x -10,0;
|
||||||
|
framesel.origin.y = pt.y - 50.0;
|
||||||
|
*/
|
||||||
|
framesel.size.width = kbdDefinitions[i].w;
|
||||||
|
// framesel.size.height = frame.size.height*2.0;
|
||||||
|
[sel setFrame:framesel];
|
||||||
|
|
||||||
|
[sel setParam:kbdDefinitions[i].k1];
|
||||||
|
[sel setNeedsDisplay];
|
||||||
|
sel.hidden=false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
kbdselected* sel =[kbdselected getSelected];
|
||||||
|
sel.hidden=true;
|
||||||
|
if (iKbd)
|
||||||
|
{
|
||||||
|
add_event_key(kbdDefinitions[iKbd].code1,1);
|
||||||
|
printf("Up : %s (%x)\n",kbdDefinitions[iKbd].k1,kbdDefinitions[iKbd].code1);
|
||||||
|
}
|
||||||
|
iKbd= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
[self touchesBegan:touches withEvent:event];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
29
Common.iphone/keyboard.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
struct kbdDefinition
|
||||||
|
{
|
||||||
|
int w;
|
||||||
|
const char* k1;
|
||||||
|
int code1;
|
||||||
|
const char* k2;
|
||||||
|
int code2;
|
||||||
|
int posx,posy;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct kbdDefinition kbdDefinitions[];
|
||||||
|
|
||||||
|
#define KBDHEIGHT 20
|
||||||
|
|
||||||
|
@interface keyboard : UIView {
|
||||||
|
CGPoint startLocation;
|
||||||
|
const char* v;
|
||||||
|
}
|
||||||
|
- (void)setParam:(const char*) _v;
|
||||||
|
|
||||||
|
@end
|
109
Common.iphone/keyboard.mm
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "keyboard.h"
|
||||||
|
#import "kbdlayout.h"
|
||||||
|
|
||||||
|
|
||||||
|
@implementation keyboard
|
||||||
|
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame {
|
||||||
|
if (self = [super initWithFrame:frame]) {
|
||||||
|
// Initialization code
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setParam:(const char*) _v
|
||||||
|
{
|
||||||
|
v = _v;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
// Drawing code
|
||||||
|
CGContextRef g = UIGraphicsGetCurrentContext();
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor grayColor].CGColor);
|
||||||
|
CGContextFillRect(g, rect);
|
||||||
|
|
||||||
|
//draw text in black.
|
||||||
|
CGContextSetFillColorWithColor(g, [UIColor blackColor].CGColor);
|
||||||
|
int size;
|
||||||
|
NSString* str = [NSString stringWithFormat:@"%s", v];
|
||||||
|
if ([str length]==1)
|
||||||
|
size =12;
|
||||||
|
else {
|
||||||
|
size = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
[str drawAtPoint:CGPointMake(2.0, 2.0) withFont:[UIFont systemFontOfSize:size]];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
CGPoint pt = [[touches anyObject] locationInView:self];
|
||||||
|
startLocation = pt;
|
||||||
|
kbdselected* sel =[kbdselected getSelected];
|
||||||
|
[[self superview] bringSubviewToFront:sel];
|
||||||
|
CGRect frame = [self frame];
|
||||||
|
CGRect framesel = [sel frame];
|
||||||
|
|
||||||
|
|
||||||
|
framesel.origin.x = frame.origin.x -10,0;
|
||||||
|
framesel.origin.y = frame.origin.y - 40.0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
framesel.origin.x = pt.x -10,0;
|
||||||
|
framesel.origin.y = pt.y - 50.0;
|
||||||
|
*/
|
||||||
|
framesel.size.width = frame.size.width * 2.0;
|
||||||
|
framesel.size.height = frame.size.height*2.0;
|
||||||
|
[sel setFrame:framesel];
|
||||||
|
|
||||||
|
[sel setParam:v];
|
||||||
|
[sel setNeedsDisplay];
|
||||||
|
sel.hidden=false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
kbdselected* sel =[kbdselected getSelected];
|
||||||
|
sel.hidden=true;
|
||||||
|
/*
|
||||||
|
CGRect frame = [self frame];
|
||||||
|
frame.origin.x += 10.0;
|
||||||
|
frame.origin.y += 30.0;
|
||||||
|
frame.size.width /=2.0;
|
||||||
|
frame.size.height /=2.0;
|
||||||
|
[self setFrame:frame];
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
CGPoint pt = [[touches anyObject] locationInView:self];
|
||||||
|
CGRect frame = [self frame];
|
||||||
|
frame.origin.x += pt.x - startLocation.x;
|
||||||
|
frame.origin.y += pt.y - startLocation.y;
|
||||||
|
[self setFrame:frame];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
BIN
Common.iphone/logo_apple2.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
Common.iphone/logo_apple2.psd
Normal file
BIN
Common.iphone/logo_apple2@2x.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
Common.iphone/logo_apple2gs.png
Normal file
After Width: | Height: | Size: 15 KiB |
14
Common.iphone/mouseView.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|
||||||
|
@interface mouseView : UIView {
|
||||||
|
CGPoint pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
56
Common.iphone/mouseView.mm
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "mouseView.h"
|
||||||
|
#include "emulatorView.h"
|
||||||
|
|
||||||
|
@implementation mouseView
|
||||||
|
|
||||||
|
|
||||||
|
- (id)initWithFrame:(CGRect)frame {
|
||||||
|
if (self = [super initWithFrame:frame]) {
|
||||||
|
// Initialization code
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)drawRect:(CGRect)rect {
|
||||||
|
// Drawing code
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
pt = [[touches anyObject] locationInView:self];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
|
{
|
||||||
|
[self touchesBegan:touches withEvent:event];
|
||||||
|
|
||||||
|
CGPoint ptdef = [[touches anyObject] locationInView:self];
|
||||||
|
//CGPoint delta = ptdef - pt;
|
||||||
|
mac_add_event_mouse(ptdef.x-pt.x,ptdef.y-pt.y,0,1);
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
272
Common.iphone/parametersView.xib
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||||
|
<data>
|
||||||
|
<int key="IBDocument.SystemTarget">1056</int>
|
||||||
|
<string key="IBDocument.SystemVersion">10H574</string>
|
||||||
|
<string key="IBDocument.InterfaceBuilderVersion">823</string>
|
||||||
|
<string key="IBDocument.AppKitVersion">1038.35</string>
|
||||||
|
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string key="NS.object.0">132</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<integer value="1"/>
|
||||||
|
</object>
|
||||||
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBProxyObject" id="372490531">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBProxyObject" id="711762367">
|
||||||
|
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBUIView" id="191373211">
|
||||||
|
<reference key="NSNextResponder"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<object class="NSMutableArray" key="NSSubviews">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBUISwitch" id="80009552">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{196, 20}, {94, 27}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<bool key="IBUIOn">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="378136549">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{37, 20}, {91, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Music</string>
|
||||||
|
<object class="NSColor" key="IBUITextColor" id="699917289">
|
||||||
|
<int key="NSColorSpace">1</int>
|
||||||
|
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<object class="NSColor" key="IBUIHighlightedColor" id="458647246">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
</object>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISlider" id="851889080">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{194, 72}, {98, 23}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||||
|
<int key="IBUIContentVerticalAlignment">0</int>
|
||||||
|
<float key="IBUIValue">1</float>
|
||||||
|
<float key="IBUIMaxValue">2</float>
|
||||||
|
<bool key="IBUIContinuous">NO</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="569188841">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{37, 72}, {101, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Refresh Rate</string>
|
||||||
|
<reference key="IBUITextColor" ref="699917289"/>
|
||||||
|
<reference key="IBUIHighlightedColor" ref="458647246"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
</object>
|
||||||
|
<object class="IBUILabel" id="185370623">
|
||||||
|
<reference key="NSNextResponder" ref="191373211"/>
|
||||||
|
<int key="NSvFlags">292</int>
|
||||||
|
<string key="NSFrame">{{37, 119}, {145, 21}}</string>
|
||||||
|
<reference key="NSSuperview" ref="191373211"/>
|
||||||
|
<bool key="IBUIOpaque">NO</bool>
|
||||||
|
<bool key="IBUIClipsSubviews">YES</bool>
|
||||||
|
<int key="IBUIContentMode">7</int>
|
||||||
|
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<string key="IBUIText">Reload Documents</string>
|
||||||
|
<reference key="IBUITextColor" ref="699917289"/>
|
||||||
|
<reference key="IBUIHighlightedColor" ref="458647246"/>
|
||||||
|
<int key="IBUIBaselineAdjustment">1</int>
|
||||||
|
<float key="IBUIMinimumFontSize">10</float>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="NSFrameSize">{320, 460}</string>
|
||||||
|
<reference key="NSSuperview"/>
|
||||||
|
<object class="NSColor" key="IBUIBackgroundColor">
|
||||||
|
<int key="NSColorSpace">3</int>
|
||||||
|
<bytes key="NSWhite">MQA</bytes>
|
||||||
|
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||||
|
<int key="NSID">2</int>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||||
|
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
<object class="NSMutableArray" key="connectionRecords">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">0</int>
|
||||||
|
<reference key="object" ref="0"/>
|
||||||
|
<reference key="children" ref="1000"/>
|
||||||
|
<nil key="parent"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">1</int>
|
||||||
|
<reference key="object" ref="191373211"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="378136549"/>
|
||||||
|
<reference ref="80009552"/>
|
||||||
|
<reference ref="851889080"/>
|
||||||
|
<reference ref="569188841"/>
|
||||||
|
<reference ref="185370623"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-1</int>
|
||||||
|
<reference key="object" ref="372490531"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
<string key="objectName">File's Owner</string>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">-2</int>
|
||||||
|
<reference key="object" ref="711762367"/>
|
||||||
|
<reference key="parent" ref="0"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">3</int>
|
||||||
|
<reference key="object" ref="80009552"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">4</int>
|
||||||
|
<reference key="object" ref="378136549"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">5</int>
|
||||||
|
<reference key="object" ref="851889080"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">6</int>
|
||||||
|
<reference key="object" ref="569188841"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">7</int>
|
||||||
|
<reference key="object" ref="185370623"/>
|
||||||
|
<reference key="parent" ref="191373211"/>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>-2.CustomClassName</string>
|
||||||
|
<string>1.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>1.IBPluginDependency</string>
|
||||||
|
<string>3.IBPluginDependency</string>
|
||||||
|
<string>3.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>4.IBPluginDependency</string>
|
||||||
|
<string>5.IBPluginDependency</string>
|
||||||
|
<string>5.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>6.IBPluginDependency</string>
|
||||||
|
<string>6.IBViewBoundsToFrameTransform</string>
|
||||||
|
<string>7.IBPluginDependency</string>
|
||||||
|
<string>7.IBViewBoundsToFrameTransform</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>UIResponder</string>
|
||||||
|
<string>{{354, 376}, {320, 480}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDRAAAwjQAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABDQgAAwrgAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABCFAAAwrQAAA</bytes>
|
||||||
|
</object>
|
||||||
|
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||||
|
<object class="NSAffineTransform">
|
||||||
|
<bytes key="NSTransformStruct">P4AAAL+AAABCFAAAwwAAAA</bytes>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="activeLocalization"/>
|
||||||
|
<object class="NSMutableDictionary" key="localizations">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference key="dict.sortedKeys" ref="0"/>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<nil key="sourceID"/>
|
||||||
|
<int key="maxID">8</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||||
|
<int key="IBDocument.localizationMode">0</int>
|
||||||
|
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||||
|
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||||
|
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||||
|
<integer value="3100" key="NS.object.0"/>
|
||||||
|
</object>
|
||||||
|
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||||
|
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
||||||
|
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||||
|
<string key="IBCocoaTouchPluginVersion">132</string>
|
||||||
|
</data>
|
||||||
|
</archive>
|
354
Common.osx/ActiveDownloadMac.cpp
Normal file
@ -0,0 +1,354 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../common.osx/cemulatorctrlmac.h"
|
||||||
|
#include "activedownload.h"
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include "../common/ki.h"
|
||||||
|
#include "../kegs/Src/sim65816.h"
|
||||||
|
|
||||||
|
#ifdef DRIVER_IOS
|
||||||
|
#include <CFNetwork/CFHTTPMessage.h>
|
||||||
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
#include <CFNetwork/CFHTTPStream.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ACTIVEGSDOMAIN kUserDomain
|
||||||
|
MyString homePath;
|
||||||
|
|
||||||
|
extern const char * activegsdownloaddir;
|
||||||
|
extern const char * activegspersistentdir;
|
||||||
|
|
||||||
|
#define MAX_PATH 1024
|
||||||
|
|
||||||
|
bool CDownload::GetFile( const char *url, const char *filename)
|
||||||
|
{
|
||||||
|
|
||||||
|
bool bSuccess=false;
|
||||||
|
|
||||||
|
CFStringRef rawCFString=NULL;
|
||||||
|
CFStringRef normalizedCFString=NULL;
|
||||||
|
CFStringRef escapedCFString=NULL;
|
||||||
|
CFURLRef urlRef=NULL;
|
||||||
|
CFHTTPMessageRef messageRef = NULL;
|
||||||
|
CFReadStreamRef readStreamRef = NULL;
|
||||||
|
|
||||||
|
#define HTTPBUFLEN 4096
|
||||||
|
UInt8 httpbuff[HTTPBUFLEN];
|
||||||
|
CFIndex numbytes ;
|
||||||
|
FILE* f = NULL;
|
||||||
|
int nbread=0;
|
||||||
|
int dwLength = 0 ;
|
||||||
|
int pourcent=0;
|
||||||
|
MyString str;
|
||||||
|
|
||||||
|
if (filename)
|
||||||
|
showProgress(url,0);
|
||||||
|
|
||||||
|
if ( strlen( url ) < 12 )
|
||||||
|
goto Bail;
|
||||||
|
|
||||||
|
rawCFString = CFStringCreateWithCString( NULL, url, CFStringGetSystemEncoding() );
|
||||||
|
if ( rawCFString == NULL ) goto Bail;
|
||||||
|
normalizedCFString = CFURLCreateStringByReplacingPercentEscapes( NULL, rawCFString, CFSTR("") );
|
||||||
|
if ( normalizedCFString == NULL ) goto Bail;
|
||||||
|
escapedCFString = CFURLCreateStringByAddingPercentEscapes( NULL, normalizedCFString, NULL, NULL, kCFStringEncodingUTF8 );
|
||||||
|
if ( escapedCFString == NULL ) goto Bail;
|
||||||
|
|
||||||
|
urlRef= CFURLCreateWithString( kCFAllocatorDefault, escapedCFString, NULL );
|
||||||
|
|
||||||
|
CFRelease( rawCFString );
|
||||||
|
CFRelease( normalizedCFString );
|
||||||
|
CFRelease( escapedCFString );
|
||||||
|
if ( urlRef == NULL )
|
||||||
|
{
|
||||||
|
goto Bail;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageRef = CFHTTPMessageCreateRequest( kCFAllocatorDefault, CFSTR("GET"), urlRef, kCFHTTPVersion1_1 );
|
||||||
|
if ( messageRef == NULL ) goto Bail;
|
||||||
|
|
||||||
|
|
||||||
|
CFRelease(urlRef);
|
||||||
|
urlRef = NULL;
|
||||||
|
|
||||||
|
// Create the stream for the request.
|
||||||
|
readStreamRef = CFReadStreamCreateForHTTPRequest( kCFAllocatorDefault, messageRef );
|
||||||
|
if ( readStreamRef == NULL ) goto Bail;
|
||||||
|
|
||||||
|
|
||||||
|
if (!CFReadStreamOpen(readStreamRef))
|
||||||
|
goto Bail;
|
||||||
|
/*
|
||||||
|
tr = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStreamRef, kCFStreamPropertyHTTPResponseHeader);
|
||||||
|
if (tr)
|
||||||
|
{
|
||||||
|
sizeStr = CFHTTPMessageCopyHeaderFieldValue (tr, CFSTR("Content-Length"));
|
||||||
|
if (sizeStr)
|
||||||
|
str = CFStringGetCStringPtr(sizeStr,CFStringGetSystemEncoding());
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (filename)
|
||||||
|
{
|
||||||
|
f =fopen(filename,"wb");
|
||||||
|
if (!f)
|
||||||
|
{
|
||||||
|
printf("cannot write file %s\n",filename);
|
||||||
|
goto Bail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while ( (numbytes = CFReadStreamRead (readStreamRef,httpbuff,HTTPBUFLEN ) ) != 0 )
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
tr = (CFHTTPMessageRef)CFReadStreamCopyProperty(readStreamRef, kCFStreamPropertyHTTPResponseHeader);
|
||||||
|
if (tr)
|
||||||
|
{
|
||||||
|
dic = CFHTTPMessageCopyAllHeaderFields (tr);
|
||||||
|
|
||||||
|
char *the_pcKeys[50],*the_pcValues[50];
|
||||||
|
|
||||||
|
CFDictionaryGetKeysAndValues(dic, (const void
|
||||||
|
**)&the_pcKeys, (const void **)&the_pcValues);
|
||||||
|
|
||||||
|
sizeStr = CFHTTPMessageCopyHeaderFieldValue (tr, CFSTR("Content-Length"));
|
||||||
|
if (sizeStr)
|
||||||
|
str = CFStringGetCStringPtr(sizeStr,CFStringGetSystemEncoding());
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (numbytes<0)
|
||||||
|
{
|
||||||
|
// CFErrorRef err = CFReadStreamCopyError (readStreamRef);
|
||||||
|
|
||||||
|
goto Bail;
|
||||||
|
}
|
||||||
|
nbread+=numbytes;
|
||||||
|
|
||||||
|
if (f)
|
||||||
|
fwrite(httpbuff,1,numbytes,f);
|
||||||
|
|
||||||
|
if (dwLength)
|
||||||
|
pourcent = (nbread*100)/dwLength;
|
||||||
|
else
|
||||||
|
pourcent = -nbread ; //(pourcent+5)%100;
|
||||||
|
|
||||||
|
if (filename)
|
||||||
|
showProgress(url,pourcent);
|
||||||
|
if (r_sim65816.should_emulator_terminate())
|
||||||
|
{
|
||||||
|
outputInfo("Download aborted (%s)\n",url);
|
||||||
|
goto Bail;
|
||||||
|
}
|
||||||
|
//usleep(2000);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nbread)
|
||||||
|
bSuccess=true;
|
||||||
|
|
||||||
|
{
|
||||||
|
Bail:
|
||||||
|
{
|
||||||
|
if (f) fclose(f);
|
||||||
|
if (filename && !bSuccess) deleteFile(filename);
|
||||||
|
|
||||||
|
if ( messageRef != NULL ) CFRelease( messageRef );
|
||||||
|
if ( readStreamRef != NULL )
|
||||||
|
{
|
||||||
|
//CFReadStreamSetClient( readStreamRef, kCFStreamEventNone, NULL, NULL );
|
||||||
|
//CFReadStreamUnscheduleFromRunLoop( readStreamRef, CFRunLoopGetCurrent(), kCFRunLoopCommonModes );
|
||||||
|
CFReadStreamClose( readStreamRef );
|
||||||
|
CFRelease( readStreamRef );
|
||||||
|
}
|
||||||
|
if ( urlRef != NULL )
|
||||||
|
CFRelease( urlRef );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DRIVER_IOS
|
||||||
|
if (!bSuccess && bNotifyDownloadFailure)
|
||||||
|
{
|
||||||
|
extern void x_notify_download_failure(const char*);
|
||||||
|
x_notify_download_failure(url);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return bSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CDownload::retrievePersistentZippedFile(const char* url,int _order,MyString& _path, MyString& _short)
|
||||||
|
{
|
||||||
|
|
||||||
|
MyString dir = getPersistentDir(url);
|
||||||
|
DIR* pdir = opendir(dir.c_str());
|
||||||
|
if (!pdir)
|
||||||
|
return false;
|
||||||
|
struct dirent* dp;
|
||||||
|
MyString search;
|
||||||
|
search.Format("%d_",_order);
|
||||||
|
while( (dp=readdir(pdir)) != NULL )
|
||||||
|
{
|
||||||
|
if (strstr(dp->d_name,search.c_str())==dp->d_name)
|
||||||
|
{
|
||||||
|
_path = dir;
|
||||||
|
_path += ACTIVEGS_DIRECTORY_SEPARATOR ;
|
||||||
|
_path += dp->d_name ;
|
||||||
|
_short = dp->d_name;
|
||||||
|
closedir(pdir);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(pdir);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CDownload::deleteFile(const char* _dir)
|
||||||
|
{
|
||||||
|
remove(_dir);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDownload::deleteDirectory(const char* _dir,int keepdir)
|
||||||
|
{
|
||||||
|
|
||||||
|
DIR* pdir = opendir(_dir);
|
||||||
|
if (!pdir)
|
||||||
|
return ;
|
||||||
|
struct dirent* dp;
|
||||||
|
while( (dp=readdir(pdir)) != NULL )
|
||||||
|
{
|
||||||
|
MyString name=_dir;
|
||||||
|
name+=ACTIVEGS_DIRECTORY_SEPARATOR;
|
||||||
|
name+=dp->d_name;
|
||||||
|
printf("delete file:%s\n",name.c_str());
|
||||||
|
deleteFile(name.c_str());
|
||||||
|
}
|
||||||
|
closedir(pdir);
|
||||||
|
|
||||||
|
if (!keepdir)
|
||||||
|
rmdir(_dir);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDownload::createDirectory(const char *_subdir)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef DRIVER_IOS
|
||||||
|
// rend le chemin absolu
|
||||||
|
if (strstr(_subdir,homePath.c_str())==_subdir)
|
||||||
|
_subdir += homePath.length()+1;
|
||||||
|
MyString fullpath(homePath.c_str());
|
||||||
|
fullpath+='/';
|
||||||
|
fullpath+=_subdir;
|
||||||
|
if (mkdir(fullpath.c_str(),0777))
|
||||||
|
{
|
||||||
|
// printf("cannot create %s\n",fullpath.c_str());
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
UniChar nameData[1024];
|
||||||
|
OSStatus err;
|
||||||
|
FSRef domain;
|
||||||
|
|
||||||
|
// élimine le chemin absolu
|
||||||
|
if (strstr(_subdir,homePath.c_str())==_subdir)
|
||||||
|
_subdir += homePath.length()+1;
|
||||||
|
|
||||||
|
err = FSFindFolder(kUserDomain, kDomainTopLevelFolderType ,kDontCreateFolder, &domain);
|
||||||
|
|
||||||
|
const char* file = getfile(_subdir);
|
||||||
|
// cherche le chemin parent
|
||||||
|
if (file!=_subdir)
|
||||||
|
{
|
||||||
|
|
||||||
|
MyString dir;
|
||||||
|
UniChar ename[1024];
|
||||||
|
FSRef subdomain;
|
||||||
|
|
||||||
|
getdir(_subdir,dir);
|
||||||
|
CFStringRef ed = __CFStringMakeConstantString(dir.c_str());
|
||||||
|
int l = CFStringGetLength(ed);
|
||||||
|
CFStringGetCharacters(ed, CFRangeMake(0, l), ename);
|
||||||
|
|
||||||
|
err = FSMakeFSRefUnicode (&domain, l, (const UniChar*)ename,0,&subdomain);
|
||||||
|
|
||||||
|
domain = subdomain;
|
||||||
|
_subdir = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CFStringRef sd = __CFStringMakeConstantString(_subdir);
|
||||||
|
int lend = CFStringGetLength(sd);
|
||||||
|
CFStringGetCharacters(sd, CFRangeMake(0, lend), nameData);
|
||||||
|
err = FSCreateDirectoryUnicode(&domain, lend, nameData, 0, NULL, NULL, NULL, NULL);
|
||||||
|
if (err !=0)
|
||||||
|
printf("cannot create %s\n",_subdir);
|
||||||
|
else
|
||||||
|
printf("%s created\n",_subdir);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CDownload::initPersistentSystemPath(MyString& path)
|
||||||
|
{
|
||||||
|
|
||||||
|
extern void x_init_persistent_path(MyString& hp);
|
||||||
|
|
||||||
|
x_init_persistent_path(homePath);
|
||||||
|
|
||||||
|
if (homePath.GetAt(homePath.GetLength()-1)=='/')
|
||||||
|
{
|
||||||
|
MyString tmp (homePath.Left(homePath.GetLength()-1));
|
||||||
|
homePath = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
path = homePath;
|
||||||
|
/*
|
||||||
|
CDownload::createDirectory(activegspersistentdir);
|
||||||
|
|
||||||
|
MyString c;
|
||||||
|
c = activegspersistentdir;
|
||||||
|
c +='/';
|
||||||
|
c += activegsdownloaddir ;
|
||||||
|
|
||||||
|
CDownload::createDirectory(c.c_str());
|
||||||
|
|
||||||
|
persistentPath = homePath.c_str() ;
|
||||||
|
persistentPath += '/';
|
||||||
|
persistentPath += activegspersistentdir;
|
||||||
|
|
||||||
|
printf("mac persistent directory :%s\n",persistentPath.c_str());
|
||||||
|
// CDownload::setPersistentPath(persistentPath.c_str());
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef DRIVER_IOS
|
||||||
|
void x_init_persistent_path(MyString& hp)
|
||||||
|
{
|
||||||
|
|
||||||
|
OSStatus err;
|
||||||
|
FSRef homeDir;
|
||||||
|
|
||||||
|
err = FSFindFolder(ACTIVEGSDOMAIN, kDomainTopLevelFolderType,kDontCreateFolder, &homeDir);
|
||||||
|
|
||||||
|
CFURLRef url = CFURLCreateFromFSRef (NULL,&homeDir);
|
||||||
|
|
||||||
|
CFStringRef fullpath = CFURLCopyFileSystemPath (url,kCFURLPOSIXPathStyle);
|
||||||
|
|
||||||
|
hp = CFStringGetCStringPtr(fullpath,CFStringGetSystemEncoding());
|
||||||
|
}
|
||||||
|
#endif
|
191
Common.osx/CEmulatorCtrlMac.cpp
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../common.osx/CEmulatorCtrlMac.h"
|
||||||
|
#include "../common/svnversion.h"
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include "../kegs/Src/sim65816.h"
|
||||||
|
#include <AudioToolbox/AudioToolbox.h>
|
||||||
|
extern int macUsingCoreGraphics;
|
||||||
|
|
||||||
|
extern int calcCRC(const char* ptr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#undef printf
|
||||||
|
extern "C" int outputInfo(const char* format,...)
|
||||||
|
{
|
||||||
|
va_list argptr;
|
||||||
|
va_start( argptr, format );
|
||||||
|
MyString st;
|
||||||
|
st.FormatV(format,argptr);
|
||||||
|
va_end(argptr);
|
||||||
|
puts(st.c_str());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int outputInfoInternal(const char* _str)
|
||||||
|
{
|
||||||
|
puts(_str);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" int fOutputInfo(FILE*,const char* format,...)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define printf outputInfo
|
||||||
|
|
||||||
|
|
||||||
|
void* PosixThreadMainRoutine(void* data)
|
||||||
|
{
|
||||||
|
CEmulatorMac* p = (CEmulatorMac*)data;
|
||||||
|
p->theThread();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void CEmulatorMac::x_LaunchThread()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// lance le thread
|
||||||
|
pthread_attr_t attr;
|
||||||
|
pthread_t posixThreadID;
|
||||||
|
|
||||||
|
assert(!pthread_attr_init(&attr));
|
||||||
|
assert(!pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
|
||||||
|
|
||||||
|
/*int threadError =*/ pthread_create(&posixThreadID, &attr, &PosixThreadMainRoutine, this);
|
||||||
|
|
||||||
|
assert(!pthread_attr_destroy(&attr));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEmulatorMac::x_WaitForEndThread()
|
||||||
|
{
|
||||||
|
while(bInThread)
|
||||||
|
usleep(100);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern void my_exit(int);
|
||||||
|
|
||||||
|
|
||||||
|
void mac_get_resource_path(const char *_path,MyString& _resPath)
|
||||||
|
{
|
||||||
|
CFURLRef resourceURL;
|
||||||
|
_resPath.Empty();
|
||||||
|
|
||||||
|
// Look for the resource in the main bundle by name and type.
|
||||||
|
|
||||||
|
#ifdef ACTIVEGSPLUGIN
|
||||||
|
CFBundleRef bundle = CFBundleGetBundleWithIdentifier(__CFStringMakeConstantString("com.freetoolsassociation.activegs"));
|
||||||
|
#else
|
||||||
|
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
CFStringRef ce = CFStringCreateWithCString(
|
||||||
|
NULL,
|
||||||
|
_path,
|
||||||
|
kCFStringEncodingASCII);
|
||||||
|
resourceURL = CFBundleCopyResourceURL(
|
||||||
|
bundle,
|
||||||
|
ce,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if(!resourceURL)
|
||||||
|
{
|
||||||
|
printf("Failed to locate a file in the loaded bundle! (%s)",_path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char fileurl[1024];
|
||||||
|
|
||||||
|
if(!CFURLGetFileSystemRepresentation(
|
||||||
|
resourceURL,
|
||||||
|
true,
|
||||||
|
(UInt8*)
|
||||||
|
fileurl,
|
||||||
|
1024))
|
||||||
|
|
||||||
|
{
|
||||||
|
printf("Failed to turn a bundle resource URL into a filesystem path representation!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_resPath = fileurl;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CEmulatorMac::CEmulatorMac(CEmulator** _parent, int _usingCoreGraphics,PluginInstance* _pi) : CEmulator(_parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
macUsingCoreGraphics = _usingCoreGraphics;
|
||||||
|
pi = _pi;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CEmulatorMac::~CEmulatorMac()
|
||||||
|
{
|
||||||
|
outputInfo("~CEmulatorMac (%X)\n",this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEmulatorMac::loadingInProgress(int _motorOn,int _slot, int _drive)
|
||||||
|
{
|
||||||
|
#ifdef DRIVER_IOS
|
||||||
|
extern void x_loadinginprogress(int,int,int);
|
||||||
|
x_loadinginprogress(_motorOn,_slot,_drive);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEmulatorMac::getEngineString(MyString& engine)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (macUsingCoreGraphics)
|
||||||
|
{
|
||||||
|
#if defined(ACTIVEGSPLUGIN) && !defined(DRIVER_IOS)
|
||||||
|
if (isEventCocoa)
|
||||||
|
engine="CG/Cocoa";
|
||||||
|
else
|
||||||
|
engine="CG/Carbon";
|
||||||
|
#else
|
||||||
|
engine="CG";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
engine = "QD";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEmulatorMac::showStatus(const char* _str)
|
||||||
|
{
|
||||||
|
#ifdef ACTIVEGSPLUGIN
|
||||||
|
extern MyString messageLine;
|
||||||
|
extern int messageLineVBL;
|
||||||
|
|
||||||
|
messageLine = _str;
|
||||||
|
if (_str)
|
||||||
|
{
|
||||||
|
messageLineVBL=100;
|
||||||
|
x_refresh_video();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
70
Common.osx/CEmulatorCtrlMac.h
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
ActiveGS, Copyright 2004-2016 Olivier Goguel, https://github.com/ogoguel/ActiveGS
|
||||||
|
Based on Kegs, Copyright 2004 Kent Dickey, https://kegs.sourceforge.net
|
||||||
|
This code is covered by the GNU GPL licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__LP64__) || defined(DRIVER_IOS) || defined(ACTIVEGSPLUGIN) || defined(ACTIVEGSCOCOA)
|
||||||
|
#else
|
||||||
|
#define ENABLEQD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DRIVER_IOS
|
||||||
|
#ifdef ACTIVEGSPLUGIN
|
||||||
|
#include "../common.xpi/npapiPlugin.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../Common/CEmulatorCtrl.h"
|
||||||
|
|
||||||
|
#ifdef DRIVER_IOS
|
||||||
|
|
||||||
|
#include <CoreGraphics/CGContext.h>
|
||||||
|
#include <CoreGraphics/CGBitmapContext.h>
|
||||||
|
#include <CoreFoundation/CFURL.h>
|
||||||
|
//extern void retrievePersistentPath(MyString&,CFStringRef);
|
||||||
|
#else
|
||||||
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
#include <CoreServices/CoreServices.h>
|
||||||
|
#include <Carbon/Carbon.h>
|
||||||
|
extern int isEventCocoa;
|
||||||
|
//extern void retrievePersistentPath(MyString&);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void x_invalidrect();
|
||||||
|
//extern int x_video_need_to_be_refreshed;
|
||||||
|
|
||||||
|
#ifdef ENABLEQD
|
||||||
|
extern CGrafPtr mac_window_port;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class PluginInstance;
|
||||||
|
|
||||||
|
class CEmulatorMac : public CEmulator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// int usingCoreGraphics;
|
||||||
|
PluginInstance* pi;
|
||||||
|
CGContextRef theContext;
|
||||||
|
// void* npWindow;
|
||||||
|
#ifdef ENABLEQD
|
||||||
|
CGrafPtr window_port;
|
||||||
|
#endif
|
||||||
|
int bInit;
|
||||||
|
// virtual void writeOptions(COption& _option);
|
||||||
|
// virtual COption loadOptions() ;
|
||||||
|
// virtual void x_terminateEmulator();
|
||||||
|
// virtual void x_launchEmulator();
|
||||||
|
// To be defined in son
|
||||||
|
virtual void x_LaunchThread() ;
|
||||||
|
virtual void x_WaitForEndThread() ;
|
||||||
|
|
||||||
|
CEmulatorMac(CEmulator** _parent, int usingCoreGraphics=0,PluginInstance* pi=NULL);
|
||||||
|
void getEngineString(MyString& engine);
|
||||||
|
virtual void loadingInProgress(int _motorOn,int _slot, int _drive);
|
||||||
|
virtual void showStatus(const char* _msg) ;
|
||||||
|
~CEmulatorMac();
|
||||||
|
};
|
BIN
Common.res/ActiveGS.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
130
Common.res/Apple_2_Disk_Drive_Sounds.txt
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
|
||||||
|
Apple 2 Disk Drive Sounds Copyright (C) Moose O'Malley,
|
||||||
|
-------------------------- January 2011.
|
||||||
|
|
||||||
|
+===========================================================+
|
||||||
|
| T A B L E O F C O N T E N T S |
|
||||||
|
+===========================================================+
|
||||||
|
| * Introduction |
|
||||||
|
| * Other Projects Using These Sounds |
|
||||||
|
| * License / Limitations / Restrictions |
|
||||||
|
| * Amendment History |
|
||||||
|
| * Contacting the Program's Author |
|
||||||
|
+===========================================================+
|
||||||
|
|
||||||
|
Introduction :
|
||||||
|
--------------
|
||||||
|
|
||||||
|
This ZIP file contains the Apple 2 disk drive sounds that I recorded for
|
||||||
|
use with my "Apple 2 Disk Drive Sound Simulator" program (Windows 95 / 98 /
|
||||||
|
ME / NT / 2000 / XP, Vista, etc).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
About the Disk Drive Sounds: (from my "Apple 2 Disk Drive Sound Simulator" program's readme).
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
As people may know from the Apple 2 Emulation section of my WEB pages :
|
||||||
|
|
||||||
|
At the best of times, the Apple 2 disk drive used to make horrible
|
||||||
|
grunting and scrapping sounds as it loaded programs. When I used to go
|
||||||
|
to the local Burleigh Heads library and used the Apple 2 there, everyone
|
||||||
|
in the library would stop and stare (and sometimes glare !) at us
|
||||||
|
whenever the Apple 2 was reading floppy disks - the grunts and groans
|
||||||
|
from the drive were *that* loud !!
|
||||||
|
|
||||||
|
N.B. These terrible sounds were perfectly normal for Apple 2 drives,
|
||||||
|
and they were quite loud as well, even when using brand new floppy
|
||||||
|
disks and brand new floppy drives.
|
||||||
|
|
||||||
|
However, people today didn't believe me about the sounds or how loud they
|
||||||
|
really were.
|
||||||
|
|
||||||
|
So now, a short MP3 of some Apple 2 disk drive sounds is available from my
|
||||||
|
WEB page.
|
||||||
|
|
||||||
|
And, in addition, I have written this program to simulate some Apple 2
|
||||||
|
disk drive sounds.
|
||||||
|
|
||||||
|
All of the Apple 2 disk drive sounds were recorded by me on April 10 and 11,
|
||||||
|
2000. To record the sounds, I used a cheap microphone hooked up to my
|
||||||
|
Windows 98 PC, which was running Goldwave a good sound editing program.
|
||||||
|
I placed the microphone at the entrance to the Apple 2 floppy drive, and
|
||||||
|
then proceeded to record the loading sounds the drive made for a bunch
|
||||||
|
of games and programs. (I own an Apple ][c with both internal and
|
||||||
|
external drives).
|
||||||
|
|
||||||
|
Finally, in December 2001, I again listened carefully to the sounds I recorded
|
||||||
|
18 months ago, and edited out some of the more common sound bytes.
|
||||||
|
|
||||||
|
Then, I wrote a Delphi program to play them back, and compiled all of the
|
||||||
|
sounds into a single resource file, which was later compiled and compressed
|
||||||
|
into the Executable program. That is why there are no WAV files accompanying
|
||||||
|
this program - they are all contained inside the EXE file !! (See my
|
||||||
|
"Apple 2 Disk Drive Sound Simulator" program).
|
||||||
|
|
||||||
|
The "squeak" was a sound that the disk drive makes very occassionally
|
||||||
|
when (I think) it is swinging its read head backwards and forwards
|
||||||
|
very quickly and the rubber belt slips - not sure about how it happens
|
||||||
|
but it does happen. It is definitely a sound the drive makes - not
|
||||||
|
the door on the drive. I rember it happening on all of the Apple ]['s I
|
||||||
|
used in the early 1980's and it still happens on my Apple ][c - but it is
|
||||||
|
very occasional.
|
||||||
|
|
||||||
|
The "Ghostbusters" digitised speech sound is not a disk drive sound,
|
||||||
|
but I thought it would be fun to add this sound in as well to show
|
||||||
|
what digitised speech on the Apple ][ sounded like. Back in the
|
||||||
|
early 80's, this speech was state of the art and I remember
|
||||||
|
times when people used to crowd around my Apple ][ just to
|
||||||
|
hear it say "Ghostbusters" !!
|
||||||
|
|
||||||
|
|
||||||
|
Other Projects Using These Sounds :
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
See the readme file that accompanies my "Apple 2 Disk Drive Sound Simulator"
|
||||||
|
program.
|
||||||
|
|
||||||
|
|
||||||
|
License / Limitations / Restrictions :
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
These sounds are freeware - which means they are copyrighted, but
|
||||||
|
any person and any company is welcome to use them in your own programs /
|
||||||
|
projects, subject to one condition.
|
||||||
|
|
||||||
|
I am a friendly guy and I like supporting / helping other software
|
||||||
|
developers. If you want to use these sounds in your own programs /
|
||||||
|
projects, then that is fine: all I ask is that you add a credit to me
|
||||||
|
on your projects's web page, the credits screen, the help file,
|
||||||
|
or similar. A credit something like this would be perfect:
|
||||||
|
|
||||||
|
Apple ][ disk drive sounds courtesy of
|
||||||
|
Moose's Software Valley: http://move.to/moose
|
||||||
|
|
||||||
|
Please don't just rip off my work / take my work without giving me
|
||||||
|
any credit.
|
||||||
|
|
||||||
|
Hope this is OK.
|
||||||
|
|
||||||
|
Long Live the Apple ][ !!!
|
||||||
|
|
||||||
|
|
||||||
|
Amendment History :
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Vers Date Description
|
||||||
|
|
||||||
|
1.0 25-Jan-2011 First Public Release of these sounds on their own.
|
||||||
|
|
||||||
|
|
||||||
|
If this ZIP file was not downloaded from my Home Page, then
|
||||||
|
it is possibly an old version. The latest version of this
|
||||||
|
ZIP file is available from my WEB page - see below.
|
||||||
|
|
||||||
|
Mike "Moose" O'Malley
|
||||||
|
____________________________________________________
|
||||||
|
Moose's Software Valley - Established July, 1996.
|
||||||
|
WEB: http://move.to/moose
|
||||||
|
____________________________________________________
|
||||||
|
|
BIN
Common.res/Search Skip Search 1.wav
Normal file
BIN
Common.res/Search Skip Search 2.wav
Normal file
BIN
Common.res/Search Skip Search 3.wav
Normal file
BIN
Common.res/Search Skip Search 4.wav
Normal file
BIN
Common.res/Search Skip Search 5.wav
Normal file
BIN
Common.res/ShastonHi640.ttf
Normal file
BIN
Common.res/Spin Up Search 1.wav
Normal file
BIN
Common.res/Spin Up Search 2.wav
Normal file
BIN
Common.res/disk.png
Normal file
After Width: | Height: | Size: 196 B |
BIN
Common.res/disk_35_1.png
Normal file
After Width: | Height: | Size: 305 B |
BIN
Common.res/disk_35_2.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Common.res/disk_525_1.png
Normal file
After Width: | Height: | Size: 292 B |
BIN
Common.res/disk_525_2.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
Common.res/facebook-logo.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
Common.res/floppy_eject.wav
Normal file
BIN
Common.res/logo_apple2.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
Common.res/logo_apple2gs.png
Normal file
After Width: | Height: | Size: 15 KiB |
567
Common/3rdpartylib/simplexml.cpp
Normal file
@ -0,0 +1,567 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
|
||||||
|
This file is part of SimpleXML, a simplified C++ tree based parser
|
||||||
|
of XML 1.0 documents.
|
||||||
|
Copyright (C) 2003 by Brian Ecker.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "simplexml.h"
|
||||||
|
#include "../cemulatorctrl.h"
|
||||||
|
|
||||||
|
|
||||||
|
#undef debug_printf
|
||||||
|
#define debug_printf(X,...)
|
||||||
|
|
||||||
|
const char* lastxmlerror=NULL;
|
||||||
|
|
||||||
|
simplexml::simplexml(const char *encoded, const simplexml *parent)
|
||||||
|
{
|
||||||
|
const char *sptr, *tptr /*, *uptr*/;
|
||||||
|
char *buf, *end, lastc;
|
||||||
|
long len;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
_parent = parent;
|
||||||
|
|
||||||
|
_key = NULL;
|
||||||
|
_value = NULL;
|
||||||
|
_properties = NULL;
|
||||||
|
_children = NULL;
|
||||||
|
|
||||||
|
ptr = NULL;
|
||||||
|
|
||||||
|
// decode the xml string
|
||||||
|
|
||||||
|
sptr = strchr(encoded,'<');
|
||||||
|
if (sptr==NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!parent && strncmp(sptr,"<?xml",5))
|
||||||
|
{
|
||||||
|
printf("not an xml file!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
// OG ignore encoding
|
||||||
|
if (sptr[1]=='?')
|
||||||
|
{
|
||||||
|
sptr++;
|
||||||
|
while(*sptr && *sptr!='<')
|
||||||
|
sptr++;
|
||||||
|
|
||||||
|
if (!*sptr)
|
||||||
|
{
|
||||||
|
printf("error!");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sptr++;
|
||||||
|
len = ntotok(sptr,"> \t\r\n"); // og
|
||||||
|
if (sptr[len-1]=='/')
|
||||||
|
len--;
|
||||||
|
|
||||||
|
|
||||||
|
_key = new char[len+1];
|
||||||
|
strncpy(_key,sptr,len);
|
||||||
|
|
||||||
|
// _key = (char*)sptr;
|
||||||
|
_key[len] = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
debug_printf("found tag:%s\n",_key);
|
||||||
|
|
||||||
|
sptr += len;
|
||||||
|
lastc = sptr[0];
|
||||||
|
//OG Manage autoclosing tag before entering the parsing loop
|
||||||
|
if (lastc=='/')
|
||||||
|
return ;
|
||||||
|
|
||||||
|
/** Parse parameters ************************************************/
|
||||||
|
while (sptr && sptr[0] && lastc != '>' /*&& lastc != '/'*/) {
|
||||||
|
len = nskiptok(sptr,"> \t\r\n");
|
||||||
|
lastc = sptr[len-1];
|
||||||
|
sptr += len;
|
||||||
|
|
||||||
|
|
||||||
|
if (lastc=='>' || sptr==NULL)
|
||||||
|
break;
|
||||||
|
/*
|
||||||
|
if (lastc=='/' && sptr[0]=='>') {
|
||||||
|
sptr += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (sptr[0]=='/' && sptr[1]=='>')
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
/*
|
||||||
|
sptr+=2;
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
len = ntotok(sptr,"=");
|
||||||
|
if (sptr[len]=='=' && sptr[len+1]) {
|
||||||
|
if (_properties==NULL) {
|
||||||
|
_properties = new keyvalue_rec;
|
||||||
|
ptr = _properties;
|
||||||
|
} else {
|
||||||
|
ptr->next = new keyvalue_rec;
|
||||||
|
ptr = ptr->next;
|
||||||
|
}
|
||||||
|
ptr->next = NULL;
|
||||||
|
long l = ntotok(sptr,"\r\n\t =");
|
||||||
|
ptr->key = new char[l+1];
|
||||||
|
strncpy(ptr->key, sptr, l);
|
||||||
|
ptr->key[l] = 0;
|
||||||
|
|
||||||
|
debug_printf("found property:[%s]\n",ptr->key);
|
||||||
|
|
||||||
|
sptr += len+1;
|
||||||
|
len = nskiptok(sptr," \t\r\n");
|
||||||
|
sptr+=len;
|
||||||
|
if (sptr[0]=='"') {
|
||||||
|
sptr++;
|
||||||
|
len = ntotok(sptr,"\"");
|
||||||
|
ptr->value = new char[len+1];
|
||||||
|
strncpy((char *)ptr->value,sptr,len);
|
||||||
|
((char *)ptr->value)[len] = 0;
|
||||||
|
sptr += len+1;
|
||||||
|
} else {
|
||||||
|
delete ptr->key;
|
||||||
|
ptr->key=NULL;
|
||||||
|
ptr->value=NULL;
|
||||||
|
SETXMLERROR("misformed xml 3\n");
|
||||||
|
return ;
|
||||||
|
/*
|
||||||
|
len = ntotok(sptr,"> \t\r\n");
|
||||||
|
ptr->value = new char[len+1];
|
||||||
|
strncpy((char *)ptr->value,sptr,len);
|
||||||
|
((char *)ptr->value)[len] = 0;
|
||||||
|
sptr += len;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
debug_printf("found property value:%s\n",ptr->value);
|
||||||
|
|
||||||
|
// OG avance
|
||||||
|
len = nskiptok(sptr," \t\r\n");
|
||||||
|
sptr += len;
|
||||||
|
|
||||||
|
lastc = sptr[0];
|
||||||
|
/*
|
||||||
|
if (sptr)
|
||||||
|
{
|
||||||
|
lastc = sptr[0];
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Empty tag? <foo/>
|
||||||
|
if (lastc=='/') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (lastc=='>') {
|
||||||
|
#ifdef _DEBUG
|
||||||
|
printf("ignore\n");
|
||||||
|
#endif
|
||||||
|
// sptr++;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
len = nskiptok(sptr,"> \t\r\n");
|
||||||
|
|
||||||
|
if (!sptr[len])
|
||||||
|
return;
|
||||||
|
|
||||||
|
debug_printf("%c%c%c%c%c\n",sptr[len],sptr[len+1],sptr[len+2],sptr[len+3],sptr[len+4]);
|
||||||
|
// skip comments before determining tag type
|
||||||
|
while (strncasecmp(&sptr[len],"<!--",4)==0) {
|
||||||
|
sptr = stristr(&sptr[len],"-->") + 3;
|
||||||
|
ASSERT(sptr);
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sptr[len]=='<') {
|
||||||
|
|
||||||
|
debug_printf("key:%s",_key);
|
||||||
|
sptr += len;
|
||||||
|
buf = new char[strlen(_key) + 4]; // 4 => "</>\0"
|
||||||
|
sprintf(buf,"</%s>",_key);
|
||||||
|
|
||||||
|
while (sptr && strncasecmp(sptr,buf,strlen(buf))) {
|
||||||
|
tptr = strchr(sptr,'<');
|
||||||
|
if (tptr==NULL) {
|
||||||
|
delete[] buf;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tptr++;
|
||||||
|
len = ntotok(tptr,"> \t\r\n");
|
||||||
|
|
||||||
|
// OG Autoclosing Tagfix
|
||||||
|
if (tptr[len-1]=='/')
|
||||||
|
len--;
|
||||||
|
|
||||||
|
if (tptr[0]=='/')
|
||||||
|
{
|
||||||
|
SETXMLERROR("misformed xml 1");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
char* keyn = (char*)new char[len+1];
|
||||||
|
strncpy(keyn,tptr,len);
|
||||||
|
keyn[len] = 0;
|
||||||
|
|
||||||
|
if (!strcmp(keyn,"![CDATA["))
|
||||||
|
{
|
||||||
|
delete keyn,
|
||||||
|
keyn=NULL;
|
||||||
|
// trim
|
||||||
|
tptr += 8; //strlen("![CDATA[");
|
||||||
|
|
||||||
|
const char* ed = stristr(tptr,"]]>");
|
||||||
|
if (!ed)
|
||||||
|
printf("CDATA does not end");
|
||||||
|
|
||||||
|
int trimleft = nskiptok(tptr," \t\r\n");
|
||||||
|
tptr+=trimleft;
|
||||||
|
int len2 = ed-tptr;
|
||||||
|
_value = new char[len2+1];
|
||||||
|
strncpy(_value,tptr,len2);
|
||||||
|
_value[len2] = 0;
|
||||||
|
debug_printf("found CDATA value: %s",_value);
|
||||||
|
|
||||||
|
// closing tag
|
||||||
|
delete buf;
|
||||||
|
buf=NULL;
|
||||||
|
|
||||||
|
tptr = ed+3;
|
||||||
|
sptr = tptr;
|
||||||
|
// skip
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (!strcmp(keyn,"!--"))
|
||||||
|
{
|
||||||
|
delete keyn;
|
||||||
|
keyn=NULL;
|
||||||
|
debug_printf("found comment");
|
||||||
|
const char* ed = stristr(tptr,"-->");
|
||||||
|
if (!ed)
|
||||||
|
printf("comment does not end");
|
||||||
|
|
||||||
|
tptr = ed+3;
|
||||||
|
sptr = tptr;
|
||||||
|
// skip
|
||||||
|
//return ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_children==NULL) {
|
||||||
|
_children = new keyvalue_rec;
|
||||||
|
ptr = _children;
|
||||||
|
} else {
|
||||||
|
ptr->next = new keyvalue_rec;
|
||||||
|
ptr = ptr->next;
|
||||||
|
}
|
||||||
|
ptr->next = NULL;
|
||||||
|
|
||||||
|
ptr->key = keyn;
|
||||||
|
|
||||||
|
|
||||||
|
debug_printf("adding key:%s\n",ptr->key);
|
||||||
|
ptr->value = new simplexml(sptr,this);
|
||||||
|
|
||||||
|
|
||||||
|
// OG Autoclosing Tag Fix
|
||||||
|
int l = ntotok(sptr+1,"><");
|
||||||
|
if ( (sptr[l]=='/') && (sptr[l+1]=='>') )
|
||||||
|
{
|
||||||
|
// autoclosing tag)
|
||||||
|
sptr += l+2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
end = new char[len + 4]; // 4 => "</>\0"
|
||||||
|
sprintf(end,"</%s>",keyn);
|
||||||
|
|
||||||
|
sptr = stristr(sptr,end);
|
||||||
|
if (sptr)
|
||||||
|
{
|
||||||
|
sptr += strlen(end);
|
||||||
|
delete[] end;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete[] end;
|
||||||
|
SETXMLERROR("misformed XML\n");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sptr = strchr(sptr,'<');
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] buf;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// OG skip trailing space
|
||||||
|
sptr+=len;
|
||||||
|
|
||||||
|
buf = new char[strlen(_key) + 4]; // 4 => "</>\0"
|
||||||
|
sprintf(buf,"</%s>",_key);
|
||||||
|
tptr = stristr(sptr,buf);
|
||||||
|
// ASSERT(tptr);
|
||||||
|
delete[] buf;
|
||||||
|
|
||||||
|
if (tptr==NULL)
|
||||||
|
len = strlen(sptr);
|
||||||
|
else
|
||||||
|
len = tptr - sptr;
|
||||||
|
|
||||||
|
len = removeendingspace(sptr,len);
|
||||||
|
_value = new char[len+1];
|
||||||
|
strncpy(_value,sptr,len);
|
||||||
|
_value[len] = 0;
|
||||||
|
|
||||||
|
debug_printf("found value:%s\n",_value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// trim ending space
|
||||||
|
int removeendingspace(const char *str,int len)
|
||||||
|
{
|
||||||
|
if (!str) return 0;
|
||||||
|
while(len)
|
||||||
|
{
|
||||||
|
if (strchr(" \t\r\n",str[len-1])==NULL)
|
||||||
|
break;
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
long ntotok(const char *str, const char *tokens)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
|
||||||
|
if (str==NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (tokens==NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (i=0; str[i] && strchr(tokens,str[i])==NULL; i++);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
long nskiptok(const char *str, const char *tokens)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
|
||||||
|
if (str==NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (tokens==NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const char* p;
|
||||||
|
for (i=0; str[i] && (p=strchr(tokens,str[i]))!=NULL; i++);
|
||||||
|
/*
|
||||||
|
for (i=0; str[i] ; i++)
|
||||||
|
{
|
||||||
|
const char* p = strchr(tokens,str[i]);
|
||||||
|
if (p!=NULL) break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *stristr(const char *haystack, const char *needle)
|
||||||
|
{
|
||||||
|
long i, n;
|
||||||
|
|
||||||
|
for (i=0; haystack[i]; i++) {
|
||||||
|
if (tolower(haystack[i])==tolower(needle[0])) {
|
||||||
|
for (n=0;
|
||||||
|
haystack[i+n] && needle[n]
|
||||||
|
&& tolower(haystack[i+n])==tolower(needle[n]);
|
||||||
|
n++);
|
||||||
|
if (n==strlen(needle))
|
||||||
|
return(&haystack[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
simplexml::~simplexml(void)
|
||||||
|
{
|
||||||
|
keyvalue_rec *ptr,*last;
|
||||||
|
|
||||||
|
if (_key!=NULL) {
|
||||||
|
delete[] _key;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_value!=NULL) {
|
||||||
|
delete[] _value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_properties!=NULL) {
|
||||||
|
for (ptr=_properties->next, last=_properties;
|
||||||
|
ptr!=NULL;
|
||||||
|
last=ptr, ptr=ptr->next) {
|
||||||
|
delete[] last->key;
|
||||||
|
delete[] (char *) last->value;
|
||||||
|
delete last;
|
||||||
|
}
|
||||||
|
delete[] last->key;
|
||||||
|
delete[] (char *) last->value;
|
||||||
|
delete last;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_children!=NULL) {
|
||||||
|
for (ptr=_children->next, last=_children;
|
||||||
|
ptr!=NULL;
|
||||||
|
last=ptr, ptr=ptr->next) {
|
||||||
|
delete[] last->key;
|
||||||
|
delete (simplexml *) last->value;
|
||||||
|
delete last;
|
||||||
|
}
|
||||||
|
delete[] last->key;
|
||||||
|
delete (simplexml *) last->value;
|
||||||
|
delete last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const simplexml *simplexml::parent(void)
|
||||||
|
{
|
||||||
|
return((const simplexml *) _parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *simplexml::key(void)
|
||||||
|
{
|
||||||
|
return((const char *) _key);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *simplexml::value(void)
|
||||||
|
{
|
||||||
|
return((const char*) _value);
|
||||||
|
}
|
||||||
|
|
||||||
|
int simplexml::number_of_properties(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (i=0, ptr=_properties; ptr!=NULL; i++, ptr=ptr->next);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *simplexml::property(int property_number)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (i=0, ptr=_properties;
|
||||||
|
i!=property_number && ptr!=NULL;
|
||||||
|
i++, ptr=ptr->next);
|
||||||
|
|
||||||
|
if (ptr)
|
||||||
|
return (const char *) ptr->value;
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *simplexml::property(const char *key, int iter)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (ptr=_properties; ptr!=NULL; ptr=ptr->next) {
|
||||||
|
if (strcmp(ptr->key,key)==0) {
|
||||||
|
for (i=0; i<iter && ptr!=NULL; i++, ptr=ptr->next);
|
||||||
|
if (ptr)
|
||||||
|
return (const char *) ptr->value;
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int simplexml::number_of_children(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (i=0, ptr=_children; ptr!=NULL; i++, ptr=ptr->next);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
simplexml *simplexml::child(int child_number)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (i=0, ptr=_children;
|
||||||
|
i!=child_number && ptr!=NULL;
|
||||||
|
i++, ptr=ptr->next);
|
||||||
|
|
||||||
|
if (ptr)
|
||||||
|
return (simplexml *) ptr->value;
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
simplexml *simplexml::child(const char *key, int iter)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
keyvalue_rec *ptr;
|
||||||
|
|
||||||
|
for (ptr=_children; ptr!=NULL; ptr=ptr->next) {
|
||||||
|
if (strcmp(ptr->key,key)==0) {
|
||||||
|
for (i=0; i<iter && ptr!=NULL; i++, ptr=ptr->next);
|
||||||
|
if (ptr)
|
||||||
|
return (simplexml *) ptr->value;
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|