Go to the source code of this file.
|
static JSBool | SunGetProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
|
static JSBool | SunGoNova (JSContext *context, uintN argc, jsval *vp) |
|
static JSBool | SunCancelNova (JSContext *context, uintN argc, jsval *vp) |
|
void | InitOOJSSun (JSContext *context, JSObject *global) |
|
◆ anonymous enum
Enumerator |
---|
kSun_radius | |
kSun_hasGoneNova | |
kSun_isGoingNova | |
kSun_name | |
Definition at line 58 of file OOJSSun.m.
◆ InitOOJSSun()
void InitOOJSSun |
( |
JSContext * | context, |
|
|
JSObject * | global ) |
Definition at line 91 of file OOJSSun.m.
92{
96}
OOINLINE JSClass * JSEntityClass(void)
OOINLINE JSObject * JSEntityPrototype(void)
static JSObject * sSunPrototype
static JSFunctionSpec sSunMethods[]
static JSPropertySpec sSunProperties[]
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
void OOJSRegisterSubclass(JSClass *subclass, JSClass *superclass)
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)
References JSEntityClass(), JSEntityPrototype(), OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSRegisterSubclass(), OOJSUnconstructableConstruct(), sSunClass, sSunMethods, sSunProperties, and sSunPrototype.
◆ SunCancelNova()
static JSBool SunCancelNova |
( |
JSContext * | context, |
|
|
uintN | argc, |
|
|
jsval * | vp ) |
|
static |
Definition at line 179 of file OOJSSun.m.
180{
182
184
186
187 if ([sun willGoNova] && ![sun goneNova])
188 {
190 }
192
194}
#define OOJS_NATIVE_ENTER(cx)
void setGoingNova:inTime:(BOOL yesno,[inTime] double interval)
◆ SunGetProperty()
static JSBool SunGetProperty |
( |
JSContext * | context, |
|
|
JSObject * | this, |
|
|
jsid | propID, |
|
|
jsval * | value ) |
|
static |
Definition at line 122 of file OOJSSun.m.
123{
124 if (!JSID_IS_INT(propID)) return YES;
125
127
129
130 if (
EXPECT_NOT(!JSSunGetSunEntity(context,
this, &sun)))
return NO;
131
132 switch (JSID_TO_INT(propID))
133 {
135 return JS_NewNumberValue(context, [sun radius], value);
136
139 return YES;
140
143 return YES;
144
147 return YES;
148
149 default:
151 return NO;
152 }
153
155}
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)
void OOJSReportBadPropertySelector(JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec)
OOINLINE jsval OOJSValueFromBOOL(int b) INLINE_CONST_FUNC
References EXPECT_NOT, kSun_hasGoneNova, kSun_isGoingNova, kSun_name, kSun_radius, nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSValueFromBOOL(), OOJSValueFromNativeObject(), and sSunProperties.
◆ SunGoNova()
static JSBool SunGoNova |
( |
JSContext * | context, |
|
|
uintN | argc, |
|
|
jsval * | vp ) |
|
static |
◆ sSunClass
Initial value:=
{
"Sun",
JSCLASS_HAS_PRIVATE,
JS_PropertyStub,
JS_PropertyStub,
JS_StrictPropertyStub,
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
JSCLASS_NO_OPTIONAL_MEMBERS
}
static JSBool SunGetProperty(JSContext *context, JSObject *this, jsid propID, jsval *value)
void OOJSObjectWrapperFinalize(JSContext *context, JSObject *this)
Definition at line 41 of file OOJSSun.m.
42{
43 "Sun",
44 JSCLASS_HAS_PRIVATE,
45
46 JS_PropertyStub,
47 JS_PropertyStub,
49 JS_StrictPropertyStub,
50 JS_EnumerateStub,
51 JS_ResolveStub,
52 JS_ConvertStub,
54 JSCLASS_NO_OPTIONAL_MEMBERS
55};
Referenced by InitOOJSSun().
◆ sSunMethods
JSFunctionSpec sSunMethods[] |
|
static |
Initial value:=
{
{ 0 }
}
static JSBool SunCancelNova(JSContext *context, uintN argc, jsval *vp)
static JSBool SunGoNova(JSContext *context, uintN argc, jsval *vp)
Definition at line 79 of file OOJSSun.m.
Referenced by InitOOJSSun().
◆ sSunProperties
JSPropertySpec sSunProperties[] |
|
static |
◆ sSunPrototype