Progress Check In
[ITKit.git] / ITCoreGraphicsHacks.h
1 /*
2  *      ITKit
3  *  ITCoreGraphicsHacks
4  *    Header to import to work with private CoreGraphics API
5  *
6  *  Original Author : Matt Judy <mjudy@ithinksw.com>
7  *   Responsibility : Matt Judy <mjudy@ithinksw.com>
8  *
9  *  Copyright (c) 2002 - 2003 iThink Software.
10  *  All Rights Reserved
11  *
12  */
13
14 /*************************************************************************/
15 #pragma mark -
16 #pragma mark CoreGraphics HACKS
17 /*************************************************************************/
18
19 typedef void * CGSGenericObj;
20 typedef CGSGenericObj CGSValueObj;
21 typedef void * CGSConnectionID;
22 typedef void * CGSWindowID;
23 typedef struct CGStyle *CGStyleRef;
24 typedef struct CGShadowStyle {
25     unsigned int version;
26     float elevation;
27     float azimuth;
28     float ambient;
29     float height;
30     float radius;
31     float saturation;
32 } CGShadowStyle;
33 typedef unsigned char CGSBoolean;
34 enum {
35     kCGSFalse = 0,
36     kCGSTrue  = 1
37 };
38
39 extern void        CGStyleRelease(CGStyleRef style);
40 extern void        CGSReleaseObj(void *obj);
41 extern void        CGContextSetStyle(CGContextRef c, CGStyleRef style);
42 extern void        CGStyleRelease(CGStyleRef style);
43 extern CGStyleRef  CGStyleCreateShadow(const CGShadowStyle *shadow);
44 extern CGSValueObj CGSCreateCString(const char *string);
45 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
46 extern CGError     CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
47                                         
48 extern CGAffineTransform CGAffineTransformMakeRotation(float angle);
49 extern CGAffineTransform CGAffineTransformMakeScale(float sx, float sy);
50 extern CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t, float tx, float ty);
51 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
52 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);