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; } ;
50 public int testing = 1;
51 argument INT testing link;
53 public char * testingstring = {g_strdup("test")}
55 argument POINTER testingstring stringlink;
57 public Gtk:Weird:Button * testingobj
58 destroywith gtk_object_unref;
59 argument POINTER testingobj objectlink;
61 public Gtk:Object * testingobj2
64 gtk_object_unref(GTK_OBJECT(VAR));
66 argument POINTER (type Gtk:Object *) testingobj2 objectlink;
68 argument POINTER (type GtkObject *) some_object
69 set { /* set some_object */ }
70 get { /* get some_object */
72 argument (CONSTRUCT) LONG (type long) write_only_long
73 set { /* set write_only_long */ };
74 argument POINTER (type char *) read_only_string
75 get { /* get readonly_long */
76 ARG = g_strdup("BLAH"); };
80 public double array[23][18];
81 protected unsigned long int wagawaga;
82 public int wagawaga_should_be_after_this_in_the_header;
97 public GtkWidget * new(int j (check > 0)) {
99 ret = GTK_WIDGET (GET_NEW);
101 SELF(ret)->_priv->j = j;
105 private int blah(self, Gtk:Widget * wid (check null type),
106 int h (check > 0)) onerror -1 {
107 gtk_container_add(GTK_CONTAINER(self),wid);
109 gtk_object_set(GTK_OBJECT(self),
110 GTK_WEIRD_BUTTON_ARG_I(99),
122 * Returns: new object
124 signal last INT (POINTER, INT)
125 int bleh(self, Gtk:Widget * wid (check null type),
127 return blah(self,wid,h);
130 * gtk_weird_button_bleh2:
137 * Returns: new object */
138 signal last INT (POINTER, INT)
139 int bleh2(self, Gtk:Widget * wid (check null type),
141 /* testing multiple marshaller support */
144 /* this should not get documented as it's nonstandard */
150 /* Here we are testing how the gtk-doc extraction code error handeling
151 it should just ingore these */
167 *zblunk*******//**//**/
168 signal first NONE (NONE)
170 virtual void * bah(self, int h (check > 0)) onerror NULL defreturn 0 {
174 virtual int beh(self, int h (check > 0));
175 override(Gtk:Container) void add(Gtk:Container * self (check null type),
176 Gtk:Widget * wid (check null type)) {
177 PARENT_HANDLER(self,wid);
179 public int consttest(self, const gchar *text, ...)
183 signal private first NONE (NONE)
184 void googlegoogle(self)
189 signal first private NONE (NONE)
190 void googlegoogle2(self)
192 int array[5][8][9]={{{0}}};
194 testprivvirtual(self,array);
196 private signal first NONE (NONE)
197 void googlegoogle3(self)
201 protected signal first NONE (NONE)
202 void googlegoogle4(self)
207 void testprivvirtual(self, int some_array[5][8][9])
213 void testprivvirtual2(self, int some_array[5][8][9])
218 void testpublicvirtual(self, int some_array[5][8][9])
223 void testprotectedvirtual(self, int some_array[5][8][9])
227 signal first NONE (POINTER)
228 void testarrsignal(self, long arr[8])
233 /* testing empty func */
234 public void foofoofoo(self) {}
235 /* testing empty func 2 */
236 public void foofoofoo2(self);
237 /* testing empty func 3 */
238 public void foofoofoo3(self) { }
239 /* testing empty func 4 */
240 public void foofoofoo4(self)
244 override (Gtk:Widget)
245 int event(Gtk:Widget *self (check null type),
246 GdkEvent *event (check null)) onerror FALSE
250 ret = PARENT_HANDLER(self,event);
254 override(Gtk:Container)
256 remove(Gtk:Container * self (check null type),
257 Gtk:Widget * wid (check null type));
261 /* just an empty function */
265 signal last NONE(CHAR,UCHAR,BOOL,INT,UINT,LONG,ULONG,FLOAT,DOUBLE,
266 STRING,ENUM,FLAGS,BOXED,POINTER,OBJECT)
268 testargs(self, gchar a, guchar b, gboolean c, gint d, guint e, glong f,
269 gulong g, gfloat h, gdouble i, gchar * j, gint k,
270 guint l, gpointer m, gpointer o, GtkObject *p)
272 /* ugh, testing casting */
275 public signal (NO_HOOKS) last INT (INT)
276 int testflags(self, int w (check > 0)) defreturn -99 {
284 test_none_thing (self)
288 /* testing empty statements */