[PyObjC-svn] r2055 - in trunk/pyobjc/pyobjc-framework-CoreText: . Doc Exceptions Lib Lib/CoreText Modules PyObjCTest
[email protected] Sun, 08 Feb 2009 05:54:44 -0600
Newsgroups
gmane.comp.python.pyobjc.cvs
Message-ID
<[email protected] >
Author: ronaldoussoren
Date: Sun Feb 8 05:54:43 2009
New Revision: 2055
Log:
- Full API test coverage on Leopard
- Add api-notes documentation
- Add manaul wrappers for a number of API's because their interface
cannot be described by the bridgesupport datafiles.
Added:
trunk/pyobjc/pyobjc-framework-CoreText/Doc/
trunk/pyobjc/pyobjc-framework-CoreText/Doc/api-notes-CoreText.txt
trunk/pyobjc/pyobjc-framework-CoreText/Modules/
trunk/pyobjc/pyobjc-framework-CoreText/Modules/_manual.m
trunk/pyobjc/pyobjc-framework-CoreText/Modules/pyobjc-api.h (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctfont.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctfontcollection.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctfontdescriptor.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctfonttraits.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctframe.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctframesetter.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctglyphinfo.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctline.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctparagraphstyle.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctrun.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_ctstringattributes.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_cttexttab.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_cttypesetter.py (contents, props changed)
Modified:
trunk/pyobjc/pyobjc-framework-CoreText/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreText/Exceptions/CoreText.bridgesupport
trunk/pyobjc/pyobjc-framework-CoreText/Lib/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/ (props changed)
trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/PyObjC.bridgesupport
trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/__init__.py
trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_coretext.py
trunk/pyobjc/pyobjc-framework-CoreText/setup.py
Modified: trunk/pyobjc/pyobjc-framework-CoreText/Exceptions/CoreText.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreText/Exceptions/CoreText.bridgesupport (original)
+++ trunk/pyobjc/pyobjc-framework-CoreText/Exceptions/CoreText.bridgesupport Sun Feb 8 05:54:43 2009
@@ -2,14 +2,14 @@
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
<signatures version='1.0'>
<struct name='CTParagraphStyleSetting' />
- <cftype gettypeid_func='CTFontCollectionGetTypeID' name='CTFontCollectionRef' />
- <cftype gettypeid_func='CTFontDescriptorGetTypeID' name='CTFontDescriptorRef' />
- <cftype gettypeid_func='CTFontGetTypeID' name='CTFontRef' />
+ <cftype gettypeid_func='CTFontCollectionGetTypeID' name='CTFontCollectionRef' tollfree='NSCTFontCollectionRef' />
+ <cftype gettypeid_func='CTFontDescriptorGetTypeID' name='CTFontDescriptorRef' tollfree='NSCTFontDescriptor' />
+ <cftype gettypeid_func='CTFontGetTypeID' name='CTFontRef' tollfree='NSCTFont' />
<cftype gettypeid_func='CTFrameGetTypeID' name='CTFrameRef' />
<cftype gettypeid_func='CTFramesetterGetTypeID' name='CTFramesetterRef' />
- <cftype gettypeid_func='CTGlyphInfoGetTypeID' name='CTGlyphInfoRef' />
+ <cftype gettypeid_func='CTGlyphInfoGetTypeID' name='CTGlyphInfoRef' tollfree='NSCTGlyphInfo' />
<cftype gettypeid_func='CTLineGetTypeID' name='CTLineRef' />
- <cftype gettypeid_func='CTParagraphStyleGetTypeID' name='CTParagraphStyleRef' />
+ <cftype gettypeid_func='CTParagraphStyleGetTypeID' name='CTParagraphStyleRef' />
<cftype gettypeid_func='CTRunGetTypeID' name='CTRunRef' />
<cftype gettypeid_func='CTTextTabGetTypeID' name='CTTextTabRef' />
<cftype gettypeid_func='CTTypesetterGetTypeID' name='CTTypesetterRef' />
@@ -24,8 +24,13 @@
</function>
<function name='CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback'>
<retval already_cfretained='true' />
- <arg comment='XXX: sort-like callback' index='1' type='^?' type64='^?' />
- <arg index='2' type='^v' type64='^v' />
+ <arg index='1' type='^?' type64='^?' function_pointer='true' function_pointer_retained='false' >
+ <retval type='i' />
+ <arg type='^{__CTFontDescriptor=}' />
+ <arg type='^{__CTFontDescriptor=}' />
+ <arg type='@' />
+ </arg>
+ <arg index='2' type='@' type64='@' />
</function>
<function name='CTFontCollectionCreateWithFontDescriptors'>
<retval already_cfretained='true' />
@@ -58,8 +63,8 @@
<retval already_cfretained='true' />
</function>
<function name='CTFontCopyGraphicsFont'>
- <retval already_retained='true' type='^{CGFont=}' type64='^{CGFont=}' />
- <arg index='1' null_accepted='true' type_modifier='o' />
+ <retval already_cfretained='true' type='^{CGFont=}' type64='^{CGFont=}' />
+ <arg index='1' null_accepted='true' type_modifier='o' already_cfretained='true' />
</function>
<function name='CTFontCopyLocalizedName'>
<retval already_cfretained='true' />
@@ -101,6 +106,10 @@
<function name='CTFontCreateForString'>
<retval already_cfretained='true' />
</function>
+ <function name='CTFontCreatePathForGlyph'>
+ <retval type='^{CGPath=}' type64='^{CGPath=}' />
+ <arg index='2' type='^{CGAffineTransform=ffffff}' type64='^{CGAffineTransform=dddddd}' />
+ </function>
<function name='CTFontCreateUIFontForLanguage'>
<retval already_cfretained='true' />
</function>
@@ -157,23 +166,24 @@
<retval already_cfretained='true' />
</function>
<function name='CTFontGetAdvancesForGlyphs'>
- <arg index='2' type_modifier='n' />
- <arg index='3' null_accepted='true' type_modifier='o' />
+ <arg index='2' type_modifier='n' c_array_length_in_arg='4' />
+ <arg index='3' null_accepted='true' type_modifier='o' c_array_length_in_arg='4' />
</function>
<function name='CTFontGetBoundingRectsForGlyphs'>
- <arg index='2' type_modifier='n' />
- <arg index='3' null_accepted='true' type_modifier='o' />
+ <arg index='2' type_modifier='n' c_array_length_in_arg='4' />
+ <arg index='3' null_accepted='true' type_modifier='o' c_array_length_in_arg='4' />
</function>
<function name='CTFontGetGlyphsForCharacters'>
- <arg index='1' type_modifier='n' unicode_string='true' />
+ <arg index='1' type_modifier='n' />
+ <arg c_array_length_in_arg='3' index='1' type_modifier='n' type='T' type64='T' />
<arg c_array_length_in_arg='3' index='2' type_modifier='o' />
</function>
<function name='CTFontGetPlatformFont'>
- <arg index='1' null_accepted='true' type_modifier='o' />
+ <arg index='1' null_accepted='true' type_modifier='o' already_cfretained='true' />
</function>
<function name='CTFontGetVerticalTranslationsForGlyphs'>
- <arg index='1' type_modifier='n' />
- <arg index='2' type_modifier='o' />
+ <arg index='1' type_modifier='n' c_array_length_in_arg='3' />
+ <arg index='2' type_modifier='o' c_array_length_in_arg='3' />
</function>
<function name='CTFrameDraw'>
<arg index='1' type='^{CGContext=}' type64='^{CGContext=}' />
@@ -216,7 +226,7 @@
<arg index='1' type='^{CGContext=}' type64='^{CGContext=}' />
</function>
<function name='CTLineGetOffsetForStringIndex'>
- <arg index='2' type='^f' type64='^d' />
+ <arg index='2' type='^f' type64='^d' type_modifier='o'/>
</function>
<function name='CTLineGetTypographicBounds'>
<arg index='1' null_accepted='true' type_modifier='o' />
@@ -231,31 +241,31 @@
<retval already_cfretained='true' />
</function>
<function name='CTParagraphStyleGetValueForSpecifier'>
- <arg c_array_length_in_arg='2' index='3' />
+ <arg c_array_length_in_arg='2' index='3' type_modifier='o'/>
</function>
<function name='CTRunDraw'>
<arg index='1' type='^{CGContext=}' type64='^{CGContext=}' />
</function>
<function name='CTRunGetGlyphs'>
- <arg c_array_length_in_arg='1' index='2' type_modifier='o' unicode_string='true' />
+ <arg c_array_length_in_arg='1' index='2' type_modifier='o' />
</function>
<function name='CTRunGetGlyphsPtr'>
- <retval type='r^S' type64='r^S' />
+ <retval type='r^S' type64='r^S' c_array_of_variable_length='true' />
</function>
<function name='CTRunGetImageBounds'>
<arg index='1' type='^{CGContext=}' type64='^{CGContext=}' />
</function>
<function name='CTRunGetPositions'>
- <arg index='2' type='^{CGPoint=ff}' type64='^{CGPoint=dd}' />
+ <arg index='2' type='^{CGPoint=ff}' type64='^{CGPoint=dd}' type_modifier='o' c_array_length_in_arg='1' />
</function>
<function name='CTRunGetPositionsPtr'>
- <retval type='r^{CGPoint=ff}' type64='r^{CGPoint=dd}' />
+ <retval type='r^{CGPoint=ff}' type64='r^{CGPoint=dd}' c_array_of_variable_length='true' />
</function>
<function name='CTRunGetStringIndices'>
<arg c_array_length_in_arg='1' index='2' type_modifier='o' />
</function>
<function name='CTRunGetStringIndicesPtr'>
- <retval type='r^i' type64='r^q' />
+ <retval type='r^i' type64='r^q' c_array_of_variable_length='true' />
</function>
<function name='CTRunGetTypographicBounds'>
<arg index='2' type_modifier='o' />
Modified: trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/PyObjC.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/PyObjC.bridgesupport (original)
+++ trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/PyObjC.bridgesupport Sun Feb 8 05:54:43 2009
@@ -6,11 +6,11 @@
<depends_on path='/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/ATS' />
<struct name='CTParagraphStyleSetting' type='{CTParagraphStyleSetting="spec"I"valueSize"I"value"^v}' type64='{CTParagraphStyleSetting="spec"I"valueSize"Q"value"^v}' />
<cftype gettypeid_func='CTFontCollectionGetTypeID' name='CTFontCollectionRef' type='^{__CTFontCollection=}' type64='^{__CTFontCollection=}' />
- <cftype gettypeid_func='CTFontDescriptorGetTypeID' name='CTFontDescriptorRef' type='^{__CTFontDescriptor=}' type64='^{__CTFontDescriptor=}' />
- <cftype gettypeid_func='CTFontGetTypeID' name='CTFontRef' type='^{__CTFont=}' type64='^{__CTFont=}' />
+ <cftype gettypeid_func='CTFontDescriptorGetTypeID' name='CTFontDescriptorRef' type='^{__CTFontDescriptor=}' type64='^{__CTFontDescriptor=}' tollfree='NSCTFontDescriptor' />
+ <cftype gettypeid_func='CTFontGetTypeID' name='CTFontRef' type='^{__CTFont=}' type64='^{__CTFont=}' tollfree='NSCTFont' />
<cftype gettypeid_func='CTFrameGetTypeID' name='CTFrameRef' type='^{__CTFrame=}' type64='^{__CTFrame=}' />
<cftype gettypeid_func='CTFramesetterGetTypeID' name='CTFramesetterRef' type='^{__CTFramesetter=}' type64='^{__CTFramesetter=}' />
- <cftype gettypeid_func='CTGlyphInfoGetTypeID' name='CTGlyphInfoRef' type='^{__CTGlyphInfo=}' type64='^{__CTGlyphInfo=}' />
+ <cftype gettypeid_func='CTGlyphInfoGetTypeID' name='CTGlyphInfoRef' type='^{__CTGlyphInfo=}' type64='^{__CTGlyphInfo=}' tollfree='NSCTGlyphInfo' />
<cftype gettypeid_func='CTLineGetTypeID' name='CTLineRef' type='^{__CTLine=}' type64='^{__CTLine=}' />
<cftype gettypeid_func='CTParagraphStyleGetTypeID' name='CTParagraphStyleRef' type='^{__CTParagraphStyle=}' type64='^{__CTParagraphStyle=}' />
<cftype gettypeid_func='CTRunGetTypeID' name='CTRunRef' type='^{__CTRun=}' type64='^{__CTRun=}' />
@@ -257,8 +257,13 @@
<function name='CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback'>
<retval already_cfretained='true' type='^{__CFArray=}' />
<arg type='^{__CTFontCollection=}' />
- <arg type='^?' type64='^?' />
- <arg type='^v' type64='^v' />
+ <arg type='^?' type64='^?' function_pointer='true' function_pointer_retained='false' >
+ <retval type='i' />
+ <arg type='^{__CTFontDescriptor=}' />
+ <arg type='^{__CTFontDescriptor=}' />
+ <arg type='@' />
+ </arg>
+ <arg type='@' type64='@' />
</function>
<function name='CTFontCollectionCreateWithFontDescriptors'>
<retval already_cfretained='true' type='^{__CTFontCollection=}' />
@@ -307,9 +312,9 @@
<arg type='^{__CTFont=}' />
</function>
<function name='CTFontCopyGraphicsFont'>
- <retval already_retained='true' type='^{CGFont=}' type64='^{CGFont=}' />
+ <retval already_cfretained='true' type='^{CGFont=}' type64='^{CGFont=}' />
<arg type='^{__CTFont=}' />
- <arg type='^^{__CTFontDescriptor}' type_modifier='o' />
+ <arg type='^^{__CTFontDescriptor}' type_modifier='o' already_cfretained='true' />
</function>
<function name='CTFontCopyLocalizedName'>
<retval already_cfretained='true' type='^{__CFString=}' />
@@ -376,6 +381,12 @@
<arg type='^{__CFString=}' />
<arg type='{_CFRange=ii}' type64='{_CFRange=ii}' />
</function>
+ <function name='CTFontCreatePathForGlyph'>
+ <retval type='^{CGPath=}' />
+ <arg type='^{__CTFont=}' />
+ <arg type='S' />
+ <arg type='^{CGAffineTransform=ffffff}' type64='^{CGAffineTransform=ffffff}' />
+ </function>
<function name='CTFontCreateUIFontForLanguage'>
<retval already_cfretained='true' type='^{__CTFont=}' />
<arg type='I' />
@@ -473,8 +484,8 @@
<retval type='d' />
<arg type='^{__CTFont=}' />
<arg type='I' />
- <arg type='^S' type_modifier='n' />
- <arg type='^{CGSize=ff}' type64='^{CGSize=ff}' type_modifier='o' />
+ <arg type='^S' type_modifier='n' c_array_length_in_arg='4' />
+ <arg type='^{CGSize=ff}' type64='^{CGSize=ff}' type_modifier='o' c_array_length_in_arg='4' />
<arg type='l' type64='l' />
</function>
<function name='CTFontGetAscent'>
@@ -489,8 +500,8 @@
<retval type='{CGRect={CGPoint=ff}{CGSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}' />
<arg type='^{__CTFont=}' />
<arg type='I' />
- <arg type='^S' type_modifier='n' />
- <arg type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=ff}{CGSize=ff}}' type_modifier='o' />
+ <arg type='^S' type_modifier='n' c_array_length_in_arg='4' />
+ <arg type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=ff}{CGSize=ff}}' type_modifier='o' c_array_length_in_arg='4' />
<arg type='l' type64='l' />
</function>
<function name='CTFontGetCapHeight'>
@@ -513,7 +524,7 @@
<function name='CTFontGetGlyphsForCharacters'>
<retval type='B' />
<arg type='^{__CTFont=}' />
- <arg type='^S' type_modifier='n' unicode_string='true' />
+ <arg type='^T' type_modifier='n' c_array_length_in_arg='3'/>
<arg c_array_length_in_arg='3' type='^S' type_modifier='o' />
<arg type='l' type64='l' />
</function>
@@ -528,7 +539,7 @@
<function name='CTFontGetPlatformFont'>
<retval type='L' type64='I' />
<arg type='^{__CTFont=}' />
- <arg type='^^{__CTFontDescriptor}' type_modifier='o' />
+ <arg type='^^{__CTFontDescriptor}' type_modifier='o' already_cfretained='true' />
</function>
<function name='CTFontGetSize'>
<retval type='f' type64='d' />
@@ -563,8 +574,8 @@
</function>
<function name='CTFontGetVerticalTranslationsForGlyphs'>
<arg type='^{__CTFont=}' />
- <arg type='^S' type_modifier='n' />
- <arg type='^{CGSize=ff}' type64='^{CGSize=ff}' type_modifier='o' />
+ <arg type='^S' type_modifier='n' c_array_length_in_arg='3' />
+ <arg type='^{CGSize=ff}' type64='^{CGSize=ff}' type_modifier='o' c_array_length_in_arg='3' />
<arg type='l' type64='l' />
</function>
<function name='CTFontGetXHeight'>
@@ -695,7 +706,7 @@
<retval type='f' type64='d' />
<arg type='^{__CTLine=}' />
<arg type='l' type64='l' />
- <arg type='^f' type64='^d' />
+ <arg type='^f' type64='^d' type_modifier='o'/>
</function>
<function name='CTLineGetPenOffsetForFlush'>
<retval type='d' />
@@ -739,11 +750,11 @@
<retval type='L' type64='Q' />
</function>
<function name='CTParagraphStyleGetValueForSpecifier'>
- <retval type='B' />
+ <retval type='Z' />
<arg type='^{__CTParagraphStyle=}' />
<arg type='I' />
<arg type='L' type64='L' />
- <arg c_array_length_in_arg='2' type='^v' />
+ <arg c_array_length_in_arg='2' type='^v' type_modifier='o' />
</function>
<function name='CTRunDraw'>
<arg type='^{__CTRun=}' />
@@ -761,10 +772,10 @@
<function name='CTRunGetGlyphs'>
<arg type='^{__CTRun=}' />
<arg type='{_CFRange=ii}' type64='{_CFRange=ii}' />
- <arg c_array_length_in_arg='1' type='^S' type_modifier='o' unicode_string='true' />
+ <arg c_array_length_in_arg='1' type='^S' type_modifier='o' />
</function>
<function name='CTRunGetGlyphsPtr'>
- <retval type='r^S' type64='r^S' />
+ <retval type='r^S' type64='r^S' c_array_of_variable_length='true' />
<arg type='^{__CTRun=}' />
</function>
<function name='CTRunGetImageBounds'>
@@ -776,10 +787,10 @@
<function name='CTRunGetPositions'>
<arg type='^{__CTRun=}' />
<arg type='{_CFRange=ii}' type64='{_CFRange=ii}' />
- <arg type='^{CGPoint=ff}' type64='^{CGPoint=dd}' />
+ <arg type='^{CGPoint=ff}' type64='^{CGPoint=dd}' type_modifier='o' c_array_length_in_arg='1' />
</function>
<function name='CTRunGetPositionsPtr'>
- <retval type='r^{CGPoint=ff}' type64='r^{CGPoint=dd}' />
+ <retval type='r^{CGPoint=ff}' type64='r^{CGPoint=dd}' c_array_of_variable_length='true' />
<arg type='^{__CTRun=}' />
</function>
<function name='CTRunGetStatus'>
@@ -792,7 +803,7 @@
<arg c_array_length_in_arg='1' type='^i' type64='^i' type_modifier='o' />
</function>
<function name='CTRunGetStringIndicesPtr'>
- <retval type='r^i' type64='r^q' />
+ <retval type='r^i' type64='r^q' c_array_of_variable_length='true' />
<arg type='^{__CTRun=}' />
</function>
<function name='CTRunGetStringRange'>
Modified: trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/__init__.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreText/Lib/CoreText/__init__.py Sun Feb 8 05:54:43 2009
@@ -15,3 +15,5 @@
frameworkPath=_objc.pathForFramework(
"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework"),
globals=globals())
+
+from _manual import *
Modified: trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_coretext.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_coretext.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreText/PyObjCTest/test_coretext.py Sun Feb 8 05:54:43 2009
@@ -1,76 +1,14 @@
-'''
-Some simple tests to check that the framework is properly wrapped.
-'''
-import objc
-import unittest
-import CoreText
-class TestCoreText (unittest.TestCase):
- def testClasses(self):
- pass
- # self.assert_( hasattr(CoreText, 'CLASSNAME') )
- # self.assert_( isinstance(CoreText.CLASSNAME, objc.objc_class) )
- # Tollfree CF-type:
- # self.assert_( hasattr(CoreText, 'CLASSNAMERef') )
- # self.assert_( CoreText.CLASSNAMERef is CoreText.CLASSNAME )
+from PyObjCTools.TestSupport import *
+from CoreText import *
- # Not-tollfree CF-type:
- # self.assert_( hasattr(CoreText, 'CLASSNAMERef') )
- # self.assert_( issubclass(CoreText.CLASSNAMERef, objc.lookUpClass('NSCFType')) )
- # self.assert_( CoreText.CLASSNAMERef is not objc.lookUpClass('NSCFType') )
-
- def testValues(self):
- # Use this to test for a number of enum and #define values
- pass
-
- # Integer values:
- # self.assert_( hasattr(CoreText, 'CONSTANT') )
- # self.assert_( isinstance(CoreText.CONSTANT, (int, long)) )
- # self.assertEquals(CoreText.CONSTANT, 7)
-
- # String values:
- # self.assert_( hasattr(CoreText, 'CONSTANT') )
- # self.assert_( isinstance(CoreText.CONSTANT, (str, unicode)) )
- # self.assertEquals(CoreText.CONSTANT, 'value')
-
- def testVariables(self):
- # Use this to test for global variables, (NSString*'s and the like)
- pass
-
- # self.assert_( hasattr(CoreText, 'CONSTANT') )
- # self.assert_( isinstance(CoreText.CONSTANT, unicode) )
+class TestCoreText (TestCase):
+ def testConstants(self):
+ self.failUnlessEqual(kCTVersionNumber10_5, 0x00020000)
def testFunctions(self):
- # Use this to test for functions
- pass
-
- # self.assert_( hasattr(CoreText, 'FUNCTION') )
-
- def testOpaque(self):
- # Use this to test for opaque pointers
- pass
-
- # self.assert_( hasattr(CoreText, 'OPAQUE') )
-
- def testProtocols(self):
- # Use this to test if informal protocols are present
- pass
-
- # self.assert_( hasattr(CoreText, 'protocols') )
-
- # self.assert_( hasattr(CoreText.protocols, 'PROTOCOL') )
- # self.assert_( isinstance(CoreText.protocols.PROTOCOL, objc.informal_protocol) )
-
- def test_structs(self):
- # Use this to test struct wrappers
- pass
-
- # self.assert_( hasattr(CoreText, 'STRUCT') )
- # o = CoreText.STRUCT()
- # self.assert_( hasattr(o, 'FIELD_NAME') )
-
-
+ v = CTGetCoreTextVersion()
+ self.failUnlessIsInstance(v, (int, long))
if __name__ == "__main__":
- unittest.main()
-
+ main()
Modified: trunk/pyobjc/pyobjc-framework-CoreText/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-CoreText/setup.py (original)
+++ trunk/pyobjc/pyobjc-framework-CoreText/setup.py Sun Feb 8 05:54:43 2009
@@ -9,7 +9,7 @@
import ez_setup
ez_setup.use_setuptools()
-from setuptools import setup
+from setuptools import setup, Extension
try:
from PyObjCMetaData.commands import extra_cmdclass, extra_options
except ImportError:
@@ -27,6 +27,11 @@
platforms = [ "MacOS X" ],
packages = [ "CoreText" ],
package_dir = { '': 'Lib' },
+ ext_modules = [
+ Extension('CoreText._manual',
+ [ 'Modules/_manual.m' ],
+ extra_link_args=['-framework', 'CoreServices']),
+ ],
setup_requires = [
],
install_requires = [
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com