Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
Functions
OOJSSound.h File Reference
import <Foundation/Foundation.h>
#include <jsapi.h>
+ Include dependency graph for OOJSSound.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InitOOJSSound (JSContext *context, JSObject *global)
 
OOSoundSoundFromJSValue (JSContext *context, jsval value)
 

Function Documentation

◆ InitOOJSSound()

void InitOOJSSound ( JSContext * context,
JSObject * global )

Definition at line 104 of file OOJSSound.m.

105{
108}
static JSObject * sSoundPrototype
Definition OOJSSound.m:33
static JSPropertySpec sSoundProperties[]
Definition OOJSSound.m:72
static JSFunctionSpec sSoundMethods[]
Definition OOJSSound.m:80
static JSFunctionSpec sSoundStaticMethods[]
Definition OOJSSound.m:88
static JSClass sSoundClass
Definition OOJSSound.m:48
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)

References OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSUnconstructableConstruct(), sSoundClass, sSoundMethods, sSoundProperties, sSoundPrototype, and sSoundStaticMethods.

+ Here is the call graph for this function:

◆ SoundFromJSValue()

OOSound * SoundFromJSValue ( JSContext * context,
jsval value )

Definition at line 111 of file OOJSSound.m.

112{
114
116 if ([PLAYER status] != STATUS_START_GAME && JSVAL_IS_STRING(value))
117 {
118 return GetNamedSound(OOStringFromJSValue(context, value));
119 }
120 else
121 {
122 return OOJSNativeObjectOfClassFromJSValue(context, value, [OOSound class]);
123 }
125
127}
#define OOJS_PROFILE_EXIT
#define OOJS_PROFILE_ENTER
static OOSound * GetNamedSound(NSString *name)
Definition OOJSSound.m:157
void OOJSPauseTimeLimiter(void)
id OOJSNativeObjectOfClassFromJSValue(JSContext *context, jsval value, Class requiredClass)
NSString * OOStringFromJSValue(JSContext *context, jsval value)
void OOJSResumeTimeLimiter(void)
#define PLAYER

References GetNamedSound(), OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOJSNativeObjectOfClassFromJSValue(), OOJSPauseTimeLimiter(), OOJSResumeTimeLimiter(), OOStringFromJSValue(), and PLAYER.

+ Here is the call graph for this function: