Re: [gtk-list] Re: GraphicsExpose (was Re: About the About Box)



On Tue, 16 Dec 1997, Raph Levien wrote:

> On Wed, 17 Dec 1997, Tim Janik wrote:
> 
> > > 2. Every time you get a GraphicsExpose event with a count of zero, or a 
> > > NoExpose event, you remove one entry from the queue.
> > 
> > you need to keep track of the time to interrelate the exposes whith
> > the XCopyArea calls.

ok, after carefully reading up on this in the Xlib - C Language X Interface
manual, i'd say we implement the following:

1) change Gdk's current event handling:
>    case GraphicsExpose:
>      event->expose.type = GDK_EXPOSE;
			    ^^^^^^^^^^
we need an own GDK_GRAPHICS_EXPOSE event type.

>      event->expose.window = window;
>      event->expose.area.x = xevent->xgraphicsexpose.x;
>      event->expose.area.y = xevent->xgraphicsexpose.y;
>      event->expose.area.width = xevent->xgraphicsexpose.width;
>      event->expose.area.height = xevent->xgraphicsexpose.height;
>      event->expose.count = xevent->xexpose.count;
>
>      return_val = window_private && !window_private->destroyed;
>      break;
>
>    case NoExpose:
and GDK_NOEXPOSE...

>      /* Not currently handled */
>      break;

then we have a function like
gdk_window_prepare_graphics_expose (window, rectangle, new_origin)
(i'm not too good at function names ;), that will be called after
*all* XCopyArea and XCopyPlane calls, and register the rectangles along
with their new origins on a per window basis.
later, when we receive GDK_GRAPHICS_EXPOSE or GDK_NOEXPOSE events,
gdk_window_graphics_expose_adjust (window, GdkEvent) will be called
which will then split/offset the events rectangle if more than
one rectangle/origin pair is queued. on both event types GDK_NOEXPOSE and
GDK_GRAPHICS_EXPOSE events if count==0, the first rectangle/origin pair
will be removed from the queue.

this ok for the wizards?
we can then right go to implememnt it...

> 
> Raph
> 

---
ciaoTJ



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