winamp/Src/Wasabi/api/script/scriptobj.h

140 lines
4.8 KiB
C++

// ----------------------------------------------------------------------------
// Generated by InterfaceFactory [Thu May 15 21:09:17 2003]
//
// File : scriptobj.h
// Class : ScriptObject
// class layer : Dispatchable Interface
// ----------------------------------------------------------------------------
#ifndef __SCRIPTOBJECT_H
#define __SCRIPTOBJECT_H
#include <bfc/dispatch.h>
#include <bfc/common.h>
class ScriptHook;
class ScriptObject;
class ScriptObjectController;
enum {
INTERFACE_GENERICVOIDPTR=0,
INTERFACE_SCRIPTOBJECT,
};
// ----------------------------------------------------------------------------
class ScriptObject: public Dispatchable {
protected:
ScriptObject() {}
~ScriptObject() {}
public:
void *vcpu_getInterface(GUID g, int *interfacetype = NULL);
void *vcpu_getInterfaceObject(GUID g, ScriptObject **o);
int vcpu_getAssignedVariable(int start, int scriptid, int functionId, int *next, int *globalevententry, int *inheritedevent);
void vcpu_removeAssignedVariable(int var, int id);
void vcpu_addAssignedVariable(int var, int scriptid);
const wchar_t *vcpu_getClassName();
ScriptObjectController *vcpu_getController();
int vcpu_getScriptId();
void vcpu_setScriptId(int i);
int vcpu_getMember(const wchar_t *id, int scriptid, int rettype);
void vcpu_delMembers(int scriptid);
void vcpu_setInterface(GUID g, void *v, int interfacetype = INTERFACE_SCRIPTOBJECT);
void vcpu_setClassName(const wchar_t *name);
void vcpu_setController(ScriptObjectController *c);
void vcpu_init();
protected:
enum {
SCRIPTOBJECT_VCPU_GETINTERFACE = 50,
SCRIPTOBJECT_VCPU_GETINTERFACEOBJECT = 60,
SCRIPTOBJECT_VCPU_GETASSIGNEDVARIABLE = 100,
SCRIPTOBJECT_VCPU_REMOVEASSIGNEDVARIABLE = 200,
SCRIPTOBJECT_VCPU_ADDASSIGNEDVARIABLE = 300,
SCRIPTOBJECT_VCPU_GETCLASSNAME = 400,
SCRIPTOBJECT_VCPU_GETCONTROLLER = 500,
SCRIPTOBJECT_VCPU_ADDCLASSHOOK = 600,
SCRIPTOBJECT_VCPU_ADDOBJECTHOOK = 700,
SCRIPTOBJECT_VCPU_GETSCRIPTID = 800,
SCRIPTOBJECT_VCPU_SETSCRIPTID = 900,
SCRIPTOBJECT_VCPU_GETMEMBER = 1000,
SCRIPTOBJECT_VCPU_DELMEMBERS = 1100,
SCRIPTOBJECT_VCPU_SETINTERFACE = 1200,
SCRIPTOBJECT_VCPU_SETCLASSNAME = 1300,
SCRIPTOBJECT_VCPU_SETCONTROLLER = 1400,
SCRIPTOBJECT_VCPU_INIT = 1500,
};
};
// ----------------------------------------------------------------------------
inline void *ScriptObject::vcpu_getInterface(GUID g, int *interfacetype) {
void *__retval = _call(SCRIPTOBJECT_VCPU_GETINTERFACE, (void *)NULL, g, interfacetype);
return __retval;
}
inline void *ScriptObject::vcpu_getInterfaceObject(GUID g, ScriptObject **o) {
void *__retval = _call(SCRIPTOBJECT_VCPU_GETINTERFACEOBJECT, (void *)NULL, g, o);
return __retval;
}
inline int ScriptObject::vcpu_getAssignedVariable(int start, int scriptid, int functionId, int *next, int *globalevententry, int *inheritedevent) {
int __retval = _call(SCRIPTOBJECT_VCPU_GETASSIGNEDVARIABLE, (int)0, start, scriptid, functionId, next, globalevententry, inheritedevent);
return __retval;
}
inline void ScriptObject::vcpu_removeAssignedVariable(int var, int id) {
_voidcall(SCRIPTOBJECT_VCPU_REMOVEASSIGNEDVARIABLE, var, id);
}
inline void ScriptObject::vcpu_addAssignedVariable(int var, int scriptid) {
_voidcall(SCRIPTOBJECT_VCPU_ADDASSIGNEDVARIABLE, var, scriptid);
}
inline const wchar_t *ScriptObject::vcpu_getClassName() {
return _call(SCRIPTOBJECT_VCPU_GETCLASSNAME, (const wchar_t *)0);
}
inline ScriptObjectController *ScriptObject::vcpu_getController() {
ScriptObjectController *__retval = _call(SCRIPTOBJECT_VCPU_GETCONTROLLER, (ScriptObjectController *)NULL);
return __retval;
}
inline int ScriptObject::vcpu_getScriptId() {
int __retval = _call(SCRIPTOBJECT_VCPU_GETSCRIPTID, (int)0);
return __retval;
}
inline void ScriptObject::vcpu_setScriptId(int i) {
_voidcall(SCRIPTOBJECT_VCPU_SETSCRIPTID, i);
}
inline int ScriptObject::vcpu_getMember(const wchar_t *id, int scriptid, int rettype) {
int __retval = _call(SCRIPTOBJECT_VCPU_GETMEMBER, (int)0, id, scriptid, rettype);
return __retval;
}
inline void ScriptObject::vcpu_delMembers(int scriptid) {
_voidcall(SCRIPTOBJECT_VCPU_DELMEMBERS, scriptid);
}
inline void ScriptObject::vcpu_setInterface(GUID g, void *v, int interfacetype) {
_voidcall(SCRIPTOBJECT_VCPU_SETINTERFACE, g, v, interfacetype);
}
inline void ScriptObject::vcpu_setClassName(const wchar_t *name) {
_voidcall(SCRIPTOBJECT_VCPU_SETCLASSNAME, name);
}
inline void ScriptObject::vcpu_setController(ScriptObjectController *c) {
_voidcall(SCRIPTOBJECT_VCPU_SETCONTROLLER, c);
}
inline void ScriptObject::vcpu_init() {
_voidcall(SCRIPTOBJECT_VCPU_INIT);
}
// ----------------------------------------------------------------------------
#endif // __SCRIPTOBJECT_H