Fixed a crash in the core image effect. Using proper transparent bit in the CoreGraph...
[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 typedef enum {
35         CGSTagExposeFade        = 0x0002,   // Fade out when Expose activates.
36         CGSTagNoShadow          = 0x0008,   // No window shadow.
37         CGSTagTransparent       = 0x0200,   // Transparent to mouse clicks.
38         CGSTagSticky            = 0x0800,   // Appears on all workspaces.
39 } CGSWindowTag;
40
41 extern void CGStyleRelease(CGStyleRef style);
42 extern void CGSReleaseObj(void *obj);
43 extern void CGContextSetStyle(CGContextRef c, CGStyleRef style);
44 extern void CGStyleRelease(CGStyleRef style);
45 extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow);
46 extern CGSValueObj CGSCreateCString(const char *string);
47 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
48 extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
49
50 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
51 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);
52
53 extern OSStatus CGSGetWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
54 extern OSStatus CGSSetWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
55 extern OSStatus CGSClearWindowTags(const CGSConnectionID cid, const CGSWindowID wid, CGSWindowTag *tags, int thirtyTwo);
56
57 @interface NSApplication (ITCoreGraphicsHacks)
58 - (CGSConnectionID)contextID;
59 @end