-/* 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 {
- gboolean simple;
- char *gtkname;
- char *typename;
-} our_gtk_type_table[] = {
- { TRUE, "NONE", "void " },
- { TRUE, "CHAR", "gchar " },
- { TRUE, "UCHAR", "guchar " },
- { TRUE, "BOOL", "gboolean " },
- { TRUE, "INT", "gint " },
- { TRUE, "UINT", "guint " },
- { TRUE, "LONG", "glong " },
- { TRUE, "ULONG", "gulong " },
- { TRUE, "FLOAT", "gfloat " },
- { TRUE, "DOUBLE", "gdouble " },
- { TRUE, "STRING", /*"GtkString"*/"gchar *" },
- { TRUE, "ENUM", /*"GtkEnum"*/"gint " },
- { TRUE, "FLAGS", /*"GtkFlags"*/"guint " },
- { TRUE, "BOXED", /*"GtkBoxed"*/"gpointer " },
- { TRUE, "POINTER", "gpointer " },
- { TRUE, "OBJECT", "GtkObject *" },
- { FALSE, "SIGNAL", /*"GtkSignal"*/"___twopointertype " },
- { FALSE, "ARGS", /*"GtkArgs"*/"___twopointertype " },
- { FALSE, "CALLBACK", /*"GtkCallback"*/"___threepointertype " },
- { FALSE, "C_CALLBACK", /*"GtkCCallback"*/"___twopointertype " },
- { FALSE, "FOREIGN", /*"GtkForeign"*/"___twopointertype " },
-
- { FALSE, NULL, NULL }
-};
-
-static const char *
-get_cast(char *type, gboolean simple_only)
-{
- int i;
- for(i=0;our_gtk_type_table[i].gtkname;i++) {
- if(strcmp(our_gtk_type_table[i].gtkname,type)==0) {
- if(simple_only &&
- !our_gtk_type_table[i].simple)
- return NULL;
- return our_gtk_type_table[i].typename;
- }
- }
- return NULL;
-}
-