Thanks, Bob, that works nicely!  I grokked the signature format and discovered that cases like ('CGContextSetGrayFillColor', 'iiff') work, too.
For CGContextFillEllipseInRect(ctxt, rect), I was able to make it as 
('CGContextFillEllipseInRect', 'ii{CGRect={CGPoint=ff}{CGSize=ff}}')
and then pass it a list like rect = [ [100., 100.], [5., 5.] ]
and -mirabile dictu- it worked!  Is this chicanery likely to blow up in my face someday, or does it make me a bad person?
- rob

On Jul 21, 2006, at 4:44 PM, Bob Ippolito wrote:

import objc

from Foundation import NSBundle

bndl = NSBundle.bundleWithPath_(objc.pathForFramework('ApplicationServices.framework'))

# this is cheating, CGDirectDisplayID is a pointer, but we treat it as an int

FUNCTIONS = [

    ('CGMainDisplayID', 'i'),

    ('CGDisplayCapture', 'ii'),

    ('CGDisplayRelease', 'ii'),

]

objc.loadBundleFunctions(bndl, globals(), FUNCTIONS)



* * * * * * * * * * * * * * * * * * * * * * *
*  Dr. Robert S. Stephenson
*  E-learning Architect
*  (415) 341-3784
*
*  Community Manager
*  Global Education & Learning Community on Java.net
*
*  Chief Architect and Principal Investigator
*  Supporting virtual communities of e-learning developers.
*
*  Founder
*  The Harvey Project
*  Open Course Physiology on the Web
*
*  Was I helpful?  Let others know:
*
*  gpg key fingerprint:
*  4255 FB43 17C8 2B80 8074  7DB6 7DD7 939B F3F6 CB92
* * * * * * * * * * * * * * * * * * * * * * *




_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to