Commits

Ronald Oussoren committed 9635220

Port to new metadata system

Comments (0)

Files changed (4)

pyobjc-framework-CoreLocation/BridgeSupport/CoreLocation.bridgesupport

+<?xml version='1.0'?>
+<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
+<signatures version='1.0'>
+  <depends_on path='/System/Library/Frameworks/Foundation.framework/Foundation' />
+  <struct name='CLLocationCoordinate2D' type='{_CLLocationCoordinate2D="latitude"d"longitude"d}' type64='{_CLLocationCoordinate2D="latitude"d"longitude"d}' />
+  <constant name='kCLDistanceFilterNone' type='d' />
+  <constant name='kCLErrorDomain' type='@' />
+  <constant name='kCLLocationAccuracyBest' type='d' />
+  <constant name='kCLLocationAccuracyHundredMeters' type='d' />
+  <constant name='kCLLocationAccuracyKilometer' type='d' />
+  <constant name='kCLLocationAccuracyNearestTenMeters' type='d' />
+  <constant name='kCLLocationAccuracyThreeKilometers' type='d' />
+  <enum name='kCLErrorDenied' value='1' />
+  <enum name='kCLErrorLocationUnknown' value='0' />
+  <class name='CLLocation' >
+    <method selector='initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:'>
+      <arg index='0' type='{_CLLocationCoordinate2D=dd}' />
+    </method>
+    <method selector='coordinate'> 
+      <retval type='{_CLLocationCoordinate2D=dd}' />
+    </method>
+  </class>
+  <class name='CLLocationManager'>
+    <method class_method='true' selector='locationServicesEnabled'>
+      <retval type='B' />
+    </method>
+  </class>
+</signatures>
+

pyobjc-framework-CoreLocation/Lib/CoreLocation/PyObjC.bridgesupport

-<?xml version='1.0'?>
-<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
-<signatures version='1.0'>
-  <depends_on path='/System/Library/Frameworks/Foundation.framework/Foundation' />
-  <struct name='CLLocationCoordinate2D' type='{_CLLocationCoordinate2D="latitude"d"longitude"d}' type64='{_CLLocationCoordinate2D="latitude"d"longitude"d}' />
-  <constant name='kCLDistanceFilterNone' type='d' />
-  <constant name='kCLErrorDomain' type='@' />
-  <constant name='kCLLocationAccuracyBest' type='d' />
-  <constant name='kCLLocationAccuracyHundredMeters' type='d' />
-  <constant name='kCLLocationAccuracyKilometer' type='d' />
-  <constant name='kCLLocationAccuracyNearestTenMeters' type='d' />
-  <constant name='kCLLocationAccuracyThreeKilometers' type='d' />
-  <enum name='kCLErrorDenied' value='1' />
-  <enum name='kCLErrorLocationUnknown' value='0' />
-  <class name='CLLocation' >
-    <method selector='initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:'>
-      <arg index='0' type='{_CLLocationCoordinate2D=dd}' />
-    </method>
-    <method selector='coordinate'> 
-      <retval type='{_CLLocationCoordinate2D=dd}' />
-    </method>
-  </class>
-  <class name='CLLocationManager'>
-    <method class_method='true' selector='locationServicesEnabled'>
-      <retval type='B' />
-    </method>
-  </class>
-</signatures>
-

pyobjc-framework-CoreLocation/Lib/CoreLocation/__init__.py

 documentation for details on how to use these functions and classes. 
 '''
 
-import objc as _objc
-from Foundation import *
+import sys
+import objc
+import Foundation
 
-__bundle__ = _objc.initFrameworkWrapper("CoreLocation",
-    frameworkIdentifier="com.apple.corelocation",
-    frameworkPath=_objc.pathForFramework(
-        "/System/Library/Frameworks/CoreLocation.framework"),
-    globals=globals())
+from CoreLocation import _metadata
+
+sys.modules['CoreLocation'] = objc.ObjCLazyModule(
+    "CoreLocation", "com.apple.corelocation",
+    objc.pathForFramework("/System/Library/Frameworks/CoreLocation.framework"),
+    _metadata.__dict__, None, {
+        '__doc__': __doc__,
+        '__path__': __path__,
+        'objc': objc
+    }, (Foundation,))

pyobjc-framework-CoreLocation/Lib/CoreLocation/_metadata.py

+# Generated file, don't edit
+# Source: BridgeSupport/CoreLocation.bridgesupport
+# Last update: Mon Jul 18 19:28:08 2011
+
+import objc, sys
+
+if sys.maxint > 2 ** 32:
+    def sel32or64(a, b): return b
+else:
+    def sel32or64(a, b): return a
+if sys.byteorder == 'little':
+    def littleOrBig(a, b): return a
+else:
+    def littleOrBig(a, b): return b
+
+misc = {
+    "CLLocationCoordinate2D": objc.createStructType('CLLocationCoordinate2D', b'{_CLLocationCoordinate2D="latitude"d"longitude"d}', None),
+}
+constants = '''$kCLDistanceFilterNone@d$kCLErrorDomain$kCLLocationAccuracyBest@d$kCLLocationAccuracyHundredMeters@d$kCLLocationAccuracyKilometer@d$kCLLocationAccuracyNearestTenMeters@d$kCLLocationAccuracyThreeKilometers@d$'''
+enums = '''$kCLErrorDenied@1$kCLErrorLocationUnknown@0$'''
+misc.update({})
+functions = {}
+cftypes = []
+r = objc.registerMetaDataForSelector
+objc._updatingMetadata(True)
+try:
+    pass
+    r('CLLocation', b'initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:', {'arguments': {2: {'type': b'{_CLLocationCoordinate2D=dd}'}}})
+    r('CLLocation', b'coordinate', {'retval': {'type': b'{_CLLocationCoordinate2D=dd}'}})
+    r('CLLocationManager', b'locationServicesEnabled', {'retval': {'type': b'Z'}})
+finally:
+    objc._updatingMetadata(False)