Re: Proposal fort GTK bindings
- From: Arun Sharma <asharma netscape com>
- To: Michael Lausch <mla gams co at>
- Cc: gtk-list redhat com
- Subject: Re: Proposal fort GTK bindings
- Date: 04 Nov 1997 10:45:23 -0800
On Tue, 04 Nov 1997 15:08:30 +0100, Michael Lausch wrote:
m> I poropose the following archtiecture of the GTK pYthon
m> bindings.
m> provide bindings for all the GTK functions in a gtk
m> module.
This is what Neil has done in his SWIG based bindings. I was trying to
save a function call in not doing it:
Gtk.Button("foo") {Python} -> gtk.gtk_button_new_with_label("foo")
{Python} -> gtk_button_new_with_label("foo") {C}
is slower than
gtk.button("foo") -> gtk_button_new_with_label("foo")
I don't know if the savings will be significant, but I didn't think
that not going with SWIG would introduce a huge implementation
penalty.
m> Build a python class hierarchy using these functions in
m> the Gtk module.
The class hierarchy would be relatively flat for now. I don't think
there is a need to expose abstract classes in gtk (gtk_box for
example) in Python.
However, object oriented principles have been used in that:
both gtk.vbox.pack() gtk.hbox.pack() eventually translate to
gtk_box_pack_start().
Of course, any new classes which add extra functionality to these
classes would form a class hierarchy.
m> The user should only access to Gtk module.
Certainly.
m> Why now implement the class hierarchy in C? Because it's
m> not possible, without overhead, to inherit from C defines
m> classes.
Could you please elaborate ?
-Arun
[ CC'ed to gtk-list so that more people can take part in the discussion]
--
#include <stddisclaimer.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]