1
0

compon.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //PORTABLE
  2. #ifndef _COMPON_H
  3. #define _COMPON_H
  4. #include <bfc/wasabi_std.h>
  5. #include <bfc/string/bfcstring.h>
  6. #include <bfc/ptrlist.h>
  7. class ifc_canvas;
  8. class CfgItem; // see cfgitem.h
  9. class CompWnd;
  10. class ComponentObject;
  11. class Container;
  12. class WaComponent;
  13. class ComponPostEntry;
  14. class ComponentManager {
  15. public:
  16. static void addStaticComponent(WaComponent *component);
  17. static void addPreloadComponent(const wchar_t *filename);
  18. static void loadPreloads();
  19. static void loadAll(const wchar_t *path);
  20. static void postLoad(int f=TRUE);
  21. static void unloadAll();
  22. static int checkGUID(GUID &g, int invalid_ok=FALSE); // boolean of if we should load it
  23. static WaComponent *enumComponent(int component);
  24. static void broadcastNotify(int cmd, int param1=0, int param2=0);
  25. static void sendNotify(GUID guid, int cmd, int param1=0, int param2=0);
  26. static int sendCommand(GUID guid, const wchar_t *command, int p1=0, int p2=0, void *ptr=NULL, int ptrlen=0);
  27. static int postCommand(GUID guid, const wchar_t *command, int p1, int p2, void *ptr, int ptrlen, int waitforanswer);
  28. static void broadcastCommand(const wchar_t *command, int p1=0, int p2=0, void *ptr=NULL, int ptrlen=0);
  29. static int getNumComponents();
  30. static GUID getComponentGUID(int c);
  31. static const wchar_t *getComponentName(GUID g);
  32. static CfgItem *getCfgInterface(GUID g);
  33. static WaComponent *getComponentFromGuid(GUID g);
  34. static void load(const wchar_t *filename);
  35. static const wchar_t *getComponentPath(GUID g);
  36. static void startupDBs();
  37. static void shutdownDBs();
  38. static void mainThread_handlePostCommands();
  39. static PtrList<ComponPostEntry> componPostEntries;
  40. };
  41. #endif