[Pythonmac-SIG] Best way to do full-screen mode?

Robert Stephenson rstephe at alumni.princeton.edu
Sat Jul 22 20:38:09 CEST 2006


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
*  rstephe at alumni.princeton.edu
*  (415) 341-3784
*  http://sun.science.wayne.edu/~rstephe
*
*  Community Manager
*  Global Education & Learning Community on Java.net
*  http://gelc.org
*
*  Chief Architect and Principal Investigator
*  http://OpenCourse.Org
*  Supporting virtual communities of e-learning developers.
*
*  Founder
*  The Harvey Project
*  Open Course Physiology on the Web
*  http://HarveyProject.org
*
*  Was I helpful?  Let others know:
*  http://rate.affero.net/rstephe
*
*  gpg key fingerprint:
*  4255 FB43 17C8 2B80 8074  7DB6 7DD7 939B F3F6 CB92
* * * * * * * * * * * * * * * * * * * * * * *




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060722/dc2248bb/attachment.html 


More information about the Pythonmac-SIG mailing list