summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/stubs.c53
-rwxr-xr-xwin/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 5977a2b..8f70da6 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 Success;
}
Cursor
@@ -62,7 +63,7 @@ XCreateGlyphCursor(display, source_font, mask_font, source_char, mask_char,
}
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 Success;
}
void
@@ -103,17 +105,19 @@ XFilterEvent(event, window)
return 0;
}
-extern void XForceScreenSaver(display, mode)
+int XForceScreenSaver(display, mode)
Display* display;
int mode;
{
+ return Success;
}
-void
+int
XFreeCursor(display, cursor)
Display* display;
Cursor cursor;
{
+ return Success;
}
GContext
@@ -180,27 +184,30 @@ XLookupColor(display, colormap, color_name, exact_def_return,
return Success;
}
-void
+int
XNextEvent(display, event_return)
Display* display;
XEvent* event_return;
{
+ return Success;
}
-void
+int
XPutBackEvent(display, event)
Display* display;
XEvent* event;
{
+ return Success;
}
-void
+int
XQueryColors(display, colormap, defs_in_out, ncolors)
Display* display;
Colormap colormap;
XColor* defs_in_out;
int ncolors;
{
+ return Success;
}
int
@@ -216,10 +223,11 @@ XQueryTree(display, w, root_return, parent_return, children_return,
return Success;
}
-void
+int
XRefreshKeyboardMapping(event_map)
XMappingEvent* event_map;
{
+ return Success;
}
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 Success;
}
int
@@ -266,60 +275,67 @@ XSetErrorHandler (handler)
return NULL;
}
-void
+int
XSetIconName(display, w, icon_name)
Display* display;
Window w;
_Xconst char* icon_name;
{
+ return Success;
}
-void
+int
XSetWindowBackground(display, w, background_pixel)
Display* display;
Window w;
unsigned long background_pixel;
{
+ return Success;
}
-void
+int
XSetWindowBackgroundPixmap(display, w, background_pixmap)
Display* display;
Window w;
Pixmap background_pixmap;
{
+ return Success;
}
-void
+int
XSetWindowBorder(display, w, border_pixel)
Display* display;
Window w;
unsigned long border_pixel;
{
+ return Success;
}
-void
+int
XSetWindowBorderPixmap(display, w, border_pixmap)
Display* display;
Window w;
Pixmap border_pixmap;
{
+ return Success;
}
-void
+int
XSetWindowBorderWidth(display, w, width)
Display* display;
Window w;
unsigned int width;
{
+ return Success;
}
-void
+int
XSetWindowColormap(display, w, colormap)
Display* display;
Window w;
Colormap colormap;
{
+ return Success;
}
Bool
@@ -337,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 Success;
}
int
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 26d73e8..04a27c4 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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -917,7 +919,7 @@ XDrawLines(display, d, gc, points, npoints, mode)
*----------------------------------------------------------------------
*/
-void
+int
XFillPolygon(display, d, gc, points, npoints, shape, mode)
Display* display;
Drawable d;
@@ -932,7 +934,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -941,6 +943,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
RenderObject(dc, gc, points, npoints, mode, pen, Polygon);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -959,7 +962,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode)
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangle(display, d, gc, x, y, width, height)
Display* display;
Drawable d;
@@ -975,7 +978,7 @@ XDrawRectangle(display, d, gc, x, y, width, height)
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -991,6 +994,7 @@ XDrawRectangle(display, d, gc, x, y, width, height)
DeleteObject(SelectObject(dc, oldPen));
SelectObject(dc, oldBrush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -1009,7 +1013,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;
@@ -1023,7 +1027,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);
}
/*
@@ -1042,7 +1046,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;
@@ -1056,7 +1060,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);
}
/*
@@ -1076,7 +1080,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;
@@ -1096,7 +1100,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill)
double radian_start, radian_end, xr, yr;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -1166,6 +1170,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill)
}
DeleteObject(SelectObject(dc, oldPen));
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 42e6e49..bac6e18 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 Success;
}
/*
@@ -383,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;
@@ -393,6 +394,7 @@ XGetInputFocus(display, focus_return, revert_to_return)
*focus_return = tkwin ? Tk_WindowId(tkwin) : None;
*revert_to_return = RevertToParent;
display->request++;
+ return Success;
}
/*
@@ -412,7 +414,7 @@ XGetInputFocus(display, focus_return, revert_to_return)
*----------------------------------------------------------------------
*/
-void
+int
XSetInputFocus(display, focus, revert_to, time)
Display* display;
Window focus;
@@ -423,6 +425,7 @@ XSetInputFocus(display, focus, revert_to, time)
if (focus != None) {
SetFocus(Tk_GetHWND(focus));
}
+ return Success;
}
/*
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index 8d76289..ef14604 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 Success;
}
/*
@@ -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 Success;
}
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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*
@@ -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 Success;
}
/*