diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/skin/groupmgr.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Wasabi/api/skin/groupmgr.h')
-rw-r--r-- | Src/Wasabi/api/skin/groupmgr.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Src/Wasabi/api/skin/groupmgr.h b/Src/Wasabi/api/skin/groupmgr.h new file mode 100644 index 00000000..4e4457ca --- /dev/null +++ b/Src/Wasabi/api/skin/groupmgr.h @@ -0,0 +1,42 @@ +#ifndef __GROUPMGR_H +#define __GROUPMGR_H + +#include <bfc/ptrlist.h> +#include <bfc/string/bfcstring.h> +#include <api/skin/skinparse.h> +#include <bfc/critsec.h> + +class Group; +class CfgItem; + +class ifc_window; +class SkinItem; + +class CfgGroupEntry +{ + public: + CfgGroupEntry(const wchar_t *_id, int _type) : id(_id), type(_type) {} + ~CfgGroupEntry() {} + + StringW id; + int type; +}; + +class GroupMgr +{ + public: + static Group *instantiate(const wchar_t *groupid, int grouptype=GROUP_GROUP, SkinItem *specific_item=NULL, int scripts_enabled=1); +#ifdef WASABI_COMPILE_CONFIG + static Group *instantiate(const wchar_t *groupid, CfgItem *i, const wchar_t *name, int scripts_enabled); +#endif + static int destroy(Group *group); + static int hasGroup(Group *g) { return grouplist.haveItem(g); } + static int getNumGroups() { return grouplist.getNumItems(); } + static int exists(const wchar_t *groupid); + + private: + static PtrList<Group> grouplist; + static CriticalSection cs_grp; +}; + +#endif |