Re: Problems with expose_event->region patch
- From: Alexander Larsson <alla lysator liu se>
- To: Havoc Pennington <hp redhat com>
- Cc: Owen Taylor <otaylor redhat com>, <gtk-devel-list gnome org>, <timj gtk org>
- Subject: Re: Problems with expose_event->region patch
- Date: Fri, 9 Mar 2001 16:09:24 +0100 (CET)
On 8 Mar 2001, Havoc Pennington wrote:
> > +/**
> > + * gtk_widget_send_expose:
> > + * @widget: a #GtkWidget
> > + * @event: a expose #GdkEvent
> > + *
> > + * Very rarely-used function. This function is used to emit
> > + * an expose event signals on a widget. This function is not
> > + * normally used directly. The only time it is used is when
> > + * propagating an expose event to a child NO_WINDOW widget, and
> > + * that is normally done using gtk_container_propagate_expose.
> > + *
> > + * If you just want to synthesize an expose event, use
> > + * gdk_window_invalidate_rect() to invalidate a region of the
> > + * window.
> > + *
> > + * Return value: return from the event signal emission (%TRUE if the event was handled)
> > + **/
>
> If people aren't supposed to use this, maybe it should be an internal
> function with prepended underscore?
If gtk_widget_send_expose is private. How do i do this (from gtkclist.c):
check_exposures (GtkCList *clist)
{
GdkEvent *event;
if (!GTK_WIDGET_REALIZED (clist))
return;
/* Make sure graphics expose events are processed before scrolling
* again */
while ((event = gdk_event_get_graphics_expose (clist->clist_window)) != NULL)
{
gtk_widget_send_expose (GTK_WIDGET (clist), event);
if (event->expose.count == 0)
{
gdk_event_free (event);
break;
}
gdk_event_free (event);
}
}
gtktext.c does the same in process_exposes(). I could just call
_gtk_widget_send_expose here, since this is part of gtk+, but i get the
feeling that this should be done some other way now.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]