Scripting questions

Leo Franchi lfranchi at kde.org
Wed Nov 17 14:29:32 UTC 2010


On Wed, Nov 17, 2010 at 4:59 AM, Nikhil Marathe <nsm.nikhil at gmail.com> wrote:
> On Tue, Nov 16, 2010 at 2:23 AM, Christian Kreibich <christian at whoop.org> wrote:
>>      * Also, is there a manual for scripting applets? I have only found
>>        scattered mentionings that this is possible and a plasmoid code
>>        snippet [1] from quite a while ago. It suggests the applets are
>>        effectively just embedded plasmoids -- is that right?
>>
>> [1] http://amarok.kde.org/blog/archives/1017-time-to-take-it-away.html
>>
>
> Yes, the Context View applets are all plasmoids, and as such most of
> the basic Plasmoid JavaScript API should be available for you.
> In addition Amarok provides certain APIs to get details like currently
> playing song and so on. See
>
> http://amarok.kde.org/wiki/Development/Scripting_HowTo_2.0
>
> In addition the classes in amarok/src/scriptengine/ usually have
> one-to-one mappings in the JS environment, so they can serve as some
> idea of a reference, and amarok/src/dialogs/ScriptManager.cpp
> ::startScriptEngine() introduces various Amarok components into JS, eg
> Amarok.Engine, Amarok.Importer, Amarok.Lyrics, so you can refer to
> that for a starting point.

Here are two sample scripted applets in amarok's git:
https://projects.kde.org/projects/extragear/multimedia/amarok/repository/revisions/master/show/playground/src/context/applets/scriptedsample
https://projects.kde.org/projects/extragear/multimedia/amarok/repository/revisions/master/show/playground/src/context/applets/jssample/

I wrote them along with the blog post in 2008---i haven't tried them
since. they probably don't work anymore, but are a good starting point
for playing around with the scripted applet functionality. There is
also built-in GHNS integration for scripted applets that is simply not
turned on in amarok right now.

you can find me on #amarok on freenode as lfranchi if you have
questions, but i'm away on business this week so won't be around till
next week comes.

cheers,
leo
-- 
_____________________________________________________________________
leo at kdab.com                                 KDAB (USA), LLC
lfranchi at kde.org                             The KDE Project



More information about the Amarok mailing list