/* * Initializes the GbWidget structure. * I've placed this at the end of the file so we don't have to include * declarations of all the functions. */ GbWidget * gb_file_selection_init () { /* Initialise the GTK type */ volatile GtkType type; type = gtk_file_selection_get_type (); /* Initialize the GbWidget structure */ gb_widget_init_struct (&gbwidget); /* Fill in the pixmap struct & tooltip */ gbwidget.pixmap_struct = fileseldialog_xpm; gbwidget.tooltip = _("File Selection Dialog"); /* Fill in any functions that this GbWidget has */ gbwidget.gb_widget_new = gb_file_selection_new; gbwidget.gb_widget_create_properties = gb_file_selection_create_properties; gbwidget.gb_widget_get_properties = gb_file_selection_get_properties; gbwidget.gb_widget_set_properties = gb_file_selection_set_properties; gbwidget.gb_widget_get_child = gb_file_selection_get_child; gbwidget.gb_widget_write_source = gb_file_selection_write_source; /* gbwidget.gb_widget_create_popup_menu = gb_file_selection_create_popup_menu; */ return &gbwidget; }
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create (JNIEnv *env, jobject obj) { gpointer widget; gdk_threads_enter (); widget = gtk_type_new (gtk_file_selection_get_type ()); gdk_threads_leave (); NSA_SET_PTR (env, obj, widget); }
CAMLprim value ml_gtkwindow_init(value unit) { /* Since these are declared const, must force gcc to call them! */ GType t = gtk_message_dialog_get_type() + gtk_input_dialog_get_type() + gtk_color_selection_dialog_get_type() + gtk_file_selection_get_type() + gtk_font_selection_dialog_get_type() #ifndef _WIN32 + gtk_plug_get_type() + gtk_socket_get_type() #endif ; return Val_GType(t); }