Documentation

Skinning

Each skin consists of a definition file which resides in the app's directory, and a couple of images in a corresponding subdirectory. The definition file must be named "Skin_xxxxx.ini", where xxxxx is the name of your skin, which is also used within Power Radio to select between skins.

Color numbers are hexadecimal ARGB values in form AARRGGBB. As alpha (transparency) is not suppported you can ignore this and set it to FF on all occasions.

Font definitions have the following format: <fontname>, <fontsize>, <style> Fontname is the name of any existing font on your PDA. You may copy ttf fonts to the \Windows directory on your PDA too. Fontsize is (of course) the size. Style may be one of the following: Regular, Bold, Italic, Strikeout, Underline. The style must be supported by the chosen font or it will be ignored. In doubt view the font on your PC to see supported styles.

ImagePath=Skin_blue\

The path to the images for this skin. The path is relative to the installation directory. Dont forget the backslash at end or it will fail to load. It MUST start with "Skin_" or will not be found by PowerRadio. The remainder of the name is displayed as the skinname when selecting a skin in PowerRadio (longpress menu). As a sample check the default Skin_brown.ini

Wallpaper=<path-to-image>

defines the background image to be shown. Size should be 800x480, Format jpg or png.

DatapanelColor

the background of the upper part of the display (default darkbrown), where frequency, station name etc resides. Usually you will have a background (=wallpaper) image so you wont see this color anyway. However, if you enter a frequency manually it will show.

DatapanelIndicatorColor

foreground color for most of the controls when in inactive state. Some controls have their own setting, see the following lines.

DatapanelIndicatorHighlightColor

foreground color for most of the controls when in active state.

DatapanelIndicatorFont

fontname, size and style for indicator controls

DatapanelTAHighlightColor

foreground color when a TA (traffic announcement) is actively broadcast by the station. Usually any alerting color like red.

DatapanelFrequencyColor

foreground color of currently tuned frequency when inactive

DatapanelFrequencyHighlightColor

foreground color of currently tuned frequency when active

DatapanelFrequencyFont

font definition for frequency

DatapanelStationnameColor

foreground color of station name when inactive

DatapanelStationnameHighlightColor

foreground color of station name when active

DatapanelStationnameFont

font definition for station name

DatapanelVolumebarsColor

foreground color of volume bars when inactive

DatapanelVolumebarsHighlightColor

foreground color of volume bars when active

DatapanelRSSIbarsColor

foreground color of RSSI bars (reception strength) when inactive

DatapanelRSSIbarsHighlightColor

foreground color of RSSI bars (reception strength) when active

DatapanelRdstextColor

foreground color of RDS text messages. These are the two textlines between indicators and preset buttons, surrounded by lines.

DatapanelRdstextFont

font definition for RDS text lines.

DatapanelPresetbuttonBackColor

background color of frequency and station name displayed on preset buttons . This color should be identical to the foreground color of these images: PresetButton, PresetButtonPressed

DatapanelPresetbuttonFrequencyColor

foreground color of frequency displayed on preset buttons

DatapanelPresetbuttonFrequencyHighlightColor

foreground color of frequency displayed on preset buttons when highlighted (tuned)

DatapanelPresetbuttonFrequencyFont

font definition of frequency displayed on preset buttons

DatapanelPresetbuttonFrequencyHighlightFont

font definition of frequency displayed on preset buttons when selected

DatapanelPresetbuttonStationnameColor

foreground color of station name displayed on preset buttons

DatapanelPresetbuttonStationnameHighlightColor

foreground color of station name displayed on preset buttons when highlighted (selected)

DatapanelPresetbuttonStationnameFont

font definition of station name displayed on preset buttons

DatapanelPresetbuttonStationnameHighlightFont

font definition of station name displayed on preset buttons when selected

DatapanelSleeptimerColor

if sleep timer is active, foreground color of countdown timer

ControlpanelColor

background color of the lower panel where the control buttons reside (default black).

ControlpanelButtonBackColor

background color of the buttons in the control panel. This color must match the background color of the following images: ControlButton, ControlButtonPressed, PowerButton, PowerButtonPressed

ControlpanelButtonColor

foreground color for most of the control buttons (seek fwd/back, ear, mute, blend, stereo, menu) when inactive

ControlpanelButtonHighlightColor

foreground color for most of the control buttons (seek fwd/back, ear, mute, blend, stereo, menu) when active

 

 

Images used in Power Radio

The following images are used within PowerRadio. As already mentioned, each skin has its own directory, see ImagePath=... All images are in .png format.

SYMBOLS

Antenna, AntennaRed: antenna symbol above station strength bars (earpiece plugged). AntennaRed is used when earpiece is unplugged

Speaker: speaker symbol above wolume bars

PresetLocked: symbol when preset is locked

BUTTONS

Controlbutton, ControlbuttonPressed, : control button background image for seek fwd/back frequency up/down, ear, mute, blend, stereo, menu . Only used when no other skins for buttons are available

Powerbutton, PowerbuttonPressed: power button

Presetbutton, PresetbuttonPressed, PresetbuttonActive, PresetLocked: preset button: active means when a station is tuned that corresponds with the button. PresetLocked is used when a preset is locked (image will be overlayed and should be a small lock symbol)

VolumeDown, VolumeDownPressed, VolumeUp, VolumeUpPressed: volume up/down

AudioEar, AudioEarPressed, AudioSpeaker, AudioSpeakerPressed: audiopath button (ear/spk)

AudioMute, AudioMutePressed, AudioUnmute, AudioUnmutePressed: mute button

Mono, MonoPressed, Stereo, StereoPressed: mono/stereo button

BlendOff, BlendOffPressed, BlendOn, BlendOnPressed: stereo blend button

FreqSeekBack, FreqSeekBackPressed: frequency search back button

FreqSeekFwd, FreqSeekFwdPressed: frequency search forward button

FreqSkipBack, FreqSkipBackPressed: frequency down button

FreqSkipFwd, FreqSkipFwdPressed: frequency up button

Menu, MenuPressed, MenuStop: menu button. MenuStop is displayed during a scan

 

 

Remote control & events

Power Radio can be remote controlled via scripts. Additionally, Power Radio delivers basic information about stations via registry, and can be configured to call external programs on content changes.

Remote control

Sending a command to Power Radio is accomplished via HeadsetButtonHandler.exe, which can be found in the installation directory.

The basic syntax is: HeadsetButtonHandler <command> <option>

Available commands and options (mostly self explanatory):

• Preset <p> select preset p (1-n). If preset is invalid, the command will be ignored
• PresetPrev select previous preset
• PresetNext select next preset
• SeekFwd  
• SeekRev  
• Mute  
• Unmute  
• MuteToggle  
• Headset send audio output to headset (earpiece)
• Speaker send audio output to speaker
• AudioPathToggle Toggle toggle between headset and speaker
• BlendOn  
• BlendOff  
• BlendToggle  
• Stereo  
• Mono  
• StereoToggle  
• PowerOff  

Examples:

HeadsetButtonHandler Preset 3
HeadsetButtonHandler PowerOff

 

Station infos and notifications

Power Radio delivers information about the currently tuned station via registry, and may be configured to run an external command when content is updated.

The following info may be obtained via registry key HKLM\Software\PowerRadio:

• Frequency
• StationName
• RdsTextMessage

Values are updated whenever they change. During scan, no updates occur.

To run a command on update of these values, create a string value named OnRdsDataChange in HKLM\Software\PowerRadio. The content of the value should contain your command and options if necessary, separated by SPACE and surrounded by quotation marks.

Here’s an example, which calls a mortscript on update:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\PowerRadio]
"OnRdsDataChange"="\"\\Program Files\\MortScript\\MortScript.exe\" \"\\Program Files\\PowerRadio\\PRSample.mscr\""

The output of regedit might be a bit confusing, here’s a screenshot for clarification:

 

The corresponding mortscript:

fr=RegRead(HKLM, "Software\PowerRadio", "Frequency")
sn=RegRead(HKLM, "Software\PowerRadio", "StationName")
tx=RegRead(HKLM, "Software\PowerRadio", "RdsTextMessage")
msg="Frequency: " & fr & "^NL^ Stationname: " & sn & "^NL^ RDS message: " & tx
SleepMessage(1, msg, "PowerRadio update", 1)