]> git.saurik.com Git - iphone-api.git/blob - WebCore/WebCoreThreadMessage.h
Adding the WebCore headers (for Cydget).
[iphone-api.git] / WebCore / WebCoreThreadMessage.h
1 /*
2 * WebCoreThreadMessage.h
3 * WebCore
4 *
5 * Copyright (C) 2006, 2007, 2008, Apple Inc. All rights reserved.
6 *
7 */
8
9 #import <Foundation/Foundation.h>
10
11 #ifdef __OBJC__
12 #import <WebCore/WebCoreThread.h>
13 #endif // __OBJC__
14
15 #if defined(__cplusplus)
16 extern "C" {
17 #endif
18
19 //
20 // Release an object on the main thread.
21 //
22 @interface NSObject(WebCoreThreadAdditions)
23 - (void)releaseOnMainThread;
24 @end
25
26 // Register a class for deallocation on the WebThread
27 void WebCoreObjCDeallocOnWebThread(Class cls);
28
29 // Asynchronous from main thread to web thread.
30 void WebThreadCallAPI(NSInvocation *invocation);
31 void WebThreadAdoptAndRelease(id obj);
32
33 // Synchronous from web thread to main thread, or main thread to main thread.
34 void WebThreadCallDelegate(NSInvocation *invocation);
35 void WebThreadPostNotification(NSString *name, id object, id userInfo);
36
37 // Asynchronous from web thread to main thread, but synchronous when called on the main thread.
38 void WebThreadCallDelegateAsync(NSInvocation *invocation);
39 void WebThreadPostNotificationAsync(NSString *name, id object, id userInfo);
40
41 // Convenience method for creating an NSInvocation object
42 NSInvocation *WebThreadCreateNSInvocation(id target, SEL selector);
43
44 #if defined(__cplusplus)
45 }
46 #endif