GtkWidgetClass' expose_event function problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you look at the code below:

gtkbutton.c:


static void
gtk_button_class_init (GtkButtonClass *klass)
{
   ........

   widget_class->expose_event = gtk_button_expose;

   .....
}

static gboolean
gtk_button_expose (GtkWidget      *widget,
           GdkEventExpose *event)
{
  if (GTK_WIDGET_DRAWABLE (widget))
    {
      GtkButton *button = GTK_BUTTON (widget);
      
      _gtk_button_paint (button, &event->area,
             GTK_WIDGET_STATE (widget),
             button->depressed ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
             "button", "buttondefault");
      
      (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); <--------------------why??
    }
 
  return FALSE;
}


Why the expose_event() function of parent_class(GtkBinClass) is called? GtkWidgetClass doesn't have an implementation of expose_event function. We know that GtkWidgetClass' expose_event is set to gtk_button_expose as shown above. So correct me if i'm wrong but it is basically calling gtk_button_expose() function recursively? So the function should never return Right? Can anyone kindly explain it? Thanks.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux