diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-08 22:47:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-08 22:47:55 (GMT) |
commit | 8409ff09f08fd2b2ef22585bb9559ee6930d4d5f (patch) | |
tree | 8085e4e968c883798ec985c45f94065fe230ee15 /carbon | |
parent | 676eb78eadce63bc5b6a98b6c1f2d077b49a9869 (diff) | |
parent | 79fa64792bbab42e97785552b9a9cf75fa126695 (diff) | |
download | tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.zip tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.tar.gz tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.tar.bz2 |
Change XChangeWindowAttributes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'carbon')
-rw-r--r-- | carbon/tkMacOSXClipboard.c | 5 | ||||
-rw-r--r-- | carbon/tkMacOSXColor.c | 6 | ||||
-rw-r--r-- | carbon/tkMacOSXDraw.c | 21 | ||||
-rw-r--r-- | carbon/tkMacOSXKeyboard.c | 3 | ||||
-rw-r--r-- | carbon/tkMacOSXXStubs.c | 6 |
5 files changed, 23 insertions, 18 deletions
diff --git a/carbon/tkMacOSXClipboard.c b/carbon/tkMacOSXClipboard.c index 07fc925..420ccf7 100644 --- a/carbon/tkMacOSXClipboard.c +++ b/carbon/tkMacOSXClipboard.c @@ -159,7 +159,7 @@ TkSelGetSelection( *---------------------------------------------------------------------- */ -void +int XSetSelectionOwner( Display *display, /* X Display. */ Atom selection, /* What selection to own. */ @@ -184,10 +184,11 @@ XSetSelectionOwner( dispPtr = TkGetMainInfoList()->winPtr->dispPtr; if (dispPtr->clipboardActive) { - return; + return Success; } ClearCurrentScrap(); } + return Success; } /* diff --git a/carbon/tkMacOSXColor.c b/carbon/tkMacOSXColor.c index 2c9100d..4915553 100644 --- a/carbon/tkMacOSXColor.c +++ b/carbon/tkMacOSXColor.c @@ -713,14 +713,15 @@ XCreateColormap( return index++; } -void +int XFreeColormap( Display* display, /* Display. */ Colormap colormap) /* Colormap. */ { + return Success; } -void +int XFreeColors( Display* display, /* Display. */ Colormap colormap, /* Colormap. */ @@ -733,4 +734,5 @@ XFreeColors( * needs to be done to release colors as there really is * no colormap in the Tk sense. */ + return Success; } diff --git a/carbon/tkMacOSXDraw.c b/carbon/tkMacOSXDraw.c index e028e45..6f40e5d 100644 --- a/carbon/tkMacOSXDraw.c +++ b/carbon/tkMacOSXDraw.c @@ -338,7 +338,7 @@ end: *---------------------------------------------------------------------- */ -void +int TkPutImage( unsigned long *colors, /* Unused on Macintosh. */ int ncolors, /* Unused on Macintosh. */ @@ -358,7 +358,7 @@ TkPutImage( display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 0, &dc)) { - return; + return BadDrawable; } if (dc.context) { TkMacOSXDbgMsg("Ignored CG drawing of XImage"); @@ -530,6 +530,7 @@ TkPutImage( } } TkMacOSXRestoreDrawingContext(&dc); + return Success; } /* @@ -548,7 +549,7 @@ TkPutImage( *---------------------------------------------------------------------- */ -void +int XDrawLines( Display *display, /* Display. */ Drawable d, /* Draw on this. */ @@ -562,16 +563,12 @@ XDrawLines( int i, lw = gc->line_width; if (npoints < 2) { - /* - * TODO: generate BadValue error. - */ - - return; + return BadValue; } display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) { - return; + return BadDrawable; } if (dc.context) { double prevx, prevy; @@ -612,6 +609,7 @@ XDrawLines( } } TkMacOSXRestoreDrawingContext(&dc); + return Success; } /* @@ -900,7 +898,7 @@ XDrawRectangles( *---------------------------------------------------------------------- */ -void +int XFillRectangles( Display* display, /* Display. */ Drawable d, /* Draw on this. */ @@ -915,7 +913,7 @@ XFillRectangles( display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) { - return; + return BadDrawable; } if (dc.context) { CGRect rect; @@ -942,6 +940,7 @@ XFillRectangles( } } TkMacOSXRestoreDrawingContext(&dc); + return Success; } /* diff --git a/carbon/tkMacOSXKeyboard.c b/carbon/tkMacOSXKeyboard.c index 4e35db6..00e73f6 100644 --- a/carbon/tkMacOSXKeyboard.c +++ b/carbon/tkMacOSXKeyboard.c @@ -392,7 +392,7 @@ XGetModifierMapping( *---------------------------------------------------------------------- */ -void +int XFreeModifiermap( XModifierKeymap *modmap) { @@ -400,6 +400,7 @@ XFreeModifiermap( ckfree(modmap->modifiermap); } ckfree(modmap); + return Success; } /* diff --git a/carbon/tkMacOSXXStubs.c b/carbon/tkMacOSXXStubs.c index 33f20c4..d88b419 100644 --- a/carbon/tkMacOSXXStubs.c +++ b/carbon/tkMacOSXXStubs.c @@ -442,12 +442,13 @@ XSelectInput( Debugger(); } -void +int XBell( Display* display, int percent) { SysBeep(percent); + return Success; } #if 0 @@ -527,7 +528,7 @@ XDrawPoints( } */ -void +int XWarpPointer( Display* display, Window src_w, @@ -539,6 +540,7 @@ XWarpPointer( int dest_x, int dest_y) { + return Success; } void |