Lines Matching refs:fout
121 static FILE *fout = NULL; variable
134 fputs ("\n", fout); in put_marshal_value_getters()
135 fputs ("#ifdef G_ENABLE_DEBUG\n", fout); in put_marshal_value_getters()
136 fputs ("#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)\n", fout); in put_marshal_value_getters()
137 fputs ("#define g_marshal_value_peek_char(v) g_value_get_char (v)\n", fout); in put_marshal_value_getters()
138 fputs ("#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)\n", fout); in put_marshal_value_getters()
139 fputs ("#define g_marshal_value_peek_int(v) g_value_get_int (v)\n", fout); in put_marshal_value_getters()
140 fputs ("#define g_marshal_value_peek_uint(v) g_value_get_uint (v)\n", fout); in put_marshal_value_getters()
141 fputs ("#define g_marshal_value_peek_long(v) g_value_get_long (v)\n", fout); in put_marshal_value_getters()
142 fputs ("#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)\n", fout); in put_marshal_value_getters()
143 fputs ("#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)\n", fout); in put_marshal_value_getters()
144 fputs ("#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)\n", fout); in put_marshal_value_getters()
145 fputs ("#define g_marshal_value_peek_enum(v) g_value_get_enum (v)\n", fout); in put_marshal_value_getters()
146 fputs ("#define g_marshal_value_peek_flags(v) g_value_get_flags (v)\n", fout); in put_marshal_value_getters()
147 fputs ("#define g_marshal_value_peek_float(v) g_value_get_float (v)\n", fout); in put_marshal_value_getters()
148 fputs ("#define g_marshal_value_peek_double(v) g_value_get_double (v)\n", fout); in put_marshal_value_getters()
149 fputs ("#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)\n", fout); in put_marshal_value_getters()
150 fputs ("#define g_marshal_value_peek_param(v) g_value_get_param (v)\n", fout); in put_marshal_value_getters()
151 fputs ("#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)\n", fout); in put_marshal_value_getters()
152 fputs ("#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)\n", fout); in put_marshal_value_getters()
153 fputs ("#define g_marshal_value_peek_object(v) g_value_get_object (v)\n", fout); in put_marshal_value_getters()
154 fputs ("#else /* !G_ENABLE_DEBUG */\n", fout); in put_marshal_value_getters()
155 fputs ("/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.\n", fout); in put_marshal_value_getters()
156 fputs (" * Do not access GValues directly in your code. Instead, use the\n", fout); in put_marshal_value_getters()
157 fputs (" * g_value_get_*() functions\n", fout); in put_marshal_value_getters()
158 fputs (" */\n", fout); in put_marshal_value_getters()
159 fputs ("#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int\n", fout); in put_marshal_value_getters()
160 fputs ("#define g_marshal_value_peek_char(v) (v)->data[0].v_int\n", fout); in put_marshal_value_getters()
161 fputs ("#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint\n", fout); in put_marshal_value_getters()
162 fputs ("#define g_marshal_value_peek_int(v) (v)->data[0].v_int\n", fout); in put_marshal_value_getters()
163 fputs ("#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint\n", fout); in put_marshal_value_getters()
164 fputs ("#define g_marshal_value_peek_long(v) (v)->data[0].v_long\n", fout); in put_marshal_value_getters()
165 fputs ("#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong\n", fout); in put_marshal_value_getters()
166 fputs ("#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64\n", fout); in put_marshal_value_getters()
167 fputs ("#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64\n", fout); in put_marshal_value_getters()
168 fputs ("#define g_marshal_value_peek_enum(v) (v)->data[0].v_long\n", fout); in put_marshal_value_getters()
169 fputs ("#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong\n", fout); in put_marshal_value_getters()
170 fputs ("#define g_marshal_value_peek_float(v) (v)->data[0].v_float\n", fout); in put_marshal_value_getters()
171 fputs ("#define g_marshal_value_peek_double(v) (v)->data[0].v_double\n", fout); in put_marshal_value_getters()
172 fputs ("#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer\n", fout); in put_marshal_value_getters()
173 fputs ("#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer\n", fout); in put_marshal_value_getters()
174 fputs ("#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer\n", fout); in put_marshal_value_getters()
175 fputs ("#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer\n", fout); in put_marshal_value_getters()
176 fputs ("#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer\n", fout); in put_marshal_value_getters()
177 fputs ("#endif /* !G_ENABLE_DEBUG */\n", fout); in put_marshal_value_getters()
178 fputs ("\n", fout); in put_marshal_value_getters()
358 …g_fprintf (fout, "#define %s_%s\t%s_%s\n", marshaller_prefix, signame, std_marshaller_prefix, sign… in generate_marshal()
362 ind = g_fprintf (fout, gen_internal ? "G_GNUC_INTERNAL " : "extern "); in generate_marshal()
363 ind += g_fprintf (fout, "void "); in generate_marshal()
364 ind += g_fprintf (fout, "%s_%s (", marshaller_prefix, signame); in generate_marshal()
365 g_fprintf (fout, "GClosure *closure,\n"); in generate_marshal()
366 g_fprintf (fout, "%sGValue *return_value,\n", indent (ind)); in generate_marshal()
367 g_fprintf (fout, "%sguint n_param_values,\n", indent (ind)); in generate_marshal()
368 g_fprintf (fout, "%sconst GValue *param_values,\n", indent (ind)); in generate_marshal()
369 g_fprintf (fout, "%sgpointer invocation_hint,\n", indent (ind)); in generate_marshal()
370 g_fprintf (fout, "%sgpointer marshal_data);\n", in generate_marshal()
376 g_fprintf (fout, "void\n"); in generate_marshal()
377 ind = g_fprintf (fout, "%s_%s (", marshaller_prefix, signame); in generate_marshal()
378 g_fprintf (fout, "GClosure *closure,\n"); in generate_marshal()
379 g_fprintf (fout, "%sGValue *return_value G_GNUC_UNUSED,\n", indent (ind)); in generate_marshal()
380 g_fprintf (fout, "%sguint n_param_values,\n", indent (ind)); in generate_marshal()
381 g_fprintf (fout, "%sconst GValue *param_values,\n", indent (ind)); in generate_marshal()
382 g_fprintf (fout, "%sgpointer invocation_hint G_GNUC_UNUSED,\n", indent (ind)); in generate_marshal()
383 g_fprintf (fout, "%sgpointer marshal_data)\n", indent (ind)); in generate_marshal()
384 g_fprintf (fout, "{\n"); in generate_marshal()
387 ind = g_fprintf (fout, " typedef %s (*GMarshalFunc_%s) (", sig->rarg->ctype, signame); in generate_marshal()
388 g_fprintf (fout, "%s data1,\n", pad ("gpointer")); in generate_marshal()
394 g_fprintf (fout, "%s%s arg_%d,\n", indent (ind), pad (iarg->ctype), a++); in generate_marshal()
396 g_fprintf (fout, "%s%s data2);\n", indent (ind), pad ("gpointer")); in generate_marshal()
399 g_fprintf (fout, " register GMarshalFunc_%s callback;\n", signame); in generate_marshal()
400 g_fprintf (fout, " register GCClosure *cc = (GCClosure*) closure;\n"); in generate_marshal()
401 g_fprintf (fout, " register gpointer data1, data2;\n"); in generate_marshal()
403 g_fprintf (fout, " %s v_return;\n", sig->rarg->ctype); in generate_marshal()
407 g_fprintf (fout, "\n"); in generate_marshal()
410 g_fprintf (fout, " g_return_if_fail (return_value != NULL);\n"); in generate_marshal()
420 g_fprintf (fout, " g_return_if_fail (n_param_values == %u);\n", 1 + a); in generate_marshal()
425 g_fprintf (fout, "\n"); in generate_marshal()
426 g_fprintf (fout, " if (G_CCLOSURE_SWAP_DATA (closure))\n {\n"); in generate_marshal()
427 g_fprintf (fout, " data1 = closure->data;\n"); in generate_marshal()
428 g_fprintf (fout, " data2 = g_value_peek_pointer (param_values + 0);\n"); in generate_marshal()
429 g_fprintf (fout, " }\n else\n {\n"); in generate_marshal()
430 g_fprintf (fout, " data1 = g_value_peek_pointer (param_values + 0);\n"); in generate_marshal()
431 g_fprintf (fout, " data2 = closure->data;\n"); in generate_marshal()
432 g_fprintf (fout, " }\n"); in generate_marshal()
433 …g_fprintf (fout, " callback = (GMarshalFunc_%s) (marshal_data ? marshal_data : cc->callback);\n",… in generate_marshal()
436 g_fprintf (fout, "\n"); in generate_marshal()
437 ind = g_fprintf (fout, " %s callback (", sig->rarg->setter ? " v_return =" : ""); in generate_marshal()
438 g_fprintf (fout, "data1,\n"); in generate_marshal()
444 g_fprintf (fout, "%s%s (param_values + %d),\n", indent (ind), iarg->getter, a++); in generate_marshal()
446 g_fprintf (fout, "%sdata2);\n", indent (ind)); in generate_marshal()
451 g_fprintf (fout, "\n"); in generate_marshal()
452 g_fprintf (fout, " %s (return_value, v_return);\n", sig->rarg->setter); in generate_marshal()
456 g_fprintf (fout, "}\n"); in generate_marshal()
502 g_fprintf (fout, "\n/* %s", sig->rarg->keyword); in process_signature()
507 g_fprintf (fout, "%c%s", node->prev ? ',' : ':', iarg->keyword); in process_signature()
510 g_fprintf (fout, " (%s)", sig->ploc); in process_signature()
511 g_fprintf (fout, " */\n"); in process_signature()
520 … g_fprintf (fout, "#define %s_%s\t%s_%s\n", marshaller_prefix, pname, marshaller_prefix, sname); in process_signature()
626 fout = stdout; in main()
639 g_fprintf (fout, "\n"); in main()
643 g_fprintf (fout, "#ifndef __%s_MARSHAL_H__\n", marshaller_prefix); in main()
644 g_fprintf (fout, "#define __%s_MARSHAL_H__\n\n", marshaller_prefix); in main()
648 g_fprintf (fout, "#include\t<glib-object.h>\n\n"); in main()
651 g_fprintf (fout, "G_BEGIN_DECLS\n"); in main()
745 g_fprintf (fout, "\nG_END_DECLS\n"); in main()
748 g_fprintf (fout, "\n#endif /* __%s_MARSHAL_H__ */\n", marshaller_prefix); in main()
750 g_fprintf (fout, "\n"); in main()