[Kde-bindings] get libkonsolepart working within ruby

Arno Rehn arno at arnorehn.de
Thu Feb 4 20:37:22 UTC 2010

On Thursday 04 February 2010 19:06:18 Arno Rehn wrote:
> On Thursday 04 February 2010 15:25:16 Robert Riemann wrote:
> > Hi all,
> > 
> > Richard and me talked yesterday about getting the konsolepart working
> > with ruby. It doesn't work with the code in trunk for now.
> > 
> > Code example: http://pastie.org/809341
> > 
> > Using the konsolepart in c++ (example from dolphin):
> > http://websvn.kde.org/trunk/KDE/kdebase/apps/dolphin/src/panels/terminal/
> > 
> > In the ruby example you get a konsole widget shown, but it doesnt do
> > what a konsole should do: providing a shell.
> > 
> > Richard said the konsolepart bases on a really weird header file and
> > would be need special handling in language bindings.
> > 
> > So the questions is:
> > - Should we try to ask the konsole KPart people to create a clean
> > interface that could be easly wrapped?
> > - Should we just add the part with its interface as it is? and how
> > could do the job? I've never learnt c++ well enough to know what they
> > (the kparts people) did there.
> > - Is there another way to get something like the konsolepart working with
> > ruby?
> There's the TerminalInterface class, which the Konsole KPart
> inherits/implements. It's actually pretty clean, contains only 3 methods.
> So it would only be a matter of including it in a smoke lib (kdeui would
> be a good place, I think) and qobject_casting the KPart to the interface.
> Should be pretty easy. In theory.
Yes, just tested it. Adding the TerminalInterface and TerminalInterfaceV2 
classes to smoke and adjusting the normalize_proc of korundum to handle the 
classes makes it work like a charm.
Now in which smoke lib should the TerminalInterface class be put? kparts 

Arno Rehn
arno at arnorehn.de

More information about the Kde-bindings mailing list