summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-05 04:46:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-05 04:46:39 (GMT)
commitbffdf13f31774677807ea594324f7a8964a1ee10 (patch)
tree4b1b6848a2a8f1b3f66d319e784c6d08ddc042ab /macosx
parent91ae12c773a03fe4533d19a6d115deb6a4c95351 (diff)
parente35d614587b25a1a03ededdf2d04bcbfca86be70 (diff)
downloadtk-bffdf13f31774677807ea594324f7a8964a1ee10.zip
tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.gz
tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.bz2
Change XSetDashes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXClipboard.c8
-rw-r--r--macosx/tkMacOSXColor.c6
-rw-r--r--macosx/tkMacOSXDraw.c21
-rw-r--r--macosx/tkMacOSXKeyboard.c3
-rw-r--r--macosx/tkMacOSXXStubs.c6
5 files changed, 24 insertions, 20 deletions
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index b561244..ae56383 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -161,7 +161,7 @@ TkSelGetSelection(
*----------------------------------------------------------------------
*/
-void
+int
XSetSelectionOwner(
Display *display, /* X Display. */
Atom selection, /* What selection to own. */
@@ -185,11 +185,11 @@ XSetSelectionOwner(
*/
dispPtr = TkGetMainInfoList()->winPtr->dispPtr;
- if (dispPtr->clipboardActive) {
- return;
+ if (!dispPtr->clipboardActive) {
+ ClearCurrentScrap();
}
- ClearCurrentScrap();
}
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 359c8a6..4150846 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/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/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index db498f9..f17bcee 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/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/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index b1e60bb..6bf3643 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -394,7 +394,7 @@ XGetModifierMapping(
*----------------------------------------------------------------------
*/
-void
+int
XFreeModifiermap(
XModifierKeymap *modmap)
{
@@ -402,6 +402,7 @@ XFreeModifiermap(
ckfree((char *) modmap->modifiermap);
}
ckfree((char *) modmap);
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index a09501b..6788bfd 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -469,12 +469,13 @@ XSelectInput(
Debugger();
}
-void
+int
XBell(
Display* display,
int percent)
{
SysBeep(percent);
+ return Success;
}
#if 0
@@ -554,7 +555,7 @@ XDrawPoints(
}
*/
-void
+int
XWarpPointer(
Display* display,
Window src_w,
@@ -566,6 +567,7 @@ XWarpPointer(
int dest_x,
int dest_y)
{
+ return Success;
}
void