1
0

application.mi 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //----------------------------------------------------------------------------------------------------------------
  2. // application.mi
  3. //
  4. // reflects the api_application object into Maki
  5. // some of the functions may not make a lot of sense in the context of skin scripting
  6. // they are here for completeness
  7. // some of these functions duplicate functionality provided in the system object
  8. //----------------------------------------------------------------------------------------------------------------
  9. #ifndef __APPLICATION_MI
  10. #define __APPLICATION_MI
  11. extern class @{B8E867B0-2715-4da7-A5BA-53DBA1FCFEAC}@ Object _predecl Application;
  12. //*****************************************************************************
  13. // APPLICATION CLASS
  14. //*****************************************************************************
  15. /**
  16. Application Class.
  17. @short Application Object
  18. @author benski
  19. @ver 1.0
  20. */
  21. // static functions
  22. extern String Application.GetApplicationName();
  23. extern String Application.GetVersionString();
  24. extern String Application.GetVersionNumberString();
  25. extern int Application.GetBuildNumber();
  26. /**
  27. A unique ID that represents what GUID this application is
  28. Winamp 5 is {4BE592C7-6937-426a-A388-ACF0EBC88E93}
  29. other Wasabi-based applications (e.g. ClipX, Winamp3, wasabi.player) will have a different GUID
  30. however, this maki class only currently resides in Winamp5, so it's a bit irrevelant :)
  31. */
  32. extern String Application.GetGUID();
  33. /**
  34. The commandline that Winamp was called with
  35. */
  36. extern String Application.GetCommandLine();
  37. /**
  38. Shuts Winamp down.
  39. */
  40. extern Application.Shutdown();
  41. /**
  42. cancels an shutdown in progress
  43. see note for IsShuttingDown about the futility of this maki script function
  44. */
  45. extern Application.CancelShutdown ();
  46. /**
  47. tests if we're in the middle of shutting down winamp.
  48. This is part of the application API in Wasabi, so it's reflected here
  49. but it might not be of much use to your script,
  50. since you'll likely be unloaded before this function
  51. ever gets a chance to return true
  52. */
  53. extern boolean Application.IsShuttingDown();
  54. /**
  55. Path where winamp.exe (or studio.exe) lives
  56. */
  57. extern String Application.GetApplicationPath();
  58. /**
  59. Path where Winamp stores it's settings (studio.xnf, winamp.ini, etc)
  60. */
  61. extern String Application.GetSettingsPath();
  62. /**
  63. Gets the current working path. This is the same path that will open by default
  64. in Winamp's "Open File" dialog.
  65. Working path persists across Winamp launches
  66. */
  67. extern String Application.GetWorkingPath();
  68. /**
  69. Sets a new working path.
  70. */
  71. extern Application.SetWorkingPath(String working_path);
  72. #endif