skinapi.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef __SKINAPI_H
  2. #define __SKINAPI_H
  3. #include <api/skin/api_skin.h>
  4. #include <bfc/string/StringW.h>
  5. #include <api/skin/widgets.h>
  6. #include <api/xml/xmlparams.h>
  7. class SkinApi : public api_skinI
  8. {
  9. public:
  10. SkinApi();
  11. virtual ~SkinApi();
  12. virtual void preShutdown();
  13. virtual ARGB32 skin_getColorElement(const wchar_t *type, const wchar_t **color_group = NULL);
  14. virtual const ARGB32 *skin_getColorElementRef(const wchar_t *type, const wchar_t **color_group = NULL);
  15. virtual const int *skin_getIterator();
  16. virtual void skin_switchSkin(const wchar_t *skin_name, const wchar_t *skin_path);
  17. virtual void skin_unloadSkin();
  18. virtual const wchar_t *getSkinName();
  19. virtual const wchar_t *getSkinPath();
  20. virtual const wchar_t *getSkinsPath();
  21. virtual const wchar_t *getDefaultSkinPath();
  22. virtual ARGB32 *imgldr_requestSkinBitmap(const wchar_t *file, int *has_alpha, int *x, int *y, int *subw, int *subh, int *w, int *h, int cached);
  23. virtual void imgldr_releaseSkinBitmap(ARGB32 *bmpbits);
  24. virtual ARGB32 filterSkinColor(ARGB32 color, const wchar_t *elementid, const wchar_t *groupname);
  25. virtual void reapplySkinFilters();
  26. virtual int colortheme_getNumColorSets();
  27. virtual const wchar_t *colortheme_enumColorSet(int n);
  28. virtual int colortheme_getNumColorGroups(const wchar_t *colorset);
  29. virtual const wchar_t *colortheme_enumColorGroupName(const wchar_t *colorset, int n);
  30. virtual ColorThemeGroup *colortheme_enumColorGroup(int colorset, int n);
  31. virtual ColorThemeGroup *colortheme_getColorGroup(const wchar_t *colorset, const wchar_t *group);
  32. virtual void colortheme_setColorSet(const wchar_t *colorset);
  33. virtual const wchar_t *colortheme_getColorSet();
  34. virtual void colortheme_newColorSet(const wchar_t *set);
  35. virtual void colortheme_updateColorSet(const wchar_t *set);
  36. virtual void colortheme_renameColorSet(const wchar_t *set, const wchar_t *newname);
  37. virtual void colortheme_deleteColorSet(const wchar_t *set);
  38. virtual int loadSkinFile(const wchar_t *xmlfile);
  39. virtual int loadGroupDefData(const wchar_t *groupdef, SkinItem **lastgroupitem);
  40. virtual void unloadSkinPart(int skinpartid);
  41. virtual ifc_window *group_create(const wchar_t *groupid, int scripts_enabled=1);
  42. virtual int group_exists(const wchar_t *groupid);
  43. #ifdef WASABI_COMPILE_CONFIG
  44. virtual ifc_window *group_create_cfg(const wchar_t *groupid, CfgItem *cfgitem, const wchar_t *attributename, int scripts_enabled=1);
  45. #endif // WASABI_COMPILE_CONFIG
  46. #ifdef WASABI_COMPILE_WNDMGR
  47. virtual ifc_window *group_create_layout(const wchar_t *groupid, int scripts_enabled=1);
  48. #endif //WASABI_COMPILE_WNDMGR
  49. virtual int group_destroy(ifc_window *group);
  50. virtual int parse(const wchar_t *str, const wchar_t *how);
  51. virtual GuiObject *xui_new(const wchar_t *classname);
  52. virtual void xui_delete(GuiObject *o);
  53. virtual OSCURSOR cursor_request(const wchar_t *id);
  54. virtual int getNumGroupDefs();
  55. virtual SkinItem *enumGroupDef(int n);
  56. virtual ifc_window *group_createBySkinItem(SkinItem *item, int scripts_enabled=1);
  57. virtual SkinItem *getGroupDefAncestor(SkinItem *item);
  58. virtual int groupdef_getNumObjects(SkinItem *item);
  59. virtual SkinItem *groupdef_enumObject(SkinItem *groupitem, int n);
  60. virtual void skin_setLockUI(int l) { if (l) lockui++; else if (lockui) lockui--; }
  61. virtual int skin_getLockUI() { return lockui; }
  62. virtual double skin_getVersion();
  63. #ifdef WASABI_COMPILE_IMGLDR
  64. virtual ARGB32 skin_getBitmapColor(const wchar_t *id);
  65. #endif
  66. bool skin_isLoaded();
  67. private:
  68. StringW skinspath;
  69. int lockui;
  70. };
  71. #endif