+/* here we will find out how inconsistent gtk really is :) */
+/* the commented out types mean that these types don't actually
+ exist. so we "emulate them" with an equivalent */
+const struct {
+ char *gtkname;
+ char *typename;
+} our_gtk_type_table[] = {
+ { "NONE", "void" },
+ { "CHAR", "gchar" },
+ { "UCHAR", "guchar" },
+ { "BOOL", "gboolean" },
+ { "INT", "gint" },
+ { "UINT", "guint" },
+ { "LONG", "glong" },
+ { "ULONG", "gulong" },
+ { "FLOAT", "gfloat" },
+ { "DOUBLE", "gdouble" },
+ { "STRING", /*"GtkString"*/"gchar *" },
+ { "ENUM", /*"GtkEnum"*/"gint" },
+ { "FLAGS", /*"GtkFlags"*/"guint" },
+ { "BOXED", /*"GtkBoxed"*/"gpointer" },
+ { "POINTER", "gpointer" },
+ { "OBJECT", "GtkObject *" },
+ { "SIGNAL", /*"GtkSignal"*/"__twopointertype" },
+ { "ARGS", /*"GtkArgs"*/"__twopointertype" },
+ { "CALLBACK", /*"GtkCallback"*/"__threepointertype" },
+ { "C_CALLBACK", /*"GtkCCallback"*/"__twopointertype" },
+ { "FOREIGN", /*"GtkForeign"*/"__twopointertype" },
+
+ { NULL, NULL }
+};
+
+static const char *
+get_cast(char *type)
+{
+ int i;
+ for(i=0;our_gtk_type_table[i].gtkname;i++) {
+ if(strcmp(our_gtk_type_table[i].gtkname,type)==0) {
+ return our_gtk_type_table[i].typename;
+ }
+ }
+ return NULL;
+}
+
+
+/* hash of method -> name of signal prototype */