r3js

r3js

Class

plugins/pl/js/r3js.h

Library

r3js

Description:

JavaScript

See Also

oops/r3prglng.h

Super Class

r3Prglng

R3CLID_PRGLNG

JavaScript

r3Javascript

Class Identifier

R3CLID_JAVASCRIPT - 1902

Methods

RESERVED, REGISTERCONSTRUCTORHO, REGISTERHOOKMAPPER, REMHOOKMAPPER, ADDOBJECT, REMOBJECT, BEGININCLUDE, ENDINCLUDE, CLEARINCLUDES, GETCURRENTINCLUDE, REGISTERMTHHANDLER, REGISTERWRAPPER, REGISTERCALLBACKTYPE,

Methods

Include,

R3JSM_RESERVED

Method

RESERVED

Identifier

R3JSM_RESERVED

JavaScript

obj.RESERVED();

Description

Private

R3JSCM_REGISTERCONSTRUCTORHO

Method

REGISTERCONSTRUCTORHO

Identifier

R3JSCM_REGISTERCONSTRUCTORHO

Return

R3BOOL, true if succeeded.

JavaScript

rc = obj.REGISTERCONSTRUCTORHO();

Description

Register a constructor hook. This function will be called * whenever a new JavaScript object is created. * In this hook you can register new java script classes to Realsoft3D.

R3JSCM_REGISTERHOOKMAPPER

Method

REGISTERHOOKMAPPER

Identifier

R3JSCM_REGISTERHOOKMAPPER

Return

R3BOOL, true if succeeded.

Param 1:

R3CLID, class id of the Realsoft object.

JavaScript

rc = obj.REGISTERHOOKMAPPER(p1, 0);

Description

Plug-in a 'C' mapper function for handling 'R3RA_Hook' for a class. * This mapper function is called by using 'C' calling convention * and is responsible for passing the call to the actual JavaScript function * specified with R3RA_Hook. * You need to do this if you have implemented custom gadgets * which don't use R3RA_Hook in standard way.

R3JSM_REMHOOKMAPPER

Method

REMHOOKMAPPER

Identifier

R3JSM_REMHOOKMAPPER

JavaScript

obj.REMHOOKMAPPER();

Description

Private

R3JSM_ADDOBJECT

Method

ADDOBJECT

Identifier

R3JSM_ADDOBJECT

JavaScript

obj.ADDOBJECT();

Description

Private

R3JSM_REMOBJECT

Method

REMOBJECT

Identifier

R3JSM_REMOBJECT

JavaScript

obj.REMOBJECT();

Description

Private

R3JSM_BEGININCLUDE

Method

BEGININCLUDE

Identifier

R3JSM_BEGININCLUDE

Return

void*, NULL if failed.

Param 3:

char*, file name

JavaScript

rc = obj.BEGININCLUDE(p3);

Description

Begin file load. The file name is pushed onto a stack so that error reports can report the file name.

R3JSM_ENDINCLUDE

Method

ENDINCLUDE

Identifier

R3JSM_ENDINCLUDE

Param 3:

char*, file name

JavaScript

obj.ENDINCLUDE(p3);

Description

End loading session. Topmost file name is pushed off the stack.

R3JSM_CLEARINCLUDES

Method

CLEARINCLUDES

Identifier

R3JSM_CLEARINCLUDES

JavaScript

obj.CLEARINCLUDES();

Description

Clear include stack.

R3JSM_GETCURRENTINCLUDE

Method

GETCURRENTINCLUDE

Identifier

R3JSM_GETCURRENTINCLUDE

Return

char*, file name

JavaScript

rc = obj.GETCURRENTINCLUDE();

Description

Return the current file name.

R3JSCM_REGISTERMTHHANDLER

Method

REGISTERMTHHANDLER

Identifier

R3JSCM_REGISTERMTHHANDLER

Param 1:

R3INT, method

Param 3:

void*, (*handler)(JSContext *cx, JSObject *jso, R3INT mth, void *p1, void *p2, void *p3);

JavaScript

obj.REGISTERMTHHANDLER(p1, p3);

Description

Register method handler function for given Realsoft3D method. All * calls to this method are dispatched to given handler. *

R3JSCM_REGISTERWRAPPER

Method

REGISTERWRAPPER

Identifier

R3JSCM_REGISTERWRAPPER

Return

R3BOOL, NULL if failed

Param 1:

R3CLID, realsoft 3d class id

Param 2:

char*, javascript class name (constructor name)

Param 3:

char*, header file defining options for the class

JavaScript

rc = obj.REGISTERWRAPPER(p1, p2, p3);

Description

Register javascript wrapper class. Wrapper is defined by a constructor function * and a header file name defining the wrapper.

R3JSCM_REGISTERCALLBACKTYPE

Method

REGISTERCALLBACKTYPE

Identifier

R3JSCM_REGISTERCALLBACKTYPE

Param 1:

R3CLID, gadget class

JavaScript

obj.REGISTERCALLBACKTYPE(p1, 0);

Description

Some gadgets support procedural callback inteface via R3RA_Hook. This * method allows one to tell javascript type type of parameter these * gadgets pass in 'p3'.

R3JSCA_Include

Method

Include

Identifier

R3JSCA_Include

JavaScript

obj.Include();

Description