diff options
Diffstat (limited to 'unix/tkUnixDraw.c')
-rw-r--r-- | unix/tkUnixDraw.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c index acc0565..fec05ee 100644 --- a/unix/tkUnixDraw.c +++ b/unix/tkUnixDraw.c @@ -24,7 +24,7 @@ typedef struct ScrollInfo { int done; /* Flag is 0 until filtering is done. */ Display *display; /* Display to filter. */ Window window; /* Window to filter. */ - TkRegion region; /* Region into which damage is accumulated. */ + Region region; /* Region into which damage is accumulated. */ int dx, dy; /* Amount by which window was shifted. */ } ScrollInfo; @@ -61,7 +61,7 @@ TkScrollWindow( int x, int y, int width, int height, /* Position rectangle to be scrolled. */ int dx, int dy, /* Distance rectangle should be moved. */ - TkRegion damageRgn) /* Region to accumulate damage in. */ + Region damageRgn) /* Region to accumulate damage in. */ { Tk_RestrictProc *prevProc; ClientData prevArg; @@ -90,7 +90,7 @@ TkScrollWindow( } Tk_RestrictEvents(prevProc, prevArg, &prevArg); - if (XEmptyRegion((Region) damageRgn)) { + if (XEmptyRegion(damageRgn)) { return 0; } else { return 1; @@ -141,8 +141,8 @@ ScrollRestrictProc( rect.y = eventPtr->xgraphicsexpose.y; rect.width = eventPtr->xgraphicsexpose.width; rect.height = eventPtr->xgraphicsexpose.height; - XUnionRectWithRegion(&rect, (Region) info->region, - (Region) info->region); + XUnionRectWithRegion(&rect, info->region, + info->region); if (eventPtr->xgraphicsexpose.count == 0) { info->done = 1; @@ -160,12 +160,12 @@ ScrollRestrictProc( rect.y = eventPtr->xexpose.y; rect.width = eventPtr->xexpose.width; rect.height = eventPtr->xexpose.height; - XUnionRectWithRegion(&rect, (Region) info->region, - (Region) info->region); + XUnionRectWithRegion(&rect, info->region, + info->region); rect.x += info->dx; rect.y += info->dy; - XUnionRectWithRegion(&rect, (Region) info->region, - (Region) info->region); + XUnionRectWithRegion(&rect, info->region, + info->region); } else { return TK_DEFER_EVENT; } @@ -202,13 +202,15 @@ TkpDrawHighlightBorder( int highlightWidth, Drawable drawable) { + (void)bgGC; + TkDrawInsetFocusHighlight(tkwin, fgGC, highlightWidth, drawable, 0); } /* *---------------------------------------------------------------------- * - * TkpDrawFrame -- + * TkpDrawFrameEx -- * * This function draws the rectangular frame area. * @@ -222,14 +224,15 @@ TkpDrawHighlightBorder( */ void -TkpDrawFrame( +TkpDrawFrameEx( Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief) { - Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, highlightWidth, + Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth, highlightWidth, Tk_Width(tkwin) - 2*highlightWidth, Tk_Height(tkwin) - 2*highlightWidth, borderWidth, relief); } |