X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/6e77e91bbb048a0ee1a072715c0ce808c169ab38..40647d7b7b7fbeae828e0a032a3c3a5f204cdfa8:/src/test.gob diff --git a/src/test.gob b/src/test.gob index 1c522a6..b5b180e 100644 --- a/src/test.gob +++ b/src/test.gob @@ -1,5 +1,10 @@ %{ #include +/* the next line is not mandatory, but if gob finds an include in one of + the %{ %} sections above the class definitions, it will not put it in + the file itself. So you can this way select where the include file is + at */ +#include "gtk-weird-button.h" static void jjjj(void); %} @@ -13,17 +18,18 @@ class Gtk:Weird:Button from Gtk:Button { argument INT i set { self->i = ARG; } get { ARG = self->i; } ; private int j; public GtkWidget * h; + public char *bleh; init(object) { GtkWeirdButton *but = GTK_WEIRD_BUTTON(object); but->i=0; } - class_init(class); + class_init(klass); public GtkWidget * new(int j (check > 0)) { GtkWidget *ret; ret = GTK_WIDGET (GET_NEW); - GTK_WEIRD_BUTTON(ret)->j = j; + GTK_WEIRD_BUTTON(ret)->_priv->j = j; return ret; } @@ -46,8 +52,7 @@ class Gtk:Weird:Button from Gtk:Button { virtual int beh(self, int h (check > 0)); override(Gtk:Container) void add(Gtk:Container * self (check null type), Gtk:Widget * wid (check null type)) { - if (GTK_CONTAINER_CLASS (parent_class)->add) - (* GTK_CONTAINER_CLASS (parent_class)->add) (self,wid); + PARENT_HANDLER(self,wid); } public int consttest(self, const gchar *text, ...) {