Huge audit of ITKit, mostly everything has been updated to current coding
[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 by iThink Software.
8  *      All Rights Reserved.
9  *
10  *      $Id$
11  *
12  */
13
14 typedef void * CGSGenericObj;
15 typedef CGSGenericObj CGSValueObj;
16 typedef void * CGSConnectionID;
17 typedef void * CGSWindowID;
18 typedef struct CGStyle *CGStyleRef;
19 typedef struct CGShadowStyle {
20         unsigned int version;
21         float elevation;
22         float azimuth;
23         float ambient;
24         float height;
25         float radius;
26         float saturation;
27 } CGShadowStyle;
28 typedef unsigned char CGSBoolean;
29 enum {
30         kCGSFalse = 0,
31         kCGSTrue = 1
32 };
33
34 extern void CGStyleRelease(CGStyleRef style);
35 extern void CGSReleaseObj(void *obj);
36 extern void CGContextSetStyle(CGContextRef c, CGStyleRef style);
37 extern void CGStyleRelease(CGStyleRef style);
38 extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow);
39 extern CGSValueObj CGSCreateCString(const char *string);
40 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
41 extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
42
43 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
44 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);
45
46 @interface NSApplication (ITCoreGraphicsHacks)
47 - (CGSConnectionID)contextID;
48 @end