Beispiel #1
0
/*
 * 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_input_dialog_init ()
{
  /* Initialise the GTK type */
  volatile GtkType type;
  type = gtk_input_dialog_get_type();

  /* Initialize the GbWidget structure */
  gb_widget_init_struct(&gbwidget);

  /* Fill in the pixmap struct & tooltip */
  gbwidget.pixmap_struct = inputdialog_xpm;
  gbwidget.tooltip = _("Input Dialog");

  /* Fill in any functions that this GbWidget has */
  gbwidget.gb_widget_new = gb_input_dialog_new;
  gbwidget.gb_widget_get_child = gb_input_dialog_get_child;
  gbwidget.gb_widget_create_properties	= gb_input_dialog_create_properties;
  gbwidget.gb_widget_get_properties	= gb_input_dialog_get_properties;
  gbwidget.gb_widget_set_properties	= gb_input_dialog_set_properties;
  gbwidget.gb_widget_write_source = gb_input_dialog_write_source;
  gbwidget.gb_widget_destroy = gb_window_destroy;
/*
  gbwidget.gb_widget_create_popup_menu	= gb_input_dialog_create_popup_menu;
*/

  return &gbwidget;
}
Beispiel #2
0
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);
}