summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-06-17 20:09:01 (GMT)
committerhobbs <hobbs@noemail.net>2002-06-17 20:09:01 (GMT)
commit139b560ef5515c196677ca750084e7540015fcb4 (patch)
tree2526b5918abac20b6e67ff9f285600bd7cf3d3f4 /mac
parent81029bb6e3e88a984b08fa7eebaf04dffb777f1e (diff)
downloadtk-139b560ef5515c196677ca750084e7540015fcb4.zip
tk-139b560ef5515c196677ca750084e7540015fcb4.tar.gz
tk-139b560ef5515c196677ca750084e7540015fcb4.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. FossilOrigin-Name: 6be89a7feefdd57fd30aca27c701f6e155497b67
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;
}