diff options
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 79 |
1 files changed, 16 insertions, 63 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 7092611..2aaf4ba 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -227,7 +227,7 @@ CreateNSImageFromPixmap( /* *---------------------------------------------------------------------- * - * TkMacOSXGetCGContextForDrawable -- + * Tk_MacOSXGetCGContextForDrawable -- * * Get CGContext for given Drawable, creating one if necessary. * @@ -240,8 +240,8 @@ CreateNSImageFromPixmap( *---------------------------------------------------------------------- */ -CGContextRef -TkMacOSXGetCGContextForDrawable( +void * +Tk_MacOSXGetCGContextForDrawable( Drawable drawable) { MacDrawable *macDraw = (MacDrawable *)drawable; @@ -611,7 +611,6 @@ XDrawRectangle( return Success; } -#ifdef TK_MACOSXDRAW_UNUSED /* *---------------------------------------------------------------------- * @@ -671,7 +670,6 @@ XDrawRectangles( TkMacOSXRestoreDrawingContext(&dc); return Success; } -#endif /* *---------------------------------------------------------------------- @@ -842,7 +840,6 @@ XDrawArc( return Success; } -#ifdef TK_MACOSXDRAW_UNUSED /* *---------------------------------------------------------------------- * @@ -923,7 +920,6 @@ XDrawArcs( TkMacOSXRestoreDrawingContext(&dc); return Success; } -#endif /* *---------------------------------------------------------------------- @@ -1004,7 +1000,6 @@ XFillArc( return Success; } -#ifdef TK_MACOSXDRAW_UNUSED /* *---------------------------------------------------------------------- * @@ -1086,24 +1081,6 @@ XFillArcs( TkMacOSXRestoreDrawingContext(&dc); return Success; } -#endif - -#ifdef TK_MACOSXDRAW_UNUSED -/* - *---------------------------------------------------------------------- - * - * XMaxRequestSize -- - * - *---------------------------------------------------------------------- - */ - -long -XMaxRequestSize( - Display *display) -{ - return (SHRT_MAX / 4); -} -#endif /* *---------------------------------------------------------------------- @@ -1130,7 +1107,7 @@ TkScrollWindow( int x, int y, /* Position rectangle to be scrolled. */ int width, int height, int dx, int dy, /* Distance rectangle should be moved. */ - TkRegion damageRgn) /* Region to accumulate damage in. */ + Region damageRgn) /* Region to accumulate damage in. */ { Drawable drawable = Tk_WindowId(tkwin); MacDrawable *macDraw = (MacDrawable *)drawable; @@ -1427,7 +1404,7 @@ TkMacOSXSetupDrawingContext( CGContextSetShouldAntialias(dc.context, shouldAntialias); CGContextSetLineWidth(dc.context, w); if (gc->line_style != LineSolid) { - int num = 0; + size_t num = 0; char *p = &gc->dashes; CGFloat dashOffset = gc->dash_offset; dashOffset -= (gc->line_width % 2) ? 0.5 : 0.0; @@ -1557,30 +1534,7 @@ TkMacOSXGetClipRgn( /* *---------------------------------------------------------------------- * - * TkMacOSXSetUpClippingRgn -- - * - * Set up the clipping region so that drawing only occurs on the specified - * X subwindow. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TkMacOSXSetUpClippingRgn( - Drawable drawable) /* Drawable to update. */ -{ -} - -/* - *---------------------------------------------------------------------- - * - * TkpClipDrawableToRect -- + * Tk_ClipDrawableToRect -- * * Clip all drawing into the drawable d to the given rectangle. If width * or height are negative, reset to no clipping. @@ -1595,7 +1549,7 @@ TkMacOSXSetUpClippingRgn( */ void -TkpClipDrawableToRect( +Tk_ClipDrawableToRect( TCL_UNUSED(Display *), Drawable d, int x, int y, @@ -1649,7 +1603,7 @@ ClipToGC( { if (gc && gc->clip_mask && ((TkpClipMask *)gc->clip_mask)->type == TKP_CLIP_REGION) { - TkRegion gcClip = ((TkpClipMask *)gc->clip_mask)->value.region; + Region gcClip = ((TkpClipMask *)gc->clip_mask)->value.region; int xOffset = ((MacDrawable *)d)->xOff + gc->clip_x_origin; int yOffset = ((MacDrawable *)d)->yOff + gc->clip_y_origin; HIShapeRef clipRgn = *clipRgnPtr, gcClipRgn; @@ -1696,7 +1650,7 @@ TkMacOSXMakeStippleMap( /* *---------------------------------------------------------------------- * - * TkpDrawHighlightBorder -- + * Tk_DrawHighlightBorder -- * * This procedure draws a rectangular ring around the outside of a widget * to indicate that it has received the input focus. @@ -1718,7 +1672,7 @@ TkMacOSXMakeStippleMap( */ void -TkpDrawHighlightBorder ( +Tk_DrawHighlightBorder ( Tk_Window tkwin, GC fgGC, GC bgGC, @@ -1739,7 +1693,7 @@ TkpDrawHighlightBorder ( /* *---------------------------------------------------------------------- * - * TkpDrawFrame -- + * TkpDrawFrameEx -- * * This procedure draws the rectangular frame area. If the user has * requested themeing, it draws with the background theme. @@ -1754,8 +1708,9 @@ TkpDrawHighlightBorder ( */ void -TkpDrawFrame( +TkpDrawFrameEx( Tk_Window tkwin, + Drawable drawable, Tk_3DBorder border, int highlightWidth, int borderWidth, @@ -1773,11 +1728,9 @@ TkpDrawFrame( } } - Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), - border, highlightWidth, highlightWidth, - Tk_Width(tkwin) - 2 * highlightWidth, - Tk_Height(tkwin) - 2 * highlightWidth, - borderWidth, relief); + Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth, + highlightWidth, Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, borderWidth, relief); } /* |