Re: [gtk-list] Re: Proposal fort GTK bindings



On Tue, Nov 04, 1997 at 10:45:23AM -0800, Arun Sharma wrote:
> 
> On Tue, 04 Nov 1997 15:08:30 +0100, Michael Lausch wrote:
> 	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.

Looks like I am behind here. :)  My gtk.py module does implement a
class hierarchy.  You can do stuff like:

	w = gtk.Window() # w is an instance of Window
	b = gtk.Button() # b is an instance of Button
	w.add(b) # comes from Container
	b.connect("clicked", gtk.main_quit) # comes from Object

The add method is found from the Python Container object, which
Window is a decendent of.  Also connect is a method of the Object
object (perhaps I should change the method name to signalConnect
to be more consistant with my name translations).

The gtk.py module implements Python classes that wrap the
underlying C "objects".  I will probably be releasing a new
version with more classes implemented and more demo programs
later today.  The extension module is about 95% complete. SWIG is
cool although it does create a big library.  Hopefully Arun's
extension module can be used instead.

Again, I really would appreciate any feedback on the design of
this Python module.


	Neil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]