Hi,<br><br>you may want to have a look at my lqt project. It contains Qt4 bindings for Lua ( <a href="http://www.lua.org">http://www.lua.org</a> ), which is a language with ANSI C interface.<br><br>lqt is not part of the KDE project, and it does not have KDE bindings yet, though I plan to include them at some point. It also does not use Smoke. I only worked on it in Linux, so I don't know how it would work on other platforms (though it should be quite portable).<br>
<br>You can find lqt in its git repository<br><a href="http://repo.or.cz/w/lqt.git">http://repo.or.cz/w/lqt.git</a><br>The snapshots include a BUILD file which should help understanding how it works.<br><br>One of the steps of the bindings generation is an XML description of the Qt API, which includes the information you want. It does not create a separate C binding before the Lua one, but it should not be too difficult to do.<br>
<br>It is not very well documented yet, so feel free to ask question if something is not clear.<br><br>mauro<br><br><div class="gmail_quote">2008/6/22 Sohail Somani <<a href="mailto:sohail@taggedtype.net">sohail@taggedtype.net</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey,<br>
<br>
I'm part of the way through generating a C-API for Qt but am confused<br>
about Smoke and default values.<br>
<br>
The idea is that given the constructor:<br>
<br>
QLabel(QWidget* parent=0, Qt::WindowFlags f = 0);<br>
<br>
I would generate:<br>
<br>
q_label*<br>
q_label_0();<br>
<br>
q_label*<br>
q_label_1_widget(q_widget* parent);<br>
<br>
q_label*<br>
q_label_2_widget_window_flags(q_widget* parent, q_window_flags flags);<br>
<br>
This does not seem to be currently possible. For example, using rbqtapi,<br>
one sees the following constructors for QLabel:<br>
<br>
QLabel* QLabel::QLabel(QWidget*)<br>
QLabel* QLabel::QLabel(QWidget*, const char*)<br>
QLabel* QLabel::QLabel(QWidget*, const QString&, QWidget*)<br>
QLabel* QLabel::QLabel(QWidget*, const QString&, QWidget*, const char*)<br>
QLabel* QLabel::QLabel(QWidget*, const QString&, QWidget*, const char*,<br>
                        Qt::WFlags)<br>
QLabel* QLabel::QLabel(QWidget*, const char*, Qt::WFlags)<br>
QLabel* QLabel::QLabel(const QString&, QWidget*)<br>
QLabel* QLabel::QLabel(const QString&, QWidget*, const char*)<br>
QLabel* QLabel::QLabel(const QString&, QWidget*, const char*,<br>
                        Qt::WFlags)<br>
<br>
I would have expected QLabel::QLabel() to be one of these overloads.<br>
<br>
The reason I am doing this is that I want to generate bindings for a<br>
language that has only a C interface and I wanted to do as much as<br>
possible in the language rather than in C++. I foresee the definitions<br>
of each C function to be quite straightforward.<br>
<br>
Does anyone know if a C-binding for Qt has been developed (or am I doing<br>
it totally wrong?)<br>
<font color="#888888"><br>
--<br>
Sohail Somani<br>
<a href="http://uint32t.blogspot.com" target="_blank">http://uint32t.blogspot.com</a><br>
<br>
_______________________________________________<br>
Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br>
</font></blockquote></div><br>