summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-17 20:09:01 (GMT)
committerhobbs <hobbs>2002-06-17 20:09:01 (GMT)
commit708274b0cca50f9902604c362628740f8dce7a49 (patch)
tree2526b5918abac20b6e67ff9f285600bd7cf3d3f4 /mac
parente008a53891ad394b6debb664cba7558a44b9d7d9 (diff)
downloadtk-708274b0cca50f9902604c362628740f8dce7a49.zip
tk-708274b0cca50f9902604c362628740f8dce7a49.tar.gz
tk-708274b0cca50f9902604c362628740f8dce7a49.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')
-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;
}