[PyObjC-svn] r2162 - in trunk/pyobjc/pyobjc-framework-Quartz: Doc Examples/TLayer Lib/Quartz Lib/Quartz/QuartzCore PyObjCTest

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue Apr 14 02:13:48 2009
New Revision: 2162

Log:
Add API tests for QuartzCore and fix some small issues
related to that.


Added:
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_caanimation.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cabase.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cacifilteradditions.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_caconstraintlayoutmanager.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_calayer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_camediatiming.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_camediatimingfunction.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_caopengllayer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_carenderer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cascrolllayer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_catextlayer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_catransaction.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_catransform3d.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cicolor.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cicontext.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cifilter.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cifiltergenerator.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cifiltershape.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ciimage.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ciimageprovider.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cikernel.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ciplugin.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ciplugininterface.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cirawfilter.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cisampler.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_civector.py   (contents, props changed)
Modified:
   trunk/pyobjc/pyobjc-framework-Quartz/Doc/api-notes.txt
   trunk/pyobjc/pyobjc-framework-Quartz/Examples/TLayer/TLayerDemo.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/PyObjC.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/__init__.py

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Doc/api-notes.txt
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Doc/api-notes.txt	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Doc/api-notes.txt	Tue Apr 14 02:13:48 2009
@@ -21,6 +21,19 @@
 The PyObjC bindings for Quartz are not compatible with the CoreGraphics 
 Python package by Apple.
 
+Importing
+---------
+
+The prefered way to import from packages in these bindings is::
+
+   from Quartz import *
+
+It is also possible to import directly from subwrappers (such
+as ``Quartz.CoreGraphics``), but it better to import from the toplevel
+to ensure you'll get all relevant definitions.
+
+
+
 Callbacks
 ---------
 
@@ -112,3 +125,12 @@
 ------------------
 
 The API's related to CGPSConverter are not supported at the moment.
+
+
+``CIContext``
+-------------
+
+* ``-render:toBitmap:rowBytes:bounds:format:colorSpace``
+
+  You must pass a writable buffer of the right size to this method (such as 
+  a properly sized instance of ``array.array``.

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Examples/TLayer/TLayerDemo.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Examples/TLayer/TLayerDemo.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Examples/TLayer/TLayerDemo.py	Tue Apr 14 02:13:48 2009
@@ -6,7 +6,13 @@
 import ShadowOffsetView
 
 
-class TLayerDemo (NibClassBuilder.AutoBaseClass):
+class TLayerDemo (NSObject:
+    colorWell = objc.IBOutlet()
+    shadowOffsetView = objc.IBOutlet()
+    shadowRadiusSlider = objc.IBOutlet()
+    tlayerView = objc.IBOutlet()
+    transparencyLayerButton = objc.IBOutlet()
+
 
     @classmethod
     def initialize(self):

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/PyObjC.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/PyObjC.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/PyObjC.bridgesupport	Tue Apr 14 02:13:48 2009
@@ -208,7 +208,7 @@
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
   </function>
   <function name='CATransform3DEqualToTransform'>
-    <retval type='B' />
+    <retval type='Z' />
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
   </function>
@@ -221,11 +221,11 @@
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
   </function>
   <function name='CATransform3DIsAffine'>
-    <retval type='B' />
+    <retval type='Z' />
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
   </function>
   <function name='CATransform3DIsIdentity'>
-    <retval type='B' />
+    <retval type='Z' />
     <arg type='{CATransform3D=ffffffffffffffff}' type64='{CATransform3D=ffffffffffffffff}' />
   </function>
   <function name='CATransform3DMakeAffineTransform'>
@@ -294,6 +294,26 @@
     <method selector='shouldArchiveValueForKey:'>
       <retval type='B' />
     </method>
+    <method selector='isRemovedOnCompletion' >
+	    <retval type='B' />
+    </method>
+    <method selector='setRemovedOnCompletion:' >
+	    <arg index='0' type='B' />
+    </method>
+  </class>
+  <class name='CAPropertyAnimation'>
+    <method selector='isAdditive' >
+	    <retval type='B' />
+    </method>
+    <method selector='setAdditive:' >
+	    <arg index='0' type='B' />
+    </method>
+    <method selector='isCumulative' >
+	    <retval type='B' />
+    </method>
+    <method selector='setCumulative:' >
+	    <arg index='0' type='B' />
+    </method>
   </class>
   <class name='CAKeyframeAnimation'>
     <method selector='path'>
@@ -304,6 +324,36 @@
     </method>
   </class>
   <class name='CALayer'>
+    <method selector='isHidden' >
+	    <retval type='B' />
+    </method>
+    <method selector='setHidden:' >
+	    <arg index='0' type='B' />
+    </method>
+    <method selector='isDoubleSided' >
+	    <retval type='B' />
+    </method>
+    <method selector='setDoubleSided:' >
+	    <arg index='0' type='B' />
+    </method>
+    <method selector='masksToBounds' >
+	    <retval type='B' />
+    </method>
+    <method selector='setMasksToBounds::' >
+	    <arg index='0' type='B' />
+    </method>
+    <method selector='isOpaque' >
+	    <retval type='B' />
+    </method>
+    <method selector='setOpaque:' >
+	    <arg index='0' type='B' />
+    </method>
+    <method selector='needsDisplayOnBoundsChange' >
+	    <retval type='B' />
+    </method>
+    <method selector='setNeedsDisplayOnBoundsChange:' >
+	    <arg index='0' type='B' />
+    </method>
     <method selector='backgroundColor'>
       <retval type='^{CGColor=}' />
     </method>
@@ -348,40 +398,35 @@
     </method>
   </class>
   <class name='CAOpenGLLayer'>
+	  <method selector='isAsynchronous'>
+		  <retval type='B' />
+	  </method>
+	  <method selector='setAsynchronous:'>
+		  <arg index='0' type='B' />
+	  </method>
     <method selector='canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:'>
       <retval type='B' />
-      <arg index='0' type='^{_CGLContextObject=}' />
-      <arg index='1' type='^{_CGLPixelFormatObject=}' />
-      <arg index='3' type='r^{?=IiqQdq{CVSMPTETime=ssIIIssss}QQ}' />
-    </method>
-    <method selector='copyCGLContextForPixelFormat:'>
-      <retval type='^{_CGLContextObject=}' />
-      <arg index='0' type='^{_CGLPixelFormatObject=}' />
-    </method>
-    <method selector='copyCGLPixelFormatForDisplayMask:'>
-      <retval type='^{_CGLPixelFormatObject=}' />
+      <arg index='3' type_modifier='n' />
     </method>
     <method selector='drawInCGLContext:pixelFormat:forLayerTime:displayTime:'>
-      <arg index='0' type='^{_CGLContextObject=}' />
-      <arg index='1' type='^{_CGLPixelFormatObject=}' />
-      <arg index='3' type='r^{?=IiqQdq{CVSMPTETime=ssIIIssss}QQ}' />
-    </method>
-    <method selector='releaseCGLContext:'>
-      <arg index='0' type='^{_CGLContextObject=}' />
-    </method>
-    <method selector='releaseCGLPixelFormat:'>
-      <arg index='0' type='^{_CGLPixelFormatObject=}' />
+      <arg index='3' type_modifier='n' />
     </method>
   </class>
   <class name='CARenderer'>
     <method selector='beginFrameAtTime:timeStamp:'>
-      <arg index='1' type='r^{?=IiqQdq{CVSMPTETime=ssIIIssss}QQ}' />
+	    <arg index='1' type_modifier='n' />
     </method>
     <method class_method='true' selector='rendererWithCGLContext:options:'>
-      <arg index='0' type='^v' />
+       <arg index='0' type='^{_CGLContextObject=}' />
     </method>
   </class>
   <class name='CATextLayer'>
+	  <method selector='isWrapped'>
+		  <retval type='B' />
+	  </method>
+	  <method selector='setWrapped:'>
+		  <arg index='0' type='B' />
+	  </method>
     <method selector='foregroundColor'>
       <retval type='^{CGColor=}' />
     </method>
@@ -423,13 +468,19 @@
       <arg index='1' type='^{__CFDictionary=}' />
     </method>
     <method selector='render:toBitmap:rowBytes:bounds:format:colorSpace:'>
-      <arg index='1' type='^v' />
+      <arg index='1' type='^v' type_modifier='o' c_array_of_variable_length='true' />
       <arg index='5' type='^{CGColorSpace=}' />
     </method>
   </class>
   <class name='CIFilter'>
-    <method selector='apply:' variadic='true' />
+    <method selector='apply:' variadic='true' c_array_delimited_by_null='true' />
     <method c_array_delimited_by_null='true' class_method='true' selector='filterWithName:keysAndValues:' variadic='true' />
+    <method selector='isEnabled' >
+	    <retval type='B' />
+    </method>
+    <method selector='setEnabled:' >
+	    <arg index='0' type='B' />
+    </method>
   </class>
   <class name='CIFilterGenerator'>
     <method selector='writeToURL:atomically:'>
@@ -523,6 +574,22 @@
     </method>
   </class>
   <class name='NSObject'>
+	  <method selector='provideImageData:bytesPerRow:origin::size::userInfo:'>
+		  <retval type='v' />
+		  <arg index='0' type='^v' type_modifier='o' c_array_of_variable_length='true' />
+		  <arg index='1' type='L' />
+		  <arg index='2' type='L' />
+		  <arg index='3' type='L' />
+		  <arg index='4' type='L' />
+		  <arg index='5' type='L' />
+		  <arg index='6' type='@' />
+	  </method>
+	  <method selector='autoreverses'>
+		  <retval type='B' />
+	  </method>
+	  <method selector='setAutoreverses:'>
+		  <arg index='0' type='B' />
+	  </method>
     <method selector='animationDidStop:finished:'>
       <arg index='1' type='B' />
     </method>

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py	Tue Apr 14 02:13:48 2009
@@ -6,7 +6,7 @@
 '''
 
 import objc as _objc
-from Quartz.CoreVideo import *
+#from Quartz.CoreVideo import *
 from Foundation import *
 
 __bundle__ = _objc.initFrameworkWrapper("QuartzCore",

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/__init__.py	Tue Apr 14 02:13:48 2009
@@ -12,15 +12,15 @@
 except ImportError:
     pass
 
-try:
-    from Quartz.CoreVideo import *
-except ImportError:
-    pass
+#try:
+    #from Quartz.CoreVideo import *
+#except ImportError:
+    #pass
 
-try:
-    from Quartz.QuartzCore import *
-except ImportError:
-    pass
+#try:
+    #from Quartz.QuartzCore import *
+#except ImportError:
+    #pass
 
 try:
     from Quartz.ImageKit import *

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.