]> git.draconx.ca Git - gob-dx.git/blobdiff - src/test.gob
Release 0.91.0
[gob-dx.git] / src / test.gob
index bac330a3e47a4ea53a0a9e1c6c4377aedff2e2d1..b5b180e68e13f49f3c5386b32af5a0fb700c48f6 100644 (file)
@@ -1,5 +1,10 @@
 %{
 #include <stdio.h>
+/* 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,13 +52,30 @@ 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, ...)
        {
                return 25;
        }
+       signal private first NONE (NONE)
+       void googlegoogle(self)
+       {
+               puts("TEST1");
+               googlegoogle2(self);
+       }
+       signal first private NONE (NONE)
+       void googlegoogle2(self)
+       {
+               puts("TEST2");
+               testprivvirtual(self);
+       }
+       virtual private
+       void testprivvirtual(self)
+       {
+               puts("TEST3");
+               googlegoogle(self);
+       }
 }
 
 %{