home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 November
/
CDVD1105.ISO
/
Util
/
Winamp
/
Skins
/
boxOr.wal
/
opensource_notifier
/
opensource_notifier.maki
(
.txt
)
< prev
Wrap
Winamp Compiled Maki Script
|
2004-08-29
|
11KB
|
396 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global Container Container11;
Global Container Container12;
Global Layout Layout13;
Global Layout Layout14;
Global Group Group15;
Global Text Text16;
Global Text Text17;
Global Text Text18;
Global Text Text19;
Global Text Text20;
Global Text Text21;
Global Text Text22;
Global Text Text23;
Global Slider Slider24;
Global Slider Slider25;
Global Slider Slider26;
Global CheckBox CheckBox27;
Global CheckBox CheckBox28;
Global CheckBox CheckBox29;
Global Timer Timer32;
Global Timer Timer33;
Global Int Int34;
Global Int Int36;
Global Float Float37;
Global Float Float38;
Global Float Float39;
Global String String40;
Global String String41;
Function func2258();
Function func2476();
Function func3589();
Function func4451(Float 5.87747175411144e-39, Float 5.87747175411144e-39);
System.onScriptLoaded()
{
Layout Layout51;
Container11 = System.getContainer(( "opensource_notifier"));
Container12 = System.getContainer(( "opensource_notifier_prefs"));
Layout13 = Container11.getLayout(( "normal"));
Layout14 = Container11.getLayout(( "normal"));
Group15 = Layout13.findObject(( "notifier\.text"));
Text16 = Layout13.findObject(( "artist"));
Text17 = Layout13.findObject(( "title"));
Text18 = Layout13.findObject(( "album"));
Text19 = Layout13.findObject(( "plentry"));
Text20 = Layout13.findObject(( "nexttrack"));
Layout51 = Container12.getLayout(( "normal"));
Text21 = Layout51.findObject(( "fadein\.text"));
Text22 = Layout51.findObject(( "stay\.text"));
Text23 = Layout51.findObject(( "fadeout\.text"));
Slider24 = Layout51.findObject(( "fadein\.slider"));
Slider25 = Layout51.findObject(( "stay\.slider"));
Slider26 = Layout51.findObject(( "fadeout\.slider"));
CheckBox29 = Layout51.findObject(( "fullscreen"));
CheckBox27 = Layout51.findObject(( "radio\.fade"));
CheckBox28 = Layout51.findObject(( "radio\.slide"));
Float37 = System.getPrivateInt(( "OpenNote"), ( "FadeIn"), 6);
Float38 = System.getPrivateInt(( "OpenNote"), ( "FadeOut"), 2);
Float39 = System.getPrivateInt(( "OpenNote"), ( "Stay"), 16);
String40 = System.getPrivateString(( "OpenNote"), ( "Effect"), ( "Fade"));
if(( String40 == ( "Fade"))) {
CheckBox27.setChecked(1);
} else {
CheckBox28.setChecked(1);
}
Timer32 = ( new Timer);
Timer33 = ( new Timer);
Timer33.setDelay(100);
Slider24.setPosition(Float37);
Slider26.setPosition(Float38);
Slider25.setPosition(Float39);
CheckBox29.setChecked(System.getPrivateInt(( "OpenNote"), ( "fullscreen"), 0));
Layout13.hide();
func3589();
return Null;
}
System.onScriptUnloading()
{
System.setPrivateInt(( "OpenNote"), ( "FadeIn"), ( Float37 * 4));
System.setPrivateInt(( "OpenNote"), ( "FadeOut"), ( Float38 * 4));
System.setPrivateInt(( "OpenNote"), ( "Stay"), ( ( Float39 * 4) / 1000));
System.setPrivateString(( "OpenNote"), ( "Effect"), String40);
return Null;
}
CheckBox29.onToggle(int newstate)
{
System.setPrivateInt(( "OpenNote"), ( "fullscreen"), newstate);
return Null;
}
CheckBox27.onToggle(int newstate)
{
if(( CheckBox27.isChecked() == 1)) {
String40 = ( "Fade");
Slider24.setPosition(( Float37 * 4));
Slider26.setPosition(( Float38 * 4));
Slider25.setPosition(( ( Float39 * 4) / 1000));
}
return Null;
}
CheckBox28.onToggle(int newstate)
{
if(( CheckBox28.isChecked() == 1)) {
String40 = ( "Slide");
Slider24.setPosition(( Float37 * 4));
Slider26.setPosition(( Float38 * 4));
Slider25.setPosition(( ( Float39 * 4) / 1000));
if(( Int34 == 2)) {
Layout13.setXmlParam(( "y"), System.integerToString(( System.getViewportHeight() + 5)));
}
}
return Null;
}
Slider24.onSetPosition(int newpos)
{
Text21.setText(( ( ( String40 + ( "\-in\ Time\ \(")) + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float37 = ( newpos / 4);
return Null;
}
Slider26.onSetPosition(int newpos)
{
Text23.setText(( ( ( String40 + ( "\-out\ Time\ \(")) + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float38 = ( newpos / 4);
return Null;
}
Slider25.onSetPosition(int newpos)
{
Text22.setText(( ( ( "Hold\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float39 = ( ( newpos / 4) * 1000);
Timer32.setDelay(Float39);
return Null;
}
System.onTitleChange(String newtitle)
{
Timer33.start();
return Null;
}
System.onPlay()
{
Timer33.start();
return Null;
}
System.onResume()
{
Timer33.start();
return Null;
}
Int System.onShowNotification()
{
Timer33.start();
complete;
return 1;
}
Timer33.onTimer()
{
Timer33.stop();
func2258();
return Null;
}
Layout13.onLeftButtonDown(int x, int y)
{
Container12.show();
return Null;
}
Layout13.onRightButtonDown(int x, int y)
{
Layout13.hide();
return Null;
}
func2258()
{
String String93;
String93 = System.getPrivateString(( "OpenNote"), ( "Freq"), ( "Always\ Show\ Notifications"));
if(( ( ( CheckBox29.isChecked() == 1) && ( System.isVideoFullscreen() == 0)) || ( CheckBox29.isChecked() == 0))) {
if(( String93 == ( "Always\ Show\ Notifications"))) {
func2476();
func3589();
func4451(Float37, Float38);
}
if(( ( String93 == ( "Show\ Notifications\ When\ Minimized")) && ( System.isMinimized() == 1))) {
func2476();
func3589();
func4451(Float37, Float38);
}
}
return Null;
}
func2476()
{
Int Int100;
Int Int102;
String String99;
String String112;
String String107;
Int Int95;
String String104;
String String98;
Int Int103;
Int95 = 0;
if(( System.Strleft(System.getPlayItemString(), 7) == ( "http\:\/\/"))) {
Int95 = 1;
}
String98 = System.integerToString(System.getPlaylistLength());
String99 = System.integerToString(( System.getPlaylistIndex() + 1));
if(( ! Int95)) {
Int100 = ( System.getPlayItemLength() / 1000);
Int102 = ( Int100 / 60);
Int103 = ( Int100 - ( Int102 * 60));
if(( Int103 > 10)) {
String104 = ( ( "0") + System.integerToString(Int103));
} else {
String104 = System.integerToString(Int103);
}
if(( System.getPlayItemMetaDataString(( "title")) == ( ""))) {
String107 = ( "\?\?\?");
} else {
String107 = System.getPlayItemMetaDataString(( "title"));
}
Text17.setXmlParam(( "ticker"), ( "1"));
if(( Int100 != 0)) {
String112 = ( ( System.integerToString(Int102) + ( "\:")) + String104);
Text17.setText(( ( ( String107 + ( "\ \(")) + String112) + ( "\)")));
} else {
Text17.setText(( String107 + ( "\ \ \ \ ")));
}
if(( System.getPlayItemMetaDataString(( "artist")) == ( ""))) {
Text16.setText(( ( "by\ ") + ( "\?\?\?")));
} else {
Text16.setText(( ( "by\ ") + System.getPlayItemMetaDataString(( "artist"))));
}
if(( System.getPlayItemMetaDataString(( "album")) == ( ""))) {
Text18.setText(( ""));
}
if(( System.getPlayItemMetaDataString(( "album")) != ( ""))) {
if(( System.getPlayItemMetaDataString(( "track")) <= ( "0"))) {
Text18.setText(( ( ( System.getPlayItemMetaDataString(( "album")) + ( "\ \(Track\ ")) + System.getPlayItemMetaDataString(( "track"))) + ( "\)")));
} else {
Text18.setText(System.getPlayItemMetaDataString(( "album")));
}
} else {
Text18.setText(( ""));
}
}
if(Int95) {
Text20.setText(( "On\ Air"));
Text17.setXmlParam(( "ticker"), ( "1"));
Text17.setXmlParam(( "display"), ( "songtitle"));
Text17.setText(( ""));
if(( ! System.isVideo())) {
Text16.setText(( "Internet\ Radio"));
} else {
Text16.setText(( "Internet\ TV"));
}
Text18.setText(( ""));
Text18.setXmlParam(( "display"), ( "songinfo"));
}
Text19.setText(( ( String99 + ( "\/")) + String98));
return Null;
}
func3589()
{
Int Int132;
Int Int131;
Int Int130;
String String129;
String129 = System.getPrivateString(( "Abducted_OpenNote"), ( "NotifierPosition"), ( "1\.\ Bottom\ Right"));
Int130 = System.getViewportWidth();
Int131 = System.getViewportHeight();
Int132 = System.strlen(Text17.getText());
Int36 = Text16.getAutoWidth();
if(( Int36 > Text18.getAutoWidth())) {
Int36 = Text18.getAutoWidth();
}
if(( Int36 > Text17.getAutoWidth())) {
Int36 = Text17.getAutoWidth();
}
if(( Int36 > 128)) {
Int36 = 150;
}
if(( Int36 < ( System.getViewportWidth() / 4))) {
Int36 = ( System.getViewportWidth() / 4);
}
Int36 = ( Int36 + 40);
if(( String129 == ( "1\.\ Bottom\ Right"))) {
String41 = ( "b");
Layout13.setXmlParam(( "x"), System.integerToString(( Int130 - Int36)));
Layout13.setXmlParam(( "y"), System.integerToString(( Int131 - 85)));
}
if(( String129 == ( "2\.\ Bottom\ Left"))) {
String41 = ( "b");
Layout13.setXmlParam(( "x"), System.integerToString(0));
Layout13.setXmlParam(( "y"), System.integerToString(( Int131 - 85)));
}
if(( String129 == ( "3\.\ Top\ Right"))) {
String41 = ( "t");
Layout13.setXmlParam(( "x"), System.integerToString(( Int130 - Int36)));
Layout13.setXmlParam(( "y"), System.integerToString(0));
}
if(( String129 == ( "4\.\ Top\ Left"))) {
String41 = ( "t");
Layout13.setXmlParam(( "x"), System.integerToString(0));
Layout13.setXmlParam(( "y"), System.integerToString(0));
}
Layout13.setXmlParam(( "h"), System.integerToString(80));
Layout13.setXmlParam(( "w"), System.integerToString(Int36));
return Null;
}
func4451(Float 5.87747175411144e-39, Float 5.87747175411144e-39)
{
Int34 = 1;
if(( CheckBox27.isChecked() == 1)) {
Layout13.show();
Layout13.setTargetA(255);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int36);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
} else {
Layout13.setAlpha(255);
Layout13.show();
Layout13.setTargetA(255);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int36);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
}
return Null;
}
Layout13.onTargetReached()
{
if(( Int34 == 1)) {
Timer32.start();
}
if(( Int34 == 2)) {
Layout13.hide();
}
return Null;
}
Timer32.onTimer()
{
Float Float147;
Float Float146;
Timer32.stop();
Int34 = 2;
if(( CheckBox27.isChecked() == 1)) {
Layout13.setTargetA(0);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int36);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float147);
Layout13.gotoTarget();
} else {
Layout13.show();
Layout13.setTargetA(255);
if(( String41 == ( "b"))) {
Layout13.setTargetY(( System.StringToInteger(Layout13.getXmlParam(( "y"))) + 90));
}
if(( String41 == ( "t"))) {
Layout13.setTargetY(( System.StringToInteger(Layout13.getXmlParam(( "y"))) - 90));
}
Layout13.setTargetW(Int36);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
}
return Null;
}