summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
commit8409ff09f08fd2b2ef22585bb9559ee6930d4d5f (patch)
tree8085e4e968c883798ec985c45f94065fe230ee15 /macosx
parent676eb78eadce63bc5b6a98b6c1f2d077b49a9869 (diff)
parent79fa64792bbab42e97785552b9a9cf75fa126695 (diff)
downloadtk-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 'macosx')
-rw-r--r--macosx/tkMacOSXClipboard.c6
-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, 18 deletions
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 7105135..d1f1baa 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. */
@@ -178,6 +178,7 @@ XSetSelectionOwner(
changeCount = [pb declareTypes:[NSArray array] owner:NSApp];
}
}
+ return Success;
}
/*
@@ -197,13 +198,14 @@ XSetSelectionOwner(
*----------------------------------------------------------------------
*/
-void
+int
TkMacOSXSelDeadWindow(
TkWindow *winPtr)
{
if (winPtr && winPtr == (TkWindow *)clipboardOwner) {
clipboardOwner = NULL;
}
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 82ed9f8..3380087 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -699,14 +699,15 @@ XCreateColormap(
return index++;
}
-void
+int
XFreeColormap(
Display* display, /* Display. */
Colormap colormap) /* Colormap. */
{
+ return Success;
}
-void
+int
XFreeColors(
Display* display, /* Display. */
Colormap colormap, /* Colormap. */
@@ -719,6 +720,7 @@ 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 806cbf4..9a49790 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -311,7 +311,7 @@ XCopyPlane(
*----------------------------------------------------------------------
*/
-void
+int
TkPutImage(
unsigned long *colors, /* Unused on Macintosh. */
int ncolors, /* Unused on Macintosh. */
@@ -330,7 +330,7 @@ TkPutImage(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
CGImageRef img = CreateCGImageWithXImage(image);
@@ -745,6 +745,7 @@ DrawCGImage(
} else {
TkMacOSXDbgMsg("Drawing of empty CGImage requested");
}
+ return Success;
}
/*
@@ -763,7 +764,7 @@ DrawCGImage(
*----------------------------------------------------------------------
*/
-void
+int
XDrawLines(
Display *display, /* Display. */
Drawable d, /* Draw on this. */
@@ -777,16 +778,12 @@ XDrawLines(
int i, lw = gc->line_width;
if (npoints < 2) {
- /*
- * TODO: generate BadValue error.
- */
-
- return;
+ return BadValue;
}
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
double prevx, prevy;
@@ -810,6 +807,7 @@ XDrawLines(
CGContextStrokePath(dc.context);
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*
@@ -1048,7 +1046,7 @@ XDrawRectangles(
*----------------------------------------------------------------------
*/
-void
+int
XFillRectangles(
Display* display, /* Display. */
Drawable d, /* Draw on this. */
@@ -1063,7 +1061,7 @@ XFillRectangles(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -1080,6 +1078,7 @@ XFillRectangles(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index d388f60..54f99d3 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -480,7 +480,7 @@ XGetModifierMapping(
*----------------------------------------------------------------------
*/
-void
+int
XFreeModifiermap(
XModifierKeymap *modmap)
{
@@ -488,6 +488,7 @@ XFreeModifiermap(
ckfree(modmap->modifiermap);
}
ckfree(modmap);
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 37384eb..848b49c 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -451,12 +451,13 @@ XSelectInput(
Debugger();
}
-void
+int
XBell(
Display* display,
int percent)
{
NSBeep();
+ return Success;
}
#if 0
@@ -536,7 +537,7 @@ XDrawPoints(
}
*/
-void
+int
XWarpPointer(
Display* display,
Window src_w,
@@ -548,6 +549,7 @@ XWarpPointer(
int dest_x,
int dest_y)
{
+ return Success;
}
void