1643ca7872b450ea4efacab6188849e5aac2ba161Steve Block/*
2643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * Copyright (C) 2009 Apple Inc. All rights reserved.
3643ca7872b450ea4efacab6188849e5aac2ba161Steve Block *
4643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * Redistribution and use in source and binary forms, with or without
5643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * modification, are permitted provided that the following conditions
6643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * are met:
7643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 1.  Redistributions of source code must retain the above copyright
8643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * notice, this list of conditions and the following disclaimer.
9643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 2.  Redistributions in binary form must reproduce the above copyright
10643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * notice, this list of conditions and the following disclaimer in the
11643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * documentation and/or other materials provided with the distribution.
12643ca7872b450ea4efacab6188849e5aac2ba161Steve Block *
13643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23643ca7872b450ea4efacab6188849e5aac2ba161Steve Block */
24643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
25d0825bca7fe65beaee391d30da42e937db621564Steve Blocktypedef struct OpaqueJSContext* JSGlobalContextRef;
26d0825bca7fe65beaee391d30da42e937db621564Steve Block
27643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@class WebScriptWorldPrivate;
28643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
29643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@interface WebScriptWorld : NSObject {
30643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@private
31643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    WebScriptWorldPrivate *_private;
32643ca7872b450ea4efacab6188849e5aac2ba161Steve Block}
33643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
34643ca7872b450ea4efacab6188849e5aac2ba161Steve Block+ (WebScriptWorld *)standardWorld;
35643ca7872b450ea4efacab6188849e5aac2ba161Steve Block+ (WebScriptWorld *)world;
36d0825bca7fe65beaee391d30da42e937db621564Steve Block
37d0825bca7fe65beaee391d30da42e937db621564Steve Block+ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)globalContext;
38d0825bca7fe65beaee391d30da42e937db621564Steve Block
39dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block- (void)unregisterWorld;
40dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block
41643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@end
42