summaryrefslogtreecommitdiffstats
path: root/win/tkWinPointer.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-14 06:53:54 (GMT)
committerhobbs <hobbs>1999-12-14 06:53:54 (GMT)
commitf2d4a0a8a6313d0104083cd328797b447fd6e51e (patch)
treeebecb7e15ad76bd36fed4bfce9bac5c8b8cb9f7c /win/tkWinPointer.c
parent0e681b41b7f68d1a46ab1c64693044ca8005a166 (diff)
downloadtk-f2d4a0a8a6313d0104083cd328797b447fd6e51e.zip
tk-f2d4a0a8a6313d0104083cd328797b447fd6e51e.tar.gz
tk-f2d4a0a8a6313d0104083cd328797b447fd6e51e.tar.bz2
* win/tkWinDraw.c:
* win/tkWinPointer.c: added support for pointer warping and platform specific support for dash patch items
Diffstat (limited to 'win/tkWinPointer.c')
-rw-r--r--win/tkWinPointer.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index d503417..6e62e31 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinPointer.c,v 1.6 1999/04/16 01:51:53 stanton Exp $
+ * RCS: @(#) $Id: tkWinPointer.c,v 1.7 1999/12/14 06:53:54 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -331,6 +331,42 @@ XQueryPointer(display, w, root_return, child_return, root_x_return,
*mask_return = TkWinGetModifierState();
return True;
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * XWarpPointer --
+ *
+ * Move pointer to new location. This is not a complete
+ * implementation of this function.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Mouse pointer changes position on screen.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width,
+ src_height, dest_x, dest_y)
+ Display* display;
+ Window src_w;
+ Window dest_w;
+ int src_x;
+ int src_y;
+ unsigned int src_width;
+ unsigned int src_height;
+ int dest_x;
+ int dest_y;
+{
+ RECT r;
+
+ GetWindowRect(Tk_GetHWND(dest_w), &r);
+ SetCursorPos(r.left+dest_x, r.top+dest_y);
+}
/*
*----------------------------------------------------------------------