Oolite
Loading...
Searching...
No Matches
OOJSCall.h
Go to the documentation of this file.
1
/*
2
3
OOJSCall.h
4
5
Basic JavaScript-to-ObjC bridge implementation.
6
7
Oolite
8
Copyright (C) 2004-2013 Giles C Williams and contributors
9
10
This program is free software; you can redistribute it and/or
11
modify it under the terms of the GNU General Public License
12
as published by the Free Software Foundation; either version 2
13
of the License, or (at your option) any later version.
14
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23
MA 02110-1301, USA.
24
25
*/
26
27
#ifdef OO_DEBUG_MONITOR_ENABLED
28
29
#import <Foundation/Foundation.h>
30
#include <jsapi.h>
31
32
/* OOJSCallObjCObjectMethod()
33
34
Function for implementing JavaScript call() methods.
35
36
The argument list is expected to be either a single string (selector), or
37
a string ending with a : followed by arbitrary arguments which will be
38
concatenated as a string. (This behaviour reflects Oolite's traditional
39
scripting system and the expectations of its script methods. It also has
40
the advantage that it can be done with GNUstep's buggy implementation of
41
NSMethodSignature.)
42
43
If the method returns an object, *outResult will be set to that object's
44
-oo_jsValueInContext:. Otherwise, it will be left unchanged.
45
46
argv is assumed to contain at least one value.
47
*/
48
BOOL OOJSCallObjCObjectMethod(JSContext* context,
id
object
, NSString* oo_jsClassName, uintN argc, jsval* argv, jsval* outResult);
49
50
#endif
src
Core
Scripting
OOJSCall.h
Generated by
1.15.0