On Wed, Nov 17, 2010 at 4:59 AM, Nikhil Marathe <[email protected]> wrote: > On Tue, Nov 16, 2010 at 2:23 AM, Christian Kreibich <[email protected]> > 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 -- _____________________________________________________________________ [email protected] KDAB (USA), LLC [email protected] The KDE Project _______________________________________________ Amarok mailing list [email protected] https://mail.kde.org/mailman/listinfo/amarok
