HTML in plasma applets

Mark Kretschmann kretschmann at kde.org
Fri Aug 31 10:05:10 CEST 2007


So,

last night Nikolaj and Leo and me had been wondering how we could
render HTML (for Wikipedia, Magnatune, etc) in plasma applets. Later
on Dan and I talked to Aseigo about this, and this is what came out of
it:


01:25 < aseigo> markey: perhaps i should mark out some time next week
to do some research into qtwebkit viability at this point and ping
some of the TT people who are looking at it from a release management
pov
01:26 < manyoso> could be selling point to say, "same webkit as seen
on Tiger" for instance
01:26 < markey> that would be good, yep
01:26 < aseigo> manyoso: yeah...
01:26 < tagx> manyoso: same webkit as leapord
01:26 < aseigo> markey: my *hope* is that we could throw a dep on a
pre-qt4.4 release-or-snapshot of qtWebKit (qwk?)
01:26 < manyoso> aseigo: you can do that
01:27 < fredrikh> aseigo: i'd say it isn't viable at this point... it
crashes predictably after running for a couple of minutes
01:27 < aseigo> manyoso: yes, assuming its usable =))
01:27 < fredrikh> even if it just sits there
01:27 < manyoso> i think it is fine for rendering simple webpages that
amarok is interested in i think
01:27 < fredrikh> just showing a static webpage
01:27 < aseigo> fredrikh: ergo what i just said to manyoso =)
01:27 < aseigo> it's getting closer all the time though .. so there is hope.
01:27 < aseigo> markey: hydrogen: ah.. one other related thing to all
this that is of interest to us all:
01:27 < markey> else we would have to transform the html and somehow
show in the applet, implement scrolling, etc
01:27 < aseigo> i don't want people to have to use, or even see, the
html engine itself
01:28 < manyoso> fredrikh: which static webpages?
01:28 < aseigo> libplasma should have 2 html containers:
01:28 < aseigo> a) a dead easy API for opening url and responding to
clicks (defaulting to handling them internally, probably, for even
                greater ease of use)
01:29 < fredrikh> manyoso: pretty much any page... i haven't tried to debug it
01:29 < aseigo> b) the canvas2d API. zack already has the bulk of this done.
01:29 < aseigo> markey: hydrogen: if you guys could give me some ideas
of what API you actually use inside amarok with regards to the html
                component, that would be great in helping ensure i
give enough (and not too much) flexibility/power for (a)
01:30 < aseigo> so we'd have a Plasma::Web : public Plasma::Widget class
01:30 < aseigo> and you should be able to do sth like:
01:30 < markey> not sure a) will suffice
01:31 < aseigo> Plasma::Web* html = new Plasma::Web(myApplet);
myApplet->layout()->addWidget(html); html->openUrl(url);
01:31 < aseigo> markey: i'll make it suffice? =)
01:31 < markey> :>
01:31 < aseigo> ergo the "what API do you guys actually use"
01:32 < aseigo> it will need to support appending/inserting html and
other common usages
01:32 < aseigo> i've looked at how kde apps (kcontrol, kmail, a few
others) currently use khtml and it's not overly complex stuff...
01:33 < aseigo> but i wouldn't dare to surmise amarok to be equally
straightforward ;)

-- 
Mark


More information about the Amarok-devel mailing list