summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/stubs.c53
-rw-r--r--win/tkWinDraw.c31
-rw-r--r--win/tkWinPointer.c9
-rw-r--r--win/tkWinWindow.c32
4 files changed, 80 insertions, 45 deletions
diff --git a/win/stubs.c b/win/stubs.c
index 8381145..bf72b72 100644
--- a/win/stubs.c
+++ b/win/stubs.c
@@ -36,7 +36,7 @@ XStringListToTextProperty(
* From Xlib.h
*/
-void
+int
XChangeProperty(
Display *display,
Window w,
@@ -47,6 +47,7 @@ XChangeProperty(
_Xconst unsigned char *data,
int nelements)
{
+ return Success;
}
Cursor
@@ -63,7 +64,7 @@ XCreateGlyphCursor(
}
XIC
-XCreateIC(void)
+XCreateIC TCL_VARARGS_DEF(XIM,xim)
{
return NULL;
}
@@ -81,12 +82,13 @@ XCreatePixmapCursor(
return (Cursor) NULL;
}
-void
+int
XDeleteProperty(
Display *display,
Window w,
Atom property)
{
+ return Success;
}
void
@@ -103,18 +105,20 @@ XFilterEvent(
return 0;
}
-void
+int
XForceScreenSaver(
Display *display,
int mode)
{
+ return Success;
}
-void
+int
XFreeCursor(
Display *display,
Cursor cursor)
{
+ return Success;
}
GContext
@@ -180,27 +184,30 @@ XLookupColor(
return Success;
}
-void
+int
XNextEvent(
Display *display,
XEvent *event_return)
{
+ return Success;
}
-void
+int
XPutBackEvent(
Display *display,
XEvent *event)
{
+ return Success;
}
-void
+int
XQueryColors(
Display *display,
Colormap colormap,
XColor *defs_in_out,
int ncolors)
{
+ return Success;
}
int
@@ -215,10 +222,11 @@ XQueryTree(
return Success;
}
-void
+int
XRefreshKeyboardMapping(
XMappingEvent *event_map)
{
+ return Success;
}
Window
@@ -229,12 +237,13 @@ XRootWindow(
return (Window) NULL;
}
-void
+int
XSelectInput(
Display *display,
Window w,
long event_mask)
{
+ return Success;
}
int
@@ -265,60 +274,67 @@ XSetErrorHandler(
return NULL;
}
-void
+int
XSetIconName(
Display *display,
Window w,
_Xconst char *icon_name)
{
+ return Success;
}
-void
+int
XSetWindowBackground(
Display *display,
Window w,
unsigned long background_pixel)
{
+ return Success;
}
-void
+int
XSetWindowBackgroundPixmap(
Display *display,
Window w,
Pixmap background_pixmap)
{
+ return Success;
}
-void
+int
XSetWindowBorder(
Display *display,
Window w,
unsigned long border_pixel)
{
+ return Success;
}
-void
+int
XSetWindowBorderPixmap(
Display *display,
Window w,
Pixmap border_pixmap)
{
+ return Success;
}
-void
+int
XSetWindowBorderWidth(
Display *display,
Window w,
unsigned int width)
{
+ return Success;
}
-void
+int
XSetWindowColormap(
Display *display,
Window w,
Colormap colormap)
{
+ return Success;
}
Bool
@@ -335,13 +351,14 @@ XTranslateCoordinates(
return 0;
}
-void
+int
XWindowEvent(
Display *display,
Window w,
long event_mask,
XEvent *event_return)
{
+ return Success;
}
int
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 388fd14..1897bc8 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -116,7 +116,7 @@ static Tcl_ThreadDataKey dataKey;
static POINT * ConvertPoints(XPoint *points, int npoints, int mode,
RECT *bbox);
-static void DrawOrFillArc(Display *display, Drawable d, GC gc,
+static int DrawOrFillArc(Display *display, Drawable d, GC gc,
int x, int y, unsigned int width,
unsigned int height, int start, int extent,
int fill);
@@ -297,7 +297,7 @@ ConvertPoints(
*----------------------------------------------------------------------
*/
-void
+int
XCopyArea(
Display *display,
Drawable src,
@@ -333,6 +333,7 @@ XCopyArea(
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return Success;
}
/*
@@ -353,7 +354,7 @@ XCopyArea(
*----------------------------------------------------------------------
*/
-void
+int
XCopyPlane(
Display *display,
Drawable src,
@@ -480,6 +481,7 @@ XCopyPlane(
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return Success;
}
/*
@@ -911,7 +913,7 @@ XDrawLines(
*----------------------------------------------------------------------
*/
-void
+int
XFillPolygon(
Display *display,
Drawable d,
@@ -926,7 +928,7 @@ XFillPolygon(
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -935,6 +937,7 @@ XFillPolygon(
RenderObject(dc, gc, points, npoints, mode, pen, Polygon);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -953,7 +956,7 @@ XFillPolygon(
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangle(
Display *display,
Drawable d,
@@ -967,7 +970,7 @@ XDrawRectangle(
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -983,6 +986,7 @@ XDrawRectangle(
DeleteObject(SelectObject(dc, oldPen));
SelectObject(dc, oldBrush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -1001,7 +1005,7 @@ XDrawRectangle(
*----------------------------------------------------------------------
*/
-void
+int
XDrawArc(
Display *display,
Drawable d,
@@ -1012,7 +1016,7 @@ XDrawArc(
{
display->request++;
- DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0);
+ return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0);
}
/*
@@ -1031,7 +1035,7 @@ XDrawArc(
*----------------------------------------------------------------------
*/
-void
+int
XFillArc(
Display *display,
Drawable d,
@@ -1042,7 +1046,7 @@ XFillArc(
{
display->request++;
- DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1);
+ return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1);
}
/*
@@ -1062,7 +1066,7 @@ XFillArc(
*----------------------------------------------------------------------
*/
-static void
+static int
DrawOrFillArc(
Display *display,
Drawable d,
@@ -1082,7 +1086,7 @@ DrawOrFillArc(
double radian_start, radian_end, xr, yr;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -1155,6 +1159,7 @@ DrawOrFillArc(
}
DeleteObject(SelectObject(dc, oldPen));
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 0136d36..7aec2b4 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -193,12 +193,13 @@ XGrabKeyboard(
*----------------------------------------------------------------------
*/
-void
+int
XUngrabKeyboard(
Display *display,
Time time)
{
keyboardWinPtr = NULL;
+ return Success;
}
/*
@@ -377,7 +378,7 @@ XWarpPointer(
*----------------------------------------------------------------------
*/
-void
+int
XGetInputFocus(
Display *display,
Window *focus_return,
@@ -388,6 +389,7 @@ XGetInputFocus(
*focus_return = tkwin ? Tk_WindowId(tkwin) : None;
*revert_to_return = RevertToParent;
display->request++;
+ return Success;
}
/*
@@ -407,7 +409,7 @@ XGetInputFocus(
*----------------------------------------------------------------------
*/
-void
+int
XSetInputFocus(
Display *display,
Window focus,
@@ -418,6 +420,7 @@ XSetInputFocus(
if (focus != None) {
SetFocus(Tk_GetHWND(focus));
}
+ return Success;
}
/*
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index 43ff0aa..3dfc078 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -297,7 +297,7 @@ TkpMakeWindow(
*----------------------------------------------------------------------
*/
-void
+int
XDestroyWindow(
Display *display,
Window w)
@@ -333,6 +333,7 @@ XDestroyWindow(
if (hwnd != NULL && !(winPtr->flags & TK_DONT_DESTROY_WINDOW)) {
DestroyWindow(hwnd);
}
+ return Success;
}
/*
@@ -351,7 +352,7 @@ XDestroyWindow(
*----------------------------------------------------------------------
*/
-void
+int
XMapWindow(
Display *display,
Window w)
@@ -375,7 +376,7 @@ XMapWindow(
for (parentPtr = winPtr->parentPtr; ;
parentPtr = parentPtr->parentPtr) {
if ((parentPtr == NULL) || !(parentPtr->flags & TK_MAPPED)) {
- return;
+ return Success;
}
if (parentPtr->flags & TK_TOP_HIERARCHY) {
break;
@@ -404,6 +405,7 @@ XMapWindow(
event.xvisibility.window = winPtr->window;
event.xvisibility.state = VisibilityUnobscured;
NotifyVisibility(&event, winPtr);
+ return Success;
}
/*
@@ -459,7 +461,7 @@ NotifyVisibility(
*----------------------------------------------------------------------
*/
-void
+int
XUnmapWindow(
Display *display,
Window w)
@@ -487,6 +489,7 @@ XUnmapWindow(
event.xunmap.from_configure = False;
Tk_HandleEvent(&event);
}
+ return Success;
}
/*
@@ -505,7 +508,7 @@ XUnmapWindow(
*----------------------------------------------------------------------
*/
-void
+int
XMoveResizeWindow(
Display *display,
Window w,
@@ -514,6 +517,7 @@ XMoveResizeWindow(
{
display->request++;
MoveWindow(Tk_GetHWND(w), x, y, (int) width, (int) height, TRUE);
+ return Success;
}
/*
@@ -532,7 +536,7 @@ XMoveResizeWindow(
*----------------------------------------------------------------------
*/
-void
+int
XMoveWindow(
Display *display,
Window w,
@@ -544,6 +548,7 @@ XMoveWindow(
MoveWindow(Tk_GetHWND(w), x, y, winPtr->changes.width,
winPtr->changes.height, TRUE);
+ return Success;
}
/*
@@ -562,7 +567,7 @@ XMoveWindow(
*----------------------------------------------------------------------
*/
-void
+int
XResizeWindow(
Display *display,
Window w,
@@ -574,6 +579,7 @@ XResizeWindow(
MoveWindow(Tk_GetHWND(w), winPtr->changes.x, winPtr->changes.y, (int)width,
(int)height, TRUE);
+ return Success;
}
/*
@@ -592,7 +598,7 @@ XResizeWindow(
*----------------------------------------------------------------------
*/
-void
+int
XRaiseWindow(
Display *display,
Window w)
@@ -601,6 +607,7 @@ XRaiseWindow(
display->request++;
SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ return Success;
}
/*
@@ -622,7 +629,7 @@ XRaiseWindow(
*----------------------------------------------------------------------
*/
-void
+int
XConfigureWindow(
Display *display,
Window w,
@@ -657,6 +664,7 @@ XConfigureWindow(
}
TkWinSetWindowPos(hwnd, sibling, values->stack_mode);
}
+ return Success;
}
/*
@@ -675,7 +683,7 @@ XConfigureWindow(
*----------------------------------------------------------------------
*/
-void
+int
XClearWindow(
Display *display,
Window w)
@@ -703,6 +711,7 @@ XClearWindow(
DeleteObject(brush);
SelectPalette(dc, oldPalette, TRUE);
ReleaseDC(hwnd, dc);
+ return Success;
}
/*
@@ -723,7 +732,7 @@ XClearWindow(
*----------------------------------------------------------------------
*/
-void
+int
XChangeWindowAttributes(
Display *display,
Window w,
@@ -733,6 +742,7 @@ XChangeWindowAttributes(
if (valueMask & CWCursor) {
XDefineCursor(display, w, attributes->cursor);
}
+ return Success;
}
/*