]> git.draconx.ca Git - gob-dx.git/blob - src/test.gob
f7fbf8d1f7b5b7f46c9f6e1a9d7c3b02b575c639
[gob-dx.git] / src / test.gob
1 %{
2 #include <stdio.h>
3
4 static void jjjj(void);
5 %}
6
7 %h{
8 void bubu(void);
9 %}
10
11 class Gtk:Weird:Button from Gtk:Button {
12         public int i;
13         argument INT i set { self->i = ARG; } get { ARG = self->i; } ;
14         private int j;
15         public GtkWidget * h;
16         public char *bleh;
17
18         init(object) {
19                 GtkWeirdButton *but = GTK_WEIRD_BUTTON(object);
20                 but->i=0;
21         }
22         class_init(klass);
23         public GtkWidget * new(int j (check > 0)) {
24                 GtkWidget *ret;
25                 ret = GTK_WIDGET (GET_NEW);
26
27                 GTK_WEIRD_BUTTON(ret)->j = j;
28
29                 return ret;
30         }
31         private int blah(self, Gtk:Widget * wid (check null type),
32                          int h (check > 0)) onerror -1 {
33                 gtk_container_add(GTK_CONTAINER(self),wid);
34                 return h;
35         }
36         signal last INT (POINTER, INT)
37         int bleh(self, Gtk:Widget * wid (check null type),
38                         int h (check > 0)) {
39                 return blah(self,wid,h);
40         }
41         signal first NONE (NONE)
42         void bloh(self);
43         virtual void * bah(self, int h (check > 0)) onerror NULL {
44                 beh(self,h);
45                 return NULL;
46         }
47         virtual int beh(self, int h (check > 0));
48         override(Gtk:Container) void add(Gtk:Container * self (check null type),
49                                          Gtk:Widget * wid (check null type)) {
50                 PARENT_HANDLER(self,wid);
51         }
52         public int consttest(self, const gchar *text, ...)
53         {
54                 return 25;
55         }
56         signal private first NONE (NONE)
57         void googlegoogle(self)
58         {
59                 puts("TEST1");
60                 googlegoogle2(self);
61         }
62         signal first private NONE (NONE)
63         void googlegoogle2(self)
64         {
65                 puts("TEST2");
66                 testprivvirtual(self);
67         }
68         virtual private
69         void testprivvirtual(self)
70         {
71                 puts("TEST3");
72                 googlegoogle(self);
73         }
74 }
75
76 %{
77
78 static void
79 jjjj(void)
80 {
81 }
82
83 void
84 bubu(void)
85 {
86         jjjj();
87 }
88
89 %}