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 */
47 class Gtk:Weird:Button from Gtk:Button {
48 public int test_array[TEST_ARRAY];
50 argument INT i set { self->i = ARG; } get { ARG = self->i; } ;
52 public int testing = 1;
53 argument INT testing link;
55 public char * testingstring = {g_strdup("test")}
57 argument POINTER testingstring stringlink;
59 public Gtk:Weird:Button * testingobj
60 destroywith gtk_object_unref;
61 argument POINTER testingobj objectlink;
63 classwide int foo = 20;
64 argument INT foo link;
66 public Gtk:Object * testingobj2
69 gtk_object_unref(GTK_OBJECT(VAR));
71 argument POINTER (type Gtk:Object *) testingobj2 objectlink;
73 argument POINTER (type GtkObject *) some_object
74 set { /* set some_object */ }
75 get { /* get some_object */
77 argument (CONSTRUCT) LONG (type long) write_only_long
78 set { /* set write_only_long */ };
79 argument POINTER (type char *) read_only_string
80 get { /* get readonly_long */
81 ARG = g_strdup("BLAH"); };
85 public double array[23][18];
86 protected unsigned long int wagawaga;
87 public int wagawaga_should_be_after_this_in_the_header;
100 * Returns: new object
102 public GtkWidget * new(int j (check > 0)) {
104 ret = GTK_WIDGET (GET_NEW);
106 SELF(ret)->_priv->j = j;
110 private int _blah(self, Gtk:Widget * wid (check null type),
111 int h (check > 0)) onerror -1 {
112 gtk_container_add(GTK_CONTAINER(self),wid);
114 gtk_object_set(GTK_OBJECT(self),
115 GTK_WEIRD_BUTTON_ARG_I(99),
127 * Returns: new object
129 signal last INT (POINTER, INT)
130 int bleh(self, Gtk:Widget * wid (check null type),
132 return _blah(self,wid,h);
135 * gtk_weird_button_bleh2:
142 * Returns: new object */
143 signal last INT (POINTER, INT)
144 int bleh2(self, Gtk:Widget * wid (check null type),
146 /* testing multiple marshaller support */
149 /* this should not get documented as it's nonstandard */
155 /* Here we are testing how the gtk-doc extraction code error handeling
156 it should just ingore these */
172 *zblunk*******//**//**/
173 signal first NONE (NONE)
175 virtual void * bah(self, int h (check > 0)) onerror NULL defreturn 0 {
179 virtual int beh(self, int h (check > 0));
180 override(Gtk:Container) void add(Gtk:Container * self (check null type),
181 Gtk:Widget * wid (check null type)) {
182 PARENT_HANDLER(self,wid);
184 public int consttest(self, const gchar *text, ...)
188 signal private first NONE (NONE)
189 void googlegoogle(self)
194 signal first private NONE (NONE)
195 void googlegoogle2(self)
197 int array[5][8][9]={{{0}}};
200 testprivvirtual(foo, array);
202 private signal first NONE (NONE)
203 void googlegoogle3(self)
207 protected signal first NONE (NONE)
208 void googlegoogle4(self)
213 void testprivvirtual(self, int some_array[5][8][9])
219 void testprivvirtual2(self, int some_array[5][8][9])
224 void testpublicvirtual(self, int some_array[5][8][9])
229 void testprotectedvirtual(self, int some_array[5][8][9])
233 signal first NONE (POINTER)
234 void testarrsignal(self, long arr[8])
239 /* testing empty func */
240 public void foofoofoo(self) {}
241 /* testing empty func 2 */
242 public void foofoofoo2(self);
243 /* testing empty func 3 */
244 public void foofoofoo3(self) { }
245 /* testing empty func 4 */
246 public void foofoofoo4(self)
250 override (Gtk:Widget)
251 int event(Gtk:Widget *self (check null type),
252 GdkEvent *event (check null)) onerror FALSE
256 ret = PARENT_HANDLER(self,event);
260 override(Gtk:Container)
262 remove(Gtk:Container * self (check null type),
263 Gtk:Widget * wid (check null type));
267 destroy(Gtk:Object * self (check null type))
270 PARENT_HANDLER(self);
275 /* just an empty function */
279 signal last NONE(CHAR,UCHAR,BOOL,INT,UINT,LONG,ULONG,FLOAT,DOUBLE,
280 STRING,ENUM,FLAGS,BOXED,POINTER,OBJECT)
282 testargs(self, gchar a, guchar b, gboolean c, gint d, guint e, glong f,
283 gulong g, gfloat h, gdouble i, gchar * j, gint k,
284 guint l, gpointer m, gpointer o, GtkObject *p)
286 /* ugh, testing casting */
289 public signal (NO_HOOKS) last INT (INT)
290 int testflags(self, int w (check > 0)) defreturn -99 {
298 test_none_thing (self)
302 /* testing empty statements */