]> git.draconx.ca Git - gob-dx.git/blob - src/test.gob
Release 0.90.1
[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
17         init(object) {
18                 GtkWeirdButton *but = GTK_WEIRD_BUTTON(object);
19                 but->i=0;
20         }
21         class_init(class);
22         public GtkWidget * new(int j (check > 0)) {
23                 GtkWidget *ret;
24                 ret = GTK_WIDGET (GET_NEW);
25
26                 GTK_WEIRD_BUTTON(ret)->j = j;
27
28                 return ret;
29         }
30         private int blah(self, Gtk:Widget * wid (check null type),
31                          int h (check > 0)) onerror -1 {
32                 gtk_container_add(GTK_CONTAINER(self),wid);
33                 return h;
34         }
35         signal last INT (POINTER, INT)
36         int bleh(self, Gtk:Widget * wid (check null type),
37                         int h (check > 0)) {
38                 return blah(self,wid,h);
39         }
40         signal first NONE (NONE)
41         void bloh(self);
42         virtual void * bah(self, int h (check > 0)) onerror NULL {
43                 beh(self,h);
44                 return NULL;
45         }
46         virtual int beh(self, int h (check > 0));
47         override(Gtk:Container) void add(Gtk:Container * self (check null type),
48                                          Gtk:Widget * wid (check null type)) {
49                 if (GTK_CONTAINER_CLASS (parent_class)->add)
50                         (* GTK_CONTAINER_CLASS (parent_class)->add) (self,wid);
51         }
52         public int consttest(self, const gchar *text, ...)
53         {
54                 return 25;
55         }
56 }
57
58 %{
59
60 static void
61 jjjj(void)
62 {
63 }
64
65 void
66 bubu(void)
67 {
68         jjjj();
69 }
70
71 %}