menuactions.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #ifndef _MENUACTIONS_H
  2. #define _MENUACTIONS_H
  3. #include <api/service/svcs/svc_action.h>
  4. extern int ffoptionstop;
  5. extern int ffwoptionstop;
  6. extern int in_menu;
  7. class MenuActions : public svc_actionI {
  8. public :
  9. MenuActions();
  10. virtual ~MenuActions();
  11. static const char *getServiceName() { return "Menu Actions"; }
  12. virtual int onActionId(int pvtid, const wchar_t *action, const wchar_t *param=NULL, int p1=0, int p2=0, void *data=NULL, int datalen=0, ifc_window *source=NULL);
  13. static void installSkinOptions(HMENU menu=NULL);
  14. static void removeSkinOptions();
  15. static int toggleOption(int n, GUID g=INVALID_GUID, int *cmdoffset=NULL);
  16. static void installSkinWindowOptions();
  17. static void removeSkinWindowOptions();
  18. static int toggleWindowOption(int n, GUID g=INVALID_GUID, int *cmdoffset=NULL);
  19. static HMENU makeSkinOptionsSubMenu(GUID g, int *cmdoffset);
  20. static const wchar_t* localizeSkinWindowName(const wchar_t*);
  21. enum {
  22. _ACTION_MENU = 0,
  23. _ACTION_SYSMENU,
  24. _ACTION_CONTROLMENU,
  25. ACTION_WA5FILEMENU,
  26. ACTION_WA5PLAYMENU,
  27. ACTION_WA5OPTIONSMENU,
  28. ACTION_WA5WINDOWSMENU,
  29. ACTION_WA5HELPMENU,
  30. ACTION_WA5PEFILEMENU,
  31. ACTION_WA5PEPLAYLISTMENU,
  32. ACTION_WA5PESORTMENU,
  33. ACTION_WA5PEHELPMENU,
  34. ACTION_WA5MLFILEMENU,
  35. ACTION_WA5MLVIEWMENU,
  36. ACTION_WA5MLHELPMENU,
  37. ACTION_PEADD,
  38. ACTION_PEREM,
  39. ACTION_PESEL,
  40. ACTION_PEMISC,
  41. ACTION_PELIST,
  42. ACTION_PELISTOFLISTS,
  43. ACTION_VIDFS,
  44. ACTION_VID1X,
  45. ACTION_VID2X,
  46. ACTION_VIDTV,
  47. ACTION_VIDMISC,
  48. ACTION_VISNEXT,
  49. ACTION_VISPREV,
  50. ACTION_VISRANDOM,
  51. ACTION_VISFS,
  52. ACTION_VISCFG,
  53. ACTION_VISMENU,
  54. ACTION_TRACKINFO,
  55. ACTION_TRACKMENU,
  56. ACTION_SENDTO,
  57. };
  58. };
  59. class ColorThemeSlot
  60. {
  61. public:
  62. ColorThemeSlot(const wchar_t *_name, int _entry) : name(_name), entry(_entry) {}
  63. virtual ~ColorThemeSlot() {}
  64. StringW name;
  65. int entry;
  66. };
  67. class ColorThemeSlotSort {
  68. public:
  69. // comparator for sorting
  70. static int compareItem(ColorThemeSlot *p1, ColorThemeSlot *p2) {
  71. return wcscmp(p1->name, p2->name);
  72. }
  73. // comparator for searching
  74. static int compareAttrib(const wchar_t *attrib, ColorThemeSlot *item) {
  75. return wcscmp(attrib, item->name);
  76. }
  77. };
  78. #endif