/*
* tkUnixDraw.c --
*
* This file contains X specific drawing routines.
*
* Copyright (c) 1995 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tkUnixDraw.c 1.7 96/02/15 18:55:26
*/
#include "tkInt.h"
/*
* The following structure is used to pass information to
* ScrollRestrictProc from TkScrollWindow.
*/
typedef struct ScrollInfo {
} ScrollInfo;
/*
* Forward declarations for procedures declared later in this file:
*/
/*
*----------------------------------------------------------------------
*
* TkScrollWindow --
*
* Scroll a rectangle of the specified window and accumulate
* damage information in the specified Region.
*
* Results:
* Returns 0 if no damage additional damage was generated. Sets
* damageRgn to contain the damaged areas and returns 1 if
* GraphicsExpose events were detected.
*
* Side effects:
* Scrolls the bits in the window and enters the event loop
* looking for damage events.
*
*----------------------------------------------------------------------
*/
int
{
/*
* Sync the event stream so all of the expose events will be on the
* X event queue before we start filtering. This avoids busy waiting
* while we filter events.
*/
&oldArg);
}
}
/*
*----------------------------------------------------------------------
*
* ScrollRestrictProc --
*
* A Tk_RestrictProc used by TkScrollWindow to gather up Expose
* information into a single damage region. It accumulates damage
* events on the specified window until a NoExpose or the last
* GraphicsExpose event is detected.
*
* Results:
* None.
*
* Side effects:
* Discards Expose events after accumulating damage information
* for a particular window.
*
*----------------------------------------------------------------------
*/
static Tk_RestrictAction
{
/*
* Defer events which aren't for the specified window.
*/
return TK_DEFER_EVENT;
}
}
/*
* This case is tricky. This event was already queued before
* the XCopyArea was issued. If this area overlaps the area
* being copied, then some of the copied area may be invalid.
* The easiest way to handle this case is to mark both the
* original area and the shifted area as damaged.
*/
} else {
return TK_DEFER_EVENT;
}
return TK_DISCARD_EVENT;
}