1
0

api_makii.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #ifndef _API_MAKII_H
  2. #define _API_MAKII_H
  3. /*[interface.header.h]
  4. #include "common/script/scriptvar.h"
  5. #include "common/script/vcputypes.h"
  6. #include "common/script/objcontroller.h"
  7. */
  8. #include "api_maki.h"
  9. #include "api_makix.h"
  10. class ScriptObject;
  11. class ScriptObjectController;
  12. class api_makiI : public api_makiX {
  13. public:
  14. api_makiI();
  15. virtual ~api_makiI();
  16. DISPATCH(10) virtual void maki_pushObject(void *o);
  17. DISPATCH(20) virtual void maki_pushInt(int i);
  18. DISPATCH(30) virtual void maki_pushBoolean(int b);
  19. DISPATCH(40) virtual void maki_pushFloat(float f);
  20. DISPATCH(50) virtual void maki_pushDouble(double d);
  21. DISPATCH(60) virtual void maki_pushString(const wchar_t *s);
  22. DISPATCH(70) virtual void maki_pushVoid();
  23. DISPATCH(80) virtual void maki_pushAny(scriptVar v);
  24. DISPATCH(90) virtual void *maki_popObject();
  25. DISPATCH(100) virtual int maki_popInt();
  26. DISPATCH(110) virtual bool maki_popBoolean();
  27. DISPATCH(120) virtual float maki_popFloat();
  28. DISPATCH(130) virtual double maki_popDouble();
  29. DISPATCH(140) virtual const wchar_t *maki_popString();
  30. DISPATCH(150) virtual scriptVar maki_popAny();
  31. DISPATCH(160) virtual void maki_popDiscard();
  32. DISPATCH(170) virtual const wchar_t *maki_getFunction(int dlfid, int *nparams, ScriptObjectController **p);
  33. DISPATCH(180) virtual int maki_addDlfRef(ScriptObjectController *o, const wchar_t *function_name, void *host);
  34. DISPATCH(190) virtual void maki_addDlfClassRef(ScriptObjectController *o, void *host);
  35. DISPATCH(200) virtual void maki_remDlfRef(void *host);
  36. DISPATCH(210) virtual scriptVar maki_callFunction(ScriptObject *o, int dlfid, scriptVar **params);
  37. DISPATCH(220) virtual scriptVar maki_triggerEvent(ScriptObject *o, int dlfid, int np, int scriptid = -1);
  38. DISPATCH(230) virtual int maki_getScriptInt(scriptVar v);
  39. DISPATCH(240) virtual bool maki_getScriptBoolean(scriptVar v);
  40. DISPATCH(250) virtual float maki_getScriptFloat(scriptVar v);
  41. DISPATCH(260) virtual double maki_getScriptDouble(scriptVar v);
  42. DISPATCH(270) virtual const wchar_t *maki_getScriptString(scriptVar v);
  43. DISPATCH(280) virtual ScriptObject *maki_getScriptObject(scriptVar v);
  44. DISPATCH(290) virtual scriptVar maki_updateDlf(maki_cmd *cmd, int *dlfid, int *linkcount);
  45. DISPATCH(300) virtual ScriptObject *maki_instantiate(GUID classguid);
  46. DISPATCH(310) virtual void maki_destroy(ScriptObject *o);
  47. DISPATCH(320) virtual void *maki_encapsulate(GUID classguid, ScriptObject *o);
  48. DISPATCH(330) virtual void maki_deencapsulate(GUID classguid, void *o);
  49. DISPATCH(340) virtual ScriptObjectController *maki_getController(GUID scriptclass);
  50. DISPATCH(350) virtual int maki_createOrphan(int type);
  51. DISPATCH(360) virtual void maki_killOrphan(int id);
  52. DISPATCH(370) virtual void maki_setObjectAtom(const wchar_t *atomname, ScriptObject *object);
  53. DISPATCH(380) virtual ScriptObject *maki_getObjectAtom(const wchar_t *atomname);
  54. /*[interface.maki_findObject.cpp]#ifdef WASABI_COMPILE_WND*/
  55. /*[interface.maki_findObject.h]#ifdef WASABI_COMPILE_WND*/
  56. /*[dispatchable.maki_findObject.enum]#ifdef WASABI_COMPILE_WND*/
  57. /*[dispatchable.maki_findObject.bridge]#ifdef WASABI_COMPILE_WND*/
  58. #ifdef WASABI_COMPILE_WND
  59. DISPATCH(390) virtual ScriptObject *maki_findObject(const wchar_t *name);
  60. #endif
  61. /*[interface.vcpu_addScriptObject.cpp]#endif*/
  62. /*[interface.vcpu_addScriptObject.h]#endif*/
  63. /*[dispatchable.vcpu_addScriptObject.enum]#endif*/
  64. /*[dispatchable.vcpu_addScriptObject.bridge]#endif*/
  65. DISPATCH(400) virtual void vcpu_addScriptObject(ScriptObject *o);
  66. DISPATCH(410) virtual void vcpu_removeScriptObject(ScriptObject *o);
  67. DISPATCH(420) virtual int vcpu_getCacheCount();
  68. DISPATCH(430) virtual int vcpu_isValidScriptId(int id);
  69. DISPATCH(440) virtual int vcpu_mapVarId(int varid, int scriptid);
  70. DISPATCH(450) virtual int vcpu_getUserAncestorId(int varid, int scriptid);
  71. DISPATCH(460) virtual int vcpu_getNumEvents();
  72. DISPATCH(470) virtual int vcpu_getEvent(int event, int *dlf, int *script, int *var);
  73. DISPATCH(480) virtual int vcpu_getComplete();
  74. DISPATCH(481) virtual void vcpu_setComplete();
  75. DISPATCH(482) virtual void vcpu_resetComplete();
  76. DISPATCH(490) virtual const wchar_t *vcpu_getClassName(int vcpuid, int localclassid);
  77. NODISPATCH void init();
  78. };
  79. /*[interface.footer.h]
  80. // {F2398F09-63B0-4442-86C9-F8BC473F6DA7}
  81. static const GUID makiApiServiceGuid =
  82. { 0xf2398f09, 0x63b0, 0x4442, { 0x86, 0xc9, 0xf8, 0xbc, 0x47, 0x3f, 0x6d, 0xa7 } };
  83. extern api_maki *makiApi;
  84. */
  85. #endif