source: trunk/macosx/UKKQueue/UKMainThreadProxy.h @ 847

Last change on this file since 847 was 847, checked in by livings124, 15 years ago

Use UKKQueue for auto import which gets rid of polling and makes the process instantaneous.

File size: 1.7 KB
Line 
1/* =============================================================================
2        FILE:           UKMainThreadProxy.h
3        PROJECT:        UKMainThreadProxy
4   
5    PURPOSE:    Send a message to object theObject to [theObject mainThreadProxy]
6                instead and the message will be received on the main thread by
7                theObject.
8
9    COPYRIGHT:  (c) 2004 M. Uli Kusterer, all rights reserved.
10   
11        AUTHORS:        M. Uli Kusterer - UK
12   
13    LICENSES:   MIT License
14
15        REVISIONS:
16                2006-03-13      UK      Clarified license.
17                2004-10-14      UK      Created.
18   ========================================================================== */
19
20// -----------------------------------------------------------------------------
21//  Headers:
22// -----------------------------------------------------------------------------
23
24#import <Cocoa/Cocoa.h>
25
26
27// -----------------------------------------------------------------------------
28//  Categories:
29// -----------------------------------------------------------------------------
30
31@interface NSObject (UKMainThreadProxy)
32
33-(id)   mainThreadProxy;                // You can't init or release this object.
34-(id)   copyMainThreadProxy;    // Gives you a retained version.
35
36@end
37
38
39// -----------------------------------------------------------------------------
40//  Classes:
41// -----------------------------------------------------------------------------
42
43/*
44        This object is created as a proxy in a second thread for an existing object.
45        All messages you send to this object will automatically be sent to the other
46        object on the main thread, except NSObject methods like retain/release etc.
47*/
48
49@interface UKMainThreadProxy : NSObject
50{
51        IBOutlet id             target;
52}
53
54-(id)   initWithTarget: (id)targ;
55
56@end
Note: See TracBrowser for help on using the repository browser.