1 /* this is a TEST file, it's VERY VERY ugly, it's just supposed to test
2 the parser of gob and somewhat test some output as well, you can
3 look in here to see a whole array of different syntax options, but
4 don't expect this to be an easy to read file */
9 /* this should go on the very top of the header */
12 /* this should go on the very top of the header as well */
15 /* this should go into the private header */
18 /* this should go into the private header as well*/
24 /* the next line is not mandatory, but if gob finds an include in one of
25 the %{ %} sections above the class definitions, it will not put it in
26 the file itself. So you can this way select where the include file is
28 #include "gtk-weird-button.h"
29 #include "gtk-weird-button-private.h"
31 /* this is to test if the lexer won't get confused by requires inside
36 static void jjjj(void);
43 /* this should be in the header, just under bubu prototype */
46 class Gtk:Weird:Button from Gtk:Button {
48 argument INT i set { self->i = ARG; } get { ARG = self->i; } ;
49 argument POINTER (type GtkObject *) some_object
50 set { /* set some_object */ }
51 get { /* get some_object */
53 argument (CONSTRUCT) LONG (type long) write_only_long
54 set { /* set write_only_long */ };
55 argument POINTER (type char *) read_only_string
56 get { /* get readonly_long */
57 ARG = g_strdup("BLAH"); };
61 public double array[23][18];
62 protected unsigned long int wagawaga;
63 public int wagawaga_should_be_after_this_in_the_header;
78 public GtkWidget * new(int j (check > 0)) {
80 ret = GTK_WIDGET (GET_NEW);
82 GTK_WEIRD_BUTTON(ret)->_priv->j = j;
86 private int blah(self, Gtk:Widget * wid (check null type),
87 int h (check > 0)) onerror -1 {
88 gtk_container_add(GTK_CONTAINER(self),wid);
90 gtk_object_set(GTK_OBJECT(self),
91 GTK_WEIRD_BUTTON_ARG_I(99),
103 * Returns: new object
105 signal last INT (POINTER, INT)
106 int bleh(self, Gtk:Widget * wid (check null type),
108 return blah(self,wid,h);
111 * gtk_weird_button_bleh2:
118 * Returns: new object */
119 signal last INT (POINTER, INT)
120 int bleh2(self, Gtk:Widget * wid (check null type),
122 /* testing multiple marshaller support */
125 /* this should not get documented as it's nonstandard */
131 /* Here we are testing how the gtk-doc extraction code error handeling
132 it should just ingore these */
148 *zblunk*******//**//**/
149 signal first NONE (NONE)
151 virtual void * bah(self, int h (check > 0)) onerror NULL {
155 virtual int beh(self, int h (check > 0));
156 override(Gtk:Container) void add(Gtk:Container * self (check null type),
157 Gtk:Widget * wid (check null type)) {
158 PARENT_HANDLER(self,wid);
160 public int consttest(self, const gchar *text, ...)
164 signal private first NONE (NONE)
165 void googlegoogle(self)
170 signal first private NONE (NONE)
171 void googlegoogle2(self)
173 int array[5][8][9]={{{0}}};
175 testprivvirtual(self,array);
177 private signal first NONE (NONE)
178 void googlegoogle3(self)
182 protected signal first NONE (NONE)
183 void googlegoogle4(self)
188 void testprivvirtual(self, int some_array[5][8][9])
194 void testprivvirtual2(self, int some_array[5][8][9])
199 void testpublicvirtual(self, int some_array[5][8][9])
204 void testprotectedvirtual(self, int some_array[5][8][9])
208 signal first NONE (POINTER)
209 void testarrsignal(self, long arr[8])
214 /* testing empty func */
215 public void foofoofoo(self) {}
216 /* testing empty func 2 */
217 public void foofoofoo2(self);
218 /* testing empty func 3 */
219 public void foofoofoo3(self) { }
220 /* testing empty func 4 */
221 public void foofoofoo4(self)
225 override (Gtk:Widget)
226 int event(Gtk:Widget *self (check null type),
227 GdkEvent *event (check null)) onerror FALSE
231 ret = PARENT_HANDLER(self,event);
235 override(Gtk:Container)
237 remove(Gtk:Container * self (check null type),
238 Gtk:Widget * wid (check null type));
242 /* just an empty function */
246 signal last NONE(CHAR,UCHAR,BOOL,INT,UINT,LONG,ULONG,FLOAT,DOUBLE,
247 STRING,ENUM,FLAGS,BOXED,POINTER,OBJECT)
249 testargs(self, gchar a, guchar b, gboolean c, gint d, guint e, glong f,
250 gulong g, gfloat h, gdouble i, gchar * j, gint k,
251 guint l, gpointer m, gpointer o, GtkObject *p)
253 /* ugh, testing casting */