aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Wasabi/Lib')
-rw-r--r--Src/Wasabi/Lib/application.mi88
-rw-r--r--Src/Wasabi/Lib/colormgr.mi119
-rw-r--r--Src/Wasabi/Lib/com/AutoRepeatButton.m100
-rw-r--r--Src/Wasabi/Lib/com/centerlayer.m84
-rw-r--r--Src/Wasabi/Lib/com/customseek.m118
-rw-r--r--Src/Wasabi/Lib/com/debug.m52
-rw-r--r--Src/Wasabi/Lib/com/dispatch_ifc.m99
-rw-r--r--Src/Wasabi/Lib/com/dragvolume.m67
-rw-r--r--Src/Wasabi/Lib/com/fillbar.m173
-rw-r--r--Src/Wasabi/Lib/com/glow.m111
-rw-r--r--Src/Wasabi/Lib/com/glowobject.m176
-rw-r--r--Src/Wasabi/Lib/com/rotationlayer.m108
-rw-r--r--Src/Wasabi/Lib/com/songinfo.m104
-rw-r--r--Src/Wasabi/Lib/config.mi29
-rw-r--r--Src/Wasabi/Lib/core.mi81
-rw-r--r--Src/Wasabi/Lib/exd.mi118
-rw-r--r--Src/Wasabi/Lib/fileio.mi130
-rw-r--r--Src/Wasabi/Lib/pldir.mi96
-rw-r--r--Src/Wasabi/Lib/private.mi26
-rw-r--r--Src/Wasabi/Lib/std.mi2778
-rw-r--r--Src/Wasabi/Lib/winampconfig.mi73
21 files changed, 4730 insertions, 0 deletions
diff --git a/Src/Wasabi/Lib/application.mi b/Src/Wasabi/Lib/application.mi
new file mode 100644
index 00000000..19a9346b
--- /dev/null
+++ b/Src/Wasabi/Lib/application.mi
@@ -0,0 +1,88 @@
+//----------------------------------------------------------------------------------------------------------------
+// application.mi
+//
+// reflects the api_application object into Maki
+// some of the functions may not make a lot of sense in the context of skin scripting
+// they are here for completeness
+// some of these functions duplicate functionality provided in the system object
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __APPLICATION_MI
+#define __APPLICATION_MI
+
+extern class @{B8E867B0-2715-4da7-A5BA-53DBA1FCFEAC}@ Object _predecl Application;
+
+//*****************************************************************************
+// APPLICATION CLASS
+//*****************************************************************************
+/**
+ Application Class.
+
+ @short Application Object
+ @author benski
+ @ver 1.0
+*/
+
+// static functions
+extern String Application.GetApplicationName();
+extern String Application.GetVersionString();
+extern String Application.GetVersionNumberString();
+extern int Application.GetBuildNumber();
+
+/**
+ A unique ID that represents what GUID this application is
+ Winamp 5 is {4BE592C7-6937-426a-A388-ACF0EBC88E93}
+ other Wasabi-based applications (e.g. ClipX, Winamp3, wasabi.player) will have a different GUID
+ however, this maki class only currently resides in Winamp5, so it's a bit irrevelant :)
+*/
+extern String Application.GetGUID();
+
+/**
+ The commandline that Winamp was called with
+*/
+extern String Application.GetCommandLine();
+
+/**
+ Shuts Winamp down.
+*/
+extern Application.Shutdown();
+
+/**
+ cancels an shutdown in progress
+ see note for IsShuttingDown about the futility of this maki script function
+*/
+extern Application.CancelShutdown ();
+
+/**
+ tests if we're in the middle of shutting down winamp.
+ This is part of the application API in Wasabi, so it's reflected here
+ but it might not be of much use to your script,
+ since you'll likely be unloaded before this function
+ ever gets a chance to return true
+*/
+extern boolean Application.IsShuttingDown();
+
+/**
+ Path where winamp.exe (or studio.exe) lives
+*/
+extern String Application.GetApplicationPath();
+
+/**
+ Path where Winamp stores it's settings (studio.xnf, winamp.ini, etc)
+*/
+extern String Application.GetSettingsPath();
+
+/**
+ Gets the current working path. This is the same path that will open by default
+ in Winamp's "Open File" dialog.
+ Working path persists across Winamp launches
+*/
+
+extern String Application.GetWorkingPath();
+
+/**
+ Sets a new working path.
+*/
+extern Application.SetWorkingPath(String working_path);
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/colormgr.mi b/Src/Wasabi/Lib/colormgr.mi
new file mode 100644
index 00000000..470a95c6
--- /dev/null
+++ b/Src/Wasabi/Lib/colormgr.mi
@@ -0,0 +1,119 @@
+//----------------------------------------------------------------------------------------------------------------
+// fileio.mi
+//
+// standard handles for file input and output (only xml parsing atm)
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __COLORMGR_MI
+#define __COLORMGR_MI
+
+extern class @{AEE235FF-EBD1-498f-96AF-D7E0DAD4541A}@ System _predecl &ColorMgr;
+extern class @{95DDB221-00E3-4e2b-8EA5-833548C13C10}@ Object &Color;
+extern class @{0D024DB9-9574-42d0-B8C7-26B553F1F987}@ Object &GammaSet;
+extern class @{B81F004D-ACBA-453d-A06B-30192A1DA17D}@ Object &GammaGroup;
+
+//*****************************************************************************
+// ColorMgr CLASS
+//*****************************************************************************
+/**
+ ColorMgr Class.
+
+ @short Static Object for handling colors
+ @author Nullsoft Inc.
+ @ver 1.0
+
+*/
+
+extern Color ColorMgr.getColor (String colorID);
+extern Color ColorMgr.enumColor (int n);
+extern int ColorMgr.getNumColors();
+
+extern GammaSet ColorMgr.getGammaSet (String colorID);
+extern GammaSet ColorMgr.enumGammaSet (int n);
+extern GammaSet ColorMgr.getCurrentGammaSet (); // available after ColorMgr.onLoaded() was called
+extern GammaSet ColorMgr.newGammaSet(String name);
+extern int ColorMgr.getNumGammaSets ();
+
+// for the next callbacks u need to instanciate a ColorMgr object.
+extern ColorMgr.onBeforeLoadingElements(); // stuff is loading, might not work hehe
+extern ColorMgr.onGuiLoaded(); // skin gui objects loaded from xml
+extern ColorMgr.onLoaded(); // all done, new skin in place
+
+extern ColorMgr.onColorThemesListChanged();
+extern ColorMgr.onColorThemeChanged(String newtheme);
+
+
+//*****************************************************************************
+// Color CLASS
+//*****************************************************************************
+/**
+ Color Class.
+
+ @short Object for handling colors
+ @author Nullsoft Inc.
+ @ver 1.0
+
+*/
+
+extern String Color.getID ();
+extern int Color.getRed ();
+extern int Color.getGreen ();
+extern int Color.getBlue ();
+extern int Color.getRedWithGamma ();
+extern int Color.getGreenWithGamma ();
+extern int Color.getBlueWithGamma ();
+extern int Color.getAlpha ();
+extern String Color.getGammagroup ();
+
+
+//*****************************************************************************
+// GammaSet CLASS
+//*****************************************************************************
+/**
+ GammaSet Class.
+
+ @short Object for handling gamma sets
+ @author Nullsoft Inc.
+ @ver 1.0
+
+*/
+
+extern String GammaSet.getID();
+extern GammaSet.apply();
+extern GammaSet.remove(); // u should still delete the object then
+extern GammaSet.rename(String newname);
+extern GammaSet.update(); // Syncs missing groups
+extern GammaGroup Gammaset.getGeneralGroup();
+extern int Gammaset.getNumGammaGroups();
+extern GammaGroup Gammaset.enumGammaGroup(int n);
+extern GammaGroup Gammaset.getGammaGroup(String name);
+
+
+
+//*****************************************************************************
+// GammaGroup CLASS
+//*****************************************************************************
+/**
+ GammaGroup Class.
+
+ @short Object for handling gamma groups
+ @author Nullsoft Inc.
+ @ver 1.0
+
+*/
+
+extern String Gammagroup.getID ();
+extern int Gammagroup.getRed ();
+extern int Gammagroup.getGreen ();
+extern int Gammagroup.getBlue ();
+extern int Gammagroup.getBoost ();
+extern int Gammagroup.getGray ();
+
+extern Gammagroup.setID (String id);
+extern Gammagroup.setRed (int _color);
+extern Gammagroup.setGreen (int _color);
+extern Gammagroup.setBlue (int _color);
+extern Gammagroup.setBoost (int _color);
+extern Gammagroup.setGray (int _color);
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/com/AutoRepeatButton.m b/Src/Wasabi/Lib/com/AutoRepeatButton.m
new file mode 100644
index 00000000..155ca387
--- /dev/null
+++ b/Src/Wasabi/Lib/com/AutoRepeatButton.m
@@ -0,0 +1,100 @@
+//--------------------------------------------------------------------------------------------------
+// AutoRepeatButton.m Orginal Code By Will Fisher, Concept By Eric Moore, Rewritten By Will Fisher
+//
+// Use like this:
+// #include </lib/AutoRepeatButton.m>
+// Global AutoRepeatButton MyButton, MyOtherButton;
+//
+// Fill in the buttons function into MyButton.OnLeftClick() as normal.
+//
+// Use AutoRepeat_ClickType to find the type of call to MyButton.onLeftClick() where
+// AutoRepeat_ClickType==1 is the first call to onLeftClick
+// AutoRepeat_ClickType==2 is a subsequent call to onLeftClick
+// AutoRepeat_ClickType==0 is an erronious call to onLeftClick, you should usually ignore
+// MyButton.onLeftClick() in this case
+// See other functions below:
+//--------------------------------------------------------------------------------------------------
+
+Function AutoRepeat_Load(); // ALWAYS call this in System.OnScriptLoaded()
+Function AutoRepeat_Unload(); // ALWAYS call this in System.OnScriptUnloading()
+Function AutoRepeat_Stop(); // stop the current button from autorepeating
+
+Function Button AutoRepeat_GetCurrentButton(); /* returns the currently autorepeating button,
+ returns NULL if no button is autorepeating */
+
+Function AutoRepeat_SetInitalDelay(int millis); /* set this for the first delay when the button is
+ pressed, defaults to 800ms (no need to use this
+ unless other delay is required) */
+
+Function AutoRepeat_SetRepeatDelay(int millis); /* set this for the subsequent delay, defaults to
+ 80ms (no need to use this unless other delay is
+ required) */
+
+Function Int AutoRepeat_GetInitalDelay(); // get the first delay length in millisecs
+Function Int AutoRepeat_GetRepeatDelay(); // get the subsequent delay in millisecs
+
+Class Button AutoRepeatButton;
+
+Global Timer _autorepeatTimer;
+Global Int _InitialDelay;
+Global Int _RepeatDelay;
+Global Int AutoRepeat_ClickType;
+Global Button _Latched;
+
+AutoRepeatButton.onLeftButtonDown(int x, int y) {
+ _Latched = AutoRepeatButton;
+ AutoRepeat_ClickType = 1; // first click
+ AutoRepeatButton.leftClick();
+ AutoRepeat_ClickType = 0; // no click
+ _autorepeatTimer.setDelay(_InitialDelay);
+ _autorepeatTimer.start();
+}
+
+AutoRepeatButton.onLeftButtonUp(int x, int y) {
+ _AutoRepeatTimer.Stop();
+ _Latched = NULL;
+}
+
+_AutoRepeatTimer.onTimer() {
+ if(_autorepeatTimer.getDelay() != _RepeatDelay) _autorepeatTimer.setDelay(_RepeatDelay);
+ AutoRepeat_ClickType = 2; // AutoRepeat
+ _Latched.LeftClick();
+ AutoRepeat_ClickType = 0; // no click
+}
+
+AutoRepeat_Load() {
+ _autoRepeatTimer = new Timer;
+ _InitialDelay = 800;
+ _RepeatDelay = 80;
+ AutoRepeat_ClickType = 0;
+}
+
+AutoRepeat_Unload() {
+ delete _autoRepeatTimer;
+}
+
+AutoRepeat_SetInitalDelay(int millis) {
+ _InitialDelay = millis;
+}
+
+
+AutoRepeat_SetRepeatDelay(int millis) {
+ _RepeatDelay = millis;
+}
+
+AutoRepeat_GetInitalDelay() {
+ return _InitialDelay;
+}
+
+AutoRepeat_GetRepeatDelay() {
+ return _repeatDelay;
+}
+
+AutoRepeat_Stop() {
+ _autorepeatTimer.stop();
+ _Latched = NULL;
+}
+
+AutoRepeat_GetCurrentButton() {
+ return _Latched;
+}
diff --git a/Src/Wasabi/Lib/com/centerlayer.m b/Src/Wasabi/Lib/com/centerlayer.m
new file mode 100644
index 00000000..590f667c
--- /dev/null
+++ b/Src/Wasabi/Lib/com/centerlayer.m
@@ -0,0 +1,84 @@
+// ----------------------------------------------------------------------
+// centerlayer.m
+// ----------------------------------------------------------------------
+// by Brennan
+// Use like this :
+// #define CENTER_VAR MyVar
+// Global MyVar;
+// #include "centerlayer.h"
+// Group l = ;
+// MyVar = l.getObject("something");
+// _MyVarInit(Layer MyVar, Group l, int centerx, int centery);
+// ----------------------------------------------------------------------
+
+Global GuiObject _##CENTER_VAR##Layer;
+Global Group _##CENTER_VAR##Group; // parent Layout to center in
+Global Int _##CENTER_VAR##centerx; // should we center x?
+Global Int _##CENTER_VAR##centery; // should we center y?
+Global Int _##CENTER_VAR##addx = 0;
+Global Int _##CENTER_VAR##addy = 0;
+Global Int _##CENTER_VAR##addh = 0;
+Global Int _##CENTER_VAR##addw = 0;
+
+Function _##CENTER_VAR##Init(GuiObject _layer, Group parentLayout, int centerx, int centery);
+Function _##CENTER_VAR##handleResize();
+Function _##CENTER_VAR##setXSpace(int val);
+Function _##CENTER_VAR##setYSpace(int val);
+Function _##CENTER_VAR##setWSpace(int val);
+Function _##CENTER_VAR##setHSpace(int val);
+Function _##CENTER_VAR##sizeError(boolean iserror);
+
+_##CENTER_VAR##Init(GuiObject _layer, Group parentLayout, int centerx, int centery) {
+ _##CENTER_VAR##Layer = _layer;
+ _##CENTER_VAR##Group = parentLayout;
+ _##CENTER_VAR##centerx = centerx;
+ _##CENTER_VAR##centery = centery;
+ _##CENTER_VAR##handleResize();
+}
+
+_##CENTER_VAR##setXSpace(int val)
+{
+ _##CENTER_VAR##addx = val;
+}
+
+_##CENTER_VAR##setYSpace(int val)
+{
+ _##CENTER_VAR##addy = val;
+}
+_##CENTER_VAR##setHSpace(int val)
+{
+ _##CENTER_VAR##addh = val;
+}
+_##CENTER_VAR##setWSpace(int val)
+{
+ _##CENTER_VAR##addw = val;
+}
+
+_##CENTER_VAR##handleResize() {
+ int myw = _##CENTER_VAR##Group.getWidth();
+ int myh = _##CENTER_VAR##Group.getHeight();
+
+ int layerw = _##CENTER_VAR##Layer.getWidth();
+ int layerh = _##CENTER_VAR##Layer.getHeight();
+
+ int x = _##CENTER_VAR##Layer.getLeft();
+ int y = _##CENTER_VAR##Layer.getTop();
+
+ if (_##CENTER_VAR##centerx) _##CENTER_VAR##Layer.setXmlParam("x", integerToString((myw - layerw)/2 + _##CENTER_VAR##addx + _##CENTER_VAR##addw));
+ if (_##CENTER_VAR##centery) _##CENTER_VAR##Layer.setXmlParam("y", integerToString((myh - layerh)/2 + _##CENTER_VAR##addy + _##CENTER_VAR##addh));
+
+ if (myw < layerw + 2*_##CENTER_VAR##addx - _##CENTER_VAR##addw || myh < layerh + _##CENTER_VAR##addy - _##CENTER_VAR##addh)
+ {
+ _##CENTER_VAR##sizeError(TRUE);
+ }
+ else
+ {
+ _##CENTER_VAR##sizeError(FALSE);
+ }
+}
+
+_##CENTER_VAR##sizeError(boolean iserror) {}
+
+_##CENTER_VAR##Group.onResize(int x, int y, int w, int h) {
+ _##CENTER_VAR##handleResize();
+}
diff --git a/Src/Wasabi/Lib/com/customseek.m b/Src/Wasabi/Lib/com/customseek.m
new file mode 100644
index 00000000..8b9a1a93
--- /dev/null
+++ b/Src/Wasabi/Lib/com/customseek.m
@@ -0,0 +1,118 @@
+//----------------------------------------------------------------------------------------
+//
+// customseek.m
+//
+//----------------------------------------------------------------------------------------
+// Use like this :
+// #define CUSTOM_SEEK_VAR MyVar
+// #include "customseek.m"
+//
+//
+// What you need :
+// _MyVarInit(Layer seeksurface, Layer seekghost, Map seekmap);
+// _MyVarShutdown();
+//
+
+
+
+Global Layer _##CUSTOM_SEEK_VAR##Surface;
+Global Layer _##CUSTOM_SEEK_VAR##Ghost;
+Global Map _##CUSTOM_SEEK_VAR##Map;
+Global Int _##CUSTOM_SEEK_VAR##Clicked;
+Global Timer _##CUSTOM_SEEK_VAR##Timer;
+Global Int _##CUSTOM_SEEK_VAR##CurPos;
+
+Function _##CUSTOM_SEEK_VAR##Init(Layer s, Layer g, Map m);
+Function _##CUSTOM_SEEK_VAR##Update(int newpos);
+Function _##CUSTOM_SEEK_VAR##UpdateXY(int x, int y);
+Function _##CUSTOM_SEEK_VAR##SeekTo(int x, int y);
+Function _##CUSTOM_SEEK_VAR##Shutdown();
+
+_##CUSTOM_SEEK_VAR##Init(Layer s, Layer g, Map m) {
+ _##CUSTOM_SEEK_VAR##Surface = s;
+ _##CUSTOM_SEEK_VAR##Ghost = g;
+ _##CUSTOM_SEEK_VAR##Map = m;
+ _##CUSTOM_SEEK_VAR##Update(0);
+ _##CUSTOM_SEEK_VAR##Timer = new Timer;
+ _##CUSTOM_SEEK_VAR##Timer.setDelay(500);
+ _##CUSTOM_SEEK_VAR##Timer.start();
+}
+
+_##CUSTOM_SEEK_VAR##Shutdown() {
+ delete _##CUSTOM_SEEK_VAR##Timer;
+}
+
+_##CUSTOM_SEEK_VAR##Surface.onLeftButtonDown(int x, int y) {
+ if (getPlayItemLength() <= 0) return;
+ if (Strleft(getPlayItemString(), 4) == "http") return;
+ _##CUSTOM_SEEK_VAR##Clicked = 1;
+ _##CUSTOM_SEEK_VAR##UpdateXY(x, y);
+}
+
+_##CUSTOM_SEEK_VAR##Surface.onMouseMove(int x, int y) {
+ if (_##CUSTOM_SEEK_VAR##Clicked) {
+ if (getPlayItemLength() == 0) {
+ _##CUSTOM_SEEK_VAR##Clicked = 0;
+ return;
+ }
+ _##CUSTOM_SEEK_VAR##UpdateXY(x, y);
+ }
+}
+
+_##CUSTOM_SEEK_VAR##Surface.onLeftButtonUp(int x, int y) {
+ if (!_##CUSTOM_SEEK_VAR##Clicked) return;
+ _##CUSTOM_SEEK_VAR##Clicked = 0;
+ _##CUSTOM_SEEK_VAR##SeekTo(x, y);
+}
+
+_##CUSTOM_SEEK_VAR##SeekTo(int x, int y) {
+ int n = _##CUSTOM_SEEK_VAR##Map.getValue(x, y);
+ seekTo(getPlayItemLength() * (n / 255));
+}
+
+_##CUSTOM_SEEK_VAR##UpdateXY(int x, int y) {
+ int n = _##CUSTOM_SEEK_VAR##Map.getValue(x, y);
+ Region r = new Region;
+ r.loadFromMap(_##CUSTOM_SEEK_VAR##Map, n, 1);
+ r.offset(-_##CUSTOM_SEEK_VAR##Ghost.getLeft(), -_##CUSTOM_SEEK_VAR##Ghost.getTop());
+ _##CUSTOM_SEEK_VAR##Ghost.setRegion(r);
+ #ifdef CUSTOM_SEEK_CALLBACK
+ int n = _##CUSTOM_SEEK_VAR##Map.getValue(x, y);
+ _##CUSTOM_SEEK_VAR##OnUpdate(r, getPlayItemLength() * (n / 255));
+ #endif
+ delete r;
+}
+
+_##CUSTOM_SEEK_VAR##Update(int newpos) {
+ float p;
+ int l = getPlayItemLength();
+ if (l == 0) p = 0;
+ else p = newpos / l * 255;
+ Region r = new Region;
+ r.loadFromMap(_##CUSTOM_SEEK_VAR##Map, p, 1);
+ _##CUSTOM_SEEK_VAR##CurPos = p;
+ r.offset(-_##CUSTOM_SEEK_VAR##Ghost.getLeft(), -_##CUSTOM_SEEK_VAR##Ghost.getTop());
+ _##CUSTOM_SEEK_VAR##Ghost.setRegion(r);
+ #ifdef CUSTOM_SEEK_CALLBACK
+ _##CUSTOM_SEEK_VAR##OnUpdate(r, newpos);
+ #endif
+ delete r;
+}
+
+_##CUSTOM_SEEK_VAR##Timer.onTimer() {
+ if (_##CUSTOM_SEEK_VAR##Clicked) return;
+ int l = getPlayItemLength();
+ if (l > 0) {
+ int p = getPosition() / l * 255;
+ if (p != _##CUSTOM_SEEK_VAR##CurPos) {
+ _##CUSTOM_SEEK_VAR##Update(getPosition());
+ }
+ } else {
+ if (_##CUSTOM_SEEK_VAR##CurPos != 0)
+ _##CUSTOM_SEEK_VAR##Update(0);
+ _##CUSTOM_SEEK_VAR##CurPos = 0;
+ }
+}
+
+
+
diff --git a/Src/Wasabi/Lib/com/debug.m b/Src/Wasabi/Lib/com/debug.m
new file mode 100644
index 00000000..cca40f07
--- /dev/null
+++ b/Src/Wasabi/Lib/com/debug.m
@@ -0,0 +1,52 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: debug.m
+Version: 1.2
+
+Type: maki/attrib loader
+Date: 29. Aug. 2006 - 23:43
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+#ifndef DEBUG
+#define debugString //
+#endif
+
+#ifdef DEBUG
+
+#define DEBUG_PREFIX "["+ FILE_NAME +": " + getTimeStamp() + "] " +
+
+Function String getTimeStamp();
+String getTimeStamp()
+{
+ int msc = getTimeOfDay();
+ int h = msc / 1000 / 3600;
+ msc -= h * 1000 * 3600;
+ int m = msc / 1000 / 60;
+ msc -= m * 1000 * 60;
+ int s = msc / 1000;
+ msc -= s * 1000;
+ string zeros = "";
+ if (msc < 100)
+ {
+ zeros += "0";
+ }
+ if (msc < 10)
+ {
+ zeros += "0";
+ }
+ return integerToString(h)+":"+integerToString(m)+":"+integerToString(s)+"."+zeros+integerToString(msc);
+}
+
+#define D_WTF 9
+#define D_NWTF 9
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/com/dispatch_ifc.m b/Src/Wasabi/Lib/com/dispatch_ifc.m
new file mode 100644
index 00000000..d87b8612
--- /dev/null
+++ b/Src/Wasabi/Lib/com/dispatch_ifc.m
@@ -0,0 +1,99 @@
+/**
+ * dispatch_ifc.m
+ *
+ * defines a function interface for dispatchable messaging
+ * define DISPATCH before loading if you are a message reciever
+ *
+ * @author mpdeimos
+ * @date 2008/10/25
+ * @version 0.1
+ */
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+Function initDispatcher(); // Call this function on startup to set the parent layout as dispatcher
+Function setDispatcher(GuiObject dispatcher); // Call this function instead if you want to define a custom
+
+#ifndef DISPATCH
+// Sends a message to the parent layout
+Function int sendMessage(int message, int i0, int i1, int i2, String s0, String s1, GuiObject obj);
+Function int sendMessageI(int message, int i0);
+Function int sendMessageI2(int message, int i0, int i1);
+Function int sendMessageS(int message, String s0);
+Function int sendMessageO(int message, GuiObject obj);
+Function int sendMessageV(int message);
+#endif
+
+#ifdef DISPATCH
+// Recieves Messages
+Function int onMessage(int message, int i0, int i1, int i2, String s0, String s1, GuiObject obj);
+int onMessage(int message, int i0, int i1, int i2, String s0, String s1, GuiObject obj) {} // STUB! Implement this in your code
+#endif
+
+
+///
+/// IMPLEMENTATION
+///
+
+
+Global GuiObject dispatcher;
+
+initDispatcher()
+{
+ dispatcher = getScriptGroup().getParentLayout();
+}
+
+setDispatcher(GuiObject go)
+{
+ dispatcher = go;
+}
+
+
+#ifndef DISPATCH
+
+int sendMessage(int message, int i0, int i1, int i2, String s0, String s1, GuiObject obj)
+{
+ return dispatcher.onAction (s0, s1, message, i0, i1, i2, obj);
+}
+
+int sendMessageI(int message, int i0)
+{
+ GuiObject obj = NULL;
+ return sendMessage(message, i0, i1, 0, "", "", obj);
+}
+
+int sendMessageI2(int message, int i0, int i1)
+{
+ GuiObject obj = NULL;
+ return sendMessage(message, i0, 0, 0, "", "", obj);
+}
+
+int sendMessageS(int message, String s0)
+{
+ GuiObject obj = NULL;
+ return sendMessage(message, 0, 0, 0, s0, "", obj);
+}
+
+int sendMessageO(int message, GuiObject obj)
+{
+ return sendMessage(message, 0, 0, 0, "", "", obj);
+}
+
+int sendMessageV(int messagej)
+{
+ GuiObject obj = NULL;
+ return sendMessage(message, 0, 0, 0, "", "", obj);
+}
+
+#endif
+
+#ifdef DISPATCH
+
+dispatcher.onAction(String action, String param, Int message, int y, int p1, int p2, GuiObject source)
+{
+ return onMessage(message, y, p1, p2, action, param, source);
+}
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/com/dragvolume.m b/Src/Wasabi/Lib/com/dragvolume.m
new file mode 100644
index 00000000..8b56d6e4
--- /dev/null
+++ b/Src/Wasabi/Lib/com/dragvolume.m
@@ -0,0 +1,67 @@
+//----------------------------------------------------------------------------------------
+//
+// dragvolume.m
+//
+//----------------------------------------------------------------------------------------
+// Use like this :
+// #define DRAG_VOLUME_VAR MyVar
+// #include "dragvolume.m"
+//
+//
+// _MyVarInit(AnimatedLayer l); // init dragvolume
+// _MyVarSetMaxDistance(Int nPixels); // set 100% pixel distance
+//
+
+
+
+Global AnimatedLayer _##DRAG_VOLUME_VAR##AnimLayer;
+Global Int _##DRAG_VOLUME_VAR##Clicked;
+Global Int _##DRAG_VOLUME_VAR##Y;
+Global Int _##DRAG_VOLUME_VAR##V;
+Global Int _##DRAG_VOLUME_VAR##Max;
+
+Function _##DRAG_VOLUME_VAR##Init(AnimatedLayer l);
+Function _##DRAG_VOLUME_VAR##Update(int vol);
+Function _##DRAG_VOLUME_VAR##SetMaxDistance(int pixels);
+Function _##DRAG_VOLUME_VAR##UpdateY(int y);
+
+_##DRAG_VOLUME_VAR##Init(AnimatedLayer l) {
+ _##DRAG_VOLUME_VAR##AnimLayer = l;
+ _##DRAG_VOLUME_VAR##Update(getVolume());
+}
+
+_##DRAG_VOLUME_VAR##AnimLayer.onLeftButtonDown(int x, int y) {
+ _##DRAG_VOLUME_VAR##Clicked = 1;
+ _##DRAG_VOLUME_VAR##Y = y;
+ _##DRAG_VOLUME_VAR##V = getVolume();
+}
+
+_##DRAG_VOLUME_VAR##AnimLayer.onMouseMove(int x, int y) {
+ if (_##DRAG_VOLUME_VAR##Clicked) {
+ _##DRAG_VOLUME_VAR##updateY(y);
+ }
+}
+
+_##DRAG_VOLUME_VAR##AnimLayer.onLeftButtonUp(int x, int y) {
+ _##DRAG_VOLUME_VAR##Clicked = 0;
+}
+
+_##DRAG_VOLUME_VAR##SetMaxDistance(int npix) {
+ _##DRAG_VOLUME_VAR##Max = npix;
+}
+
+_##DRAG_VOLUME_VAR##UpdateY(int y) {
+ float p = (_##DRAG_VOLUME_VAR##Y - y) / _##DRAG_VOLUME_VAR##Max;
+ SetVolume(_##DRAG_VOLUME_VAR##V + p * 255); // range is checked
+}
+
+_##DRAG_VOLUME_VAR##Update(int vol) {
+ float p = vol / 255;
+ _##DRAG_VOLUME_VAR##AnimLayer.gotoFrame(p * (_##DRAG_VOLUME_VAR##AnimLayer.getLength()-1));
+}
+
+#ifndef _##DRAG_VOLUME_VAR##NOSYSTEMHOOK
+System.onVolumeChanged(int newvol) {
+ _##DRAG_VOLUME_VAR##Update(newvol);
+}
+#endif
diff --git a/Src/Wasabi/Lib/com/fillbar.m b/Src/Wasabi/Lib/com/fillbar.m
new file mode 100644
index 00000000..b28d7f82
--- /dev/null
+++ b/Src/Wasabi/Lib/com/fillbar.m
@@ -0,0 +1,173 @@
+/**
+ * fillbar.m
+ *
+ * Manages custom fillbars.
+ *
+ * @package com.winamp.maki.lib.community.fillbar
+ * @author mpdeimos
+ * @date 08/10/01
+ * @version 1.0
+ */
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+Class Layer FillBar;
+// {
+ Member Map FillBar.fillmap;
+ Member int FillBar.pos;
+ Member boolean Fillbar.reverse;
+
+ // User dragging stuff
+ Member boolean Fillbar.dragable;
+ Member boolean Fillbar.dragging;
+
+ /**
+ * constructor
+ *
+ * @param layer that should be handled like a fillbar
+ * @param bitmapID that should be used as region map
+ * @ret FillBar object
+ */
+ Function FillBar FillBar_construct(Layer l, String bitmapID);
+ Function FillBar_setMap(FillBar fb, String bitmapID);
+
+ /**
+ * destructor, always call on script unloading
+ *
+ */
+ Function FillBar_destruct(FillBar fb);
+
+ /**
+ * sets the region
+ *
+ * @param fillbar to act on
+ * @param threshold of the map to generate a region
+ */
+ Function FillBar_setPosition(FillBar fb, int threshold);
+
+ /**
+ * called each time the users drags the fillbar
+ *
+ * @param The dragged FillBar
+ * @param The alue the FillBar was dragged to.
+ * @ret FALSE if you do not want to allow dragging.
+ */
+ Function boolean FillBar_onDrag(FillBar fb, int pos);
+
+ /*
+ * called each time the users ends dragging the fillbar
+ *
+ * @param The dragged FillBar
+ * @param The alue the FillBar was dragged to.
+ * @ret FALSE if you do not want to allow dragging.
+ */
+ Function boolean FillBar_onEndDrag(FillBar fb, int pos);
+
+
+ /*
+ * IMPLEMENTATION
+ */
+
+ FillBar FillBar_construct(Layer l, String bitmapID)
+ {
+ FillBar fb = l;
+ fb.reverse = TRUE;
+ fb.fillmap = new Map;
+ fb.fillmap.loadMap(bitmapID);
+ return fb;
+ }
+
+ FillBar_setMap(Fillbar fb, String bitmapID)
+ {
+ if (fb.fillmap != NULL)
+ {
+ delete fb.fillmap;
+ }
+
+ fb.fillmap = new Map;
+ fb.fillmap.loadMap(bitmapID);
+ }
+
+ FillBar_destruct(FillBar fb)
+ {
+ Map tmp = fb.fillmap;
+ delete tmp;
+ }
+
+ FillBar_setPosition(FillBar fb, int threshold)
+ {
+ fb.pos = threshold;
+ fb.setRegionFromMap(fb.fillmap, threshold, fb.reverse);
+ }
+
+
+ // User dragging handles
+
+ FillBar.onLeftButtonDown (int x, int y)
+ {
+ if (!FillBar.dragable)
+ {
+ return;
+ }
+
+ Fillbar.dragging = TRUE;
+ }
+
+ FillBar.onMouseMove (int x, int y)
+ {
+ if (!FillBar.dragable || !Fillbar.dragging)
+ {
+ return;
+ }
+
+ int mouseLeft = x - FillBar.getLeft();
+ int mouseTop = y - Fillbar.getTop();
+
+ if (!FillBar.fillMap.inRegion(mouseLeft, mouseTop))
+ {
+ return;
+ }
+
+ int position = FillBar.fillMap.getValue(mouseLeft, mouseTop);
+
+ int update = FillBar_onDrag(FillBar, position);
+
+ if (update)
+ {
+ FillBar_setPosition(FillBar, position);
+ }
+ }
+
+ Fillbar.onLeftButtonUp (int x, int y)
+ {
+ if (!FillBar.dragable || !Fillbar.dragging)
+ {
+ return;
+ }
+
+ int mouseLeft = x - FillBar.getLeft();
+ int mouseTop = y - Fillbar.getTop();
+
+ int position = FillBar.fillMap.getValue(mouseLeft, mouseTop);
+
+ if (!FillBar.fillMap.inRegion(mouseLeft, mouseTop))
+ {
+ position = fb.pos;
+ }
+
+ int update = FillBar_onEndDrag(FillBar, position);
+
+ if (update)
+ {
+ FillBar_setPosition(FillBar, position);
+ }
+
+ Fillbar.dragging = FALSE;
+ }
+
+ // Callback Stubs
+ boolean FillBar_onDrag(Fillbar fb, int pos) { return TRUE; }
+ boolean FillBar_onEndDrag(Fillbar fb, int pos) { return TRUE; }
+// }
diff --git a/Src/Wasabi/Lib/com/glow.m b/Src/Wasabi/Lib/com/glow.m
new file mode 100644
index 00000000..12e0406b
--- /dev/null
+++ b/Src/Wasabi/Lib/com/glow.m
@@ -0,0 +1,111 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: glow.m
+Version: 1.0
+
+Type: maki/glow class
+Date: 16. Jun. 2007 - 23:13
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+
+Usage: 1: #include glow.m
+ 2: #define GLOW_OBJECT MyGlow
+ 3: call _MyGlow_GlowInit (someObj, otherObj)
+ to init the objects.
+ You can also call _MyGlow_GlowInit (NULL, otherObj)
+ and load a bunch of GuiObjects in _MyGlow_GlowTrigger
+ or load up to 5 objects via _MyGlow_addTarget(obj);
+
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+#ifndef GLOW_OBJECT
+#error GLOW_OBJECT not defined!
+#endif
+
+Class GuiObject _##GLOW_OBJECT##_GlowTrigger;
+Global _##GLOW_OBJECT##_GlowTrigger _##GLOW_OBJECT##_trigger0, _##GLOW_OBJECT##_trigger1, _##GLOW_OBJECT##_trigger2, _##GLOW_OBJECT##_trigger3, _##GLOW_OBJECT##_trigger4, _##GLOW_OBJECT##_trigger5;
+Global GuiObject _##GLOW_OBJECT##_glow;
+Global float _##GLOW_OBJECT##_fdoutspeed;
+Global boolean _##GLOW_OBJECT##_mouseDown;
+
+Function _##GLOW_OBJECT##_GlowInit (GuiObject triggerObject, GuiObject glowObject, float fdoutspeed);
+Function _##GLOW_OBJECT##_addTrigger (GuiObject triggerObject);
+
+_##GLOW_OBJECT##_GlowInit (GuiObject triggerObject, GuiObject glowObject, float fdoutspeed)
+{
+ if (triggerObject) _##GLOW_OBJECT##_trigger0 = triggerObject;
+ if (glowObject) _##GLOW_OBJECT##_glow = glowObject;
+
+ _##GLOW_OBJECT##_fdoutspeed = fdoutspeed;
+}
+
+_##GLOW_OBJECT##_addTrigger(GuiObject triggerObject)
+{
+ if (triggerObject)
+ {
+ if (!_##GLOW_OBJECT##_trigger1)
+ {
+ _##GLOW_OBJECT##_trigger1 = triggerObject;
+ return;
+ }
+ if (!_##GLOW_OBJECT##_trigger2)
+ {
+ _##GLOW_OBJECT##_trigger2 = triggerObject;
+ return;
+ }
+ if (!_##GLOW_OBJECT##_trigger3)
+ {
+ _##GLOW_OBJECT##_trigger3 = triggerObject;
+ return;
+ }
+ if (!_##GLOW_OBJECT##_trigger4)
+ {
+ _##GLOW_OBJECT##_trigger4 = triggerObject;
+ return;
+ }
+ if (!_##GLOW_OBJECT##_trigger5)
+ {
+ _##GLOW_OBJECT##_trigger5 = triggerObject;
+ return;
+ }
+ }
+}
+
+_##GLOW_OBJECT##_GlowTrigger.onEnterArea ()
+{
+ _##GLOW_OBJECT##_glow.cancelTarget();
+ _##GLOW_OBJECT##_glow.setAlpha(255);
+}
+
+_##GLOW_OBJECT##_GlowTrigger.onLeftButtonDown (int x, int y)
+{
+ _##GLOW_OBJECT##_mouseDown = 1;
+ _##GLOW_OBJECT##_glow.cancelTarget();
+ _##GLOW_OBJECT##_glow.setAlpha(0);
+}
+
+_##GLOW_OBJECT##_GlowTrigger.onLeftButtonUp (int x, int y)
+{
+ _##GLOW_OBJECT##_mouseDown = 0;
+ _##GLOW_OBJECT##_glow.cancelTarget();
+ if (_##GLOW_OBJECT##_GlowTrigger.isMouseOverRect()) _##GLOW_OBJECT##_glow.setAlpha(255);
+}
+
+_##GLOW_OBJECT##_GlowTrigger.onLeaveArea ()
+{
+ if (_##GLOW_OBJECT##_mouseDown) return;
+ _##GLOW_OBJECT##_glow.cancelTarget();
+ _##GLOW_OBJECT##_glow.setTargetA(0);
+ _##GLOW_OBJECT##_glow.setTargetX(_##GLOW_OBJECT##_glow.getGuiX());
+ _##GLOW_OBJECT##_glow.setTargetSpeed(_##GLOW_OBJECT##_fdoutspeed);
+ _##GLOW_OBJECT##_glow.gotoTarget();
+}
+
+#undef GLOW_OBJECT \ No newline at end of file
diff --git a/Src/Wasabi/Lib/com/glowobject.m b/Src/Wasabi/Lib/com/glowobject.m
new file mode 100644
index 00000000..1d4eff3a
--- /dev/null
+++ b/Src/Wasabi/Lib/com/glowobject.m
@@ -0,0 +1,176 @@
+/**
+ * glowobject.m
+ *
+ * @package com.winamp.maki.lib.community.glowobject
+ * @author mpdeimos
+ * @date 18/10/01
+ * @version 1.0
+ */
+
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+#define GLOW_TYPE_HOLD 0
+#define GLOW_TYPE_FLASH 1
+#define GLOW_TYPE_BOUNCE 2
+
+Class GuiObject GlowLayer;
+// {
+ Member GuiObject GlowLayer.trigger;
+// }
+
+Class GuiObject GlowObject;
+// {
+ Member float GlowObject.fadeInSpeed;
+ Member float GlowObject.fadeOutSpeed;
+ Member int GlowObject.glowType;
+ Member boolean GlowObject.glowing;
+
+ Member GuiObject GlowObject.glow;
+
+ /**
+ * constructor
+ *
+ * @param GuiObject that will be used to trigger the glow on mouse entering it's region
+ * @param the glowing object
+ * @ret GlowObject object
+ */
+ Function GlowObject GlowObject_construct(GlowObject trigger, GlowLayer glow);
+
+ /**
+ * sets fade in time
+ *
+ * @param GlowObject to act on
+ * @param milliseconds till the glow is at alpha 255
+ */
+ Function GlowObject_setFadeInSpeed(GlowObject go, float ms);
+
+ /**
+ * sets fade out time
+ *
+ * @param GlowObject to act on
+ * @param milliseconds till the glow is at alpha 0
+ */
+ Function GlowObject_setFadeOutSpeed(GlowObject go, float ms);
+
+ /**
+ * sets the glowtype used by this glow button.
+ *
+ * @param GlowObject to act on
+ * @param glowType defined via GLOW_TYPE_*
+ */
+ Function GlowObject_setGlowType(GlowObject go, int glowType);
+
+
+ /*
+ * IMPLEMENTATION
+ */
+
+ GlowObject GlowObject_construct(GlowObject trigger, GlowLayer glow)
+ {
+ if (trigger == null)
+ {
+ debug("trigger");
+ }
+ if (glow == NULL)
+ {
+ debug("glow");
+ }
+
+ GlowObject go = trigger;
+ go.fadeInSpeed = 0.3;
+ go.fadeOutSpeed = 0.5;
+ go.glow = glow;
+ go.glowType = GLOW_TYPE_HOLD;
+ go.glowing = false;
+ glow.trigger = trigger;
+ return go;
+ }
+
+ GlowObject_setFadeInSpeed(GlowObject go, float ms)
+ {
+ go.fadeInSpeed = ms;
+ }
+
+ GlowObject_setFadeOutSpeed(GlowObject go, float ms)
+ {
+ go.fadeOutSpeed = ms;
+ }
+
+ GlowObject_setGlowType(GlowObject go, int glowType)
+ {
+ go.glowType = glowType;
+ }
+
+ GlowObject.onEnterArea ()
+ {
+ GlowObject.glowing = true;
+ GlowObject.glow.cancelTarget();
+ GlowObject.glow.setTargetA(255);
+ GlowObject.glow.setTargetSpeed(GlowObject.fadeInSpeed);
+ GlowObject.glow.gotoTarget();
+ }
+
+ GlowObject.onLeaveArea ()
+ {
+ GlowObject.glowing = false;
+ if (GlowObject.glowType != GLOW_TYPE_FLASH)
+ {
+ GlowObject.glow.cancelTarget();
+ GlowObject.glow.setTargetA(0);
+ GlowObject.glow.setTargetSpeed(GlowObject.fadeOutSpeed);
+ GlowObject.glow.gotoTarget();
+ }
+ }
+
+ GlowLayer.onTargetReached ()
+ {
+ GlowObject go = GlowLayer.trigger;
+ if (go.glowType == GLOW_TYPE_HOLD)
+ {
+ return;
+ }
+ else if (go.glowType == GLOW_TYPE_FLASH)
+ {
+ if (GlowLayer.getAlpha() == 255)
+ {
+ GlowLayer.cancelTarget();
+ GlowLayer.setTargetA(0);
+ GlowLayer.setTargetSpeed(GlowObject.fadeOutSpeed);
+ GlowLayer.gotoTarget();
+ }
+ }
+ else if (go.glowType == GLOW_TYPE_BOUNCE)
+ {
+ if (GlowLayer.getAlpha() == 255)
+ {
+ GlowLayer.cancelTarget();
+ GlowLayer.setTargetA(0);
+ GlowLayer.setTargetSpeed(GlowObject.fadeOutSpeed);
+ GlowLayer.gotoTarget();
+ }
+ else if (GlowLayer.getAlpha() == 0 && go.glowing)
+ {
+ GlowLayer.cancelTarget();
+ GlowLayer.setTargetA(255);
+ GlowLayer.setTargetSpeed(GlowObject.fadeInSpeed);
+ GlowLayer.gotoTarget();
+ }
+ }
+ }
+
+ GlowObject.onSetVisible (Boolean onoff)
+ {
+ if (onoff)
+ {
+ GlowObject.glow.show();
+ }
+ else
+ {
+ GlowObject.glow.hide();
+ }
+
+ }
+// }
diff --git a/Src/Wasabi/Lib/com/rotationlayer.m b/Src/Wasabi/Lib/com/rotationlayer.m
new file mode 100644
index 00000000..7a6b81bf
--- /dev/null
+++ b/Src/Wasabi/Lib/com/rotationlayer.m
@@ -0,0 +1,108 @@
+//----------------------------------------------------------------------------------------
+//
+// rotationlayer.m
+//
+//----------------------------------------------------------------------------------------
+// Use like this :
+// #define ROTATION_LAYER_VAR MyVar
+// #include "rotationlayer.m"
+//
+// _MyVarInit(Group parentgroup, String layername); // init rotationlayer
+// _MyVarRotateDegree(double r); // in degrees
+// _MyVarRotate(double r); // in radians
+// double _MyVarGetRotationDegree(); // in degrees
+// double _MyVarGetRotation(); // in radians
+//
+
+#ifndef PI
+#define PI 3.1415926536
+#endif
+
+Global Double _##ROTATION_LAYER_VAR##R;
+Global Layer _##ROTATION_LAYER_VAR##Layer;
+
+Function _##ROTATION_LAYER_VAR##Init(Group parentgroup, String layername);
+Function _##ROTATION_LAYER_VAR##RotateDegree(double r);
+Function _##ROTATION_LAYER_VAR##Rotate(double r);
+Function double _##ROTATION_LAYER_VAR##GetRotationDegree();
+Function double _##ROTATION_LAYER_VAR##GetRotation();
+
+_##ROTATION_LAYER_VAR##RotateDegree(double r) {
+ _##ROTATION_LAYER_VAR##Rotate(r * PI / 180.0);
+}
+
+_##ROTATION_LAYER_VAR##Rotate(double r) {
+ _##ROTATION_LAYER_VAR##R = r;
+ _##ROTATION_LAYER_VAR##Layer.fx_update();
+}
+
+double _##ROTATION_LAYER_VAR##GetRotationDegree() {
+ return _##ROTATION_LAYER_VAR##R * 180 / PI;
+}
+
+double _##ROTATION_LAYER_VAR##GetRotation() {
+ return _##ROTATION_LAYER_VAR##R;
+}
+
+_##ROTATION_LAYER_VAR##Init(Group parentgroup, String layername) {
+ _##ROTATION_LAYER_VAR##Layer = parentgroup.getObject(layername);
+ _##ROTATION_LAYER_VAR##Layer.fx_setGridSize(1,1);
+ _##ROTATION_LAYER_VAR##Layer.fx_setBgFx(0);
+ _##ROTATION_LAYER_VAR##Layer.fx_setWrap(1);
+ _##ROTATION_LAYER_VAR##Layer.fx_setBilinear(1);
+ _##ROTATION_LAYER_VAR##Layer.fx_setRect(0);
+ _##ROTATION_LAYER_VAR##Layer.fx_setClear(0);
+ _##ROTATION_LAYER_VAR##Layer.fx_setLocalized(1);
+ _##ROTATION_LAYER_VAR##Layer.fx_setRealtime(0);
+ _##ROTATION_LAYER_VAR##Layer.fx_setEnabled(1);
+}
+
+_##ROTATION_LAYER_VAR##Layer.fx_onGetPixelR(double r, double d, double x, double y) {
+ return r + _##ROTATION_LAYER_VAR##R;
+}
+
+//--------------------II-----------------
+Global Double _##ROTATION_LAYER_VARII##R;
+Global Layer _##ROTATION_LAYER_VARII##Layer;
+
+Function _##ROTATION_LAYER_VARII##Init(Group parentgroup, String layername);
+Function _##ROTATION_LAYER_VARII##RotateDegree(double r);
+Function _##ROTATION_LAYER_VARII##Rotate(double r);
+Function double _##ROTATION_LAYER_VARII##GetRotationDegree();
+Function double _##ROTATION_LAYER_VARII##GetRotation();
+
+_##ROTATION_LAYER_VARII##RotateDegree(double r) {
+ _##ROTATION_LAYER_VARII##Rotate(r * PI / 180.0);
+}
+
+_##ROTATION_LAYER_VARII##Rotate(double r) {
+ _##ROTATION_LAYER_VARII##R = r;
+ _##ROTATION_LAYER_VARII##Layer.fx_update();
+}
+
+double _##ROTATION_LAYER_VARII##GetRotationDegree() {
+ return _##ROTATION_LAYER_VARII##R * 180 / PI;
+}
+
+double _##ROTATION_LAYER_VARII##GetRotation() {
+ return _##ROTATION_LAYER_VARII##R;
+}
+
+_##ROTATION_LAYER_VARII##Init(Group parentgroup, String layername) {
+ _##ROTATION_LAYER_VARII##Layer = parentgroup.getObject(layername);
+ _##ROTATION_LAYER_VARII##Layer.fx_setGridSize(1,1);
+ _##ROTATION_LAYER_VARII##Layer.fx_setBgFx(0);
+ _##ROTATION_LAYER_VARII##Layer.fx_setWrap(1);
+ _##ROTATION_LAYER_VARII##Layer.fx_setBilinear(1);
+ _##ROTATION_LAYER_VARII##Layer.fx_setRect(0);
+ _##ROTATION_LAYER_VARII##Layer.fx_setClear(0);
+ _##ROTATION_LAYER_VARII##Layer.fx_setLocalized(1);
+ _##ROTATION_LAYER_VARII##Layer.fx_setRealtime(0);
+ _##ROTATION_LAYER_VARII##Layer.fx_setEnabled(1);
+
+}
+
+_##ROTATION_LAYER_VARII##Layer.fx_onGetPixelR(double r, double d, double x, double y) {
+ return r + _##ROTATION_LAYER_VAR##R;
+}
+
diff --git a/Src/Wasabi/Lib/com/songinfo.m b/Src/Wasabi/Lib/com/songinfo.m
new file mode 100644
index 00000000..30736fb7
--- /dev/null
+++ b/Src/Wasabi/Lib/com/songinfo.m
@@ -0,0 +1,104 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: songinfo.m
+Version: 1.0
+
+Type: maki/songinfo loading
+Date: 09. Sept. 2008 - 10:02
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+-----------------------------------------------------
+---------------------------------------------------*/
+
+/**
+ * This library is still in testing phase
+ */
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+// use this function to reload songinfo (usually do this on system.onTitleChange())
+Function songinfo_reload();
+
+// use this vars to get song information (is faster than function calls)
+Global String songinfo_title;
+Global String songinfo_artist;
+Global String songinfo_album;
+Global String songinfo_location; // url or path on your hd
+Global String songinfo_displayTitle;
+
+Global String songinfo_streamTitle; // similar to display title
+Global String songinfo_streamName; // name of current stream (station title)
+Global String songinfo_streamURL;
+Global String songinfo_streamAlbumArt; // _full_ URL to an image on the web, like http://images.play.it/amg/album/cov200/drh200/h238/h23853pph7b.jpg
+
+Global Boolean songinfo_isStream; // true if current song is a stream
+
+Global Int songinfo_streamType; // use in conjunction with the values below
+#define SONGINFO_STREAMTYPE_SHOUTCAST 2
+#define SONGINFO_STREAMTYPE_AOLRADIO 3
+#define SONGINFO_STREAMTYPE_CBSRADIO 4
+#define SONGINFO_STREAMTYPE_SHOUTCAST2 5
+#define SONGINFO_STREAMTYPE_NOSTREAM 0
+#define SONGINFO_STREAMTYPE_UNKNOWN 666
+
+/////////////////////////////////////
+// IMPLEMENTATION // DO NOT MODIFY //
+/////////////////////////////////////
+
+songinfo_reload()
+{
+ // Fill vars with data
+ songinfo_location = System.getPlayItemString();
+ songinfo_displayTitle = System.getPlayItemDisplayTitle();
+
+ String metaPrefix = ""; // used for streams
+
+ // Check for a stream
+ songinfo_streamType = stringToInteger(getPlayItemMetaDataString("streamtype"));
+ songinfo_isStream = (songinfo_streamType > 0);
+ if (songinfo_isStream) // STREAM!
+ {
+ if (!(songinfo_streamType == SONGINFO_STREAMTYPE_SHOUTCAST
+ || songinfo_streamType == SONGINFO_STREAMTYPE_AOLRADIO
+ || songinfo_streamType == SONGINFO_STREAMTYPE_CBSRADIO
+ || songinfo_streamType == SONGINFO_STREAMTYPE_SHOUTCAST2))
+ {
+ songinfo_streamType = SONGINFO_STREAMTYPE_UNKNOWN;
+ }
+
+ // read stream metadata
+ songinfo_streamName = getPlayItemMetaDataString("streamname");
+ songinfo_streamTitle = getPlayItemMetaDataString("streamtitle");
+ songinfo_streamURL = getPlayItemMetaDataString("streamurl");
+
+ if (songinfo_streamType == SONGINFO_STREAMTYPE_AOLRADIO)
+ {
+ metaPrefix = "uvox/";
+ }
+ else if (songinfo_streamType == SONGINFO_STREAMTYPE_CBSRADIO)
+ {
+ metaPrefix = "cbs/";
+ }
+
+ songinfo_streamAlbumArt = getPlayItemMetaDataString(metaPrefix + "albumart");
+ if (songinfo_streamType == SONGINFO_STREAMTYPE_AOLRADIO)
+ {
+ songinfo_streamAlbumArt = "http://broadband-albumart.music.aol.com/scan/" + songinfo_streamAlbumArt;
+ }
+ }
+ else //NO STREAM!
+ {
+ // resetting stream specific values
+ songinfo_streamName = "";
+ songinfo_streamTitle = "";
+ songinfo_streamURL = "";
+ songinfo_streamAlbumArt = "";
+ }
+
+ songinfo_title = getPlayItemMetaDataString(metaPrefix + "title");
+ songinfo_artist = getPlayItemMetaDataString(metaPrefix + "artist");
+ songinfo_album = getPlayItemMetaDataString(metaPrefix + "album");
+} \ No newline at end of file
diff --git a/Src/Wasabi/Lib/config.mi b/Src/Wasabi/Lib/config.mi
new file mode 100644
index 00000000..ce1dc25b
--- /dev/null
+++ b/Src/Wasabi/Lib/config.mi
@@ -0,0 +1,29 @@
+//----------------------------------------------------------------------------------------------------------------
+// config.mi
+//
+// standard definitions for internal objects
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __CONFIG_MI
+#define __CONFIG_MI
+
+extern class @{593DBA22-D077-4976-B952-F4713655400B}@ Object _predecl Config;
+extern class @{D4030282-3AAB-4d87-878D-12326FADFCD5}@ Object ConfigItem;
+extern class @{24DEC283-B76E-4a36-8CCC-9E24C46B6C73}@ Object ConfigAttribute;
+
+extern ConfigItem Config.getItem(String item_name);
+extern ConfigItem Config.getItemByGuid(String item_guid);
+extern ConfigItem Config.newItem(String item_name, String item_guid);
+
+extern ConfigAttribute ConfigItem.getAttribute(String attr_name);
+extern ConfigAttribute ConfigItem.newAttribute(String attr_name, String default_value);
+extern String ConfigItem.getGuid(String attr_name);
+extern String ConfigItem.getName(); //TODO
+
+extern ConfigAttribute.setData(String value);
+extern String ConfigAttribute.getData();
+extern ConfigAttribute.onDataChanged();
+extern ConfigItem ConfigAttribute.getParentItem();
+extern String ConfigAttribute.getAttributeName();
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/core.mi b/Src/Wasabi/Lib/core.mi
new file mode 100644
index 00000000..87a5e613
--- /dev/null
+++ b/Src/Wasabi/Lib/core.mi
@@ -0,0 +1,81 @@
+/**
+ Note:
+ This file is a relict of Winamp3/Wasabi.Player.
+ I have tested it and it seems not to work :(
+ If anyone get's this one to work lemme know: martin@skinconsortium.com
+**/
+
+extern class @{F857BECA-8E19-41f1-973E-097E39649F03}@ Object _predecl CoreAdmin;
+extern class @{2825A91B-D488-4245-AAF1-7059CF88437B}@ Object &Core;
+
+extern Core CoreAdmin.getNamedCore(String name);
+extern Core CoreAdmin.newNamedCore(String name);
+extern Int CoreAdmin.freeCore(Core name);
+extern Int CoreAdmin.freeCoreByName(String name);
+
+
+extern Core.playFile(String filename);
+extern Core.stop();
+extern Core.setVolume(Int volume);
+extern Core.getStatus();
+
+// I love keyboard macros.
+extern Int Core.onStarted();
+extern Int Core.onStopped();
+extern Int Core.onPaused();
+extern Int Core.onUnpaused();
+extern Int Core.onSeeked(Int newpos);
+extern Int Core.onVolumeChange(Int newvol);
+extern Int Core.onPanChange(Int newpan);
+extern Int Core.onEQStatusChange(Int newval);
+extern Int Core.onEQPreampChange(Int newval);
+extern Int Core.onEQBandChange(Int band, Int newval);
+extern Int Core.onEQAutoChange(Int newval);
+extern Int Core.onCoreStatusMsg(String msgtext);
+extern Int Core.onWarningMsg(String msgtext);
+extern Int Core.onErrorMsg(String msgtext);
+extern Int Core.onTitleChange(String newtitle);
+extern Int Core.onTitle2Change(String newtitle2);
+extern Int Core.onInfoChange(String info);
+extern Int Core.onUrlChange(String url);
+extern Int Core.onLengthChange(Int newlength);
+extern Int Core.onNextFile();
+extern Int Core.onNeedNextFile(Int fileid);
+extern Int Core.onSetNextFile(String playstring);
+extern Int Core.onErrorOccured(Int severity, String errortext);
+extern Int Core.onAbortCurrentSong();
+extern Int Core.onEndOfDecode();
+extern Int Core.onFileComplete(String playstring);
+extern Int Core.onConvertersChainRebuilt();
+extern Int Core.onMediaFamilyChange(String newfamily);
+
+extern Int Core.setNextFile(String pstr);
+extern Int Core.getStatus();
+extern String Core.getCurrent();
+extern Int Core.getCurPlaybackNumber();
+extern Int Core.getNumTracks();
+extern Int Core.getPosition();
+extern Int Core.getWritePosition();
+extern Int Core.setPosition(Int ms);
+extern Int Core.getLength();
+extern Int Core.getVolume();
+extern Core.setVolume(Int vol);
+extern Int Core.getPan();
+extern Core.setPan(Int bal);
+extern Core.setMute(Int mute);
+extern Int Core.getMute();
+extern Int Core.getLeftVuMeter();
+extern Int Core.getRightVuMeter();
+extern Core.userButton(Int ubutton);
+extern Int Core.getEqStatus();
+extern Core.setEqStatus(Int enable);
+extern Int Core.getEqPreamp();
+extern Core.setEqPreamp(Int pre);
+extern Int Core.getEqBand(Int band);
+extern Core.setEqBand(Int band, Int val);
+extern Int Core.getEqAuto();
+extern Core.setEqAuto(Int enable);
+extern Core.setCustomMsg(String msgtext);
+extern Core.setPriority(Int priority);
+extern Int Core.getPriority();
+extern Core.rebuildConvertersChain();
diff --git a/Src/Wasabi/Lib/exd.mi b/Src/Wasabi/Lib/exd.mi
new file mode 100644
index 00000000..3866bd19
--- /dev/null
+++ b/Src/Wasabi/Lib/exd.mi
@@ -0,0 +1,118 @@
+//----------------------------------------------------------------------------------------------------------------
+// exd.mi
+//
+// extra definitions for internal objects
+//----------------------------------------------------------------------------------------------------------------
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+#ifndef __EXD_MI
+#define __EXD_MI
+
+
+
+//*****************************************************************************
+// String CLASS
+//*****************************************************************************
+
+Function String replaceString(string baseString, string toreplace, string replacedby);
+
+/**
+ replaceString()
+
+ Returns the class name for the object.
+
+ @param baseString The String which you want to modify.
+ @param toreplace The String you want to be replaced.
+ @param replacedby The String instead of 'toreplace'.
+ @ret The replaced string.
+*/
+
+String replaceString(string baseString, string toreplace, string replacedby) {
+ if (toreplace == "") return baseString;
+ string sf1 = strupper(baseString);
+ string sf2 = strupper(toreplace);
+ int i = strsearch(sf1, sf2);
+ if (i == -1) return baseString;
+ string left = "", right = "";
+ if (i != 0) left = strleft(baseString, i);
+
+ if (strlen(basestring) - i - strlen(toreplace) != 0) {
+ right = strright(basestring, strlen(basestring) - i - strlen(toreplace));
+ }
+ return left + replacedby + right;
+}
+
+Function String cutString(string baseString, string toreplace);
+
+/**
+ cutString()
+
+ Returns the class name for the object.
+
+ @param baseString The String which you want to modify.
+ @param toreplace The String you want to be replaced.
+ @ret The replaced string.
+*/
+
+String cutString(string baseString, string toreplace) {
+ if (toreplace == "") return baseString;
+ int i = strsearch(baseString, toreplace);
+ if (i == -1) return baseString;
+ string left = "", right = "";
+ if (i != 0) left = strleft(baseString, i);
+
+ if (strlen(basestring) - i - strlen(toreplace) != 0) {
+ right = strright(basestring, strlen(basestring) - i - strlen(toreplace));
+ }
+ return left + right;
+}
+
+Function String fillStringBefore(string baseString, string after, string before);
+
+/**
+ fillStringBefore()
+
+ Returns the class name for the object.
+
+ @param baseString The String which you want to modify.
+ @param toreplace The String you want to be replaced.
+ @ret The replaced string.
+*/
+
+String fillStringBefore(string baseString, string filled, string anchor) {
+ int i = strsearch(baseString, anchor);
+ if (i == -1) return baseString;
+
+ string left = "", right = "";
+ if (i != 0) left = strleft(baseString, i);
+ if (strlen(basestring) - i - strlen(toreplace) != 0) {
+ right = strright(basestring, strlen(basestring) - i);
+ }
+/* bef.setText(integerToString(i) + " - " + left);
+ aft.setText(integerToString(strlen(basestring) - i) + " - " + right);
+*/ return left + filled + right;
+}
+
+
+Function Int countSubString(string str, string substr);
+
+int countSubString(string str, string substr) {
+ int n = 0;
+ for ( int i = 0; i < 666; i++ ) {
+ int r = strSearch(str, substr);
+#ifdef DEBUG
+ debug(integerToString(r));
+#endif
+ if (r == -1) i = 666;
+ else {
+ str = strright(str, strlen(str) - (r + 1));
+ n++;
+ if (strlen(str) - r == 1) return n;
+ }
+ }
+ return n;
+}
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/fileio.mi b/Src/Wasabi/Lib/fileio.mi
new file mode 100644
index 00000000..0f8d3d32
--- /dev/null
+++ b/Src/Wasabi/Lib/fileio.mi
@@ -0,0 +1,130 @@
+//----------------------------------------------------------------------------------------------------------------
+// fileio.mi
+//
+// standard handles for file input and output (only xml parsing atm)
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __FILEIO_MI
+#define __FILEIO_MI
+
+
+extern class @{836F8B2E-E0D1-4db4-937F-0D0A04C8DCD1}@ Object &File;
+extern class @{417FFB69-987F-4be8-8D87-D9965EEEC868}@ File &XmlDoc;
+
+
+
+//*****************************************************************************
+// File CLASS
+//*****************************************************************************
+/**
+ File Class.
+
+ @short Root Object for handling files
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+extern File.load (String path); // !Always call this first!
+extern boolean File.exists ();
+extern int File.getSize ();
+
+
+//*****************************************************************************
+// XmlDoc CLASS
+//*****************************************************************************
+/**
+ XmlDoc Class.
+
+ @short Root Object for handling xml files
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+
+/**
+ parser_addCallback()
+
+ Add a XML tag to the global callback list for this file. Ensure to load the file first!
+ You can call this function more than once in order to add multiple callbacks (not implemented yet).
+ Use / for subtags and * as wildchar.
+ Example:
+ <main>
+ <cfg>
+ <int id="a" value="1"/>
+ <int id="b" value="2"/>
+ <int id="c" value="3"/>
+ <string id="d" value="bla" />
+ </cfg>
+ <otherstuff what="blabla"/>
+ </main>
+ in order to read all items listed under cfg add this callback:
+
+ Global XmlDoc myDoc;
+
+ System.onScriptLoaded()
+ {
+ myDoc = new XmlDoc;
+ myDoc.load("C:\mycfg.xml");
+ myDoc.parser_addCallback("main/cfg/*");
+ myDoc.parser_addCallback("main/otherstuff");
+ myDoc.parser_start();
+ myDoc.parser_destroy();
+ }
+
+ Note: myDoc.parser_addCallback("*"); will parse everything.
+
+ @param any XML tag you want a callback for
+*/
+extern XmlDoc.parser_addCallback (String section);
+
+
+/**
+ parser_start()
+
+ Start parsing the XmlDoc.
+*/
+extern XmlDoc.parser_start ();
+
+
+/**
+ parser_onCallback()
+
+ Hookable. Called everytime an opening XML tag with a added callback is found.
+ opening XML tags: <sometag id="bla"> or <sometag id="bla"/>
+
+ @param XML path to the XML tag that triggered the callback (uppercase!)
+ @param name of the XML tag that triggered the callback
+ @param List that holds the paramnames
+ @param List that holds the paramvalues (sorted in the same way as List paramname)
+*/
+extern String XmlDoc.parser_onCallback (String xmlpath, String xmltag, list paramname, list paramvalue);
+
+
+/**
+ parser_onCloseCallback()
+
+ Hookable. Called everytime a closing XML tag with an added callback is found.
+ closing XML tag: </sometag> or <sometag id="bla"/>
+
+ @param XML tag that triggered the callback
+*/
+extern String XmlDoc.parser_onCloseCallback (String xmlpath, String xmltag);
+
+
+/**
+ parser_onError()
+
+ due to some API changes filename and incpath will hold an empty string since winamp 5.56
+*/
+extern String XmlDoc.parser_onError (String filename, int linenum, String incpath, int errcode, String errstr);
+
+
+/**
+ parser_destroy()
+
+ Always call this if you are done with parsing, or if you want to reset your callbacks.
+*/
+extern String XmlDoc.parser_destroy ();
+
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/pldir.mi b/Src/Wasabi/Lib/pldir.mi
new file mode 100644
index 00000000..2e21cd80
--- /dev/null
+++ b/Src/Wasabi/Lib/pldir.mi
@@ -0,0 +1,96 @@
+//----------------------------------------------------------------------------------------------------------------
+// pldir.mi
+//
+// standard handles for PlEdit manipulation
+//----------------------------------------------------------------------------------------------------------------
+
+
+extern class @{345BEEBC-0229-4921-90BE-6CB6A49A79D9}@ Object _predecl &PlEdit; // Our Winamp Playlist Editor
+extern class @{61A7ABAD-7D79-41f6-B1D0-E1808603A4F4}@ Object _predecl PlDir; // <PlEditDirectory/>
+
+
+
+//*****************************************************************************
+// PlEdit CLASS
+//*****************************************************************************
+/**
+ PlEdit Class.
+
+ @short Our main PlEdit Editor.
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+ // General PlEdit Information
+extern int PlEdit.getNumTracks (); // Returns total number of tracks
+extern int PlEdit.getCurrentIndex (); // Index of the currently Playing Item
+extern int PlEdit.getNumSelectedTracks ();
+extern int PlEdit.getNextSelectedTrack (int i);
+
+
+ // Manipulate PlEdit View
+extern PlEdit.showCurrentlyPlayingTrack (); // Scrolls the PL to the currently playling item (mostly used with onKeyDown: space)
+extern PlEdit.showTrack (int item);
+
+ // Manipulate PlEdit Entries
+extern PlEdit.enqueueFile (string file); // Enqueues a file at the end of the PL
+extern PlEdit.clear ();
+extern PlEdit.removeTrack (int item); // Removes a specific Track from PL
+extern PlEdit.swapTracks (int item1, int item2); // Changes the position of item1 and item2
+extern PlEdit.moveUp (int item); // Moves item one position up
+extern PlEdit.moveDown (int item); // Moves item one position down
+extern PlEdit.moveTo (int item, int pos); // Moves an item to a new position in our PlEdit (this one is faster as calling multiple swaps in maki)
+extern PlEdit.playTrack (int item);
+
+
+ // Metadata Stuff
+extern int PlEdit.getRating (int item);
+extern PlEdit.setRating (int item, int rating); // Sets Rating of track #item to a value from 0-5
+extern String PlEdit.getTitle (int item);
+extern String PlEdit.getLength (int item);
+extern String PlEdit.getMetaData (int item, String metadatastring); // You know the metadata strings, don't you?
+extern String PlEdit.getFileName (int item);
+
+/**
+ Hookable.
+ You need to instanciate a PlEdit object first. so basically it goes like this:
+
+ Global PlEdit PeListener;
+
+ System.onScriptLoaded ()
+ {
+ PeListener = new PlEdit;
+ }
+
+ PeListener.onPleditModified ()
+ {
+ // Do some crazy stuff
+ }
+*/
+extern PlEdit.onPleditModified ();
+
+//*****************************************************************************
+// PlDir CLASS
+//*****************************************************************************
+/**
+ PlDir Class.
+
+ @short Handles for the <PlEditDirectory/> XML object and ML PlEdits view.
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+ // General PlEdits Information
+extern int PlDir.getNumItems (); // Returns total number of stored PlEdits in your ml
+extern String PlDir.getItemName (int item);
+
+ // Manipulate PlDir View
+extern PlDir.showCurrentlyPlayingEntry (); // Backwards Compatibility (wa3 relict), does the same as PlEdit.showCurrentlyPlayingTrack ()
+extern PlDir.refresh(); // Not working 100% on ml lists
+
+ // Manipulate PlDir Entries
+extern PlDir.renameItem (int item, String name);
+
+ // Playback funtions
+extern PlDir.enqueueItem (int item);
+extern PlDir.playItem (int item); \ No newline at end of file
diff --git a/Src/Wasabi/Lib/private.mi b/Src/Wasabi/Lib/private.mi
new file mode 100644
index 00000000..5edffc68
--- /dev/null
+++ b/Src/Wasabi/Lib/private.mi
@@ -0,0 +1,26 @@
+//----------------------------------------------------------------------------------------------------------------
+// private.mi
+//
+// these are our own private calls ;)
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __PRIVATE_MI
+#define __PRIVATE_MI
+
+extern class @{78BD6ED9-0DBC-4fa5-B5CD-5977E3A912F8}@ Object &Private;
+
+Global Private WaPrivateCall;
+//Member boolean WaPrivateCall.t;
+
+Function initWaPrivateCalls();
+initWaPrivateCalls ()
+{
+ WaPrivateCall = new Private;
+ //WaPrivateCall.t = false;
+ //debugInt(WaPrivateCall.t);
+}
+
+extern Private.updateLinks(String version, String browserversion);
+extern Private.onLinksUpdated();
+
+#endif \ No newline at end of file
diff --git a/Src/Wasabi/Lib/std.mi b/Src/Wasabi/Lib/std.mi
new file mode 100644
index 00000000..dac8d122
--- /dev/null
+++ b/Src/Wasabi/Lib/std.mi
@@ -0,0 +1,2778 @@
+//----------------------------------------------------------------------------------------------------------------
+// std.mi
+//
+// standard definitions for internal objects
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __STD_MI
+#define __STD_MI
+
+#define MC_TARGET "Winamp 5.66 (skin version 1.36)"
+#define VCPU_VERSION 2
+
+#define deprecated //
+
+// GUIDS
+extern class @{51654971-0D87-4a51-91E3-A6B53235F3E7}@ @{00000000-0000-0000-0000-000000000000}@ Object;
+extern class @{D6F50F64-93FA-49b7-93F1-BA66EFAE3E98}@ Object _predecl System;
+extern class @{E90DC47B-840D-4ae7-B02C-040BD275F7FC}@ Object Container;
+deprecated extern class @{00C074A0-FEA2-49a0-BE8D-FABBDB161640}@ Object Wac;
+extern class @{B2023AB5-434D-4ba1-BEAE-59637503F3C6}@ Object &List;
+extern class @{87C65778-E743-49fe-85F9-09CC532AFD56}@ Object &BitList;
+extern class @{38603665-461B-42a7-AA75-D83F6667BF73}@ Object &Map;
+extern class @{F4787AF4-B2BB-4ef7-9CFB-E74BA9BEA88D}@ Object &PopupMenu;
+extern class @{3A370C02-3CBF-439f-84F1-86885BCF1E36}@ Object &Region;
+extern class @{5D0C5BB6-7DE1-4b1f-A70F-8D1659941941}@ Object &Timer;
+deprecated extern class @{A5376FA1-4E94-411a-83F6-05EC5EEA5F0A}@ Object &FeedWatcher;
+extern class @{4EE3E199-C636-4bec-97CD-78BC9C8628B0}@ Object &GuiObject;
+extern class @{45BE95E5-2072-4191-935C-BB5FF9F117FD}@ GuiObject &Group;
+extern class @{60906D4E-537E-482e-B004-CC9461885672}@ Group &Layout;
+extern class @{403ABCC0-6F22-4bd6-8BA4-10C829932547}@ GuiObject &WindowHolder;
+extern class @{97AA3E4D-F4D0-4fa8-817B-0AF22A454983}@ GuiObject &ComponentBucket;
+extern class @{64E4BBFA-81F4-49d9-B0C0-A85B2EC3BCFD}@ GuiObject &Edit;
+extern class @{62B65E3F-375E-408d-8DEA-76814AB91B77}@ GuiObject &Slider;
+extern class @{CE4F97BE-77B0-4e19-9956-D49833C96C27}@ GuiObject &Vis;
+extern class @{A8C2200D-51EB-4b2a-BA7F-5D4BC65D4C71}@ GuiObject &Browser;
+extern class @{8D1EBA38-489E-483e-B960-8D1F43C5C405}@ GuiObject &EqVis;
+extern class @{0F08C940-AF39-4b23-80F3-B8C48F7EBB59}@ GuiObject &Status;
+extern class @{EFAA8672-310E-41fa-B7DC-85A9525BCB4B}@ GuiObject &Text;
+extern class @{7DFD3244-3751-4e7c-BF40-82AE5F3ADC33}@ GuiObject &Title;
+extern class @{5AB9FA15-9A7D-4557-ABC8-6557A6C67CA9}@ GuiObject &Layer;
+extern class @{698EDDCD-8F1E-4fec-9B12-F944F909FF45}@ GuiObject &Button;
+extern class @{6B64CD27-5A26-4c4b-8C59-E6A70CF6493A}@ Layer &AnimatedLayer;
+extern class @{6DCB05E4-8AC4-48c2-B193-49F0910EF54A}@ Layer &AlbumArtLayer;
+extern class @{B4DCCFFF-81FE-4bcc-961B-720FD5BE0FFF}@ Button &ToggleButton;
+extern class @{01E28CE1-B059-11d5-979F-E4DE6F51760A}@ GuiObject &GroupList;
+extern class @{80F0F8BD-1BA5-42a6-A093-3236A00C8D4A}@ Group &CfgGroup;
+deprecated extern class @{CDCB785D-81F2-4253-8F05-61B872283CFA}@ GuiObject &QueryList;
+extern class @{9B2E341B-6C98-40fa-8B85-0C1B6EE89405}@ GuiObject &MouseRedir;
+extern class @{36D59B71-03FD-4af8-9795-0502B7DB267A}@ GuiObject &DropDownList;
+extern class @{7FD5F210-ACC4-48df-A6A0-5451576CDC76}@ GuiObject &LayoutStatus;
+extern class @{B5BAA535-05B3-4dcb-ADC1-E618D28F6896}@ GuiObject &TabSheet;
+extern class @{6129FEC1-DAB7-4d51-9165-01CA0C1B70DB}@ GuiObject &GuiList;
+extern class @{D59514F7-ED36-45e8-980F-3F4EA0522CD9}@ GuiObject &GuiTree;
+extern class @{9B3B4B82-667A-420e-8FFC-794115809C02}@ Object &TreeItem;
+deprecated extern class @{1D8631C8-80D0-4792-9F98-BD5D36B49136}@ GuiObject &MenuButton;
+extern class @{C7ED3199-5319-4798-9863-60B15A298CAA}@ GuiObject &CheckBox;
+deprecated extern class @{2D2D1376-BE0A-4CB9-BC0C-57E6E4C999F5}@ GuiObject &Form;
+extern class @{E2BBC14D-84F6-4173-BDB3-B2EB2F665550}@ GuiObject &Frame; // Winamp 5.5
+extern class @{73C00594-961F-401B-9B1B-672427AC4165}@ GuiObject &Menu; // Winamp 5.52
+
+deprecated define Component WindowHolder
+
+#ifndef true
+#define true 1
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef false
+#define false 0
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+// class tree member functions & events
+
+//*****************************************************************************
+// Object CLASS
+//*****************************************************************************
+/**
+ Object Class.
+
+ @short This is the base class from which all other classes inherit.
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+/**
+ getClassName()
+
+ Returns the class name for the object.
+
+ @ret The class name.
+*/
+extern String Object.getClassName();
+
+/**
+ getId()
+
+*/
+extern String Object.getId();
+
+/**
+ onNotify()
+
+ @ret
+ @param command
+ @param param
+ @param a
+ @param b
+*/
+extern Int Object.onNotify(String command, String param, int a, int b);
+
+//*****************************************************************************
+// System CLASS
+//*****************************************************************************
+/**
+ System Class.
+
+ @short The system class are basic system functions accessible to all.
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+/**
+ onScriptLoaded()
+
+ Hookable. Event happens when script has just finished being loaded.
+ No params.
+*/
+extern System.onScriptLoaded();
+
+/**
+ onScriptUnloading()
+
+ Hookable. Event happens when script is going to be unloaded.
+ No params.
+*/
+extern System.onScriptUnloading();
+
+/**
+ onQuit()
+
+ Hookable. Event happens when the user quits the application.
+ No params.
+*/
+extern System.onQuit();
+
+/**
+ onSetXuiParam(String param, String value)
+
+ Hookable. Event happens when the script is in a group implementing
+ an xuiobject and a parameter has not been recognized by the group or
+ the embedded object.
+
+ No params.
+*/
+extern System.onSetXuiParam(String param, String value);
+
+/**
+ onKeyDown()
+
+ Hookable. Event happens when the user presses a key on the keyboard.
+
+ @param key The key that was pressed.
+*/
+extern System.onKeyDown(String key);
+
+/**
+ onAccelerator()
+
+ Hookable. Event happens when the user presses an accelerator key.
+
+ @param action The action to perform (from locales)
+ @param section The locales section for the accelerator.
+ @param key The key, ie: "tab", "ctrl+a".
+*/
+extern System.onAccelerator(String action, String section, String key);
+
+/**
+ onCreateLayout()
+
+ Hookable. Event happens when a layout is created.
+
+ @param _layout The layout that was just created.
+*/
+extern System.onCreateLayout(Layout _layout);
+
+/**
+ onShowLayout()
+
+ Hookable. Event happens when a layout is about to be shown.
+ This even only happens if the layout was previously hidden.
+
+ @param _layout The layout that's about to be shown.
+*/
+extern System.onShowLayout(Layout _layout);
+
+/**
+ onHideLayout()
+
+ Hookable.
+
+ @param _layout The layout that's about to be hidden.
+*/
+extern System.onHideLayout(Layout _layout);
+
+/**
+ onViewPortChanged()
+
+ Hookable. Event happens when the Windows viewport has changed.
+ Note: The monitor Winamp is currently on may not be related to
+ the Windows message which led to generating this event.
+
+ @param width The new viewport width or -1 if not given by the OS.
+ @param height The new viewport height or -1 if not given by the OS.
+*/
+extern System.onViewPortChanged(int width, int height);
+
+/**
+ onStop()
+
+ Hookable. Event happens when Winamp3 stops playing a file.
+ No params.
+*/
+extern System.onStop();
+
+/**
+ onPlay()
+
+ Hookable. Event happens when Winamp3 starts playing a file.
+ No params.
+*/
+extern System.onPlay();
+
+/**
+ onPause()
+
+ Hookable. Event happens when Winamp3 pauses playback.
+ No params.
+*/
+extern System.onPause();
+
+/**
+ onResume()
+
+ Hookable. Event happens when Winamp3 resumes playback.
+ Event only happens when the song was previously set in a paused state.
+ No params.
+*/
+extern System.onResume();
+
+/**
+ onTitleChange()
+
+ Hookable. Event happens when the song title changes.
+*/
+extern System.onTitleChange(String newtitle);
+
+extern System.onTitle2Change(String newtitle2);
+extern System.onUrlChange(String url);
+extern System.onInfoChange(String info);
+extern System.onStatusMsg(String msg);
+
+/**
+ onEqBandChanged()
+
+ Hookable. Event happens when an equalizer band changes values.
+ The bands are numbered from 0 to 9 (0 being 60Hz and 9 being 16kHz)
+ and their values range from -127 to +127.
+
+ @param band The frequency band that has changed.
+ @param newvalue The new value of the frequency band.
+*/
+extern System.onEqBandChanged(int band, int newvalue);
+
+/**
+ onEqPreampChanged()
+
+ Hookable. Event happens when the equalizer pre-amp has changed
+ values. Range of the value is from -127 to +127.
+
+ @param newvalue The new pre-amp value.
+*/
+extern System.onEqPreampChanged(int newvalue);
+
+/**
+ onEqChanged()
+
+ Hookable. Event happens when the EQ is switched on or off.
+ 0 means the EQ was turned off. 1 means it was turned on.
+ You might want to use true and false to verify this, it's a bit
+ more elegant. :)
+
+ @param newstatus The new status of the EQ.
+*/
+extern System.onEqChanged(int newstatus);
+
+extern System.onEqFreqChanged(int isiso); //Requires 5.51
+
+/**
+ onVolumeChanged()
+
+ Hookable. Event happens when the volume was changed.
+ The range of the volume is from 0 to 255.
+
+ @param newvol The new volume value.
+*/
+extern System.onVolumeChanged(int newvol);
+
+/**
+ onSeek()
+
+ Hookable. Event happens when the user seeks
+ to a position in the track.
+
+ @param newpos The seekers new position.
+*/
+extern System.onSeek(int newpos);
+
+/**
+ getContainer()
+
+ @ret The requested container.
+ @param container_id The containers identifier string.
+*/
+extern Container System.getContainer(String container_id);
+
+/**
+ newDynamicContainer()
+
+ @ret The new container.
+ @param container_id The identifier for the container you want to create.
+*/
+extern Container System.newDynamicContainer(String container_id);
+
+/**
+ newGroup()
+
+ @ret The new group.
+ @param group_id The identifier for the group you want to create.
+*/
+extern Group System.newGroup(String group_id);
+
+extern Layout System.newGroupAsLayout(String group_id);
+
+/**
+ getNumContainers()
+
+ Get the number of containers currently created.
+
+ @ret The number of containers.
+*/
+extern Int System.getNumContainers();
+
+/**
+ enumContainer()
+
+ Returns the name of the container associated with it's number.
+ Use getNumContainers() to fetch the number of containers present.
+ The containers are numbered from 0 to the value returned by getNumContainers().
+
+ @ret The name of the specified container.
+ @param num The container's number for which you want to know the name.
+*/
+extern Container System.enumContainer(Int num);
+
+extern String system.enumEmbedGUID(int num); //TODO
+
+/**
+ getWac()
+
+ Gets the reference to the wac identified by the guid sent.
+
+ @ret The requested WAC.
+ @param wac_guid The WAC's GUID.
+*/
+deprecated extern Wac System.getWac(String wac_guid);
+
+/**
+ messageBox()
+
+ Creates a message box.
+ The flag paramater lets you set the style of the message box.
+ Just use the OR bitwise operator to set the style you want.
+ Here's a list of the flags you can use:
+
+ MSGBOX_OK Adds an OK button. (1)
+ MSGBOX_CANCEL Adds a CANCEL button. (2)
+ MSGBOX_YES Adds a YES button. (4)
+ MSGBOX_NO Adds a NO button. (8)
+ MSGBOX_ALL Adds ALL buttons. (16)
+ MSGBOX_NEXT Adds a NEXT button. (32)
+ MSGBOX_PREVIOUS Adds a PREVIOUS button. (64)
+
+ Note that the notanymore_id parameter stores the users answer in the
+ configuration file with the entry name specified by it's value.
+
+ @ret The value of the button that was pressed (example: if OK is pressed, 1 is returned).
+ @param message The message you want to display.
+ @param msgtitle The title of the message box.
+ @param flag The message box style you want.
+ @param notanymore_id Configuration item name in which to store the users answer.
+*/
+extern Int System.messageBox(String message, String msgtitle, Int flag, String notanymore_id);
+
+/**
+ getPlayItemString()
+
+ @ret The name of what is playing.
+*/
+extern String System.getPlayItemString();
+
+/**
+ getPlayItemLength()
+
+ Get the length of the track currently playing, in milliseconds.
+
+ @ret Length of the track, in seconds.
+*/
+extern Int System.getPlayItemLength();
+
+/**
+ getPlayItemMetaDataString()
+
+ Get metadata for the track currently playing. The metadata field names that
+ are available are the following:
+
+ title
+ album
+ artist
+ albumartist
+ comment
+ year
+ composer
+ bitrate
+ srate
+ stereo
+ vbr
+ replaygain_track_gain
+ replaygain_album_gain
+ replaygain_track_peak
+ replaygain_album_peak
+ gain
+ genre
+ track
+ length
+ disc
+ bpm
+ conductor
+ key
+ mood
+ subtitle
+ lyricist
+ ISRC
+ media
+ remixer
+ encoder
+ publisher
+ tool
+ pregap
+ postgap
+ numsamples
+
+
+ @ret The requested metadata.
+ @param metadataname The name of the metadata field you want to read.
+*/
+extern String System.getPlayItemMetaDataString(String metadataname);
+extern String System.getMetaDataString(String filename, String metadataname); // Requires 5.53
+extern String System.getPlayItemDisplayTitle();
+
+extern Int System.getCurrentTrackRating(); //Requires 5.5
+extern System.onCurrentTrackRated(int rating); //Requires 5.5
+extern System.setCurrentTrackRating(int rating); //Requires 5.5
+
+/**
+ getExtFamily()
+
+ This one still return the same as getDecoderName()
+
+ //Gets registered family for given extension (i.e. mp3 -> "Audio")
+
+ @ret The registered family for given extension.
+ @param ext The extension in question.
+*/
+extern String System.getExtFamily(String ext);
+
+extern String system.getDecoderName(string playitem);
+
+/**
+ playFile()
+
+ Play the requested file. Path and filename are required
+ with proper extension (example: playFile("c:\music\mp3\file.mp3"); ).
+ It also works with URL's (example: playFile("http://myshoutcast.com:8000"); ).
+
+ @param playitem The path and filename to play.
+*/
+extern System.playFile(String playitem);
+
+extern Int System.getAlbumArt(String playitem); //Requires 5.5 // Will return 1 if an album art has been downloaded, otherwise 0
+
+/**
+ downloadMedia()
+
+ Hookable. Downloads a file from url and saves it as destination_filename.
+ If destinationPath is "" it will be saved in CD Ripping dir (=getDownloadPath()).
+
+ @param url the file to be downloaded
+ @param destinationPath the path you want to store the file
+ @param wantAddToML set true if you wnt to add the file to ML database
+ @param notifyDownloadsList set true in order to list the download in <DownloadsLis/> Object
+*/
+extern System.downloadMedia(String url, String destinationPath, boolean wantAddToML, boolean notifyDownloadsList); // Requires 5.54
+deprecated extern System.downloadURL(String url, String destination_filename, String progress_dialog_title); //Requires 5.5 // destination_filename is just a dummy parameter as well as progress_dialog_title - use download() instead
+
+extern System.onDownloadFinished(String url, boolean success, String filename); // Requires 5.53
+extern String System.getDownloadPath(); // Requires 5.53 // returns the CD Ripping Directory
+extern System.setDownloadPath(String new_path); // Requires 5.53 // Sets the CD Ripping Directory
+
+/**
+ enqueueFile()
+
+ Enqueque the requested file. Path and filename are required
+ with proper extension (example: playFile("c:\music\mp3\file.mp3"); ).
+ It also works with URL's (example: playFile("http://myshoutcast.com:8000"); ).
+
+ @param playitem The path and filename to play.
+*/
+extern System.enqueueFile(String playitem); //Requires 5.5
+
+/**
+ getLeftVuMeter()
+
+ Get the value of the left vu meter.
+ Range is from 0 to 255. Linear.
+
+ @ret The value of the left vu meter.
+*/
+extern Int System.getLeftVuMeter();
+
+/**
+ getRightVuMeter()
+
+ Get the value of the right vu meter.
+ Range is from 0 to 255. Linear.
+
+ @ret The value of the left vu meter.
+*/
+extern Int System.getRightVuMeter();
+
+/**
+ getVolume()
+
+ Get the current volume. Range is from 0 to 255.
+
+ @ret The current volume.
+*/
+extern Int System.getVolume();
+
+/**
+ setVolume()
+
+ Set the volume to the desired value.
+ Range is from 0 to 255.
+
+ @param vol The desired volume value.
+*/
+extern System.setVolume(Int vol);
+
+/**
+ play()
+
+ Trigger the play event.
+*/
+extern System.play();
+
+/**
+ stop()
+
+ Trigger the stop event.
+*/
+extern System.stop();
+
+/**
+ pause()
+
+ Trigger the pause event.
+*/
+extern System.pause();
+
+/**
+ next()
+
+ Trigger the next event.
+*/
+extern System.next();
+
+/**
+ previous()
+
+ Trigger the previous event.
+*/
+extern System.previous();
+
+/**
+ eject()
+
+ Trigger the eject event.
+*/
+extern System.eject();
+
+/**
+ seekTo()
+
+ Seek to the desired position in the track. Range is from
+ 0 to SONG LENGTH (in milliseconds).
+*/
+extern System.seekTo(Int pos);
+
+/**
+ getPosition()
+
+ Get the current position in the track currently playing,
+ in milliseconds.
+
+ @ret The current position in the track.
+*/
+extern Int System.getPosition();
+
+/**
+ setEqBand()
+
+ Sets the requested equalizer band to the specified value.
+ The bands are numbered from 0 (60Hz) to 9 (16kHz) and
+ each range from -127 to +127.
+
+ @param band The EQ band to set.
+ @param value The desired value for the specified band.
+*/
+extern System.setEqBand(int band, Int value);
+
+/**
+ setEqPreamp()
+
+ Set the equalizer pre-amp to the desired value.
+ Range is from -127 to +127 (0 means no preamp).
+
+ @param value The desired value for the pre-amp.
+*/
+extern System.setEqPreamp(Int value);
+
+/**
+ Set the equalizer to the desired state. On or off.
+ 0 is off, 1 is on.
+
+ @param onoff The desired state for the eq.
+*/
+extern System.setEq(Int onoff);
+
+/**
+ getEqBand()
+
+ Get the value of an equalizer band. The bands
+ are numbered from 0 (60Hz) to 9 (16kHz). The return
+ value range is from -127 to +127.
+
+ @ret The value of the band.
+ @param band The eq band number you want to get.
+*/
+extern Int System.getEqBand(int band);
+
+/**
+ getEqPreamp()
+
+ Get the equalizer preamp value. The value range is
+ from -127 to +127 (0 means no preamp).
+
+ @ret The preamp's current value.
+*/
+extern int System.getEqPreamp();
+
+/**
+ getEq()
+
+ Get the equalizer state. 0 for off, 1 for on.
+ Remember to compare return value to true and false.
+
+ @ret The EQ's state.
+*/
+extern int System.getEq();
+
+/**
+ getMousePosX()
+
+ This returns the X position of the mouse in the screen,
+ using the screen coordinate system.
+
+ @ret The mouse's current X pos.
+*/
+extern int System.getMousePosX();
+
+/**
+ getMousePosY()
+
+ This returns the Y position of the mouse in the screen,
+ using the screen coordinate system.
+
+ @ret The mouse's current Y pos.
+*/
+extern int System.getMousePosY();
+
+/**
+ integerToString()
+
+ Get the string representation of an integer.
+
+ @ret The string equivalent of the integer.
+ @param value The integer to change into a string.
+*/
+extern String System.integerToString(Int value);
+
+/**
+ StringToInteger()
+
+ Get the integer representation of a string.
+
+ @ret The integer equivalent of the string.
+ @param str The string to change into an integer.
+*/
+extern Int System.StringToInteger(String str);
+
+/**
+ floatToString()
+
+ Get the string representation of a floating point number.
+
+ @ret The string representation of the float number.
+ @param value The float to convert.
+ @param ndigits Number of digits after the decimal point you want.
+*/
+extern String System.floatToString(float value, int ndigits);
+
+/**
+ stringToFloat()
+
+ Get the floating point representation of a string.
+
+ @ret The float representation of the string.
+ @param str The string to convert.
+*/
+extern Float System.stringToFloat(String str);
+
+/**
+ integerToLongTime()
+
+ Convert a time in seconds to a HH:MM:SS value.
+
+ @ret The string representation of the time (HH:MM:SS).
+ @param value Timestamp to use.
+*/
+extern String System.integerToLongTime(Int value);
+
+/**
+ integerToTime()
+
+ Convert a time in seconds to a MM:SS value.
+
+ @ret The string representation of the time (MM:SS).
+ @param value Timestamp to use.
+*/
+extern String System.integerToTime(Int value);
+
+extern String System.dateToTime(Int datetime); // prints the time from a date with the same format as integerToTime
+extern String System.dateToLongTime(Int datetime); // prints the time from a date with the same format as integerToLongTime
+extern String System.formatDate(Int datetime); // formats the date according to the locales - short date format
+extern String System.formatLongDate(Int datetime); // formats the date according to the locales - long date format
+extern Int System.getDateYear(Int datetime); // returns the datetime's year since 1900
+extern Int System.getDateMonth(Int datetime); // returns the datetime's month (0-11)
+extern Int System.getDateDay(Int datetime); // returns the datetime's day of the month (1-31)
+extern Int System.getDateDow(Int datetime); // returns the datetime's day of the week (0-6)
+extern Int System.getDateDoy(Int datetime); // returns the datetime's day of the year (0-365)
+extern Int System.getDateHour(Int datetime); // returns the datetime's hour (0-23)
+extern Int System.getDateMin(Int datetime); // returns the datetime's minutes (0-59)
+extern Int System.getDateSec(Int datetime); // returns the datetime's seconds (0-59)
+extern Int System.getDateDst(Int datetime); // returns the datetime's daylight savings flag
+extern Int System.getDate(); // returns the datetime, use with the above functions
+
+/**
+ strmid()
+
+ Get a substring from a string.
+
+ @ret The substring.
+ @param str The string.
+ @param start The start position.
+ @param len The length of the string to extract, from start position.
+*/
+extern String System.strmid(String str, Int start, Int len);
+
+/**
+ strleft()
+
+ Get a substring from a string, starting from the left.
+
+ @ret The substring.
+ @param str The string.
+ @param nchars The length of the string to extract, from the left.
+*/
+extern String System.strleft(string str, int nchars);
+
+/**
+ strright()
+
+ Get a substring from a string, starting from the right. Since
+ the start point is the right of the string (or the end). It will
+ extract the string starting from the END going towards the BEGINNING.
+
+ @ret The substring.
+ @param str The string.
+ @param nchars The length of the string to extract, from the right.
+*/
+extern string System.strright(string str, int nchars);
+
+/**
+ strsearch()
+
+ Search a string for any occurance of substring. If the substring was
+ found in the string, it will return the position of the substring in
+ the string searched. If the substring is not found, the return value
+ is -1.
+
+ @ret Position at which the substring was found.
+ @param str The string to search in.
+ @param substr The substring to find.
+*/
+extern int System.strsearch(string str, string substr);
+
+/**
+ strlen()
+
+ Returns the length of the string.
+
+ @ret The length of the string.
+ @param str The string.
+*/
+extern int System.strlen(string str);
+
+/**
+ strupper()
+
+ Convert a string to all uppercase.
+
+ @ret The uppercase string.
+ @param str The string to uppercase.
+*/
+extern string System.strupper(string str);
+
+/**
+ strlower()
+
+ Convert a string to all lowercase.
+
+ @ret The lowercase string.
+ @param str The string to lowercase.
+*/
+extern string System.strlower(string str);
+
+/**
+ urlEncode()
+
+ URL Encode a string. Characters that are NOT encoded
+ are: All letters, All digits, underscore (_), dash (-) and
+ period (.).
+
+ @ret The URL encoded string.
+ @param url The string to URL encode.
+*/
+extern string System.urlEncode(string url);
+
+extern string System.urlDecode(string url); // Requires 5.54
+
+/**
+ parseATF()
+
+ Pass a string through the ATF parser
+
+ @ret The ATF encoded string.
+ @param topass The string to ATF encode.
+*/
+//extern string System.parseATF(string topass); // To be done
+
+/**
+ removePath()
+
+ Remove the path from a full filename. (example:
+ c:\music\mp3\test.mp3 -> test.mp3)
+ Also works on URLs.
+
+ @ret The filename with the path removed.
+ @param str The fullpath of a file.
+*/
+extern string System.removePath(string str);
+
+/**
+ getPath()
+
+ Gets the path from a full filename. (example:
+ c:\music\mp3\test.mp3 -> c:\music\mp3)
+ Also works on URLs.
+
+ @ret The path with the filename removed.
+ @param str The fullpath of a file.
+*/
+extern string System.getPath(string str);
+
+/**
+ getExtension()
+
+ Gets the extension from a filename. (example:
+ c:\music\mp3\test.mp3 -> mp3)
+ Also works on URLs.
+
+ @ret The extension of the filename.
+ @param str The fullpath of a file.
+*/
+extern string System.getExtension(string str);
+
+/**
+ getToken()
+
+ Retreive a token from a list of tokens seperated by separator.
+ The index starts at 0, not 1, so be careful.
+ Here's a short example:
+ getToken("1,2,3,4,5", ",", 3);
+ Would return, 3. If the token you ask for doesn't exist, an
+ empty string is returned.
+
+ @ret The token requested.
+ @param str The tokenenized string.
+ @param separator The separator to use.
+ @param tokennum The token to retreive.
+*/
+extern string System.getToken(string str, string separator, int tokennum);
+
+/**
+ sin()
+
+ Takes an angle in radians and returns the ratio of two sides of a right triangle.
+ The ratio is the length of the side opposite the angle divided by the length
+ of the hypotenuse. The result range is from -1 to 1.
+
+ Converting from degrees to radians can be done by multiplying degrees by PI/180.
+
+ @ret The sine value of the angle.
+ @param value The angle for which you want to know the sine value.
+*/
+extern double System.sin(double value);
+
+/**
+ cos()
+
+ Takes an angle in radians and returns the ratio of the two sides of a right triangle.
+ The ratio is the length of the side adjacent to the angle divided by the length of the
+ hypotenuse. The result is range is from -1 to 1.
+
+ @ret The cosine value of the angle.
+ @param value The angle for which you want to know the cosine value.
+*/
+extern double System.cos(double value);
+
+/**
+ tan()
+
+ Takes an angle in radians and returns the ratio between two sides of a right triangle.
+ The ratio is sin(x) divided by cos(x).
+
+ @ret The tangent value of the angle.
+ @param value The angle for which you want to know the tangent value.
+*/
+extern double System.tan(double value);
+
+/**
+ asin()
+
+ Takes a sine value ranging from -1 to 1 and returns the angle in radians.
+ The return value ranges from -PI/2 to +PI/2.
+
+ @ret The angle in radians.
+ @param value The sine value for which you want to know the angle.
+*/
+extern double System.asin(double value);
+
+/**
+ acos()
+
+ Takes a cosine value ranging from -1 to 1 and returns the angle in radians.
+ The return value ranges from -PI/2 to +PI/2.
+
+ @ret The angle in radians.
+ @param value The cosine value for which you want to know the angle.
+*/
+extern double System.acos(double value);
+
+/**
+ atan()
+
+ Takes an angle in radians and returns the ration between two sides of a right triangle.
+ The ratio is cos(x) divided by sin(x).
+
+ @ret The arc tangent value of the angle.
+*/
+extern double System.atan(double value);
+
+/**
+ atan2()
+
+ @ret The arctangent of y/x.
+*/
+extern double System.atan2(double y, double x);
+
+
+/**
+ pow()
+
+ Elevate a number to the N'th power.
+
+ @ret The number
+ @param value The number you want to elevate to the N power.
+ @param pvalue The power to which you want to elevate the number.
+*/
+extern double System.pow(double value, double pvalue);
+
+/**
+ sqr()
+
+ Get the square of a number.
+
+ @ret The number, squared.
+ @param value The number for which you want the square value.
+*/
+extern double System.sqr(double value);
+
+extern double System.log10(double value);
+extern double System.ln(double value);
+
+/**
+ sqrt()
+
+ Get the square root of a number.
+
+ @ret The square root of the number.
+ @param value The number for which you want the square root value.
+*/
+extern double System.sqrt(double value);
+
+/**
+ random()
+
+ Get a randomely generated number. The random number will not
+ be bigger than the max value indicated. Smallest value is 0.
+
+ @ret The random number.
+ @param max The maximum value of the random number to return.
+*/
+extern int System.random(int max);
+
+/**
+ setPrivateString()
+
+ Create a private config entry for your script, of String type.
+
+ @param section The section for the entry.
+ @param item The item name for the entry.
+ @param value The value of the entry.
+*/
+extern System.setPrivateString(string section, string item, string value);
+
+/**
+ setPrivateInt()
+
+ Create a private config entry for your script, of Int type.
+
+ @param section The section for the entry.
+ @param item The item name for the entry.
+ @param value The value of the entry.
+*/
+extern System.setPrivateInt(string section, string item, int value);
+
+/**
+ getPrivateString()
+
+ Read a private config entry of String type. Returns
+ the specified default value if the section and item isn't
+ found.
+
+ @ret The value of the config entry.
+ @param section The section from which to read the entry.
+ @param item The name of the item to read.
+ @param defvalue The default value to return if no item is found.
+*/
+extern String System.getPrivateString(String section, String item, String defvalue);
+
+/**
+ getPrivateInt()
+
+ Read a private config entry of Integer type. Returns
+ the specified default value if the section and item isn't
+ found.
+
+ @ret The value of the config entry.
+ @param section The section from which to read the entry.
+ @param item The name of the item to read.
+ @param defvalue The defautl value to return if no item is found.
+*/
+extern Int System.getPrivateInt(String section, String item, Int defvalue);
+
+/**
+ setPublicString()
+
+ Create a public config entry for your script, of String type.
+
+ @param item The item name for the entry.
+ @param value The value of the entry.
+*/
+extern System.setPublicString(String item, String value);
+
+/**
+ setPublicInt()
+
+ Create a public config entry for your script, of Int type.
+
+ @param item The item name of the entry.
+ @param value The value of the entry.
+*/
+extern System.setPublicInt(String item, Int value);
+
+/**
+ getPublicString()
+
+ Read a public config entry of String type. Returns
+ the specified default value if the item isn't found.
+
+ @ret The value of the config entry.
+ @param item The item name to read.
+ @param defvalue The default value to return if no item is found.
+*/
+extern String System.getPublicString(String item, String defvalue);
+
+/**
+ getPublicInt()
+
+ Read a public config entry of Integer type. Returns
+ the specified default value if the item isn't found.
+
+ @ret The value of the config entry.
+ @param item The item name to read.
+ @param defvalue The default value to return if no item is found.
+*/
+extern Int System.getPublicInt(String item, Int defvalue);
+
+/**
+ getParam()
+
+ Get the parameters with which the script is called.
+ This is the 'param="..."' attribute in the <script ...>
+ skin XML tag.
+
+ @ret The parameter for the script.
+*/
+extern String System.getParam();
+
+/**
+ getScriptGroup()
+
+ Get the group in which the script is instantiated. Returns
+ Null if it's not instantiated in a group.
+
+ @ret
+*/
+extern Group System.getScriptGroup();
+
+/**
+ getViewPortWidth()
+
+ Get the user's screen width in pixels.
+
+ @ret The width of the user's screen.
+*/
+extern Int System.getViewportWidth();
+extern Int System.getViewportWidthFromGuiObject(GuiObject g); //Requires 5.5
+extern Int System.getViewportWidthFromPoint(int x, int y);
+
+extern Int System.getMonitorWidth(); //Requires 5.5
+extern Int System.getMonitorWidthFromPoint(int x, int y); //Requires 5.5
+extern Int System.getMonitorWidthFromGuiObject(GuiObject g); //Requires 5.631
+
+//todo/ extern System.onMouseMove(int x, int y);
+
+/**
+ getViewPortHeight()
+
+ Get the user's screen height in pixels.
+
+ @ret The height of the user's screen.
+*/
+extern Int System.getViewportHeight();
+extern Int System.getViewportHeightFromGuiObject(GuiObject g); //Requires 5.5
+extern Int System.getViewportHeightFromPoint(int x, int y);
+
+extern Int System.getMonitorHeight(); //Requires 5.5
+extern Int System.getMonitorHeightFromPoint(int x, int y); //Requires 5.5
+extern Int System.getMonitorHeightFromGuiObject(GuiObject g); //Requires 5.631
+
+extern Int System.getMonitorLeft(); //Requires 5.631
+extern Int System.getMonitorLeftFromGuiObject(GuiObject g); //Requires 5.5
+extern Int System.getMonitorLeftFromPoint(int x, int y); //Requires 5.5
+
+extern Int System.getMonitorTop(); //Requires 5.631
+extern Int System.getMonitorTopFromGuiObject(GuiObject g); //Requires 5.631
+extern Int System.getMonitorTopFromPoint(int x, int y); //Requires 5.631
+
+extern Int System.getViewportLeft();
+extern Int System.getViewportLeftFromGuiObject(GuiObject g); //Requires 5.5
+extern Int System.getViewportLeftFromPoint(int x, int y);
+
+extern Int System.getViewportTop();
+extern Int System.getViewportTopFromGuiObject(GuiObject g); //Requires 5.5
+extern Int System.getViewportTopFromPoint(int x, int y);
+
+/**
+ debugString()
+
+ Send a debug message to the Wasabi Console.
+ The severity ranges from 0 (not serious) to 9 (very serious).
+
+ @param str The debug message.
+ @param severity The severity of the error.
+*/
+extern System.debugString(String str, Int severity);
+
+/**
+ ddeSend()
+
+ Send a DDE message to an application. The minimum
+ interval between messages is specified in milliseconds.
+ Here's an example:
+
+ ddeSend("mIRC", "/msg #channel I'm using Winamp3", 300);
+
+ @param application The DDE server name of the application.
+ @param command The command to send.
+ @param mininterval The minimum interval to respect between messages (in ms).
+*/
+extern System.ddeSend(String application, String command, Int mininterval);
+
+/**
+ onLookForComponent()
+
+ Hookable. Event happens when the component with the
+ specified GUID is going to be shown. Don't forget
+ to return the component when you're done doing what
+ you want to do (example: animate something).
+
+ @ret The component requested.
+ @param guid The requested components GUID.
+
+*/
+extern WindowHolder System.onLookForComponent(String guid);
+
+/**
+ getCurAppLeft()
+
+ Get the applications current left coordinate in the screen,
+ using the screen coordinate system.
+
+ @ret The left coordinate of the application.
+*/
+extern Int System.getCurAppLeft();
+
+/**
+ getCurAppTop()
+
+ Get the applications current top coordinate in the screen,
+ using the screen coordinate system.
+
+ @ret The top coordinate of the application.
+*/
+extern Int System.getCurAppTop();
+
+/**
+ getCurAppWidth()
+
+ Get the applications current window width, in pixels.
+
+ @ret The width of the application window.
+*/
+extern Int System.getCurAppWidth();
+
+/**
+ getCurAppHeight()
+
+ Get the applications current window height, in pixels.
+
+ @ret The height of the application window.
+*/
+extern Int System.getCurAppHeight();
+
+/**
+ isAppActive()
+
+ Get the current status of the application. If it's active,
+ it means the application has focus. True is active, false is
+ inactive.
+
+ @ret The application's status.
+*/
+extern Boolean System.isAppActive();
+
+/**
+ getSkinName()
+
+ Get the skin name for the loaded skin.
+
+ @ret The skin's name.
+*/
+extern String System.getSkinName();
+extern System.switchSkin(String skinname);
+extern Int System.isLoadingSkin(); // 1 if loading, -1 if UNloading, 0 otherwise
+extern System.lockUI();
+extern System.unlockUI();
+
+/**
+ getMainBrowser()
+
+ Get a reference to the main browser object.
+ This is the browser object that's defined with
+ mainmb="1" in the skin XML.
+
+ @ret A reference to the main browser object.
+*/
+extern Browser System.getMainBrowser();
+extern System.popMainBrowser();
+extern System.navigateUrl(String url);
+extern System.navigateUrlBrowser(String url); //Requires 5.53 // will call an onOpenUrl requuest and then navigate to an extern browser, can also be used to open nowplaying
+
+extern Boolean System.onOpenURL(string url); //Requires 5.5 // called everytime winamp wants to open a website in an extern browser, return 1 to cancel this opening and open in your browser
+
+/**
+ isObjectValid()
+
+ Verifies if an object is valid. You can also verify
+ this using the Null object. True means the object is valid,
+ false means it isn't.
+
+ @ret The validity of the object.
+ @param o The object you want to verify.
+*/
+extern Boolean System.isObjectValid(Object o);
+
+/**
+ integer()
+
+ Takes a Double and returns the closest integer representation.
+
+ @ret The integer representation of the double.
+ @param d The double for which you want an integer representation.
+*/
+extern Int System.integer(Double d);
+extern Double System.frac(Double d);
+
+/**
+ getTimeOfDay()
+
+ Read the current time of the day. Returns a number that's
+ the number of milliseconds since the start of the day (0:00).
+
+ @ret The number of milliseconds since midnight.
+*/
+extern Int System.getTimeOfDay();
+
+/**
+ setMenuTransparency()
+
+ Set the menu's transparency value (alpha blending). Ranges
+ from 0 to 255. 0 being totally transparent and 255 being
+ totally opaque.
+
+ @param alphavalue The transparency value to set.
+*/
+extern System.setMenuTransparency(int alphavalue);
+
+extern Boolean System.onGetCancelComponent(String guid, boolean goingvisible);
+
+#define STATUS_PAUSED -1
+#define STATUS_STOPPED 0
+#define STATUS_PLAYING 1
+
+/**
+ getStatus()
+
+ returns the status of the main player core.
+
+ @ret STATUS_PAUSED (-1) if paused, STATUS_STOPPED (0) if stopped, STATUS_PLAYING (1) if playing.
+*/
+extern Int System.getStatus();
+
+#define VK_SHIFT 16
+#define VK_CONTROL 17
+#define VK_ALT 18
+
+/**
+ Int isKeyDown(int vk_code)
+
+ Checks if a virtual key (like VK_CONTROL, VK_SHIFT, VK_ALT) is pressed.
+
+ @ret 1 if key is pressed, 0 if not.
+*/
+
+extern Int System.isKeyDown(int vk_code);
+
+/**
+ setClipboardText(String text)
+
+ Sets the given text to the clipboard.
+*/
+
+extern System.setClipboardText(String _text);
+
+/**
+ String Chr(Int charnum)
+
+ Returns a string the ascii char.
+*/
+
+extern String System.Chr(Int charnum);
+
+
+/**
+ translate
+
+ Takes a passed string and attempts to find a matching translation
+ of the skin as specified in wasabi.xml (if this is present).
+
+ @ret The translated string or the passed string if no translation present.
+ @param str The string to be compared for translation.
+
+e.g. int wasabi.xml we have <translation from="Volume:" to="Volume: Happy" />
+ so on calling translate("Volume:") would give us "Volume: Happy"
+*/
+extern String System.translate(String str); // Requires 5.54
+
+/**
+ getString
+ Returns a String from wasabi StringTable
+
+ @ret The translated string or "" if no translation present.
+ @param table The StringTable identifier, eg "nullsoft.bento"
+ @param id The id of the String (starting with 0)
+*/
+extern String System.getString(String table, int id); // Requires 5.54
+
+/**
+ getLanguageId
+ Returns the Language Identifier (en-us or de-de).
+
+ @ret Language Identifier.
+*/
+extern String System.getLanguageId(); // Requires 5.54
+
+
+// extlist should be like "jpeg files|*.jpg|all files|*.*||"
+// note the extra | on the end
+deprecated extern String System.selectFile(String extlist, String id, String prev_filename);
+extern String System.selectFolder(String wnd_title, String wnd_info, String default_path); // Requires 5.53 // use wnd_title="" in order to display default system caption
+extern System.systemMenu();
+extern System.windowMenu();
+extern System.triggerAction(GuiObject context, String actionname, String actionparam);
+extern GuiObject System.showWindow(String guidorgroupid, String preferedcontainer, Boolean transient); // "" = default container, returns the hosted window
+extern System.hideWindow(GuiObject hw); // hw = hosted window, returned by showWindow
+extern System.hideNamedWindow(String guidorgroup); // hides the last created wnd with this guid/groupname
+extern Boolean System.isNamedWindowVisible(String guidorgroup);
+//extern System.setAtom(String atomname, Object object);
+//extern Object System.getAtom(String atomname);
+extern System.invokeDebugger();
+extern int System.hasVideoSupport(); // requires 5.666 - returns 1 if video support is enabled in Winamp
+extern Int System.isVideo();
+extern Int System.isVideoFullscreen();
+extern System.setVideoFullscreen(Boolean fullscreen); // requires 5.8
+extern Int System.getIdealVideoWidth(); // -1 if video has never been open this session, otherwise the ideal width of the currently (or last) video played
+extern Int System.getIdealVideoHeight(); // -1 if video has never been open this session, otherwise the ideal height of the currently (or last) video played
+extern Int System.isMinimized();
+extern System.minimizeApplication();
+extern System.restoreApplication();
+extern System.activateApplication();
+extern Int System.getPlaylistLength(); // number of items in the playlist
+extern Int System.getPlaylistIndex(); // currently playing item in the playlist (or next to play if stopped)
+extern System.clearPlaylist(); //Requires 5.5
+extern Boolean System.isDesktopAlphaAvailable();
+extern Boolean System.isTransparencyAvailable();
+extern Int System.onShowNotification(); // return 1 if you implement it
+extern String System.getSongInfoText(); // same as what gets in a text object with display="SONGINFO"
+extern String System.getSongInfoTextTranslated(); // same as what gets in a text object with display="SONGINFO_LOCALISE"
+extern Int System.getVisBand(int channel, int band); // 0,1 / 0..75
+extern Double System.getRuntimeVersion(); // returns the maki runtime version, up to 5.01 = 0.0, 5.02+ = 1.0
+
+//extern Int System.isWa2ComponentVisible(String guid);
+//extern System.hideWa2Component(String guid);
+
+extern boolean system.isProVersion(); //Requires 5.5
+extern String System.getWinampVersion(); //Requires 5.51
+extern Int System.getBuildNumber(); //Requires 5.51
+
+extern int System.getFileSize(String fullfilename); //Requires 5.51
+
+//*****************************************************************************
+// Container CLASS
+//*****************************************************************************
+/**
+ Container Class.
+
+ @short The container class enables you to control current containers and also create them.
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+/**
+ onSwitchToLayout()
+
+ Hookable. Event happens when a container is going to switch
+ from the currently active layout to another layout (newlayout).
+
+ @param newlayout The new layout that will be used.
+*/
+extern Container.onSwitchToLayout(Layout newlayout);
+extern Container.onBeforeSwitchToLayout(Layout oldlayout, Layout newlayout);
+extern Container.setXmlParam(String param, String value);
+/**
+ onHideLayout()
+
+ Hookable. Event happens when a container is about to hide
+ the currently active layout (_layout).
+
+ @param _layout The layout that's going to be hidden.
+*/
+extern Container.onHideLayout(Layout _layout);
+
+/**
+ onShowLayout()
+
+ Hookable. Event happens when a container is about to
+ show a layout (_layout).
+
+ @param _layout The layout about to be shown
+*/
+extern Container.onShowLayout(Layout _layout);
+
+/**
+ getLayout()
+
+ Get the layout associated with the an id.
+ This corresponds to the "id=..." attribute in
+ the XML tag <layout .. />.
+
+ @ret The layout associated with the id.
+ @param layout_id The id of the layout you wish to retrieve.
+*/
+extern Layout Container.getLayout(String layout_id);
+
+/**
+ getNumLayouts()
+
+ Get the number of layouts contained in the
+ container.
+
+ @ret The number of layouts.
+*/
+extern Int Container.getNumLayouts();
+
+/**
+ enumLayout()
+
+ Get the layout by it's index number.
+ Range is from 0 to the value returned
+ by getNumLayouts() - 1.
+
+ @ret The layout.
+ @param num The index number of the layout you want.
+*/
+extern Layout Container.enumLayout(Int num);
+
+/**
+ switchToLayout()
+
+ Switch to a perticular layout by using the
+ desired layout's id. This corresponds to the
+ "id=..." attribute in the XML tag <layout .. />.
+
+ @param layout_id The id of the layout to which you want to switch.
+*/
+extern Container.switchToLayout(String layout_id);
+
+/**
+ show()
+
+ Trigger the show event.
+*/
+extern Container.show();
+
+/**
+ hide()
+
+ Trigger the hide event.
+*/
+extern Container.hide();
+// this one destroys it if the container is dynamic, or hides otherwise
+extern Container.close();
+
+/**
+ toggle()
+
+ Toggle the containers state between Shown / Hidden.
+*/
+extern Container.toggle();
+
+/**
+ isDynamic()
+
+ Tells you if the current container is a dynamic
+ container or not. Values are true (1) for dynamic
+ false (0) for static.
+
+ @ret The container type (dynamic or static).
+*/
+extern Int Container.isDynamic();
+
+extern Container.setName(String name);
+extern String Container.getName(); //requires Winamp 5.53
+extern String Container.getGuid(); //requires Winamp 5.53
+extern Layout Container.getCurLayout();
+extern Container.onAddContent(GuiObject wnd, String id, String guid); //requires Winamp 5.51
+
+//*****************************************************************************
+// WAC CLASS
+//*****************************************************************************
+/**
+ WAC Class.
+ Not used in Winamp5.
+
+ @short .
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+/**
+ getGuid()
+
+ Get the GUID of the WAC.
+
+ @ret The GUID of the WAC.
+*/
+deprecated extern String Wac.getGuid();
+
+/**
+ getName()
+
+ Get the name of the WAC.
+
+ @ret The name of the WAC.
+*/
+deprecated extern String Wac.getName();
+
+/**
+ sendCommand()
+
+
+*/
+deprecated extern Int Wac.sendCommand(String cmd, Int param1, Int param2, String param3);
+
+/**
+ show()
+
+ Trigger the show event.
+*/
+deprecated extern Wac.show();
+
+/**
+ hide()
+
+ Trigger the hide event.
+*/
+deprecated extern Wac.hide();
+
+/**
+ isVisible()
+
+
+*/
+deprecated extern Boolean Wac.isVisible();
+
+/**
+ onNotify()
+
+
+*/
+deprecated extern Wac.onNotify(String notifstr, Int a, Int b);
+
+/**
+ onShow()
+
+ Hookable. The event happens when the WAC is about
+ to be shown.
+*/
+deprecated extern Wac.onShow();
+
+/**
+ onHide()
+
+ Hookable. The event happens when the WAC is about
+ to be hidden.
+*/
+deprecated extern Wac.onHide();
+
+/**
+ setStatusBar()
+
+ Set the status bars visibility.
+ Sending true will make the status bar
+ visible while sending false will hide
+ it.
+
+ @param onoff The status bars visibility.
+*/
+deprecated extern Wac.setStatusBar(Boolean onoff);
+
+/**
+ getStatusBar()
+
+ Get the status bars visibility. True means
+ it's visible, false means it's hidden.
+
+ @ret The status bars visibility.
+*/
+deprecated extern Boolean Wac.getStatusBar();
+
+//*****************************************************************************
+// GUIOBJECT CLASS
+//*****************************************************************************
+/**
+ GuiObject Class.
+
+ @short .
+ @author Nullsoft Inc.
+ @ver 1.0
+*/
+
+/**
+ show()
+
+ Trigger the show event.
+*/
+extern GuiObject.show();
+
+/**
+ hide()
+
+ Trigger the hide event.
+*/
+extern GuiObject.hide();
+
+/**
+ isVisible()
+
+ Get the visibility status of the object.
+ False means it's hidden, true means it's
+ visible.
+
+ @ret The visibility status of the object.
+*/
+extern int GuiObject.isVisible();
+
+/**
+ onSetVisible()
+
+ Hookable. Event happens when the visibility
+ status of the object is changed from visible to
+ hidden or vice-versa.
+
+ @param onoff The objects visibility status.
+*/
+extern GuiObject.onSetVisible(Boolean onoff);
+
+/**
+ setAlpha()
+
+ Set the alphablending value of the object.
+ Value ranges from 0 (fully transparent) to
+ 255 (fully opaque).
+
+ @param alpha The alpha value.
+*/
+extern GuiObject.setAlpha(int alpha);
+
+/**
+ getAlpha()
+
+ Get the current alphablending value of
+ the object. Value ranges from 0 (fully
+ transparent) to 255 (fully opaque).
+
+ @ret The alpha value.
+*/
+extern int GuiObject.getAlpha();
+
+/**
+ onLeftButtonUp()
+
+ Hookable. Event happens when the left mouse
+ button was previously down and is now up.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onLeftButtonUp(int x, int y);
+
+/**
+ onLeftButtonDown()
+
+ Hookable. Event happens when the left mouse button
+ is pressed.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onLeftButtonDown(int x, int y);
+
+/**
+ onRightButtonUp()
+
+ Hookable. Event happens when the right mouse button
+ was previously down and is now up.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onRightButtonUp(int x, int y);
+
+/**
+ onRightButtonDown()
+
+ Hookable. Event happens when the right mouse button
+ is pressed.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onRightButtonDown(int x, int y);
+
+/**
+ onRightButtonDlbClk()
+
+ Hookable. Event happens when the right mouse button
+ is double clicked.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onRightButtonDblClk(int x, int y);
+
+/**
+ onLeftButtonDlbClk()
+
+ Hookable. Event happens when the left mouse button
+ is double clicked.
+
+ @param x The X position in the screen where the cursor was when the event was triggered.
+ @param y The Y position in the screen where the cursor was when the event was triggered.
+*/
+extern GuiObject.onLeftButtonDblClk(int x, int y);
+
+extern int GuiObject.onMouseWheelUp(int clicked , int lines); // Requires 5.54 - return 1 if you don't want to send the handle to winamp
+extern int GuiObject.onMouseWheelDown(int clicked , int lines); // Requires 5.54 - return 1 if you don't want to send the handle to winamp
+
+/**
+ onMouseMove()
+
+ Hookable. Event happens when the mouse is moved.
+
+ @param x The new X screen position of the mouse.
+ @param y The new Y screen position of the mouse.
+*/
+extern GuiObject.onMouseMove(int x, int y);
+
+/**
+ onEnterArea()
+
+ Hookable. Event happens when the mouse
+ enters the objects area.
+*/
+extern GuiObject.onEnterArea();
+
+/**
+ onLeaveArea()
+
+ Hookable. Event happens when the mouse
+ leaves the objects area.
+*/
+extern GuiObject.onLeaveArea();
+
+/**
+ setEnabled()
+*/
+extern GuiObject.setEnabled(boolean onoff);
+
+/**
+ getEnabled()
+*/
+extern boolean GuiObject.getEnabled();
+
+/**
+ onEnabled()
+*/
+extern GuiObject.onEnable(boolean onoff);
+
+/**
+ resize()
+
+ Resize the object to the desired size and position.
+
+ @param x The X position where to anchor the object before resize.
+ @param y The Y position where to anchor the object before resize.
+ @param w The width you wish the object to have.
+ @param h The height you wish the object to have.
+*/
+extern GuiObject.resize(int x, int y, int w, int h);
+
+/**
+ onResize()
+
+ Hookable. Event happens when the object is about
+ to be resized.
+
+ @param x The X position where the object will be anchored.
+ @param y The Y position where the object will be anchored.
+ @param w The width the object will have.
+ @param h The height the object will have.
+*/
+extern GuiObject.onResize(int x, int y, int w, int h);
+
+/**
+ isMouseOver()
+
+*/
+extern boolean GuiObject.isMouseOver(int x, int y);
+
+/**
+ getLeft()
+
+ Get the X position, in the screen, of the
+ left edge of the object.
+
+ @ret The left edge's position (in screen coordinates).
+*/
+extern int GuiObject.getLeft();
+
+/**
+ getTop()
+
+ Get the Y position, in the screen, of the
+ top edge of the object.
+
+ @ret The top edge's position (in screen coordinates).
+*/
+extern int GuiObject.getTop();
+
+/**
+ getWidth()
+
+ Get the width of the object, in pixels.
+
+ @ret The width of the object.
+*/
+extern int GuiObject.getWidth();
+
+/**
+ getHeight()
+
+ Get the height of the object, in pixels.
+
+ @ret The height of the object.
+*/
+extern int GuiObject.getHeight();
+
+/**
+ setTargetX()
+
+ Set a target X position, in the screen, for
+ the object.
+
+ @param x The target X position of the object.
+*/
+extern GuiObject.setTargetX(int x);
+
+/**
+ setTargetY()
+
+ Set a target Y position, in the screen, for
+ the object.
+
+ @param y The target Y position of the object.
+*/
+extern GuiObject.setTargetY(int y);
+
+/**
+ setTargetW()
+
+ Set a target width, in pixels, for the object.
+
+ @param w The target width of the object.
+*/
+extern GuiObject.setTargetW(int w);
+
+/**
+ setTargetH()
+
+ Set a target height, in pixels, for the object.
+
+ @param h The target height of the object.
+*/
+extern GuiObject.setTargetH(int r);
+
+/**
+ setTargetA()
+
+ Set a target alphablending value for the object.
+ The value range is from 0 (totally transparent)
+ to 255 (totally opaque).
+
+ @param alpha The target alpha value.
+*/
+extern GuiObject.setTargetA(int alpha);
+
+/**
+ setTargetSpeed()
+
+ The amount of time in which you wish to arrive at
+ the target(s) previously set, in seconds.
+
+ @param insecond The number of seconds in which to reach the target.
+*/
+extern GuiObject.setTargetSpeed(float insecond);
+
+/**
+ gotoTarget()
+
+ Begin transition to previously set target.
+*/
+extern GuiObject.gotoTarget();
+
+/**
+ onTargetReached()
+
+ Hookable. Event happens when the object has reached
+ it's previously set target.
+*/
+extern GuiObject.onTargetReached();
+extern GuiObject.cancelTarget();
+/**
+ isGoingToTarget()
+
+*/
+extern GuiObject.reverseTarget(int reverse); // modifies the x/y targets so that they compensate for gained width/height. useful to make drawers that open up without jittering
+extern GuiObject.onStartup();
+extern boolean GuiObject.isGoingToTarget();
+extern GuiObject.setXmlParam(String param, String value);
+extern String GuiObject.getXmlParam(String param);
+extern GuiObject.init(Group parent);
+extern GuiObject.bringToFront();
+extern GuiObject.bringToBack();
+extern GuiObject.bringAbove(GuiObject guiobj);
+extern GuiObject.bringBelow(GuiObject guiobj);
+extern Int GuiObject.getGuiX();
+extern Int GuiObject.getGuiY();
+extern Int GuiObject.getGuiW();
+extern Int GuiObject.getGuiH();
+extern Int GuiObject.getGuiRelatX();
+extern Int GuiObject.getGuiRelatY();
+extern Int GuiObject.getGuiRelatW();
+extern Int GuiObject.getGuiRelatH();
+extern Boolean GuiObject.isActive();
+extern GuiObject GuiObject.getParent();
+extern Layout GuiObject.getParentLayout();
+extern GuiObject GuiObject.getTopParent();
+extern int GuiObject.runModal();
+extern GuiObject.endModal(int retcode);
+extern GuiObject GuiObject.findObject(String id);
+extern GuiObject GuiObject.findObjectXY(int x, int y);
+extern String GuiObject.getName();
+extern int GuiObject.clientToScreenX(int x);
+extern int GuiObject.clientToScreenY(int y);
+extern int GuiObject.clientToScreenW(int w);
+extern int GuiObject.clientToScreenH(int h);
+extern int GuiObject.screenToClientX(int x);
+extern int GuiObject.screenToClientY(int y);
+extern int GuiObject.screenToClientW(int w);
+extern int GuiObject.screenToClientH(int h);
+extern int GuiObject.getAutoWidth();
+extern int GuiObject.getAutoHeight();
+extern GuiObject.setFocus();
+extern GuiObject.onChar(String c);
+extern GuiObject.onAccelerator(String accel);
+extern Boolean GuiObject.isMouseOverRect();
+extern Object GuiObject.getInterface(String interface_guid);
+extern GuiObject.onDragEnter();
+extern GuiObject.onDragOver(int x, int y);
+extern GuiObject.onDragLeave();
+
+#define VK_PRIOR 33
+#define VK_NEXT 34
+#define VK_END 35
+#define VK_HOME 36
+#define VK_LEFT 37
+#define VK_UP 38
+#define VK_RIGHT 39
+#define VK_DOWN 40
+
+extern GuiObject.onKeyDown(int vk_code);
+extern GuiObject.onKeyUp(int vk_code);
+extern GuiObject.onGetFocus();
+extern GuiObject.onKillFocus();
+extern Int GuiObject.sendAction(String action, String param, Int x, int y, int p1, int p2);
+extern Int GuiObject.onAction(String action, String param, Int x, int y, int p1, int p2, GuiObject source);
+
+ // Group
+
+extern GuiObject Group.getObject(String object_id);
+extern Int Group.getNumObjects();
+extern GuiObject Group.enumObject(Int num);
+extern Group.onCreateObject(GuiObject newobj);
+extern Int Group.getMousePosX();
+extern Int Group.getMousePosY();
+extern Boolean Group.isLayout();
+
+
+ // Layout
+
+extern Layout.onDock(int side);
+extern Layout.onUndock();
+extern Layout.onScale(Double newscalevalue);
+extern Double Layout.getScale();
+extern Layout.setScale(Double scalevalue);
+extern Layout.setDesktopAlpha(Boolean onoff);
+extern Boolean Layout.getDesktopAlpha();
+extern Container Layout.getContainer();
+extern Layout.center();
+extern Layout.onMove();
+extern Layout.onEndMove();
+extern Layout.onUserResize(int x, int y, int w, int h);
+extern Layout.snapAdjust(int left, int top, int right, int bottom);
+extern Int Layout.getSnapAdjustTop();
+extern Int Layout.getSnapAdjustRight();
+extern Int Layout.getSnapAdjustLeft();
+extern Int Layout.getSnapAdjustBottom();
+extern Layout.setRedrawOnResize(int wantredrawonresize);
+extern Layout.beforeRedock();
+extern Layout.redock();
+extern Boolean Layout.isTransparencySafe();
+extern Boolean Layout.isLayoutAnimationSafe();
+extern Layout.onMouseEnterLayout();
+extern Layout.onMouseLeaveLayout();
+extern Layout.onSnapAdjustChanged();
+
+ // List
+
+extern List.addItem(Any _object);
+extern List.removeItem(int pos);
+extern Any List.enumItem(int pos);
+extern Int List.findItem(Any _object);
+extern Int List.findItem2(Any _object, int startItem);
+extern int List.getNumItems();
+extern List.removeAll();
+
+ // BitList
+
+extern boolean BitList.getItem(int n);
+extern BitList.setItem(int n, boolean val);
+extern BitList.setSize(int s);
+extern int BitList.getSize();
+
+ // Map
+
+extern Int Map.getValue(int x, int y);
+extern Int Map.getARGBValue(int x, int y, int channel); // requires wa 5.51 // channel: 0=Blue, 1=Green, 2=Red, 3=Alpha. if your img has a alpha channal the returned rgb value might not be exact
+extern Boolean Map.inRegion(int x, int y);
+extern Map.loadMap(String bitmapid);
+extern Int Map.getWidth();
+extern Int Map.getHeight();
+extern Region Map.getRegion();
+
+ // PopupMenu
+
+extern PopupMenu.addSubMenu(PopupMenu submenu, String submenutext);
+extern PopupMenu.addCommand(String cmdtxt, Int cmd_id, Boolean checked, Boolean disabled);
+extern PopupMenu.addSeparator();
+extern Int PopupMenu.popAtXY(int x, int y);
+extern Int PopupMenu.popAtMouse();
+extern Int PopupMenu.getNumCommands();
+extern PopupMenu.checkCommand(int cmd_id, boolean check);
+extern PopupMenu.disableCommand(int cmd_id, boolean disable);
+
+ // Region
+
+extern Region.add(Region reg);
+extern Region.sub(Region reg);
+extern Region.offset(int x, int y);
+extern Region.stretch(double r);
+extern Region.copy(Region reg);
+extern Region.loadFromMap(Map regionmap, Int threshold, Boolean reversed);
+extern Region.loadFromBitmap(String bitmapid);
+extern Int Region.getBoundingBoxX();
+extern Int Region.getBoundingBoxY();
+extern Int Region.getBoundingBoxW();
+extern Int Region.getBoundingBoxH();
+
+ // Timer
+
+extern Timer.onTimer();
+extern Timer.setDelay(int millisec);
+extern Int Timer.getDelay();
+extern Timer.start();
+extern Timer.stop();
+extern Timer.isRunning();
+extern Int Timer.getSkipped();
+
+ // FeedWatcher
+
+deprecated extern Int FeedWatcher.setFeed(String feed_id);
+deprecated extern FeedWatcher.releaseFeed();
+deprecated extern FeedWatcher.onFeedChange(String new_feeddata);
+
+ // WindowHolder
+
+extern WindowHolder.setRegionFromMap(Map regionmap, Int threshold, Boolean reverse);
+extern WindowHolder.setRegion(Region reg);
+extern GuiObject WindowHolder.getContent();
+extern String WindowHolder.getGuid(); // Fixed in Winamp 5.53 - returns the guid of the current window. If the WindowHolder is not visible the zero-guid is displayed
+extern String WindowHolder.getComponentName(); // Requires 5.54
+
+deprecated extern WindowHolder.onGetWac(Wac wacobj);
+deprecated extern WindowHolder.onGiveUpWac(Wac wacobj);
+deprecated extern Wac WindowHolder.getWac();
+deprecated extern WindowHolder.setAcceptWac(Boolean onoff);
+
+ // Edit
+
+extern Edit.onEnter();
+extern Edit.onAbort();
+extern Edit.onIdleEditUpdate();
+extern Edit.onEditUpdate();
+extern Edit.setText(String txt);
+extern Edit.setAutoEnter(boolean onoff);
+extern Int Edit.getAutoEnter();
+extern String Edit.getText();
+extern Edit.selectAll();
+extern Edit.enter();
+extern Edit.setIdleEnabled(boolean onoff);
+extern Int Edit.getIdleEnabled();
+
+ // Slider
+
+extern Slider.onSetPosition(int newpos);
+extern Slider.onPostedPosition(int newpos);
+extern Slider.onSetFinalPosition(int pos);
+extern Slider.setPosition(int pos);
+extern Int Slider.getPosition();
+extern Slider.lock(); // locks descendant core collbacks
+extern Slider.unlock(); // unloads them
+
+ // Vis
+
+extern Vis.onFrame();
+extern Vis.setRealtime(Boolean onoff);
+extern Boolean Vis.getRealtime();
+extern Int Vis.getMode();
+extern Vis.setMode(Int mode);
+extern Vis.nextMode();
+
+ // Browser
+
+extern Browser.navigateUrl(String url);
+extern Browser.back();
+extern Browser.forward();
+extern Browser.stop();
+extern Browser.refresh();
+extern Browser.home();
+extern Browser.setTargetName(String targetname);
+extern Boolean Browser.onBeforeNavigate(String url, Int flags, String targetframename); // return TRUE to cancel navigation
+extern Browser.onDocumentComplete(String url); // Will be called for main site and inlineFrames
+extern Browser.onDocumentReady(String url); // Requires 5.53 // Will be called after all inlineFrames & site is loaded
+extern String Browser.getDocumentTitle();
+extern Browser.onNavigateError(String url, int code); // Requires 5.53
+extern Browser.setCancelIEErrorPage(boolean cancel); // Requires 5.53
+
+/**
+ scrape()
+
+ Starts to search the current document of browser for strings linking to playable madia.
+ Call best after onDocumenteComplete();
+ No params.
+*/
+extern browser.scrape(); //Requires 5.5
+
+/**
+ onMediaLink()
+
+ Called everytime the SiteScraper has found a media link
+ in the current document.
+
+ @param url A string that contains the URL link to this file.
+*/
+extern string browser.onMediaLink(string url); //Requires 5.5
+
+
+ // Text
+
+extern Text.setText(String txt); // changes the display/text="something" param
+extern Text.setAlternateText(String txt); // overrides the display/text parameter with a custom string, set "" to cancel
+extern String Text.getText();
+extern int Text.getTextWidth();
+extern Text.onTextChanged(String newtxt);
+
+ // Layer
+
+extern Layer.onBeginResize(int x, int y, int w, int h);
+extern Layer.onEndResize(int x, int y, int w, int h);
+extern Layer.fx_onInit();
+extern Layer.fx_onFrame();
+extern Double Layer.fx_onGetPixelR(double r, double d, double x, double y);
+extern Double Layer.fx_onGetPixelD(double r, double d, double x, double y);
+extern Double Layer.fx_onGetPixelX(double r, double d, double x, double y);
+extern Double Layer.fx_onGetPixelY(double r, double d, double x, double y);
+extern Double Layer.fx_onGetPixelA(double r, double d, double x, double y);
+extern Layer.setRegionFromMap(Map regionmap, int threshold, boolean reverse);
+extern Layer.setRegion(Region reg);
+extern Layer.fx_setEnabled(boolean onoff);
+extern Boolean Layer.fx_getEnabled();
+extern Layer.fx_setWrap(Boolean onoff);
+extern Boolean Layer.fx_getWrap();
+extern Layer.fx_setRect(Boolean onoff);
+extern Boolean Layer.fx_getRect();
+extern Layer.fx_setBgFx(Boolean onoff);
+extern Boolean Layer.fx_getBgFx();
+extern Layer.fx_setClear(Boolean onoff);
+extern Boolean Layer.fx_getClear();
+extern Layer.fx_setSpeed(Int msperframe);
+extern Int Layer.fx_getSpeed();
+extern Layer.fx_setRealtime(Boolean onoff);
+extern Boolean Layer.fx_getRealtime();
+extern Layer.fx_setLocalized(Boolean onoff);
+extern Boolean Layer.fx_getLocalized();
+extern Layer.fx_setBilinear(Boolean onoff);
+extern Boolean Layer.fx_getBilinear();
+extern Layer.fx_setAlphaMode(Boolean onoff);
+extern Boolean Layer.fx_getAlphaMode();
+extern Layer.fx_setGridSize(Int x, Int y);
+extern Layer.fx_update();
+extern Layer.fx_restart();
+extern Boolean Layer.isInvalid(); // Returns 1 if image load failed
+
+ // Button
+
+extern Button.onActivate(int activated);
+extern Button.onLeftClick();
+extern Button.onRightClick();
+extern Button.setActivated(Boolean onoff);
+extern Button.setActivatedNoCallback(Boolean onoff);
+extern Boolean Button.getActivated();
+extern Button.leftClick();
+extern Button.rightClick();
+
+ // AnimatedLayer
+
+extern AnimatedLayer.onPlay();
+extern AnimatedLayer.onPause();
+extern AnimatedLayer.onResume();
+extern AnimatedLayer.onStop();
+extern AnimatedLayer.onFrame(Int framenum);
+extern AnimatedLayer.setSpeed(Int msperframe);
+extern AnimatedLayer.gotoFrame(int framenum);
+extern AnimatedLayer.setStartFrame(Int framenum);
+extern AnimatedLayer.setEndFrame(int framenum);
+extern AnimatedLayer.setAutoReplay(Boolean onoff);
+extern AnimatedLayer.play();
+extern AnimatedLayer.stop();
+extern AnimatedLayer.pause();
+extern Boolean AnimatedLayer.isPlaying();
+extern Boolean AnimatedLayer.isPaused();
+extern Boolean AnimatedLayer.isStopped();
+extern Int AnimatedLayer.getStartFrame();
+extern Int AnimatedLayer.getEndFrame();
+extern Int AnimatedLayer.getLength();
+extern Int AnimatedLayer.getDirection();
+extern Boolean AnimatedLayer.getAutoReplay();
+extern Int AnimatedLayer.getCurFrame();
+extern AnimatedLayer.setRealtime(Boolean onoff);
+
+ // AlbumArt
+
+extern AlbumArtLayer.refresh();
+extern AlbumArtLayer.isLoading();
+extern AlbumArtLayer.onAlbumArtLoaded(boolean success);
+
+ // ToggleButton
+
+extern ToggleButton.onToggle(Boolean onoff);
+extern int TOggleButton.getCurCfgVal();
+
+ // GroupList
+
+extern Group GroupList.instantiate(String group_id, int num_groups);
+extern Int GroupList.getNumItems();
+extern Group GroupList.enumItem(int num);
+extern GroupList.removeAll();
+extern GroupList.scrollToPercent(Int percent);
+extern GroupList.setRedraw(int redraw);
+
+ // CfgGroup
+
+extern Int CfgGroup.cfgGetInt();
+extern CfgGroup.cfgSetInt(Int intvalue);
+extern String CfgGroup.cfgGetString();
+extern Float CfgGroup.cfgGetFloat();
+extern CfgGroup.cfgSetFloat(Float floatvalue);
+extern CfgGroup.cfgSetString(String strvalue);
+extern CfgGroup.onCfgChanged();
+extern String CfgGroup.cfgGetGuid();
+extern String CfgGroup.cfgGetName();
+
+ // QueryList
+
+deprecated extern QueryList.onResetQuery();
+
+ // MouseRedir
+
+extern MouseRedir.setRedirection(GuiObject o);
+extern GuiObject MouseRedir.getRedirection();
+extern MouseRedir.setRegionFromMap(Map regionmap, Int threshold, Boolean reverse);
+extern MouseRedir.setRegion(Region reg);
+
+ // DropDownList
+
+extern String DropDownList.getItemSelected();
+extern DropDownList.onSelect(Int id, Int hover);
+extern DropDownList.setListHeight(Int h);
+extern DropDownList.openList();
+extern DropDownList.closeList();
+extern DropDownList.setItems(String lotsofitems);
+extern Int DropDownList.addItem(String _text);
+extern DropDownList.delItem(Int id);
+extern Int DropDownList.findItem(String _text);
+extern Int DropDownList.getNumItems();
+extern DropDownList.selectItem(Int id, Int hover);
+extern String DropDownList.getItemText(Int id);
+extern Int DropDownList.getSelected();
+extern String DropDownList.getSelectedText();
+extern String DropDownList.getCustomText();
+extern DropDownList.deleteAllItems();
+extern DropDownList.setNoItemText(String txt);
+
+
+ // LayoutStatus
+
+extern LayoutStatus.callme(String str);
+
+ // TabSheet
+
+extern Int TabSheet.getCurPage();
+extern TabSheet.setCurPage(Int a);
+
+ // GuiList
+
+// Columns
+extern Int GuiList.addColumn(String name, Int width, Int numeric);
+extern Int GuiList.getNumColumns();
+extern Int GuiList.getColumnWidth(Int column);
+extern GuiList.setColumnWidth(Int column, Int newwidth);
+extern String GuiList.getColumnLabel(Int column);
+extern GuiList.setColumnLabel(Int column, String newlabel);
+extern Int GuiList.getColumnNumeric(Int column);
+extern GuiList.setColumnDynamic(Int column, Int isdynamic);
+extern Int GuiList.isColumnDynamic(Int column);
+extern GuiList.invalidateColumns();
+// Items
+extern Int GuiList.getNumItems();
+extern Int GuiList.getItemCount();
+extern Int GuiList.addItem(String label);
+extern Int GuiList.insertItem(Int pos, String label);
+extern Int GuiList.getLastAddedItemPos();
+extern GuiList.setSubItem(Int pos, Int subpos, String txt);
+extern GuiList.deleteAllItems();
+extern Int GuiList.deleteByPos(Int pos);
+extern String GuiList.getItemLabel(Int pos, Int subpos);
+extern String GuiList.getSubitemText(Int pos, Int subpos);
+extern GuiList.setItemLabel(Int pos, String _text);
+extern Int GuiList.invalidateItem(Int pos);
+extern Int GuiList.getFirstItemVisible();
+extern Int GuiList.getLastItemVisible();
+extern GuiList.setItemIcon(Int pos, String bitmapId); // Requires 5.54
+extern String GuiList.getItemIcon(Int pos); // Requires 5.54
+// Attributes
+extern GuiList.setMinimumSize(Int size);
+extern Int GuiList.getWantAutoDeselect();
+extern GuiList.setWantAutoDeselect(Int want);
+extern GuiList.onSetVisible(Int show);
+extern GuiList.setAutoSort(Int dosort);
+extern Int GuiList.setFontSize(Int size);
+extern Int GuiList.getFontSize();
+extern Int GuiList.getHeaderHeight();
+extern Int GuiList.getPreventMultipleSelection();
+extern Int GuiList.setPreventMultipleSelection(Int val);
+extern GuiList.setShowIcons(int showThem); // Requires 5.54
+extern Int GuiList.getShowIcons(); // Requires 5.54
+extern Int GuiList.setIconWidth(int width); // Requires 5.54
+extern Int GuiList.setIconHeight(int width); // Requires 5.54
+extern GuiList.getIconWidth(); // Requires 5.54
+extern GuiList.getIconHeight(); // Requires 5.54
+// Navigation
+extern GuiList.next();
+extern GuiList.previous();
+extern GuiList.pagedown();
+extern GuiList.pageup();
+extern GuiList.home();
+extern GuiList.end();
+extern GuiList.reset();
+extern GuiList.ensureItemVisible(Int pos);
+extern Int GuiList.scrollAbsolute(Int x);
+extern Int GuiList.scrollRelative(Int x);
+extern GuiList.scrollLeft(Int lines);
+extern GuiList.scrollRight(Int lines);
+extern GuiList.scrollUp(Int lines);
+extern GuiList.scrollDown(Int lines);
+extern GuiList.jumpToNext(Int c);
+extern GuiList.scrollToItem(Int pos);
+// Selecting
+extern GuiList.selectCurrent();
+extern GuiList.selectFirstEntry();
+extern Int GuiList.getItemSelected(Int pos);
+extern Int GuiList.isItemFocused(Int pos);
+extern Int GuiList.getItemFocused();
+extern GuiList.setItemFocused(Int pos);
+extern Int GuiList.getFirstItemSelected();
+extern Int GuiList.getNextItemSelected(Int lastpos);
+extern Int GuiList.selectAll();
+extern Int GuiList.deselectAll();
+extern Int GuiList.invertSelection();
+extern GuiList.setSelectionStart(Int pos);
+extern GuiList.setSelectionEnd(Int pos);
+extern GuiList.setSelected(Int pos, Int selected);
+extern GuiList.toggleSelection(Int pos, Int setfocus);
+// Actions, Moving
+extern GuiList.resort();
+extern Int GuiList.getSortDirection();
+extern Int GuiList.getSortColumn();
+extern GuiList.setSortColumn(Int col);
+extern GuiList.setSortDirection(Int dir);
+extern GuiList.moveItem(Int from, Int to);
+// Callbacks
+extern GuiList.onSelectAll();
+extern GuiList.onDelete();
+extern GuiList.onDoubleClick(Int itemnum);
+extern GuiList.onLeftClick(Int itemnum);
+extern GuiList.onSecondLeftClick(Int itemnum);
+extern Int GuiList.onRightClick(Int itemnum);
+extern Int GuiList.onColumnDblClick(Int col, Int x, Int y);
+extern Int GuiList.onColumnLabelClick(Int col, Int x, Int y);
+extern GuiList.onItemSelection(Int itemnum, Int selected);
+extern Int GuiList.onIconLeftClick(int itemnum, int x, int y); // Return 1 to prevent other actions to be called (eg onLeftClick()) // Requires 5.54
+
+
+
+ // GuiTree
+
+extern Int GuiTree.onWantAutoContextMenu();
+extern Int GuiTree.onMouseWheelUp(Int clicked, Int lines);
+extern Int GuiTree.onMouseWheelDown(Int clicked, Int lines);
+extern Int GuiTree.onContextMenu(Int x, Int y);
+extern Int GuiTree.onChar(Int c);
+extern GuiTree.onItemRecvDrop(TreeItem item);
+extern GuiTree.onLabelChange(TreeItem item);
+extern GuiTree.onItemSelected(TreeItem item);
+extern GuiTree.onItemDeselected(TreeItem item);
+
+extern Int GuiTree.getNumRootItems();
+extern TreeItem GuiTree.enumRootItem(Int which);
+extern GuiTree.jumpToNext(Int c);
+extern GuiTree.ensureItemVisible(TreeItem item);
+extern Int GuiTree.getContentsWidth();
+extern Int GuiTree.getContentsHeight();
+extern TreeItem GuiTree.addTreeItem(TreeItem item, TreeItem par, Int sorted, Int haschildtab);
+extern Int GuiTree.removeTreeItem(TreeItem item);
+extern GuiTree.moveTreeItem(TreeItem item, TreeItem newparent);
+extern GuiTree.deleteAllItems();
+extern Int GuiTree.expandItem(TreeItem item);
+extern GuiTree.expandItemDeferred(TreeItem item);
+extern Int GuiTree.collapseItem(TreeItem item);
+extern GuiTree.collapseItemDeferred(TreeItem item);
+extern GuiTree.selectItem(TreeItem item);
+extern GuiTree.selectItemDeferred(TreeItem item);
+extern GuiTree.delItemDeferred(TreeItem item);
+extern GuiTree.hiliteItem(TreeItem item);
+extern GuiTree.unhiliteItem(TreeItem item);
+extern TreeItem GuiTree.getCurItem();
+extern TreeItem GuiTree.hitTest(Int x, Int y);
+extern GuiTree.editItemLabel(TreeItem item);
+extern GuiTree.cancelEditLabel(Int destroyit);
+extern GuiTree.setAutoEdit(Int ae);
+extern Int GuiTree.getAutoEdit();
+extern TreeItem GuiTree.getByLabel(TreeItem item, String name);
+extern GuiTree.setSorted(Int dosort);
+extern Int GuiTree.getSorted();
+extern GuiTree.sortTreeItems();
+extern TreeItem GuiTree.getSibling(TreeItem item);
+extern GuiTree.setAutoCollapse(Int doautocollapse);
+extern Int GuiTree.setFontSize(Int newsize);
+extern Int GuiTree.getFontSize();
+extern Int GuiTree.getNumVisibleChildItems(TreeItem c);
+extern Int GuiTree.getNumVisibleItems();
+extern TreeItem GuiTree.enumVisibleItems(Int n);
+extern TreeItem GuiTree.enumVisibleChildItems(TreeItem c, Int n);
+extern TreeItem GuiTree.enumAllItems(Int n);
+extern Int GuiTree.getItemRectX(TreeItem item);
+extern Int GuiTree.getItemRectY(TreeItem item);
+extern Int GuiTree.getItemRectW(TreeItem item);
+extern Int GuiTree.getItemRectH(TreeItem item);
+// extern TreeItem GuiTree.getItemFromPoint(Int x, Int y);
+
+
+
+ // TreeItem
+
+extern Int TreeItem.getNumChildren();
+extern TreeItem.setLabel(String label);
+extern String TreeItem.getLabel();
+extern TreeItem.ensureVisible();
+extern TreeItem TreeItem.getNthChild(Int nth);
+extern TreeItem TreeItem.getChild();
+extern TreeItem TreeItem.getChildSibling(TreeItem _item);
+extern TreeItem TreeItem.getSibling();
+extern TreeItem TreeItem.getParent();
+extern TreeItem.editLabel();
+extern Int TreeItem.hasSubItems();
+extern TreeItem.setSorted(Int issorted);
+extern TreeItem.setChildTab(Int haschildtab);
+extern Int TreeItem.isSorted();
+extern Int TreeItem.isCollapsed();
+extern Int TreeItem.isExpanded();
+extern TreeItem.invalidate();
+extern Int TreeItem.isSelected();
+extern Int TreeItem.isHilited();
+extern TreeItem.setHilited(Int ishilited);
+extern Int TreeItem.collapse();
+extern Int TreeItem.expand();
+extern GuiTree TreeItem.getTree();
+// return 1 to override default behaviour of stuff.
+extern TreeItem.onTreeAdd();
+extern TreeItem.onTreeRemove();
+extern TreeItem.onSelect();
+extern TreeItem.onDeselect();
+extern Int TreeItem.onLeftDoubleClick();
+extern Int TreeItem.onRightDoubleClick();
+extern Int TreeItem.onChar(Int key);
+extern TreeItem.onExpand();
+extern TreeItem.onCollapse();
+extern Int TreeItem.onBeginLabelEdit();
+extern Int TreeItem.onEndLabelEdit(String newlabel);
+extern Int TreeItem.onContextMenu(Int x, Int y);
+
+
+ // MenuButton
+
+deprecated extern MenuButton.onOpenMenu();
+deprecated extern MenuButton.onCloseMenu();
+deprecated extern MenuButton.onSelectItem(String item);
+deprecated extern MenuButton.openMenu();
+deprecated extern MenuButton.closeMenu();
+
+
+ // CheckBox
+
+extern CheckBox.onToggle(int newstate);
+extern CheckBox.setChecked(int checked);
+extern Int CheckBox.isChecked();
+extern CheckBox.setText(String txt);
+extern String CheckBox.getText();
+
+
+ // Form
+
+deprecated extern Int Form.getContentsHeight();
+deprecated extern Form.newCell(String groupname);
+deprecated extern Form.nextRow();
+deprecated extern Form.deleteAll();
+
+
+ // ComponentBucket
+
+extern Int ComponentBucket.getMaxHeight(); // for vertical compbucks
+extern Int ComponentBucket.getMaxWidth(); // for horizontal compbucks
+extern Int ComponentBucket.setScroll(int x);
+extern Int ComponentBucket.getScroll();
+extern Int ComponentBucket.getNumChildren();
+extern GuiObject ComponentBucket.enumChildren(int n);
+
+
+ // Frame (Requires 5.5)
+
+extern Int Frame.getPosition();
+extern Frame.setPosition(Int position);
+extern Frame.onSetPosition(Int position);
+
+
+ // Menu (Requires 5.52)
+
+extern Menu.setMenuGroup(String groupId);
+extern String Menu.getMenuGroup();
+extern Menu.setMenu(String menuId);
+extern String Menu.getMenu();
+extern Menu.spawnMenu(int monitor); // monitor can be 1 or 0 - default 1. 0 doesn't trigger some keyboard timers...
+extern Menu.cancelMenu();
+extern Menu.setNormalId(String id);
+extern Menu.setDownId(String id);
+extern Menu.setHoverId(String id);
+extern Menu.onOpenMenu();
+extern Menu.onCloseMenu();
+extern Menu.nextMenu();
+extern Menu.previousMenu();
+
+// predecl system symbols
+.CODE
+
+// This function is called by System.onScriptLoaded() as the first thing it does. Subsequent events check
+// __deprecated_runtime before continuing. If you have no System.onScriptLoaded(), you will have no version check.
+
+// This is to ensure that runtimes that do not have stack protection (that is wa3, wa5 and wa5.01) do
+// not crash when trying to unexisting functions (with parameters, since parameterless functions would
+// not crash), that is, functions that are meant for a higher version number than that of the runtime
+// the script is running on.
+
+Function Int versionCheck();
+Int versionCheck() {
+ Double v = getRuntimeVersion();
+ if (v < VCPU_VERSION || v > 65535) {
+ __deprecated_runtime = 1;
+ int last = getPrivateInt(getSkinName(), "runtimecheck", 0);
+ int now = getTimeOfDay();
+ if (now - last < 5000 && last < now) return 0;
+ setPrivateInt(getSkinName(), "runtimecheck", getTimeOfDay());
+ messageBox("This script requires " + MC_TARGET, "Error", 1, "");
+ return 0;
+ }
+ return 1;
+}
+
+// begin protecting the stack, anything below this requires a getRuntimeVersion() >= 1 and <= 65535
+.STACKPROT
+
+/*---------------*/
+
+Function debug(string s);
+debug(string s) { messagebox(s, "DEBUG", 0, ""); }
+
+Function debugInt(int s);
+debugInt(int s) { messagebox(integerToString(s), "DEBUG", 0, ""); }
+
+#endif
+
diff --git a/Src/Wasabi/Lib/winampconfig.mi b/Src/Wasabi/Lib/winampconfig.mi
new file mode 100644
index 00000000..098ad350
--- /dev/null
+++ b/Src/Wasabi/Lib/winampconfig.mi
@@ -0,0 +1,73 @@
+//----------------------------------------------------------------------------------------------------------------
+// winampconfig.mi
+//
+// your best way to get winamp config states
+//----------------------------------------------------------------------------------------------------------------
+
+#ifndef __WINAMPCONFIG_MI
+#define __WINAMPCONFIG_MI
+
+extern class @{B2AD3F2B-31ED-4e31-BC6D-E9951CD555BB}@ Object _predecl WinampConfig;
+extern class @{FC17844E-C72B-4518-A068-A8F930A5BA80}@ Object WinampConfigGroup;
+
+
+// WinampConfig
+
+extern WinampConfigGroup WinampConfig.getGroup(String config_group_guid);
+
+// WinampConfigGroup
+
+extern Boolean WinampConfigGroup.getBool(String itemname);
+extern WinampConfigGroup.setBool(String itemname, Boolean itemvalue);
+
+extern Int WinampConfigGroup.getInt(String itemname);
+extern WinampConfigGroup.setInt(String itemname);
+
+extern String WinampConfigGroup.getString(String itemname);
+extern WinampConfigGroup.setString(String itemname);
+
+
+/*
+BENSKI:
+basically, make a WinampConfig object, and call getGroup with a guid (see below) and then you can get & set values from the WinampConfigGroup object it returns.
+
+I plan on adding more types to get/set in the WinampConfigGroup object later... these were just the minimum number to get you your two video options. Once we get this working, I'll add getString, getInt, etc.
+
+The WinampConfig stuff differs from system.setPrivateString (and family). It sets/gets Winamp configuration items directly. Some items are read-only. You can not store your own values, and it does not save the values to studio.xnf (they are saved wherever the underlying configuration value is saved, normally winamp.ini). There's also no callback if items change.
+
+Some values to get you started
+
+Video config group guid: {2135E318-6919-4bcf-99D2-62BE3FCA8FA6}
+The two config items you requested are named:
+autoopen
+autoclose
+
+Other interesting groups/items (these are read-only for now... If there are any you'd like to have modifiable, let me know)
+
+more items in the video group:
+name: "overlay"
+name: "YV12"
+name: "vsync"
+name: "ddraw"
+name: "gdiplus"
+description: experimental GDI+ video renderer. Used mainly for video on Vista
+
+Internet Config Group: {C0A565DC-0CFE-405a-A27C-468B0C8A3A5C}
+name: "proxy"
+description: proxy server setting. Won't be retrievable until I make a "getString" function which I will shortly
+name: "proxy80"
+description: boolean value as to whether the proxy is only required for port 80
+
+Playback Config Group: {B6CB4A7C-A8D0-4c55-8E60-9F7A7A23DA0F}
+name: "bits"
+name: "mono"
+name: "surround"
+name: "dither"
+name: "replaygain"
+name: "replaygain_mode"
+name: "replaygain_source"
+name: "replaygain_preferred_only"
+name: "non_replaygain"
+*/
+
+#endif \ No newline at end of file