c818325fd9a4e6b27f41a3147e4838c66eadd36b
[ITKit.git] / ITCoreGraphicsHacks.h
1 /*
2  *      ITKit
3  *      ITCoreGraphicsHacks.h
4  *
5  *      Header to import to work with private CoreGraphics API.
6  *
7  *      Copyright (c) 2005 iThink Software
8  *
9  */
10
11 typedef void * CGSGenericObj;
12 typedef CGSGenericObj CGSValueObj;
13 typedef void * CGSConnectionID;
14 typedef void * CGSWindowID;
15 typedef struct CGStyle *CGStyleRef;
16 typedef struct CGShadowStyle {
17         unsigned int version;
18         float elevation;
19         float azimuth;
20         float ambient;
21         float height;
22         float radius;
23         float saturation;
24 } CGShadowStyle;
25 typedef unsigned char CGSBoolean;
26 enum {
27         kCGSFalse = 0,
28         kCGSTrue = 1
29 };
30
31 typedef enum {
32         CGSTagExposeFade        = 0x0002,   // Fade out when Expose activates.
33         CGSTagNoShadow          = 0x0008,   // No window shadow.
34         CGSTagTransparent       = 0x0200,   // Transparent to mouse clicks.
35         CGSTagSticky            = 0x0800,   // Appears on all workspaces.
36 } CGSWindowTag;
37
38 extern void CGStyleRelease(CGStyleRef style);
39 extern void CGSReleaseObj(void *obj);
40 extern void CGContextSetStyle(CGContextRef c, CGStyleRef style);
41 extern void CGStyleRelease(CGStyleRef style);
42 extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow);
43 extern CGSValueObj CGSCreateCString(const char *string);
44 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
45 extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
46
47 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
48 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);
49
50 extern OSStatus CGSGetWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
51 extern OSStatus CGSSetWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
52 extern OSStatus CGSClearWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
53
54 @interface NSApplication (ITCoreGraphicsHacks)
55 - (CGSConnectionID)contextID;
56 @end