|
Nothing to say...
Join Date: Sep 2000
Location: UK
Posts: 23,020
|
Introduction to WA3
NSDN Scripting overview
Quote:
Scripting If you want it, Winamp can do it for you.
Winamp3 is all about flexibility and doing exactly what you want it to. To better realize this goal it includes a cross platform scripting system which allows the properties of any object (it's position, it's size or anything else) in a skin to be altered in almost limitless ways through a quick, efficient and easy programming language. This language was also developed to have a shallow learning curve where pretty much anyone, with or without previous programming experience, can learn to script without too much difficulty.
This powerful language has created in a new type of developer: The scripter.
This language, known as MAKI (make a killer interface), has syntax similar to C++ and these “.maki” files can appear in two locations: inside of skins, where they deal with slide out drawers, curved seek sliders and the like. And also in stand alone scripts, which can act like mini components, performing any number of complex actions with a press of a button, while still having access to all of the graphic and multimedia power that Winamp provides to full skins.
The biggest advantage of scripts is, as mentioned above, that they are automatically compatible across all the operating systems that Winamp3 is ported to (Win32, MacOS, Linux, etc) without any need to re-compile. This offers a distinct advantage over components which would need to be recompiled to work with another operating system.
Using this language it is possible to rapidly create scripts which act like mini plug-ins, with a minimum of coding. Scripts, in many places, can do the job of Winamp2 'General' plug-ins. These scripts may also be skinned so that they match the rest of the interface that the user has active.
Maki is an object-oriented language. This means you can use inheritance to control objects and events in your skin. For example all the elements on your skin (guiobjects) have a number of things that can be changed (like position, size and opacity), and commands that can be used on them (like hide/show). All layers (regular images) on the skin inherit from Guiobjects, animatedlayers (a specially formatted .png file which resembles a film strip) inherit from layers, and so on. For example: Since Animatedlayers inherit from layers which inherits from Guiobjects it can use all Guiobject commands, all layer commands, and some of its own (like “jump to animation frame”). Therefore the opacity of an animated layer could be changed, some effects could be applied to it and then animation could be played with.
But that’s not all! Maki also includes layer FX, which work similarly to dynamic movement in AVS, meaning that bits of the skin can be rotated, skewed, bent, flexed, faded or almost anything you can imagine, or even react to the music that you're playing.
The options that this kind of power opens up for skinners are enormous: Rotating volume knobs, color changing skins, dynamic menus, skins that change according to the time of day, they can even intermingle with websites, bringing in a whole new level of interactivity. And, as though that weren’t enough, new commands and behaviors can be added to MAKI by components, making the eventual possibilities limitless. Any coder can write a component for Wasabi and then expose his functions to MAKI, which then allows scripters to “tap into” his code, without needing to learn anything but how the new functions are called.
|
|