summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/stubs.c62
-rw-r--r--win/tkWinClipboard.c3
-rw-r--r--win/tkWinColor.c6
-rwxr-xr-xwin/tkWinDraw.c41
-rw-r--r--win/tkWinKey.c3
-rw-r--r--win/tkWinPointer.c14
-rw-r--r--win/tkWinWindow.c32
-rw-r--r--win/tkWinWm.c7
-rw-r--r--win/tkWinX.c3
9 files changed, 108 insertions, 63 deletions
diff --git a/win/stubs.c b/win/stubs.c
index 5fbc8d1..93daf8d 100644
--- a/win/stubs.c
+++ b/win/stubs.c
@@ -34,7 +34,7 @@ XStringListToTextProperty(list, count, text_prop_return)
* From Xlib.h
*/
-void
+int
XChangeProperty(display, w, property, type, format, mode, data, nelements)
Display* display;
Window w;
@@ -45,6 +45,7 @@ XChangeProperty(display, w, property, type, format, mode, data, nelements)
_Xconst unsigned char* data;
int nelements;
{
+ return 0;
}
Cursor
@@ -55,14 +56,14 @@ XCreateGlyphCursor(display, source_font, mask_font, source_char, mask_char,
Font mask_font;
unsigned int source_char;
unsigned int mask_char;
- XColor* foreground_color;
- XColor* background_color;
+ XColor _Xconst *foreground_color;
+ XColor _Xconst *background_color;
{
return 1;
}
XIC
-XCreateIC()
+XCreateIC TCL_VARARGS_DEF(XIM,xim)
{
return NULL;
}
@@ -81,12 +82,13 @@ XCreatePixmapCursor(display, source, mask, foreground_color,
return (Cursor) NULL;
}
-void
+int
XDeleteProperty(display, w, property)
Display* display;
Window w;
Atom property;
{
+ return 0;
}
void
@@ -103,17 +105,19 @@ XFilterEvent(event, window)
return 0;
}
-extern void XForceScreenSaver(display, mode)
+int XForceScreenSaver(display, mode)
Display* display;
int mode;
{
+ return 0;
}
-void
+int
XFreeCursor(display, cursor)
Display* display;
Cursor cursor;
{
+ return 0;
}
GContext
@@ -180,27 +184,30 @@ XLookupColor(display, colormap, color_name, exact_def_return,
return 0;
}
-void
+int
XNextEvent(display, event_return)
Display* display;
XEvent* event_return;
{
+ return 0;
}
-void
+int
XPutBackEvent(display, event)
Display* display;
XEvent* event;
{
+ return 0;
}
-void
+int
XQueryColors(display, colormap, defs_in_out, ncolors)
Display* display;
Colormap colormap;
XColor* defs_in_out;
int ncolors;
{
+ return 0;
}
int
@@ -216,10 +223,11 @@ XQueryTree(display, w, root_return, parent_return, children_return,
return 0;
}
-void
+int
XRefreshKeyboardMapping(event_map)
XMappingEvent* event_map;
{
+ return 0;
}
Window
@@ -230,12 +238,13 @@ XRootWindow(display, screen_number)
return (Window) NULL;
}
-void
+int
XSelectInput(display, w, event_mask)
Display* display;
Window w;
long event_mask;
{
+ return 0;
}
int
@@ -249,13 +258,14 @@ XSendEvent(display, w, propagate, event_mask, event_send)
return 0;
}
-void
+int
XSetCommand(display, w, argv, argc)
Display* display;
Window w;
- CONST char** argv;
+ char** argv;
int argc;
{
+ return 0;
}
XErrorHandler
@@ -265,60 +275,67 @@ XSetErrorHandler (handler)
return NULL;
}
-void
+int
XSetIconName(display, w, icon_name)
Display* display;
Window w;
_Xconst char* icon_name;
{
+ return 0;
}
-void
+int
XSetWindowBackground(display, w, background_pixel)
Display* display;
Window w;
unsigned long background_pixel;
{
+ return 0;
}
-void
+int
XSetWindowBackgroundPixmap(display, w, background_pixmap)
Display* display;
Window w;
Pixmap background_pixmap;
{
+ return 0;
}
-void
+int
XSetWindowBorder(display, w, border_pixel)
Display* display;
Window w;
unsigned long border_pixel;
{
+ return 0;
}
-void
+int
XSetWindowBorderPixmap(display, w, border_pixmap)
Display* display;
Window w;
Pixmap border_pixmap;
{
+ return 0;
}
-void
+int
XSetWindowBorderWidth(display, w, width)
Display* display;
Window w;
unsigned int width;
{
+ return 0;
}
-void
+int
XSetWindowColormap(display, w, colormap)
Display* display;
Window w;
Colormap colormap;
{
+ return 0;
}
Bool
@@ -336,13 +353,14 @@ XTranslateCoordinates(display, src_w, dest_w, src_x, src_y, dest_x_return,
return 0;
}
-void
+int
XWindowEvent(display, w, event_mask, event_return)
Display* display;
Window w;
long event_mask;
XEvent* event_return;
{
+ return 0;
}
int
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 19dcc11..97d809c 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -190,7 +190,7 @@ error:
*----------------------------------------------------------------------
*/
-void
+int
XSetSelectionOwner(display, selection, owner, time)
Display* display;
Atom selection;
@@ -218,6 +218,7 @@ XSetSelectionOwner(display, selection, owner, time)
UpdateClipboard(hwnd);
}
}
+ return 0;
}
/*
diff --git a/win/tkWinColor.c b/win/tkWinColor.c
index 088c216..1c7eb7a 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.c
@@ -430,7 +430,7 @@ XAllocColor(display, colormap, color)
*----------------------------------------------------------------------
*/
-void
+int
XFreeColors(display, colormap, pixels, npixels, planes)
Display* display;
Colormap colormap;
@@ -485,6 +485,7 @@ XFreeColors(display, colormap, pixels, npixels, planes)
}
}
ReleaseDC(NULL, dc);
+ return 0;
}
/*
@@ -567,7 +568,7 @@ XCreateColormap(display, w, visual, alloc)
*----------------------------------------------------------------------
*/
-void
+int
XFreeColormap(display, colormap)
Display* display;
Colormap colormap;
@@ -578,6 +579,7 @@ XFreeColormap(display, colormap)
}
Tcl_DeleteHashTable(&cmap->refCounts);
ckfree((char *) cmap);
+ return 0;
}
/*
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 805dde3..9130e39 100755
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -117,7 +117,7 @@ static Tcl_ThreadDataKey dataKey;
static POINT * ConvertPoints _ANSI_ARGS_((XPoint *points, int npoints,
int mode, RECT *bbox));
-static void DrawOrFillArc _ANSI_ARGS_((Display *display,
+static int DrawOrFillArc _ANSI_ARGS_((Display *display,
Drawable d, GC gc, int x, int y,
unsigned int width, unsigned int height,
int start, int extent, int fill));
@@ -299,7 +299,7 @@ ConvertPoints(points, npoints, mode, bbox)
*----------------------------------------------------------------------
*/
-void
+int
XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y)
Display* display;
Drawable src;
@@ -335,6 +335,7 @@ XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y)
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return 0;
}
/*
@@ -356,7 +357,7 @@ XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y)
*----------------------------------------------------------------------
*/
-void
+int
XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x,
dest_y, plane)
Display* display;
@@ -486,6 +487,7 @@ XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x,
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return 0;
}
/*
@@ -620,7 +622,7 @@ TkPutImage(colors, ncolors, display, d, gc, image, src_x, src_y, dest_x,
*----------------------------------------------------------------------
*/
-void
+int
XFillRectangles(display, d, gc, rectangles, nrectangles)
Display* display;
Drawable d;
@@ -635,7 +637,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles)
HBRUSH brush, oldBrush;
if (d == None) {
- return;
+ return 0;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -722,6 +724,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles)
}
DeleteObject(brush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return 0;
}
/*
@@ -871,7 +874,7 @@ RenderObject(dc, gc, points, npoints, mode, pen, func)
*----------------------------------------------------------------------
*/
-void
+int
XDrawLines(display, d, gc, points, npoints, mode)
Display* display;
Drawable d;
@@ -885,7 +888,7 @@ XDrawLines(display, d, gc, points, npoints, mode)
HDC dc;
if (d == None) {
- return;
+ return 0;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -896,6 +899,7 @@ XDrawLines(display, d, gc, points, npoints, mode)
DeleteObject(pen);
TkWinReleaseDrawableDC(d, dc, &state);
+ return 0;
}
/*
@@ -914,7 +918,7 @@ XDrawLines(display, d, gc, points, npoints, mode)
*----------------------------------------------------------------------
*/
-void
+int
XFillPolygon(display, d, gc, points, npoints, shape, mode)
Display* display;
Drawable d;
@@ -929,7 +933,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
HDC dc;
if (d == None) {
- return;
+ return 0;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -938,6 +942,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
RenderObject(dc, gc, points, npoints, mode, pen, Polygon);
TkWinReleaseDrawableDC(d, dc, &state);
+ return 0;
}
/*
@@ -956,7 +961,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangle(display, d, gc, x, y, width, height)
Display* display;
Drawable d;
@@ -972,7 +977,7 @@ XDrawRectangle(display, d, gc, x, y, width, height)
HDC dc;
if (d == None) {
- return;
+ return 0;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -988,6 +993,7 @@ XDrawRectangle(display, d, gc, x, y, width, height)
DeleteObject(SelectObject(dc, oldPen));
SelectObject(dc, oldBrush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return 0;
}
/*
@@ -1006,7 +1012,7 @@ XDrawRectangle(display, d, gc, x, y, width, height)
*----------------------------------------------------------------------
*/
-void
+int
XDrawArc(display, d, gc, x, y, width, height, start, extent)
Display* display;
Drawable d;
@@ -1020,7 +1026,7 @@ XDrawArc(display, d, gc, x, y, width, height, start, extent)
{
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);
}
/*
@@ -1039,7 +1045,7 @@ XDrawArc(display, d, gc, x, y, width, height, start, extent)
*----------------------------------------------------------------------
*/
-void
+int
XFillArc(display, d, gc, x, y, width, height, start, extent)
Display* display;
Drawable d;
@@ -1053,7 +1059,7 @@ XFillArc(display, d, gc, x, y, width, height, start, extent)
{
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);
}
/*
@@ -1073,7 +1079,7 @@ XFillArc(display, d, gc, x, y, width, height, start, extent)
*----------------------------------------------------------------------
*/
-static void
+static int
DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill)
Display *display;
Drawable d;
@@ -1093,7 +1099,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill)
double radian_start, radian_end, xr, yr;
if (d == None) {
- return;
+ return 0;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -1163,6 +1169,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill)
}
DeleteObject(SelectObject(dc, oldPen));
TkWinReleaseDrawableDC(d, dc, &state);
+ return 0;
}
/*
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index aa532bf..9b78ee4 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -690,12 +690,13 @@ XGetModifierMapping(display)
*----------------------------------------------------------------------
*/
-void
+int
XFreeModifiermap(modmap)
XModifierKeymap* modmap;
{
ckfree((char *) modmap->modifiermap);
ckfree((char *) modmap);
+ return 0;
}
/*
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 0d9ed61..de812ba 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -195,12 +195,13 @@ XGrabKeyboard(display, grab_window, owner_events, pointer_mode,
*----------------------------------------------------------------------
*/
-void
+int
XUngrabKeyboard(display, time)
Display* display;
Time time;
{
keyboardWinPtr = NULL;
+ return 0;
}
/*
@@ -347,7 +348,7 @@ XQueryPointer(display, w, root_return, child_return, root_x_return,
*----------------------------------------------------------------------
*/
-void
+int
XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width,
src_height, dest_x, dest_y)
Display* display;
@@ -363,7 +364,8 @@ XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width,
RECT r;
GetWindowRect(Tk_GetHWND(dest_w), &r);
- SetCursorPos(r.left+dest_x, r.top+dest_y);
+ SetCursorPos(r.left+dest_x, r.top+dest_y);
+ return 0;
}
/*
@@ -382,7 +384,7 @@ XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width,
*----------------------------------------------------------------------
*/
-void
+int
XGetInputFocus(display, focus_return, revert_to_return)
Display *display;
Window *focus_return;
@@ -392,6 +394,7 @@ XGetInputFocus(display, focus_return, revert_to_return)
*focus_return = tkwin ? Tk_WindowId(tkwin) : None;
*revert_to_return = RevertToParent;
display->request++;
+ return 0;
}
/*
@@ -411,7 +414,7 @@ XGetInputFocus(display, focus_return, revert_to_return)
*----------------------------------------------------------------------
*/
-void
+int
XSetInputFocus(display, focus, revert_to, time)
Display* display;
Window focus;
@@ -422,6 +425,7 @@ XSetInputFocus(display, focus, revert_to, time)
if (focus != None) {
SetFocus(Tk_GetHWND(focus));
}
+ return 0;
}
/*
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index 8d76289..2e5b97e 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -294,7 +294,7 @@ TkpMakeWindow(winPtr, parent)
*----------------------------------------------------------------------
*/
-void
+int
XDestroyWindow(display, w)
Display* display;
Window w;
@@ -330,6 +330,7 @@ XDestroyWindow(display, w)
if (hwnd != NULL && !(winPtr->flags & TK_DONT_DESTROY_WINDOW)) {
DestroyWindow(hwnd);
}
+ return 0;
}
/*
@@ -349,7 +350,7 @@ XDestroyWindow(display, w)
*----------------------------------------------------------------------
*/
-void
+int
XMapWindow(display, w)
Display* display;
Window w;
@@ -373,7 +374,7 @@ XMapWindow(display, w)
for (parentPtr = winPtr->parentPtr; ;
parentPtr = parentPtr->parentPtr) {
if ((parentPtr == NULL) || !(parentPtr->flags & TK_MAPPED)) {
- return;
+ return 0;
}
if (parentPtr->flags & TK_TOP_HIERARCHY) {
break;
@@ -402,6 +403,7 @@ XMapWindow(display, w)
event.xvisibility.window = winPtr->window;
event.xvisibility.state = VisibilityUnobscured;
NotifyVisibility(&event, winPtr);
+ return 0;
}
/*
@@ -458,7 +460,7 @@ NotifyVisibility(eventPtr, winPtr)
*----------------------------------------------------------------------
*/
-void
+int
XUnmapWindow(display, w)
Display* display;
Window w;
@@ -486,6 +488,7 @@ XUnmapWindow(display, w)
event.xunmap.from_configure = False;
Tk_HandleEvent(&event);
}
+ return 0;
}
/*
@@ -504,7 +507,7 @@ XUnmapWindow(display, w)
*----------------------------------------------------------------------
*/
-void
+int
XMoveResizeWindow(display, w, x, y, width, height)
Display* display;
Window w;
@@ -515,6 +518,7 @@ XMoveResizeWindow(display, w, x, y, width, height)
{
display->request++;
MoveWindow(Tk_GetHWND(w), x, y, width, height, TRUE);
+ return 0;
}
/*
@@ -533,7 +537,7 @@ XMoveResizeWindow(display, w, x, y, width, height)
*----------------------------------------------------------------------
*/
-void
+int
XMoveWindow(display, w, x, y)
Display* display;
Window w;
@@ -546,6 +550,7 @@ XMoveWindow(display, w, x, y)
MoveWindow(Tk_GetHWND(w), x, y, winPtr->changes.width,
winPtr->changes.height, TRUE);
+ return 0;
}
/*
@@ -564,7 +569,7 @@ XMoveWindow(display, w, x, y)
*----------------------------------------------------------------------
*/
-void
+int
XResizeWindow(display, w, width, height)
Display* display;
Window w;
@@ -577,6 +582,7 @@ XResizeWindow(display, w, width, height)
MoveWindow(Tk_GetHWND(w), winPtr->changes.x, winPtr->changes.y, width,
height, TRUE);
+ return 0;
}
/*
@@ -595,7 +601,7 @@ XResizeWindow(display, w, width, height)
*----------------------------------------------------------------------
*/
-void
+int
XRaiseWindow(display, w)
Display* display;
Window w;
@@ -605,6 +611,7 @@ XRaiseWindow(display, w)
display->request++;
SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
+ return 0;
}
/*
@@ -626,7 +633,7 @@ XRaiseWindow(display, w)
*----------------------------------------------------------------------
*/
-void
+int
XConfigureWindow(display, w, value_mask, values)
Display* display;
Window w;
@@ -660,6 +667,7 @@ XConfigureWindow(display, w, value_mask, values)
}
TkWinSetWindowPos(hwnd, sibling, values->stack_mode);
}
+ return 0;
}
/*
@@ -678,7 +686,7 @@ XConfigureWindow(display, w, value_mask, values)
*----------------------------------------------------------------------
*/
-void
+int
XClearWindow(display, w)
Display* display;
Window w;
@@ -706,6 +714,7 @@ XClearWindow(display, w)
DeleteObject(brush);
SelectPalette(dc, oldPalette, TRUE);
ReleaseDC(hwnd, dc);
+ return 0;
}
/*
@@ -726,7 +735,7 @@ XClearWindow(display, w)
*----------------------------------------------------------------------
*/
-void
+int
XChangeWindowAttributes(display, w, valueMask, attributes)
Display* display;
Window w;
@@ -736,6 +745,7 @@ XChangeWindowAttributes(display, w, valueMask, attributes)
if (valueMask & CWCursor) {
XDefineCursor(display, w, attributes->cursor);
}
+ return 0;
}
/*
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 59287c8..6b157cd 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -2347,7 +2347,7 @@ TkWmUnmapWindow(winPtr)
*----------------------------------------------------------------------
*/
-void
+int
TkpWmSetState(winPtr, state)
TkWindow *winPtr; /* Toplevel window to operate on. */
int state; /* One of IconicState, ZoomState, NormalState,
@@ -2358,7 +2358,7 @@ TkpWmSetState(winPtr, state)
if (wmPtr->flags & WM_NEVER_MAPPED) {
wmPtr->hints.initial_state = state;
- return;
+ return 1;
}
wmPtr->flags |= WM_SYNC_PENDING;
@@ -2374,6 +2374,7 @@ TkpWmSetState(winPtr, state)
ShowWindow(wmPtr->wrapper, cmd);
wmPtr->flags &= ~WM_SYNC_PENDING;
+ return 1;
}
/*
@@ -3265,7 +3266,7 @@ WmCommandCmd(tkwin, winPtr, interp, objc, objv)
wmPtr->cmdArgc = cmdArgc;
wmPtr->cmdArgv = cmdArgv;
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
- XSetCommand(winPtr->display, winPtr->window, cmdArgv, cmdArgc);
+ XSetCommand(winPtr->display, winPtr->window, (char **)cmdArgv, cmdArgc);
}
return TCL_OK;
}
diff --git a/win/tkWinX.c b/win/tkWinX.c
index cdbdc84..5d53714 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -759,12 +759,13 @@ TkClipCleanup(dispPtr)
*----------------------------------------------------------------------
*/
-void
+int
XBell(display, percent)
Display* display;
int percent;
{
MessageBeep(MB_OK);
+ return 0;
}
/*