Re: [Vala] GObject Extensions

2008-07-18 Thread Matías De la Puente
> > > > > 2. I think once the class definition is closed, you can't > > extend it, but > > > > I agree with you that once the class definition is closed we can't > > extend it. But in this case the gtkglext functions extend the > > GdkWindow object to bring OpenGL capabilities to s

Re: [Vala] GObject Extensions

2008-07-18 Thread Yu Feng
On Fri, 2008-07-18 at 10:29 -0300, Matías De la Puente wrote: > > 2008/7/17 Yu Feng <[EMAIL PROTECTED]>: > Hi Matias, > > 1. Gdk.Window isn't a GObject. > > Gdk.Window IS a GObject, you can see this in > http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#GdkWindow

Re: [Vala] GObject Extensions

2008-07-18 Thread Matías De la Puente
2008/7/17 Yu Feng <[EMAIL PROTECTED]>: > Hi Matias, > > 1. Gdk.Window isn't a GObject. Gdk.Window IS a GObject, you can see this in http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#GdkWindow Object Hierarchy GObject +GdkDrawable

Re: [Vala] GObject Extensions

2008-07-17 Thread Yu Feng
Hi Matias, 1. Gdk.Window isn't a GObject. 2. I think once the class definition is closed, you can't extend it, but why not try something like this: [CCode cname=GdkWindow new=gdk_window_new ] class DrawingArea:Gdk.Window { public void unset_gl_capability (); } This is hackish a

[Vala] GObject Extensions

2008-07-17 Thread Matías De la Puente
Hi, all. It is possible to add extension functions to some GObjects in the vapi files? Here is a concrete sample. In gtkglext-1.0 there's some functions that extend a Gdk.Window object. I create a vapi file with this: [CCode (lower_case_cprefix="gdk_window_")] namespace GdkWindow