]> git.saurik.com Git - iphone-api.git/blob - WebCore/WKUtilities.h
Adding the WebCore headers (for Cydget).
[iphone-api.git] / WebCore / WKUtilities.h
1 //
2 // WKUtilities.h
3 //
4 // Copyright (C) 2005, 2006, 2007, Apple Inc. All rights reserved.
5 //
6
7 #import <CoreGraphics/CoreGraphics.h>
8
9 #import "WKTypes.h"
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 extern const CFArrayCallBacks WKCollectionArrayCallBacks;
16 extern const CFSetCallBacks WKCollectionSetCallBacks;
17
18
19 typedef void(*WKDeallocCallback)(WKObjectRef object);
20
21 typedef struct _WKClassInfo WKClassInfo;
22
23 struct _WKClassInfo
24 {
25 const WKClassInfo *parent;
26 const char *name;
27 WKDeallocCallback dealloc;
28 };
29
30 extern WKClassInfo WKObjectClass;
31
32 struct _WKObject
33 {
34 unsigned referenceCount;
35 WKClassInfo *classInfo;
36 };
37
38 const void *WKCreateObjectWithSize (size_t size, WKClassInfo *info);
39 const void *WKRetain(const void *object);
40 void WKRelease(const void *object);
41
42 const void *WKCollectionRetain (CFAllocatorRef allocator, const void *value);
43 void WKCollectionRelease (CFAllocatorRef allocator, const void *value);
44
45 void WKReportError(const char *file, int line, const char *function, const char *format, ...);
46 #define WKError(formatAndArgs...) WKReportError(__FILE__, __LINE__, __PRETTY_FUNCTION__, formatAndArgs)
47
48 CFIndex WKArrayIndexOfValue (CFArrayRef array, const void *value);
49
50 WKClassInfo *WKGetClassInfo (WKObjectRef object);
51
52 #ifdef __cplusplus
53 }
54 #endif