]> git.draconx.ca Git - gob-dx.git/blob - src/test.gob
Release 0.91.1
[gob-dx.git] / src / test.gob
1 %{
2 #include <stdio.h>
3 /* the next line is not mandatory, but if gob finds an include in one of
4    the %{ %} sections above the class definitions, it will not put it in
5    the file itself.  So you can this way select where the include file is
6    at */
7 #include "gtk-weird-button.h"
8 #include "gtk-weird-button-private.h"
9
10 static void jjjj(void);
11 %}
12
13 %h{
14 void bubu(void);
15 %}
16
17 class Gtk:Weird:Button from Gtk:Button {
18         public int i;
19         argument INT i set { self->i = ARG; } get { ARG = self->i; } ;
20         private int j;
21         public GtkWidget * h;
22         public char *bleh;
23         public double array[23][18];
24
25         init(object) {
26                 GtkWeirdButton *but = GTK_WEIRD_BUTTON(object);
27                 but->i=0;
28         }
29         class_init(klass);
30         public GtkWidget * new(int j (check > 0)) {
31                 GtkWidget *ret;
32                 ret = GTK_WIDGET (GET_NEW);
33
34                 GTK_WEIRD_BUTTON(ret)->_priv->j = j;
35
36                 return ret;
37         }
38         private int blah(self, Gtk:Widget * wid (check null type),
39                          int h (check > 0)) onerror -1 {
40                 gtk_container_add(GTK_CONTAINER(self),wid);
41                 return h;
42         }
43         signal last INT (POINTER, INT)
44         int bleh(self, Gtk:Widget * wid (check null type),
45                         int h (check > 0)) {
46                 return blah(self,wid,h);
47         }
48         signal first NONE (NONE)
49         void bloh(self);
50         virtual void * bah(self, int h (check > 0)) onerror NULL {
51                 beh(self,h);
52                 return NULL;
53         }
54         virtual int beh(self, int h (check > 0));
55         override(Gtk:Container) void add(Gtk:Container * self (check null type),
56                                          Gtk:Widget * wid (check null type)) {
57                 PARENT_HANDLER(self,wid);
58         }
59         public int consttest(self, const gchar *text, ...)
60         {
61                 return 25;
62         }
63         signal private first NONE (NONE)
64         void googlegoogle(self)
65         {
66                 puts("TEST1");
67                 googlegoogle2(self);
68         }
69         signal first private NONE (NONE)
70         void googlegoogle2(self)
71         {
72                 int array[5][8][9]={{{0}}};
73                 puts("TEST2");
74                 testprivvirtual(self,array);
75         }
76         virtual private
77         void testprivvirtual(self, int some_array[5][8][9])
78         {
79                 puts("TEST3");
80                 googlegoogle(self);
81         }
82         signal first NONE (POINTER)
83         void testarrsignal(self, long arr[8])
84         {
85                 puts("TEST2");
86         }
87 }
88
89 %{
90
91 static void
92 jjjj(void)
93 {
94 }
95
96 void
97 bubu(void)
98 {
99         jjjj();
100 }
101
102 %}