]> git.draconx.ca Git - gob-dx.git/blob - src/test.gob
Release 0.0.1
[gob-dx.git] / src / test.gob
1 %{
2 #include <stdin.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 { this->i = ARG; } get { ARG = this->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(this, Gtk:Widget * wid (check null type),
31                          int h (check > 0)) onerror -1 {
32                 gtk_container_add(GTK_CONTAINER(this),wid);
33                 return h;
34         }
35         signal last INT (POINTER, INT)
36         int bleh(this, Gtk:Widget * wid (check null type),
37                         int h (check > 0)) {
38                 return blah(this,wid,h);
39         }
40         signal first NONE (NONE)
41         void bloh(this);
42         virtual void * bah(this, int h (check > 0)) onerror NULL {
43                 beh(this,h);
44                 return NULL;
45         }
46         virtual int beh(this, int h (check > 0));
47         override(Gtk:Container) void add(Gtk:Container * this (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) (this,wid);
51         }
52 }
53
54 %{
55
56 static void
57 jjjj(void)
58 {
59 }
60
61 void
62 bubu(void)
63 {
64         jjjj();
65 }
66
67 %}