groupmgr.h 1005 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __GROUPMGR_H
  2. #define __GROUPMGR_H
  3. #include <bfc/ptrlist.h>
  4. #include <bfc/string/bfcstring.h>
  5. #include <api/skin/skinparse.h>
  6. #include <bfc/critsec.h>
  7. class Group;
  8. class CfgItem;
  9. class ifc_window;
  10. class SkinItem;
  11. class CfgGroupEntry
  12. {
  13. public:
  14. CfgGroupEntry(const wchar_t *_id, int _type) : id(_id), type(_type) {}
  15. ~CfgGroupEntry() {}
  16. StringW id;
  17. int type;
  18. };
  19. class GroupMgr
  20. {
  21. public:
  22. static Group *instantiate(const wchar_t *groupid, int grouptype=GROUP_GROUP, SkinItem *specific_item=NULL, int scripts_enabled=1);
  23. #ifdef WASABI_COMPILE_CONFIG
  24. static Group *instantiate(const wchar_t *groupid, CfgItem *i, const wchar_t *name, int scripts_enabled);
  25. #endif
  26. static int destroy(Group *group);
  27. static int hasGroup(Group *g) { return grouplist.haveItem(g); }
  28. static int getNumGroups() { return grouplist.getNumItems(); }
  29. static int exists(const wchar_t *groupid);
  30. private:
  31. static PtrList<Group> grouplist;
  32. static CriticalSection cs_grp;
  33. };
  34. #endif