[Kde-bindings] Wt ruby bindings

Richard Dale richard.j.dale at gmail.com
Mon Aug 18 10:15:19 UTC 2008


Hi Koen

On Tue, Aug 12, 2008 at 1:02 PM, Koen Deforche <koen.deforche at gmail.com>wrote:

> Richard,
>
> Geert is the person who is making Python bindings for Wt (and has
> already progressed very far). So I guess he could certainly help you
> with specific issues for making Ruby bindings.
>
> Geert Verbruggen: verbruggen.geert at gmail.com

Thanks, I'll contact him about his ideas for getting slots/signals working
in language bindings.

I didn't have time at Akademy, but yesterday I got the code generation
working for a Wt smoke library for use with Ruby bindings, and it now builds
and links with 130 or so Wt:: classes. The coverage of the api is pretty
complete apart from the WSignalBase/WSignal classes and the methods that
take function pointers, or templated arguments. The next steps would be:

* Get a 'hello world' working by linking to the QtRuby runtime
* Find out how much interest there would be in a Ruby Wt binding by mailing
the Wt list
* Create a WtRuby project be removing all Qt-specific code from QtRuby
* Write marshallers for the various std::vector and std::map types etc
* Work out how to do slots/signals in Ruby.

I don't think I should put the code in the KDE svn as it isn't really
possible to use it with any KDE code. So it could go on the Korundum
RubyForge project or maybe as another WtRuby project on RubyForge. I'll
check in the changes needed for the 'kalyptus' code generator as that won't
do any harm. I've attached a tar ball of the smoke project, and I'll cc this
mail to the kdebindings list.

Here are the issues that I came across:

* The multiple inclusion guard macro on WPolygonArea was wrong
* An include was missing from WTableRow for WTableCell (I can special case
this, but the include should be there I think)

diff -r src/Wt/WPolygonArea src.patched/Wt/WPolygonArea
7,8c7,8
< #ifndef WCIRCLE_AREA_H_
< #define WCIRCLE_AREA_H_
---
> #ifndef WPOLYGON_AREA_H_
> #define WPOLYGON_AREA_H_
95c95
< #endif // WIMAGE_AREA_H_
---
> #endif // WPOLYGON_AREA_H_
diff -r src/Wt/WTableRow src.patched/Wt/WTableRow
10a11
> #include <Wt/WTableCell>

The following methods gave problems with linking, which usually means they
are declared in the header, but not defined (I haven't checked what went
wrong, just suppressed the code generation for now):

Wt::RemoveExposedSignal(Wt::EventSignalBase*)
Wt::AddExposedSignal(Wt::EventSignalBase*)
Wt::WDate::isLeapYear(int)
Wt::WDate::isValid(int, int, int)
Wt::WPainter::drawImage(double, double, Wt::WPainter::Image const&, double,
double, double, double)
Wt::WPainterPath::addEllipse(Wt::WRectF const&)
Wt::WRectF::WRectF(Wt::WPointF const&, Wt::WPointF const&)
Wt::WSlider::setRange(int, int)
Wt::WTextEdit::setStyleSheet(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
Wt::WTextEdit::setExtraPlugins(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
Wt::WTextEdit::setToolBar(int, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)

The FindWt.cmake script is expecting to find the fastcgi Wt lib, which isn't
built be default.

regards
-- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080818/23945336/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wt_smoke.tgz
Type: application/x-gzip
Size: 5513 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080818/23945336/attachment.gz>


More information about the Kde-bindings mailing list