/** argnames.c **/ #include void showArgs(GtkWidget *); int main(int argc,char *argv[]) { GtkWidget *clist; GtkWidget *window; gnome_init("argnames","1.0",argc,argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); clist = gtk_clist_new(4); showArgs(clist); exit(0); } void showArgs(GtkWidget *widget) { GtkType objectType; GtkArg *arg; gint argCount; guint32 *argFlags; GtkArgInfo *argInfo; gint i; objectType = GTK_OBJECT_TYPE(widget); while(objectType != GTK_TYPE_INVALID) { arg = gtk_object_query_args(objectType, &argFlags,&argCount); g_print("%s::\n",gtk_type_name(objectType)); for(i=0; iname, gtk_type_name(argInfo->type)); if((argInfo->arg_flags & GTK_ARG_READWRITE) == GTK_ARG_READWRITE) g_print(" Read/Write"); else if(argInfo->arg_flags & GTK_ARG_READABLE) g_print(" Readonly"); else if(argInfo->arg_flags & GTK_ARG_WRITABLE) g_print(" Writeonly"); if(argInfo->arg_flags & GTK_ARG_CONSTRUCT_ONLY) g_print(" (Not writable after realized)"); g_print("\n"); } g_free(arg); g_free(argFlags); objectType = gtk_type_parent(objectType); } }