summaryrefslogtreecommitdiffstats
path: root/mac/tkMacXStubs.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-17 20:09:01 (GMT)
committerhobbs <hobbs>2002-06-17 20:09:01 (GMT)
commit25f604e4d2e56721809b177202db73a38df2491e (patch)
tree2526b5918abac20b6e67ff9f285600bd7cf3d3f4 /mac/tkMacXStubs.c
parenta984d974f6b3123815d8116428afe8e51e025f31 (diff)
downloadtk-25f604e4d2e56721809b177202db73a38df2491e.zip
tk-25f604e4d2e56721809b177202db73a38df2491e.tar.gz
tk-25f604e4d2e56721809b177202db73a38df2491e.tar.bz2
* generic/tkCmds.c (Tk_TkObjCmd):
* generic/tkInt.h (struct TkCaret): * mac/tkMacXStubs.c (Tk_SetCaretPos): * unix/tkUnixKey.c (TkpGetString, Tk_SetCaretPos): * win/tkWinX.c (Tk_SetCaretPos): * tests/tk.test: Added 'tk caret' implementation of TIP#96 * doc/SetCaret.3 (new): which adds a TkCaret structure element to * doc/tk.n: TkDisplay for maintaining state.
Diffstat (limited to 'mac/tkMacXStubs.c')
-rw-r--r--mac/tkMacXStubs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mac/tkMacXStubs.c b/mac/tkMacXStubs.c
index 2e6b90a..6525c1f 100644
--- a/mac/tkMacXStubs.c
+++ b/mac/tkMacXStubs.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacXStubs.c,v 1.13 2002/04/12 07:31:20 hobbs Exp $
+ * RCS: @(#) $Id: tkMacXStubs.c,v 1.14 2002/06/17 20:09:01 hobbs Exp $
*/
#include "tkInt.h"
@@ -811,8 +811,8 @@ TkGetDefaultScreenName(
*
* Tk_SetCaretPos --
*
- * This indicates the cursor position to Tk. This is not used
- * on the Mac currently.
+ * This indicates the cursor position to Tk.
+ * This is currently a noop stub for MacX.
*
*----------------------------------------------------------------------
*/
@@ -820,5 +820,10 @@ TkGetDefaultScreenName(
void
Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height)
{
- return;
+ TkCaret *caretPtr = &(((TkWindow *) tkwin)->dispPtr->caret);
+
+ caretPtr->winPtr = ((TkWindow *) tkwin);
+ caretPtr->x = x;
+ caretPtr->y = y;
+ caretPtr->height = height;
}