[PyObjC-svn] r2064 - in trunk/pyobjc/pyobjc-framework-Quartz: . Doc Examples/Programming with Quartz/ParsePageContents Exceptions Lib/Quartz Lib/Quartz/CoreGraphics Lib/Quartz/CoreVideo Lib/Quartz/ImageIO Lib/Quartz/ImageKit Lib/Quartz/PDFKit Lib/Quartz/QuartzComposer Lib/Quartz/QuartzCore Lib/Quartz/QuartzFilters Modules PyObjCTest

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Sun Mar  1 07:56:02 2009
New Revision: 2064

Log:
First drop of test support for the Quartz frameworks, still far from finished.

Includes several fixes for bugs uncovered by adding tests.


Added:
   trunk/pyobjc/pyobjc-framework-Quartz/Doc/context-managers.txt
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/PyObjC.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/PDFKit/PyObjC.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Modules/_coregraphics.m
      - copied, changed from r2061, /trunk/pyobjc/pyobjc-framework-Quartz/Modules/_cgwindow.m
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKFilterBrowserPanel.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKFilterBrowserView.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKImageBrowserView.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKImageEditPanel.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKImageView.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_IKPictureTaker.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotation.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationButtonWidget.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationChoiceWidget.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationLine.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationMarkup.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationPopup.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFAnnotationText.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFBorder.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFOutline.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFSelection.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_PDFThumbnailView.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgaffinetransform.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgbase.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgbitmapcontext.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgcolor.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgcolorspace.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgcontext.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdataconsumer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdataprovider.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdirectdisplay.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdirectpalette.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdisplayconfiguration.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgdisplayfade.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgerror.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgevent.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgeventsource.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgeventtypes.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgfont.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgfunction.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cggeometry.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgglcontext.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cggradient.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgimage.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cglayer.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpath.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpattern.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfarray.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontentstream.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfcontext.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfdictionary.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfdocument.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfobject.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfoperatortable.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfpage.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfscanner.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfstream.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpdfstring.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgpsconverter.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgremoteoperation.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgsession.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgshading.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgwindow.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_cgwindowlevel.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ikfilterui.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_ikslideshow.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_imagekitdeprecated.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfactionnamed.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfactionresetform.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfdocument.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfpage.py   (contents, props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfview.py   (contents, props changed)
Removed:
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/PyObjCOverrides.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageKit/PyObjCOverrides.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Modules/_cgwindow.m
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_coregraphics.py
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_imageio.py
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_imagekit.py
   trunk/pyobjc/pyobjc-framework-Quartz/PyObjCTest/test_pdfkit.py
Modified:
   trunk/pyobjc/pyobjc-framework-Quartz/Doc/api-notes.txt
   trunk/pyobjc/pyobjc-framework-Quartz/Examples/Programming with Quartz/ParsePageContents/parse_page_contents.py
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/CoreGraphics.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageIO.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageKit.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzComposer.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzCore.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzFilters.bridgesupport
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/   (props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/_contextmanager.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/   (props changed)
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageIO/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageKit/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/PDFKit/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzComposer/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzFilters/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/__init__.py
   trunk/pyobjc/pyobjc-framework-Quartz/Modules/_callbacks.m
   trunk/pyobjc/pyobjc-framework-Quartz/setup.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	Sun Mar  1 07:56:02 2009
@@ -1,13 +1,26 @@
 =======================================
-API Notes for the CoreGraphics bindings
+API Notes for the Quartz bindings
 =======================================
 
 Introduction
 ------------
 
-This document describes special considerations for the PyObjC based CoreGraphics
+This document describes special considerations for the PyObjC based Quartz
 bindings.
 
+Quartz vs. CoreGraphics
+-----------------------
+
+The PyObjC bindings for the Quartz related frameworks, including CoreGraphics
+and QuartzComposer are in the Python package "Quartz". When you use the
+system version of Python there's also a package named "CoreGraphics".  This
+is Apple's closed-source binding of CoreGraphics, which is not a direct
+mapping of the Quartz API's but includes some convenience APIs that are not 
+present in the C API. 
+
+The PyObjC bindings for Quartz are not compatible with the CoreGraphics 
+Python package by Apple.
+
 Callbacks
 ---------
 
@@ -31,4 +44,55 @@
 advisable not to call these functions, are at least call them a small number
 of times.
 
+``CGPatternCreate``: the callback argument is a single function: the ``drawPattern`` callback.
+
+``CGDataProviderCreateWithData``: the release callback can be ``None``. If it is not ``None`` it 
+must be a function with 1 argument: the ``info`` object.
+
 ``CGPDFOperatorTableSetCallback`` is not supported at the moment.
+
+
+
+``CGColorSpaceCreateWithPlatformColorSpace``
+--------------------------------------------
+
+This function is not supported because the lowlevel "CMProfileRef" type is
+not wrappped by PyObjC.
+
+``kCGDirectMainDisplay``
+------------------------
+
+This value isn't actually a constant and can therefore not be wrapped by
+PyObjC. Use ``CGMainDisplayID()`` instead.
+
+``CGWindowListCreate``, ``CGWindowListCreateDescriptionFromArray``, ``CGWindowListCreateImageFromArray``
+--------------------------------------------------------------------------------------------------------
+
+
+
+This function is documented to return a "CFArray of CGWindowID". This specific type cannot be represented by
+PyObjC, therefore the (manually wrapped) function returns a tuple of CGWindowID values instead.
+
+For the same reason ``CGWindowListCreateDescriptionFromArray``, ``CGWindowListCreateImageFromArray`` are
+manually wrapped and take a tuple of WindowID values as an argument.
+
+``CGBitmapCreate``
+------------------
+
+The easiest way to use this function is to pass ``None`` as the buffer argument, that way Quartz will create the
+buffer for you. If you do want direct access to the buffer you'll have to create a writable buffer, for example
+like so::
+
+    bytes = array.array('B', (0 for i in xrange(100*80*4)))
+    ctx = CGBitmapContextCreate(bytes, 100, 80, 8, 400, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaPremultipliedLast)
+
+This creates a context for a 100 pixels by 80 pixels image with a RGBA colorspace.
+
+Note that there limitations on the kinds of context's you can create, see the Apple documentation about supported
+pixel formats for the details on that.
+
+``CGColorSpaceGetColorTable``
+-----------------------------
+
+This function has an output buffer of indetermined size. You cannot pass ``None`` as the value of that buffer but have
+to explicitly specify a writable output buffer (such an ``array.array`` or the right type and size).

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Examples/Programming with Quartz/ParsePageContents/parse_page_contents.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Examples/Programming with Quartz/ParsePageContents/parse_page_contents.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Examples/Programming with Quartz/ParsePageContents/parse_page_contents.py	Sun Mar  1 07:56:02 2009
@@ -7,6 +7,9 @@
 from Quartz import *
 import objc
 import sys
+import array
+
+import Quartz
 
 class MyDataScan (object):
     def __init__(self):
@@ -111,11 +114,13 @@
 
     # An XObject must be a stream so obtain the value from the xobject
     # as if it were a stream. If this fails, the PDF is malformed.
-    res, stream = CGPDFObjectGetValue(xobject, kCGPDFObjectTypeSTream, None)
+    res, stream = CGPDFObjectGetValue(xobject, kCGPDFObjectTypeStream, None)
     if not res:
         print >>sys.stderr, "XObject '%s' is not a stream"%(name,)
         return 
 
+    print stream
+
     # Streams consist of a dictionary and the data associated
     # with the stream. This code only cares about the dictionary.
     dict = CGPDFStreamGetDictionary(stream);
@@ -144,6 +149,7 @@
 # "EI" operator.
 @objc.callbackFor(CGPDFOperatorTableSetCallback)
 def myOperator_EI(s, info):
+    print "EI"
     # When the scanner encounters the EI operator, it has a
     # stream corresponding to the image on the operand stack.
     # This code pops the stream off the stack in order to
@@ -201,14 +207,15 @@
                     print >>sys.stderr, "Couldn't create content stream for page #%d"%(i,)
                     return
 
+		# Initialize the counters of images for this page.
+                myData = MyDataScan()
+
 		# Create a scanner for this PDF document page.
-		scanner = CGPDFScannerCreate(cs, table, myData);
+		scanner = CGPDFScannerCreate(cs, table, 0);
                 if scanner is None:
 			print >>sys.stderr, "Couldn't create scanner for page #%d!"%(i,)
 			return
 
-		# Initialize the counters of images for this page.
-                myData = MyDataScan()
 	
 		# CGPDFScannerScan causes Quartz to scan the content stream,
 		# calling the callbacks in the table when the corresponding
@@ -249,6 +256,7 @@
     for inputFileName in args[1:]:
         print "Beginning Document %r"%(inputFileName,)
 
+        print CFURLCreateFromFileSystemRepresentation.__metadata__()
         inURL = CFURLCreateFromFileSystemRepresentation(None, inputFileName, 
 				len(inputFileName), False)
         if inURL is None:
@@ -256,7 +264,7 @@
             return 1
     
         dumpPageStreams(inURL, sys.stdout)
-        CFRelease(inURL)
+        #CFRelease(inURL)
     
     return 0
 

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/CoreGraphics.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/CoreGraphics.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/CoreGraphics.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -41,7 +41,7 @@
   <cftype gettypeid_func='CGGradientGetTypeID' name='CGGradientRef' />
   <cftype gettypeid_func='CGImageGetTypeID' name='CGImageRef' />
   <cftype gettypeid_func='CGLayerGetTypeID' name='CGLayerRef' />
-  <cftype gettypeid_func='CGMutablePathGetTypeID' name='CGMutablePathRef' />
+  <cftype name='CGMutablePathRef' ignore='true' />
   <cftype gettypeid_func='CGPDFDocumentGetTypeID' name='CGPDFDocumentRef' />
   <cftype gettypeid_func='CGPDFPageGetTypeID' name='CGPDFPageRef' />
   <cftype gettypeid_func='CGPSConverterGetTypeID' name='CGPSConverterRef' />
@@ -293,7 +293,7 @@
     <arg c_array_length_in_arg='1,2' comment='and 2 on output' index='3' type_modifier='o' />
   </function>
   <function name='CGEventKeyboardSetUnicodeString'>
-    <arg c_array_length_in_arg='1' index='2' type_modifier='n' unicode_string='true' />
+    <arg c_array_length_in_arg='1' index='2' type_modifier='n' />
   </function>
   <function name='CGEventPostToPSN'>
     <arg index='0' type='^{ProcessSerialNumber=II}' type64='^{ProcessSerialNumber=II}' type_modifier='n' />
@@ -639,7 +639,7 @@
   </function>
   <function name='CGPathAddLines'>
     <arg index='1' null_accepted='true' type_modifier='n' />
-    <arg c_array_length_in_arg='3' index='2' />
+    <arg c_array_length_in_arg='3' index='2' type_modifier='n' />
   </function>
   <function name='CGPathAddPath'>
     <arg index='1' null_accepted='true' type_modifier='n' />
@@ -652,7 +652,7 @@
   </function>
   <function name='CGPathAddRects'>
     <arg index='1' null_accepted='true' type_modifier='n' />
-    <arg c_array_length_in_arg='3' index='2' />
+    <arg c_array_length_in_arg='3' index='2' type_modifier='n' />
   </function>
   <function comment='manual wrapper' name='CGPathApply'>
     <arg comment='context' index='1' type='^v' type64='^v' />
@@ -685,7 +685,7 @@
     <retval already_cfretained='true' type='^{__CFDictionary=}' type64='^{__CFDictionary=}' />
   </function>
   <function name='CGPointMakeWithDictionaryRepresentation'>
-    <arg index='1' type='^{CGPoint=ff}' type64='^{CGPoint=dd}' />
+    <arg index='1' type='^{CGPoint=ff}' type64='^{CGPoint=dd}' type_modifier='o' />
   </function>
   <function name='CGPostMouseEvent' variadic='true' />
   <function name='CGPostScrollWheelEvent' variadic='true' />
@@ -693,11 +693,11 @@
     <retval already_cfretained='true' type='^{__CFDictionary=}' type64='^{__CFDictionary=}' />
   </function>
   <function name='CGRectDivide'>
-    <arg index='1' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' />
-    <arg index='2' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' />
+    <arg index='1' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
+    <arg index='2' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
   </function>
   <function name='CGRectMakeWithDictionaryRepresentation'>
-    <arg index='1' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' />
+    <arg index='1' type='^{CGRect={CGPoint=ff}{CGSize=ff}}' type64='^{CGRect={CGPoint=dd}{CGSize=dd}}' type_modifier='o' />
   </function>
   <function comment='manual wrapper' name='CGRegisterScreenRefreshCallback'>
     <arg index='0' type='^?' type64='^?' />
@@ -740,7 +740,7 @@
     <retval already_cfretained='true' type='^{__CFDictionary=}' type64='^{__CFDictionary=}' />
   </function>
   <function name='CGSizeMakeWithDictionaryRepresentation'>
-    <arg index='1' type='^{CGSize=ff}' type64='^{CGSize=dd}' />
+    <arg index='1' type='^{CGSize=ff}' type64='^{CGSize=dd}' type_modifier='o' />
   </function>
   <function comment='manual wrapper' name='CGUnregisterScreenRefreshCallback'>
     <arg index='0' type='^?' type64='^?' />

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageIO.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageIO.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageIO.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -3,6 +3,9 @@
 <signatures version='1.0'>
   <cftype gettypeid_func='CGImageDestinationGetTypeID' name='CGImageDestinationRef' />
   <cftype gettypeid_func='CGImageSourceGetTypeID' name='CGImageSourceRef' />
+  <function name='CGImageDestinationAddImage'>
+    <arg index='1' type='^{CGImage=}' type64='^{CGImage=}' />
+  </function>
   <function name='CGImageDestinationCopyTypeIdentifiers'>
     <retval already_cfretained='true' />
   </function>
@@ -11,6 +14,7 @@
   </function>
   <function name='CGImageDestinationCreateWithDataConsumer'>
     <retval already_cfretained='true' />
+    <arg index='0' type='^{CGDataConsumer=}' type64='^{CGDataConsumer=}' />
   </function>
   <function name='CGImageDestinationCreateWithURL'>
     <retval already_cfretained='true' />
@@ -25,21 +29,25 @@
     <retval already_cfretained='true' />
   </function>
   <function name='CGImageSourceCreateImageAtIndex'>
-    <retval already_cfretained='true' />
+    <retval already_cfretained='true' type='^{CGImage=}' type64='^{CGImage=}' />
   </function>
   <function name='CGImageSourceCreateIncremental'>
     <retval already_cfretained='true' />
   </function>
   <function name='CGImageSourceCreateThumbnailAtIndex'>
-    <retval already_cfretained='true' />
+    <retval already_cfretained='true' type='^{CGImage=}' type64='^{CGImage=}' />
   </function>
   <function name='CGImageSourceCreateWithData'>
     <retval already_cfretained='true' />
   </function>
   <function name='CGImageSourceCreateWithDataProvider'>
     <retval already_cfretained='true' />
+    <arg index='0' type='^{CGDataProvider=}' type64='^{CGDataProvider=}' />
   </function>
   <function name='CGImageSourceCreateWithURL'>
     <retval already_cfretained='true' />
   </function>
+  <function name='CGImageSourceUpdateDataProvider'>
+    <arg index='1' type='^{CGDataProvider=}' type64='^{CGDataProvider=}' />
+  </function>
 </signatures>

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageKit.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageKit.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/ImageKit.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -3,6 +3,59 @@
 <signatures version='1.0'>
   <class name='IKFilterBrowserPanel'>
     <method selector='beginSheetWithOptions:modalForWindow:modalDelegate:didEndSelector:contextInfo:'>
+      <arg index='3' type=':' sel_of_type='v@:@i^v' />
+      <arg comment='context' index='4' type='^v' />
+    </method>
+    <method selector='beginWithOptions:modelessDelegate:didEndSelector:contextInfo:'>
+      <arg index='2' type=':' sel_of_type='v@:@i^v' />
+      <arg comment='context' index='3' type='^v' />
+    </method>
+  </class>
+  <class name='IKImagePicker'>
+    <method selector='beginImagePickerSheetForWindow:withDelegate:didEndSelector:contextInfo:'>
+      <arg index='2' type=':' />
+      <arg comment='context' index='3' type='^v' />
+    </method>
+    <method selector='beginImagePickerWithDelegate:didEndSelector:contextInfo:'>
+      <arg index='1' type=':' />
+      <arg comment='context' index='2' type='^v' />
+    </method>
+  </class>
+  <class name='IKImageView'>
+    <method selector='image'>
+      <retval type='^{CGImage=}' />
+    </method>
+    <method selector='setImage:imageProperties:'>
+      <arg comment='cftype' index='0' type='^{CGImage=}' />
+    </method>
+  </class>
+  <class name='IKPictureTaker'>
+    <method selector='beginPictureTakerSheetForWindow:withDelegate:didEndSelector:contextInfo:'>
+      <arg index='2' type=':' />
+      <arg comment='context' index='3' type='^v' />
+    </method>
+    <method selector='beginPictureTakerWithDelegate:didEndSelector:contextInfo:'>
+      <arg index='1' type=':' />
+      <arg comment='context' index='2' type='^v' />
+    </method>
+    <method selector='popUpRecentsMenuForView:withDelegate:didEndSelector:contextInfo:'>
+      <arg index='2' type=':' />
+      <arg comment='context' index='3' type='^v' />
+    </method>
+  </class>
+  <class name='NSObject'>
+    <method selector='image'>
+      <retval type='^{CGImage=}' />
+    </method>
+    <method selector='setImage:imageProperties:'>
+      <arg comment='cftype' index='0' type='^{CGImage=}' />
+    </method>
+    <method selector='thumbnailWithMaximumSize:'>
+      <retval type='^{CGImage=}' />
+    </method>
+  </class>
+  <class name='IKFilterBrowserPanel'>
+    <method selector='beginSheetWithOptions:modalForWindow:modalDelegate:didEndSelector:contextInfo:'>
       <arg index='3' type=':' />
       <arg comment='context' index='4' type='^v' />
     </method>

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzComposer.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzComposer.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzComposer.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -270,6 +270,84 @@
       <arg index='0' type='^{CGColorSpace=}' />
     </method>
     <method comment='fixme' selector='logMessage:' variadic='true' />
+    <method selector='outputImageProviderFromBufferWithPixelFormat:pixelsWide:pixelsHigh:baseAddress:bytesPerRow:releaseCallback:releaseContext:colorSpace:shouldColorMatch:'>
+      <arg index='3' type='^v' />
+      <arg index='5' type='^?' />
+      <arg index='6' type='^v' />
+      <arg index='7' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='outputImageProviderFromTextureWithPixelFormat:pixelsWide:pixelsHigh:name:flipped:releaseCallback:releaseContext:colorSpace:shouldColorMatch:'>
+      <arg index='5' type='^?' />
+      <arg index='6' type='^v' />
+      <arg index='7' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='releaseRenderedTexture:forCGLContext:'>
+      <arg index='1' type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='renderToBuffer:withBytesPerRow:pixelFormat:forBounds:'>
+      <arg index='0' type='^v' />
+    </method>
+    <method selector='renderWithCGLContext:forBounds:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='textureColorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method selector='textureMatrix'>
+      <retval comment='fixme' type='^f' />
+    </method>
+    <method selector='unbindTextureRepresentationFromCGLContext:textureUnit:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+    </method>
+  </class>
+  <class name='QCRenderer'>
+    <method selector='initOffScreenWithSize:colorSpace:composition:'>
+      <arg index='1' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='initWithCGLContext:pixelFormat:colorSpace:composition:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+      <arg index='1' type='^{_CGLPixelFormatObject=}' />
+      <arg index='2' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='initWithComposition:colorSpace:'>
+      <arg index='1' type='^{CGColorSpace=}' />
+    </method>
+  </class>
+  <class name='NSObject'>
+    <method selector='CGLContextObj'>
+      <retval type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='bindTextureRepresentationToCGLContext:textureUnit:normalizeCoordinates:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='bufferBaseAddress'>
+      <retval type='^v' />
+    </method>
+    <method selector='bufferColorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method selector='canRenderWithCGLContext:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='colorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method selector='copyRenderedTextureForCGLContext:pixelFormat:bounds:isFlipped:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+    </method>
+    <method selector='imageColorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method selector='imageColorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method selector='lockBufferRepresentationWithPixelFormat:colorSpace:forBounds:'>
+      <arg index='1' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='lockTextureRepresentationWithColorSpace:forBounds:'>
+      <arg index='0' type='^{CGColorSpace=}' />
+    </method>
+    <method comment='fixme' selector='logMessage:' variadic='true' />
     <method selector='releaseRenderedTexture:forCGLContext:'>
       <arg index='1' type='^{_CGLContextObject=}' />
     </method>

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzCore.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzCore.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzCore.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -7,7 +7,207 @@
   <enum ignore='true' name='CGFLOAT_DEFINED' />
   <enum ignore='true' name='CGFLOAT_IS_DOUBLE' />
   <enum ignore='true' name='CGFLOAT_IS_DOUBLE' />
-  <enum ignore='true' name='LK_WARN_DEPRECATED' />
+  <class name='CAKeyframeAnimation'>
+    <method selector='path'>
+      <retval type='^{CGPath=}' />
+    </method>
+    <method selector='setPath:'>
+      <arg index='0' type='^{CGPath=}' />
+    </method>
+  </class>
+  <class name='CALayer'>
+    <method selector='backgroundColor'>
+      <retval type='^{CGColor=}' />
+    </method>
+    <method selector='borderColor'>
+      <retval type='^{CGColor=}' />
+    </method>
+    <method selector='drawInContext:'>
+      <arg index='0' type='^{CGContext=}' />
+    </method>
+    <method selector='renderInContext:'>
+      <arg index='0' type='^{CGContext=}' />
+    </method>
+    <method selector='setBackgroundColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+    <method selector='setBorderColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+    <method selector='setShadowColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+    <method selector='shadowColor'>
+      <retval type='^{CGColor=}' />
+    </method>
+  </class>
+  <class name='CAOpenGLLayer'>
+    <method selector='canDrawInCGLContext: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='copyCGLContextForPixelFormat:'>
+      <retval type='^{_CGLContextObject=}' />
+      <arg index='0' type='^{_CGLPixelFormatObject=}' />
+    </method>
+    <method selector='copyCGLPixelFormatForDisplayMask:'>
+      <retval type='^{_CGLPixelFormatObject=}' />
+    </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=}' />
+    </method>
+  </class>
+  <class name='CARenderer'>
+    <method selector='beginFrameAtTime:timeStamp:'>
+      <arg index='1' type='r^{?=IiqQdq{CVSMPTETime=ssIIIssss}QQ}' />
+    </method>
+    <method class_method='true' selector='rendererWithCGLContext:options:'>
+      <arg index='0' type='^v' />
+    </method>
+  </class>
+  <class name='CATextLayer'>
+    <method selector='foregroundColor'>
+      <retval type='^{CGColor=}' />
+    </method>
+    <method selector='setForegroundColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+  </class>
+  <class name='CIColor'>
+    <method selector='colorSpace'>
+      <retval type='^{CGColorSpace=}' />
+    </method>
+    <method class_method='true' selector='colorWithCGColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+    <method selector='components'>
+      <retval c_array_of_variable_length='true' type='r^f' type64='r^d' />
+    </method>
+    <method selector='initWithCGColor:'>
+      <arg index='0' type='^{CGColor=}' />
+    </method>
+  </class>
+  <class name='CIContext'>
+    <method class_method='true' selector='contextWithCGContext:options:'>
+      <arg index='0' type='^{CGContext=}' />
+    </method>
+    <method class_method='true' selector='contextWithCGLContext:pixelFormat:options:'>
+      <arg index='0' type='^{_CGLContextObject=}' />
+      <arg index='1' type='^{_CGLPixelFormatObject=}' />
+    </method>
+    <method selector='createCGImage:fromRect:'>
+      <retval type='^{CGImage=}' />
+    </method>
+    <method selector='createCGImage:fromRect:format:colorSpace:'>
+      <retval type='^{CGImage=}' />
+      <arg index='3' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='createCGLayerWithSize:info:'>
+      <retval type='^{CGLayer=}' />
+      <arg index='1' type='^{__CFDictionary=}' />
+    </method>
+    <method selector='render:toBitmap:rowBytes:bounds:format:colorSpace:'>
+      <arg index='1' type='^v' />
+      <arg index='5' type='^{CGColorSpace=}' />
+    </method>
+  </class>
+  <class name='CIFilter'>
+    <method selector='apply:' variadic='true' />
+    <method c_array_delimited_by_null='true' selector='filterWithName:keysAndValues:' variadic='true' />
+  </class>
+  <class name='CIImage'>
+    <method class_method='true' selector='imageWithBitmapData:bytesPerRow:size:format:colorSpace:'>
+      <arg index='4' type='^{CGColorSpace=}' />
+    </method>
+    <method class_method='true' selector='imageWithCGImage:'>
+      <arg index='0' type='^{CGImage=}' />
+    </method>
+    <method class_method='true' selector='imageWithCGImage:options:'>
+      <arg index='0' type='^{CGImage=}' />
+    </method>
+    <method class_method='true' selector='imageWithCGLayer:'>
+      <arg index='0' type='^{CGLayer=}' />
+    </method>
+    <method class_method='true' selector='imageWithCGLayer:options:'>
+      <arg index='0' type='^{CGLayer=}' />
+    </method>
+    <method class_method='true' selector='imageWithCVImageBuffer:'>
+      <arg index='0' type='^{__CVBuffer=}' />
+    </method>
+    <method class_method='true' selector='imageWithCVImageBuffer:options:'>
+      <arg index='0' type='^{__CVBuffer=}' />
+    </method>
+    <method class_method='true' selector='imageWithImageProvider:size:format:colorSpace:options:'>
+      <arg index='3' type='^{CGColorSpace=}' />
+    </method>
+    <method class_method='true' selector='imageWithTexture:size:flipped:colorSpace:'>
+      <arg index='3' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='initWithBitmapData:bytesPerRow:size:format:colorSpace:'>
+      <arg index='4' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='initWithCGImage:'>
+      <arg index='0' type='^{CGImage=}' />
+    </method>
+    <method selector='initWithCGImage:options:'>
+      <arg index='0' type='^{CGImage=}' />
+    </method>
+    <method selector='initWithCGLayer:'>
+      <arg index='0' type='^{CGLayer=}' />
+    </method>
+    <method selector='initWithCGLayer:options:'>
+      <arg index='0' type='^{CGLayer=}' />
+    </method>
+    <method selector='initWithCVImageBuffer:'>
+      <arg index='0' type='^{__CVBuffer=}' />
+    </method>
+    <method selector='initWithCVImageBuffer:options:'>
+      <arg index='0' type='^{__CVBuffer=}' />
+    </method>
+    <method selector='initWithImageProvider:size:format:colorSpace:options:'>
+      <arg index='3' type='^{CGColorSpace=}' />
+    </method>
+    <method selector='initWithTexture:size:flipped:colorSpace:'>
+      <arg index='3' type='^{CGColorSpace=}' />
+    </method>
+  </class>
+  <class name='CIKernel'>
+    <method selector='setROISelector:'>
+      <arg index='0' sel_of_type='{CGRect={CGPoint=ff}{CGSize=ff}}@:i{CGRect={CGPoint=ff}{CGSize=ff}}@' />
+    </method>
+  </class>
+  <class name='CISampler'>
+    <method c_array_delimited_by_null='true' selector='initWithImage:keysAndValues:' variadic='true' />
+    <method c_array_delimited_by_null='true' selector='samplerWithImage:keysAndValues:' variadic='true' />
+  </class>
+  <class name='CIVector'>
+    <method selector='initWithValues:count:'>
+      <arg c_array_length_in_arg='1' index='0' type='r^f' type64='r^d' type_modifier='n' />
+    </method>
+    <method class_method='true' selector='vectorWithValues:count:'>
+      <arg c_array_length_in_arg='1' index='0' type='r^f' type64='r^d' type_modifier='n' />
+    </method>
+  </class>
+  <class name='NSObject'>
+    <method selector='drawLayer:inContext:'>
+      <arg index='1' type='^{CGContext=}' />
+    </method>
+    <method selector='load:'>
+      <arg index='0' type='^v' />
+    </method>
+    <method selector='provideImageData:bytesPerRow:origin:size:userInfo:'>
+      <arg index='0' type='^v' />
+    </method>
+  </class>
   <class name='CALayer'>
     <method selector='drawInContext:'>
       <arg index='0' type='^{CGContext=}' />

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzFilters.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzFilters.bridgesupport	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Exceptions/QuartzFilters.bridgesupport	Sun Mar  1 07:56:02 2009
@@ -9,4 +9,12 @@
       <arg index='0' type='^{CGContext=}' />
     </method>
   </class>
+  <class name='QuartzFilter'>
+    <method selector='applyToContext:'>
+      <arg index='0' type='^{CGContext=}' />
+    </method>
+    <method selector='removeFromContext:'>
+      <arg index='0' type='^{CGContext=}' />
+    </method>
+  </class>
 </signatures>

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/__init__.py	Sun Mar  1 07:56:02 2009
@@ -22,7 +22,7 @@
 from Quartz.CoreGraphics._callbacks import *
 from Quartz.CoreGraphics._doubleindirect import *
 from Quartz.CoreGraphics._sortandmap import *
-from Quartz.CoreGraphics._cgwindow import *
+from Quartz.CoreGraphics._coregraphics import *
 
 setCGPathElement(CGPathElement)
 del setCGPathElement

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/_contextmanager.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/_contextmanager.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/_contextmanager.py	Sun Mar  1 07:56:02 2009
@@ -2,6 +2,11 @@
 This module defines a number of context managers. These are meant to be used
 in the context of the with statement (introduced in Python 2.5).
 """
+from Quartz.CoreGraphics import *
+
+__all__ = ('CGSavedGState', 'CGTransparencyLayer',  'CGContextPage')
+
+
 class CGSavedGState (object):
     """
     Context manager for saving and restoring the graphics state.
@@ -32,27 +37,32 @@
 
 class CGTransparencyLayer (object):
     """
-    Context manager for saving and restoring the graphics state.
+    Context manager for working in a transparancylayer.
 
     Usage::
 
-        with GTransparancyLayer(context):
+        with CGTransparencyLayer(context, info [, rect]):
             statement
 
     This is equivalent to:
-        CGContextBeginTransparencyLayer(context)
+        CGContextBeginTransparencyLayer(context, info)
         try:
             statement
 
         finally:
             CGContextEndTransparencyLayer(context)
     """
-    def __init__(self, context):
+    def __init__(self, context, info, rect = None):
         self.context = context
+        self.info = info
+        self.rect = rect
 
     def __enter__(self):
-        CGContextBeginTransparencyLayer(self.context)
-        return self
+        if self.rect is None:
+            result = CGContextBeginTransparencyLayer(self.context, self.info)
+        else:
+            result = CGContextBeginTransparencyLayerWithRect(self.context, self.rect, self.info)
+        return result
 
     def __exit__(self, exc_type, exc_value, exc_tp):
         CGContextEndTransparencyLayer(self.context)
@@ -64,24 +74,26 @@
 
     Usage::
 
-        with CGContextPage(context) as mediaRect:
+        with CGContextPage(context):
             statement
 
     This is equivalent to:
-        mediaRect = CGContextBeginPage(context, None)
+        CGContextBeginPage(context, None)
         try:
             statement
 
         finally:
             CGContextEndPage(context)
     """
-    def __init__(self, context):
+    def __init__(self, context, mediaBox = None):
         self.context = context
+        self.mediaBox = mediaBox
 
     def __enter__(self):
-        mediaRect = CGContextBeginPage(self.context, None)
-        return mediaRect
+        mediaRect = CGContextBeginPage(self.context, self.mediaBox)
 
     def __exit__(self, exc_type, exc_value, exc_tp):
         CGContextEndPage(self.context)
         return False
+
+

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/__init__.py	Sun Mar  1 07:56:02 2009
@@ -13,6 +13,7 @@
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/CoreVideo.framework"),
     globals=globals(),
+    frameworkResourceName="Quartz.CoreVideo",
     scan_classes=False) 
 
 from Quartz.CoreVideo._CVPixelBuffer import *

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageIO/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageIO/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageIO/__init__.py	Sun Mar  1 07:56:02 2009
@@ -6,11 +6,13 @@
 '''
 
 import objc as _objc
-from Quartz.CoreGraphics import *
+import CoreFoundation
+#from Quartz.CoreGraphics import *
 
 __bundle__ = _objc.initFrameworkWrapper("ImageIO",
     frameworkIdentifier="com.apple.ImageIO.framework",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework"),
     globals=globals(),
+    frameworkResourceName="Quartz.ImageIO",
     scan_classes=False)

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageKit/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageKit/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/ImageKit/__init__.py	Sun Mar  1 07:56:02 2009
@@ -8,10 +8,11 @@
 import objc as _objc
 from AppKit import *
 from Foundation import *
-from Quartz.QuartzCore import *
+#from Quartz.QuartzCore import *
 
 __bundle__ = _objc.initFrameworkWrapper("ImageKit",
     frameworkIdentifier="com.apple.imageKit",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/Quartz.framework/Frameworks/ImageKit.framework"),
+    frameworkResourceName="Quartz.ImageKit",
     globals=globals())

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/PDFKit/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/PDFKit/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/PDFKit/__init__.py	Sun Mar  1 07:56:02 2009
@@ -12,4 +12,5 @@
     frameworkIdentifier="com.apple.PDFKit",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/Quartz.framework/Frameworks/PDFKit.framework"),
+    frameworkResourceName="Quartz.PDFKit",
     globals=globals())

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzComposer/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzComposer/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzComposer/__init__.py	Sun Mar  1 07:56:02 2009
@@ -13,4 +13,5 @@
     frameworkIdentifier="com.apple.QuartzComposer",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/Quartz.framework/Frameworks/QuartzComposer.framework"),
+    frameworkResourceName="Quartz.QuartzComposer",
     globals=globals())

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	Sun Mar  1 07:56:02 2009
@@ -13,5 +13,6 @@
     frameworkIdentifier="com.apple.QuartzCore",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/QuartzCore.framework"),
+    frameworkResourceName="Quartz.QuartzCore",
     globals=globals())
 

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzFilters/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzFilters/__init__.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Lib/Quartz/QuartzFilters/__init__.py	Sun Mar  1 07:56:02 2009
@@ -12,5 +12,6 @@
     frameworkIdentifier="com.apple.quartzfilters",
     frameworkPath=_objc.pathForFramework(
         "/System/Library/Frameworks/Quartz.framework/Frameworks/QuartzFilters.framework"),
+    frameworkResourceName="Quartz.QuartzFilters",
     globals=globals())
 

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	Sun Mar  1 07:56:02 2009
@@ -2,26 +2,26 @@
 Helper module that makes it easier to import all of Quartz
 """
 
-try:
-    from Quartz.CoreGraphics import *
-except ImportError:
-    pass
+#try:
+#    from Quartz.CoreGraphics import *
+#except ImportError:
+#    pass
 
 try:
     from Quartz.ImageIO import *
 except ImportError:
     pass
 
-try:
-    from Quartz.CoreVideo import *
-except ImportError:
-    pass
-
-try:
-    from Quartz.QuartzCore import *
-except ImportError:
-    pass
-
+#try:
+#    from Quartz.CoreVideo import *
+#except ImportError:
+#    pass
+#
+#try:
+#    from Quartz.QuartzCore import *
+#except ImportError:
+#    pass
+#
 try:
     from Quartz.ImageKit import *
 except ImportError:
@@ -32,7 +32,7 @@
 except ImportError:
     pass
 
-try:
-    from Quartz.QuartzFilters import *
-except ImportError:
-    pass
+#try:
+#    from Quartz.QuartzFilters import *
+#except ImportError:
+#    pass

Modified: trunk/pyobjc/pyobjc-framework-Quartz/Modules/_callbacks.m
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/Modules/_callbacks.m	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Modules/_callbacks.m	Sun Mar  1 07:56:02 2009
@@ -24,7 +24,7 @@
 	PyGILState_STATE   state = PyGILState_Ensure();
 
 	PyObject* result = PyObject_CallFunction(
-			PyTuple_GET_ITEM(info, 0), "Ot#l",
+			PyTuple_GET_ITEM(info, 0), "Os#l",
 			PyTuple_GET_ITEM(info, 2), buffer, count, count);
 	if (result == NULL) {
 		PyObjCErr_ToObjCWithGILState(&state);
@@ -672,9 +672,7 @@
 	if (PyTuple_GET_ITEM(info, 1) != Py_None) {
 		PyObject* result = PyObject_CallFunction(
 				PyTuple_GET_ITEM(info, 1),
-				"Ol",
-				PyTuple_GET_ITEM(info, 0),
-				size);
+				"O", PyTuple_GET_ITEM(info, 0));
 		if (result == NULL) {
 			PyObjC_FreeCArray(tag, (void*)data);
 			Py_DECREF(info);
@@ -764,8 +762,8 @@
 
 	PyGILState_STATE   state = PyGILState_Ensure();
 
-	domdim = PyInt_AsLong(PyTuple_GET_ITEM(info, 3));
-	rangedim = PyInt_AsLong(PyTuple_GET_ITEM(info, 4));
+	domdim = PyInt_AsLong(PyTuple_GET_ITEM(info, 2));
+	rangedim = PyInt_AsLong(PyTuple_GET_ITEM(info, 3));
 
 	PyObject* input;
 	if (inData) {
@@ -814,7 +812,7 @@
 };
 
 PyDoc_STRVAR(doc_CGFunctionCreate,
-	"CGFunctionCreate(info, domainDimension, domain, rangeDimension, range, (evaluate, release) -> functionref");
+	"CGFunctionCreate(info, domainDimension, domain, rangeDimension, range, evaluate) -> functionref");
 static PyObject*
 m_CGFunctionCreate(PyObject* self __attribute__((__unused__)),
 		PyObject* args)
@@ -825,7 +823,6 @@
 	PyObject* rangeDim;
 	PyObject* range;
 	PyObject* evaluate;
-	PyObject* release;
 	size_t domainDimension;
 	size_t rangeDimension;
 	float* domainArr;
@@ -836,9 +833,9 @@
 	int rangeTag;
 	int domainTag;
 
-	if (!PyArg_ParseTuple(args, "OOOOO(OO)", 
+	if (!PyArg_ParseTuple(args, "OOOOOO", 
 			&info, &domDim, &domain, &rangeDim, 
-			&range, &evaluate, &release)) {
+			&range, &evaluate)) {
 		return NULL;
 	}
 
@@ -848,11 +845,6 @@
 	if (PyObjC_PythonToObjC(@encode(size_t), rangeDim, &rangeDimension) < 0){
 		return NULL;
 	}
-	if (release != Py_None && !PyCallable_Check(release)) {
-		PyErr_SetString(PyExc_TypeError, "release not callable");
-		return NULL;
-	}
-
 	if (domain == Py_None) {
 		domainArr = NULL;
 		domainTag = -1;
@@ -902,8 +894,8 @@
 
 	PyObject* real_info;
 
-	real_info = Py_BuildValue("OOOll",
-		info, evaluate, release, domainDimension, rangeDimension);
+	real_info = Py_BuildValue("OOll",
+		info, evaluate, domainDimension, rangeDimension);
 	if (real_info == NULL) {
 		return NULL;
 	}
@@ -1638,10 +1630,9 @@
 
 	PyObject* result = PyObject_CallFunction(
 			PyTuple_GET_ITEM(info, 0),
-			"NO",
-			PyTuple_GET_ITEM(info, 2),
+			"ON",
+			PyTuple_GET_ITEM(info, 1),
 			ctx);
-
 	if (result == NULL) {
 		PyObjCErr_ToObjCWithGILState(&state);
 	}
@@ -1655,17 +1646,6 @@
 	PyObject* info = (PyObject*)_info;
 
 	PyGILState_STATE   state = PyGILState_Ensure();
-
-	if (PyTuple_GET_ITEM(info, 1) != Py_None) {
-		PyObject* result = PyObject_CallFunction(
-				PyTuple_GET_ITEM(info, 1),
-				"O",
-				PyTuple_GET_ITEM(info, 2));
-		if (result == NULL) {
-			PyObjCErr_ToObjCWithGILState(&state);
-		}
-		Py_DECREF(result);
-	}	
 	Py_DECREF(info);
 
 	PyGILState_Release(state);
@@ -1688,16 +1668,15 @@
 	PyObject* py_tiling;
 	PyObject* py_isColored;
 	PyObject* draw;
-	PyObject* release;
 	CGRect bounds;
 	CGAffineTransform matrix;
 	CGPatternTiling tiling;
 	int isColored;
 
 
-	if (!PyArg_ParseTuple(args, "OOOffOO(OO)",
+	if (!PyArg_ParseTuple(args, "OOOffOOO",
 		&info, &py_bounds, &py_matrix, &xStep, &yStep,
-		&py_tiling, &py_isColored, &draw, &release)) {
+		&py_tiling, &py_isColored, &draw)) {
 
 		return NULL;
 	}
@@ -1705,10 +1684,6 @@
 		PyErr_SetString(PyExc_TypeError, "drawPattern is not callable");
 		return NULL;
 	}
-	if (release != Py_None && !PyCallable_Check(draw)) {
-		PyErr_SetString(PyExc_TypeError, "releaseInfo is not callable");
-		return NULL;
-	}
 	if (PyObjC_PythonToObjC(@encode(CGRect), py_bounds, &bounds) < 0) {
 		return NULL;
 	}
@@ -1724,7 +1699,11 @@
 		isColored = false;
 	}
 
-	PyObject* real_info = Py_BuildValue("OOO", draw, release, info);
+	PyObject* real_info = Py_BuildValue("OO", draw, info);
+	if (real_info == NULL) {
+		return NULL;
+	}
+
 	CGPatternRef result = NULL;
 
 	PyObjC_DURING

Copied: trunk/pyobjc/pyobjc-framework-Quartz/Modules/_coregraphics.m (from r2061, /trunk/pyobjc/pyobjc-framework-Quartz/Modules/_cgwindow.m)
==============================================================================
--- /trunk/pyobjc/pyobjc-framework-Quartz/Modules/_cgwindow.m	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/Modules/_coregraphics.m	Sun Mar  1 07:56:02 2009
@@ -194,6 +194,88 @@
 	return rv;
 }
 
+static PyObject*
+m_CGBitmapContextCreate(PyObject* self __attribute__((__unused__)), 
+		PyObject* args)
+{
+	PyObject* py_data;
+	PyObject* py_width;
+	PyObject* py_height;
+	PyObject* py_bitsPerComponent;
+	PyObject* py_bytesPerRow;
+	PyObject* py_colorSpace;
+	PyObject* py_bitmapInfo;
+
+	void*	data;
+	size_t  width;
+	size_t  height;
+	size_t  bitsPerComponent;
+	size_t  bytesPerRow;
+	CGColorSpaceRef colorSpace;
+	CGBitmapInfo bitmapInfo;
+
+	if (!PyArg_ParseTuple(args, "OOOOOOO", &py_data, &py_width, &py_height, &py_bitsPerComponent, &py_bytesPerRow, &py_colorSpace, &py_bitmapInfo)) {
+		return NULL;
+	}
+
+	if (PyObjC_PythonToObjC(@encode(size_t), py_width, &width) == -1) {
+		return NULL;
+	}
+	if (PyObjC_PythonToObjC(@encode(size_t), py_height, &height) == -1) {
+		return NULL;
+	}
+	if (PyObjC_PythonToObjC(@encode(size_t), py_bitsPerComponent, &bitsPerComponent) == -1) {
+		return NULL;
+	}
+	if (PyObjC_PythonToObjC(@encode(size_t), py_bytesPerRow, &bytesPerRow) == -1) {
+		return NULL;
+	}
+	if (PyObjC_PythonToObjC(@encode(CGColorSpaceRef), py_colorSpace, &colorSpace) == -1) {
+		return NULL;
+	}
+	if (PyObjC_PythonToObjC(@encode(CGBitmapInfo), py_bitmapInfo, &bitmapInfo) == -1) {
+		return NULL;
+	}
+
+	if (py_data == Py_None) {
+		data = NULL;
+
+	} else if (PyUnicode_Check(py_data)) {
+		PyErr_SetString(PyExc_TypeError, "Cannot use Unicode as backing store");
+		return NULL;
+
+	} else {
+		Py_ssize_t size;
+
+		if (PyObject_AsWriteBuffer(py_data, &data, &size) == -1) {
+			return NULL;
+		}
+	}
+
+
+	CGContextRef ctx = NULL;
+	PyObjC_DURING
+		ctx = CGBitmapContextCreate(data, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo);
+
+	PyObjC_HANDLER
+		ctx = NULL;
+		PyObjCErr_FromObjC(localException);
+	PyObjC_ENDHANDLER
+
+	if (ctx == NULL && PyErr_Occurred()) {
+		return NULL;
+	}
+
+	if (ctx == NULL)  {
+		Py_INCREF(Py_None);
+		return Py_None;
+	}
+
+	PyObject* rv = PyObjC_ObjCToPython(@encode(CGContextRef), &ctx);
+	CFRelease(ctx);
+	return rv;
+}
+
 
 static PyMethodDef m_methods[] = {
 	{
@@ -214,15 +296,21 @@
 		METH_VARARGS,
 		NULL
 	},
+	{
+		"CGBitmapContextCreate",
+		(PyCFunction)m_CGBitmapContextCreate,
+		METH_VARARGS,
+		NULL
+	},
 
 
 	{ 0, 0, 0, }
 };
 
-void init_cgwindow(void);
-void init_cgwindow(void)
+void init_coregraphics(void);
+void init_coregraphics(void)
 {
-	PyObject* m = Py_InitModule4("_cgwindow", m_methods,
+	PyObject* m = Py_InitModule4("_coregraphics", m_methods,
 		NULL, NULL, PYTHON_API_VERSION);
 
         if (PyObjC_ImportAPI(m) < 0) { return; }

Modified: trunk/pyobjc/pyobjc-framework-Quartz/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Quartz/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Quartz/setup.py	Sun Mar  1 07:56:02 2009
@@ -73,7 +73,7 @@
             [ 'Modules/_doubleindirect.m' ]),
         Extension('Quartz.CoreGraphics._sortandmap',
             [ 'Modules/_sortandmap.m' ]),
-        Extension('Quartz.CoreGraphics._cgwindow',
-            [ 'Modules/_cgwindow.m' ]),
+        Extension('Quartz.CoreGraphics._coregraphics',
+            [ 'Modules/_coregraphics.m' ]),
     ],
 )

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
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.