wacobj.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef _WACOBJ_H
  2. #define _WACOBJ_H
  3. #include <api/script/script.h>
  4. #include <api/script/scriptobj.h>
  5. #include <api/script/objects/guiobj.h>
  6. #include <bfc/ptrlist.h>
  7. #include <api/wac/wac.h>
  8. // {00C074A0-FEA2-49a0-BE8D-FABBDB161640}
  9. static const GUID wacGuid =
  10. { 0xc074a0, 0xfea2, 0x49a0, { 0xbe, 0x8d, 0xfa, 0xbb, 0xdb, 0x16, 0x16, 0x40 } };
  11. #define WACOBJECT_SCRIPTPARENT RootObjectInstance
  12. class WacScriptController : public ScriptObjectControllerI {
  13. public:
  14. virtual const wchar_t *getClassName();
  15. virtual const wchar_t *getAncestorClassName();
  16. virtual ScriptObjectController *getAncestorController();
  17. virtual int getNumFunctions();
  18. virtual const function_descriptor_struct *getExportedFunctions();
  19. virtual GUID getClassGuid();
  20. virtual ScriptObject *instantiate();
  21. virtual void destroy(ScriptObject *o);
  22. virtual int getInstantiable();
  23. virtual void *encapsulate(ScriptObject *o);
  24. virtual void deencapsulate(void *o);
  25. private:
  26. static function_descriptor_struct exportedFunction[];
  27. };
  28. extern WacScriptController *wacController;
  29. #include <api/wnd/virtualwnd.h>
  30. class WACObject : public WACOBJECT_SCRIPTPARENT {
  31. public:
  32. WACObject();
  33. virtual ~WACObject();
  34. void setGUID(GUID g);
  35. GUID getGUID(void);
  36. int onScriptNotify(const wchar_t *s, int i1, int i2);
  37. // VCPU
  38. static scriptVar script_getGUID(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  39. static scriptVar script_getName(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  40. static scriptVar script_vcpu_onNotify(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar str, scriptVar i1, scriptVar i2);
  41. static scriptVar script_vcpu_dummy4(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a, scriptVar b, scriptVar c, scriptVar d);
  42. static scriptVar script_vcpu_dummy1(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar a);
  43. static scriptVar script_vcpu_dummy0(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  44. // End VCPU
  45. static int notifyScripts(WaComponent *comp, const wchar_t *s, int i1, int i2);
  46. GUID myGUID;
  47. private:
  48. static PtrList<WACObject> wacobjs;
  49. public:
  50. };
  51. #endif