Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hotkeys in Cocoa using undocumented CoreGraphics calls



On Monday, December 10, 2001, at 07:36 am, David Remahl wrote:

I've been looking into the CoreGraphics framework and found out there
were a few mysterious undocumented calls

Badger Apple to open up the CGS headers :-)

And CGX! Drooooool! Me wanna do cool window transforms too! ;-)

Actually that API is CGS.

typedef int CGSWindowID;
typedef void * CGSConnectionID;

#define kCGSNullConnectionID ((CGSConnectionID)0)

extern CGSConnectionID _CGSDefaultConnection(void);

extern OSStatus CGSSetWindowTransforms(const CGSConnectionID cid,
CGSWindowID *wid, CGAffineTransform *transform, int n);
extern OSStatus CGSSetWindowTransform(const CGSConnectionID cid,
CGSWindowID wid, CGAffineTransform transform);

Then you can do CGSSetWindowTransform(_CGSDefaultConnection(), [aNSWindow windowNumber], aCGAffineTransform)

More complicated window transforms involve opaque datatypes, I think.

Oh yes, and note that this API just plain breaks at certain points -- I have code that repeatedly crashes the windowserver. Use with care :-)

-- Finlay


References: 
 >Re: Hotkeys in Cocoa using undocumented CoreGraphics calls (From: David Remahl <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.