Re: Hotkeys in Cocoa using undocumented CoreGraphics calls
Re: Hotkeys in Cocoa using undocumented CoreGraphics calls
- Subject: Re: Hotkeys in Cocoa using undocumented CoreGraphics calls
- From: Finlay Dobbie <email@hidden>
- Date: Mon, 10 Dec 2001 07:41:23 +0000
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