/* * 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_toggle_button_init () { /* Initialise the GTK type */ volatile GtkType type; type = gtk_toggle_button_get_type (); /* Initialize the GbWidget structure */ gb_widget_init_struct (&gbwidget); /* Fill in the pixmap struct & tooltip */ gbwidget.pixmap_struct = togglebutton_xpm; gbwidget.tooltip = _("Toggle Button"); /* Fill in any functions that this GbWidget has */ gbwidget.gb_widget_new = gb_toggle_button_new; gbwidget.gb_widget_create_properties = gb_toggle_button_create_properties; gbwidget.gb_widget_get_properties = gb_toggle_button_get_properties; gbwidget.gb_widget_set_properties = gb_toggle_button_set_properties; gbwidget.gb_widget_create_popup_menu = gb_button_create_popup_menu; gbwidget.gb_widget_write_source = gb_toggle_button_write_source; gbwidget.gb_widget_destroy = gb_button_destroy; return &gbwidget; }
static void gtk_check_item_class_init (GtkCheckItemClass *klass) { GtkWidgetClass *widget_class; widget_class = (GtkWidgetClass*) klass; parent_class = gtk_type_class (gtk_toggle_button_get_type ()); widget_class->draw = gtk_check_item_draw; widget_class->draw_focus = gtk_check_item_draw_focus; widget_class->size_request = gtk_check_item_size_request; widget_class->size_allocate = gtk_check_item_size_allocate; widget_class->expose_event = gtk_check_item_expose; klass->indicator_size = INDICATOR_SIZE; klass->indicator_spacing = INDICATOR_SPACING; klass->draw_indicator = gtk_real_check_item_draw_indicator; }