Gandharva.dll
multi functional LiteStep-Module for Winamp
version 0.30c
Author: HOSHINO Yoshifumi (also known as Yoshi); yoshi.fm@anet.ne.jp
Website: Yoshi's Storeroom [http://go.iclub.to/yoshi/]
Source of translation: README.html in the archive of this module.
Date of permission to translate: 20th March, 2001 by an email in [jlsug] list.
Translator: Takayuki Kawamoto (also known as philsci); philsci@jupiter.interq.or.jp
1st appeared on 14th August, 2001.
Revised on 15th August, 2001.
Acknowledgement: Thanks Yoshi for the nice works and sendin' me a kind permission :)
Contents
Introduction
Last modified date
Tips
Step.rc
Sample of commands in step.rc
!Bang commands
Developmental conditions
About license
Acknowledgements
Introduction
This module grabs a title of music playing on Winamp and shows the same title on its original window. There are also another mods like this, such as Amptitle or LSXCommandClock, but they have somewhat difficulties for showing titles with Japanese characters or other multi-byte encoding characters.
Gandharva.dll is designed to be easily hacked for another players as possible as I can. If you want to use this module with anothers, you may do it yourself, provided that you follow the GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) or later if you will redistribute your hacked Gandharva.dll.
And you may or may not recognize, this module is still under development and it has not been completed because of my limited knowledge in development languages and LiteStep itself. You should consent to these facts and if you have any suggestions, comments, or complaints on my work, please send me a mail.
Last modified date
0.30c (2001-06-12)
- Change
- README as a html file... don't know what is good and bad for you :P
- Additions
- .rc GandharvaHiddenAmp - To choose the status in show/hide at the startup. The default setting is "show".
- You can set an image for Gandharva with a distance from the center of screen such as "GandharvaX C-80".
Tips
- Depending on your setting in the "Display' properties", the colors of font and background will cause the antialias and it will also occur even if you use a skin for Gandharva.dll, so it appears to be "edged" with the background color :( If you worry such an effect, please check OFF "smoothing screen fonts" option in the display's properties window (in Windows 2000).
- When you click the left button on the play time indication, Gandharva.dll will exchange elapsed/remaining times even after the executing of this module.
- When you click the right button on Gandharva, it will show the same menu as in Winamp.
- When you double-click the left button on the title, Gandharva.dll will launch the dialogbox for the volume control.
- (These actions are also customizable with Gandharva.dll 0.30b or later.)
- Turn off the option of Winamp that "Scroll song title in the windows taskbar" (in [Preference > Options > Display]), or else gandharva.dll will make its notification little strange.
- You don't need to set the PATH to winamp.exe. gandharva.dll will automatically detect the location of winamp.exe from the information of associated executable with "Winamp media file" in registry.
Step.rc
You should load this module only in a "LoadModule" line, and should not load gandharva.dll in wharf.
The self-explanatory description for each definitions will be as follows.
- Command
- Explanation
- Data type / default
so goes on here...
- GandharvaHiddenAmp
- Choose whether gandharva.dll should show Winamp when it is launched from gandharva.
- boolean / false
- GandharvaX [C][+ | -]###
GandharvaY [C][+ | -]### - They will set the position of gandharva window. Both commands support the negative value and when you use negative values, each value will be construed as of the position from the right-bottom edge of your screen. Moreover when you use "c" parameter before numerical values as "c60", gandharva.dll takes this value as of the position from the center of your screen.
- integer / 0
- GandharvaMouseRemap
- It resets all definitions for actions in mouse click, and redefines with your parameters. Expected actions are !bang commands or path to the executable programs. Or, you can launch an associated program with some document.
- boolean / false
- GandharvaMouseXXYZ [string]
- When you set GandharvaMouseRemap as true, you can (rather should) redefine actions with this command.
- XX must be set with one of the following parameter. AL: whole window; TT: title; TM: the area showing time. And the place of "Y" will take one of the following parameter. L: with left button; R: with right button. And "Z" will... C: click; D: double click. So, for example, if you set "GandharvaMouseALRC" the [string] paramter will be executed when you "click" the "right button" on "any area on the window".
- However this command has its limits as follows. First, when you set several commands which are mutually incompatible or overlapped in range, gandharva.dll will use the command for AT than TT or TT than TM, therefore AT than TM. Second, you can not define actions with click and double click for exactly the same area. You may do, but the action for single click will be executed also, even if you do double click for something.
- string / null
- GandharvaForceTransp
- It forces the current background color as being transparent. Please set this command if you need the anti-alias effect, but the color in your skin will be ignored.
- boolean / false
- GandharvaBitmap [filename]
- It calls your favourite bitmap as a skin and the MAGIC PINK (TM): FF00FF in hexadecimal value will get the transparency. This command should ignore GandharvaForceTransp because you might use another bitmap and want to use another color as being transparent.
- string / null
- GandharvaTime [elapsed | remain]
- With this command, you can set elapsed or remaining time of a track in gandharva window. The remaining time will be shown with "-" (minus) letter. And if you don't use this command, gandharva.dll will not show any time.
- string / null
- GandharvaTimeFont [string]
GandharvaTimeFontColor [RRGGBB]
GandharvaTimeFontSize ###
GandharvaTimeFontBold
GandharvaTimeFontItalic - See below of each command for the title.
- ~Bold, ~Italic; boolean / false (others will be the same with parameters for the title)
- GandharvaTimePadding # # # # / GandharvaTimePadding #
- You can set "padding" values from top, right, bottom, and left edges of the time area a la Cascading Stylesheets for webpages. When this command get one parameter, gandharva.dll will use this value for all of padding from each edge, so "GandharvaTimePadding 3 3 3 3" and "GandharvaTimePadding 3" do the same things. And, if a padding are overlaps with the title, the former will be shown under the title.
- integer / 0 (0 0 0 0)
- GandharvaBorderSize # # # # / GandharvaBorderSize #
- It does nealy the same with Cascading Stylesheets like as above.
- integer / 0 (0 0 0 0)
- GandharvaPadding # # # # / GandharvaPadding #
- Same with the above, and when this value overlaps with one for the time area, gandharva.dll will take precedence over another.
- integer / 0 (0 0 0 0)
- GandharvaTextAlignH [left | center | right]
- It sets the title without scrolling and put the title text in left / center / right position of the title area. Like as "text-align" of CSS.
- string / "left"
- GandharvaDefaultString [string]
- This sets the default message when nothing has been played. The maximum size of text should be 128 bytes.
- string / the version of gandharva.dll
- GandharvaCommandMode [none | basic]
- It sets own command mode for controlling Winamp. Details are available in explanations for !bang command. "none" will do nothing and leave all controls to another modules or Winamp itself. "basic" will serve all handling as Nullsoft tells us.
- string / "basic"
- GandharvaKeepPrefixGandharvaKeepSuffix
- Keeping the prefix and suffix for each title. For reference, the prefix of Winamp 2.xx is the track number, the suffix of Winamp 2.xx is "Winamp (STATUS)", the prefix of Winamp 3.xx is nothing, and the suffix of Winamp 3.xx is "(STATUS) - Winamp".
- boolean / false
- GandharvaAlwaysOnTop
- It forces gandharva window to stay on the top over all windows.
- boolean / faise
- GandharvaHidden
- At the startup of LiteStep and after its recycling, this command hides the gandharva window.
- boolean / failse
- GandharvaWidth ### / GandharvaHeight ###
- It sets the width and height of gandharva window. If you use a skin image, these command will be unnecessary and gandharva.dll will use the image's original size.
- integer / width: 100, Height: 20
- GandharvaBGColor [RRGGBB]
- It sets the background color for the gandharva window. Depending on your setting in the display applet in control panel, this color and another color for fonts will cause the anti-aliasing effect. Please tweak this color for a suitable appearance :) When you use FF00FF (transparent color), the background will not be shown and the current wallpaper will be appeared. And when you call GandharvaForceTransp command, any color you set with GandharvaBGColor will be taken as a transparent color in gandharva window.
- colorref (hexadecimal value will be safe) / 000000 (black)
- GandharvaBorderColor [RRGGBB]
- It does the same thing with above.
- colorref / 888888 (gray/grey)
- GandharvaFont [fontname]
- It sets a font used in the title.
- string / "MS UI Gothic"
- GandharvaFontSize ###
- It sets a size of font above.
- integer / 16 (pixels)
- GandharvaFontColor [RRGGBB]
- It sets also a color for the font, and depending on your setting in the display applet in control panel, these colors will cause the anti-aliasing effect. So please tweak this color if you use a skin.
- colorref / FFFFFF (white)
- GandharvaFontBold / GandharvaFontItalic
- These will force all texts to be boler or italicized.
- boolean / false
- GandharvaAutoScroll
- It enables the scrolling texts in gandharva window like as Winamp.
- boolean / false
- GandharvaScrollInterval ###
- It sets an interval of scrolling texts in a unit of ms. Less value will cause texts more fast.
- integer / 500 (ms)
- GandharvaScrollStep ###
- It sets a distance of scrolling texts in unit of pixel. Less value will cause texts more smooth but slower.
- integer / 4 (pixels per the value set in GandharvaScrollInterval)
Sample of commands in step.rc
Here's a sample of my step.rc.
GandharvaAlwaysOnTop
GandharvaX -500
GandharvaY 0
GandharvaWidth 180
GandharvaHeight 20
;GandharvaHidden
;GandharvaHiddenAmp
;GandharvaDefaultString "Gandharva ready!"
GandharvaFont "tahoma"
GandharvaFontSize 14
GandharvaFontColor FFE0E0
;GandharvaFontBold
;GandharvaFontItalic
GandharvaPadding 4 3 2 40
GandharvaTextAlignH center
GandharvaForceTransp
GandharvaBitmap skin_ampdisp.bmp
GandharvaBGColor CD6E6E
GandharvaBorderColor FFE0E0
;GandharvaBorderSize 1 0 1 0
GandharvaAutoScroll
GandharvaScrollInterval 50
GandharvaScrollStep 1
;GandharvaKeepPrefix
;GandharvaKeepSuffix
GandharvaCommandMode basic
GandharvaTime elapsed
;GandharvaTimeFont "tahoma"
;GandharvaTimeFontColor 000000
GandharvaTimeFontSize 12
;GandharvaTimeFontItalic
;GandharvaTimeFontBold
GandharvaTimePadding 5 135 3 0
;GandharvaMouseRemap
;GandharvaMouseALRC !GandharvaDispMenu
;GandharvaMouseTTLD !GandharvaSndvol
;GandharvaMouseTMLC !GandharvaToggleTime
!Bang commands
- Window Control Commands
- Some of commands will control the status of gandharva window as follows.
- !GandharvaHide
- It hides the gandharva window.
- !GandharvaShow
- It shows the gandharva window whatever its status.
- !GandharvaToggle
- It switches the status of hide / show.
- !GandharvaToggleTime
- It switches the time value as in elapsed / remaining.
- !GandharvaSndvol (*)
- It launches sndvol32.exe, the configuration window for sound volume in Windows.
- !GandharvaDispMenu (*)
- it shows the main menu of Winamp.
(*) these are intrinsic commands for gandharva.dll and they may vary in the future.
- Winamp Control Commands
- They are available with shortcut.dll or popup.dll for controlling Winamp. You can disable these commands with the setting in GandharvaCommandMode command.
- !GandharvaCmdPrev
- Plays (moves) the previous track.
- !GandharvaCmdPlay
- Plays present track, or executes Winamp if it is not launched (but not play anything).
- !GandharvaCmdPause
- Makes a pause, or restart from an idling.
- !GandharvaCmdStop
- Stops the present track.
- !GandharvaCmdNext
- Plays (moves) the next track.
- !GandharvaCmdPLEdit
- Shows / hides the playlist window of Winamp.
- !GandharvaCmdOpenFile
- Calls the Open File(s) dialog of Winamp.
- !GandharvaCmdPower
- Launches / closes Winamp.
- !GandharvaCmdExtension #####
- Sends parameters to winamp.exe. With this commands, you can control all actions that are available in Winamp (insofar as Nullsoft tells us). Please see the list of all parameters on Nullsoft Developer Network Winamp API page.
Developmental conditions
Microsoft Windows 2000 (SP2)
Litestep 0.24.6 (20010102)
Borland C Compiler 5.5.1
Microsoft Visual C++ 6.0 (SP5)
LoadModule $lsdir$desktop2.dll
LoadModule $lsdir$shortcut2.dll
LoadModule $lsdir$popup2.dll ; 20010102 hacked 1
LoadModule $moduledir$dwarf.dll ; version 1.11 hacked 1
LoadModule $moduledir$tasks.dll ; version of Tasks.dll .90 (j hack)
LoadModule $moduledir$grdTray2.dll ; v2.3 beta 2 hacked #3
LoadModule $moduledir$gandharva.dll
LoadModule $moduledir$Nornir.dll ; my module for showing date and time.
I've tested on the above situation.
About license
copyright (C) 2000,2001 HOSHINO Yoshifumi (Yoshi)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Acknowledgements
This modules has a precursor, AmpDisp.dll as an early beta, and it was a hacked mod from Mr.Munkby's GrdTray version 2.3 beta 2. Now gandharva.dll is a module from a scratch, but some influences from GrdTray will be remain. Thanks Munkby to release the great module and its source code.
And, I will thank all webmasters to keep up informations on LiteStep.