summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-12-04 21:33:25 (GMT)
committernijtmans <nijtmans>2008-12-04 21:33:25 (GMT)
commitb03fbd581208efaae3c161c9222c0bd6e5b61d96 (patch)
treec0a5c075effa403d67ce447314477bf7db522940 /generic
parent595edef015407433f0bfb19bf62c29a302edffe1 (diff)
downloadtk-b03fbd581208efaae3c161c9222c0bd6e5b61d96.zip
tk-b03fbd581208efaae3c161c9222c0bd6e5b61d96.tar.gz
tk-b03fbd581208efaae3c161c9222c0bd6e5b61d96.tar.bz2
Move 10 functions from tkText.h to
stub table [Feature Request 220906]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkInt.decls50
-rw-r--r--generic/tkIntDecls.h130
-rw-r--r--generic/tkStubInit.c12
-rw-r--r--generic/tkText.h34
4 files changed, 189 insertions, 37 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 6864169..0edfde5 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tkInt.decls,v 1.49 2008/11/05 23:29:58 nijtmans Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.50 2008/12/04 21:33:25 nijtmans Exp $
library tk
@@ -516,10 +516,56 @@ declare 157 generic {
const char **argv)
}
declare 158 generic {
- int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin,
+ int TkSelGetSelection(Tcl_Interp *interp, Tk_Window tkwin,
Atom selection, Atom target, Tk_GetSelProc *proc,
ClientData clientData)
}
+declare 159 generic {
+ int TkTextGetIndex(Tcl_Interp *interp, struct TkText *textPtr,
+ const char *string, struct TkTextIndex *indexPtr)
+}
+declare 160 generic {
+ int TkTextIndexBackBytes(const struct TkText *textPtr,
+ const struct TkTextIndex *srcPtr, int count,
+ struct TkTextIndex *dstPtr)
+}
+declare 161 generic {
+ int TkTextIndexForwBytes(const struct TkText *textPtr,
+ const struct TkTextIndex *srcPtr, int count,
+ struct TkTextIndex *dstPtr)
+}
+declare 162 generic {
+ struct TkTextIndex *TkTextMakeByteIndex(const TkTextBTree tree,
+ const struct TkText *textPtr, int lineIndex,
+ int byteIndex, struct TkTextIndex *indexPtr)
+}
+declare 163 generic {
+ int TkTextPrintIndex(const struct TkText *textPtr,
+ const struct TkTextIndex *indexPtr, char *string)
+}
+declare 164 generic {
+ struct TkTextSegment *TkTextSetMark(struct TkText *textPtr,
+ const char *name, struct TkTextIndex *indexPtr)
+}
+declare 165 generic {
+ int TkTextXviewCmd(struct TkText *textPtr, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[])
+}
+declare 166 generic {
+ void TkTextChanged(struct TkSharedText *sharedTextPtr,
+ struct TkText *textPtr, const struct TkTextIndex *index1Ptr,
+ const struct TkTextIndex *index2Ptr)
+}
+declare 167 generic {
+ int TkBTreeNumLines(TkTextBTree tree,
+ const struct TkText *textPtr)
+}
+declare 168 generic {
+ void TkTextInsertDisplayProc(struct TkText *textPtr,
+ struct TkTextDispChunk *chunkPtr, int x, int y,
+ int height, int baseline, Display *display,
+ Drawable dst, int screenY)
+}
##############################################################################
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index c7e2324..77e429a 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -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: tkIntDecls.h,v 1.39 2008/11/05 23:29:58 nijtmans Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.40 2008/12/04 21:33:25 nijtmans Exp $
*/
#ifndef _TKINTDECLS
@@ -22,6 +22,13 @@
#define TCL_STORAGE_CLASS DLLEXPORT
#endif
+struct TkText;
+typedef struct TkTextBTree_ *TkTextBTree;
+struct TkTextDispChunk;
+struct TkTextIndex;
+struct TkTextSegment;
+struct TkSharedText;
+
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
@@ -962,6 +969,77 @@ EXTERN int TkSelGetSelection (Tcl_Interp * interp,
Tk_Window tkwin, Atom selection, Atom target,
Tk_GetSelProc * proc, ClientData clientData);
#endif
+#ifndef TkTextGetIndex_TCL_DECLARED
+#define TkTextGetIndex_TCL_DECLARED
+/* 159 */
+EXTERN int TkTextGetIndex (Tcl_Interp * interp,
+ struct TkText * textPtr, const char * string,
+ struct TkTextIndex * indexPtr);
+#endif
+#ifndef TkTextIndexBackBytes_TCL_DECLARED
+#define TkTextIndexBackBytes_TCL_DECLARED
+/* 160 */
+EXTERN int TkTextIndexBackBytes (const struct TkText * textPtr,
+ const struct TkTextIndex * srcPtr, int count,
+ struct TkTextIndex * dstPtr);
+#endif
+#ifndef TkTextIndexForwBytes_TCL_DECLARED
+#define TkTextIndexForwBytes_TCL_DECLARED
+/* 161 */
+EXTERN int TkTextIndexForwBytes (const struct TkText * textPtr,
+ const struct TkTextIndex * srcPtr, int count,
+ struct TkTextIndex * dstPtr);
+#endif
+#ifndef TkTextMakeByteIndex_TCL_DECLARED
+#define TkTextMakeByteIndex_TCL_DECLARED
+/* 162 */
+EXTERN struct TkTextIndex * TkTextMakeByteIndex (const TkTextBTree tree,
+ const struct TkText * textPtr, int lineIndex,
+ int byteIndex, struct TkTextIndex * indexPtr);
+#endif
+#ifndef TkTextPrintIndex_TCL_DECLARED
+#define TkTextPrintIndex_TCL_DECLARED
+/* 163 */
+EXTERN int TkTextPrintIndex (const struct TkText * textPtr,
+ const struct TkTextIndex * indexPtr,
+ char * string);
+#endif
+#ifndef TkTextSetMark_TCL_DECLARED
+#define TkTextSetMark_TCL_DECLARED
+/* 164 */
+EXTERN struct TkTextSegment * TkTextSetMark (struct TkText * textPtr,
+ const char * name,
+ struct TkTextIndex * indexPtr);
+#endif
+#ifndef TkTextXviewCmd_TCL_DECLARED
+#define TkTextXviewCmd_TCL_DECLARED
+/* 165 */
+EXTERN int TkTextXviewCmd (struct TkText * textPtr,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj *const objv[]);
+#endif
+#ifndef TkTextChanged_TCL_DECLARED
+#define TkTextChanged_TCL_DECLARED
+/* 166 */
+EXTERN void TkTextChanged (struct TkSharedText * sharedTextPtr,
+ struct TkText * textPtr,
+ const struct TkTextIndex * index1Ptr,
+ const struct TkTextIndex * index2Ptr);
+#endif
+#ifndef TkBTreeNumLines_TCL_DECLARED
+#define TkBTreeNumLines_TCL_DECLARED
+/* 167 */
+EXTERN int TkBTreeNumLines (TkTextBTree tree,
+ const struct TkText * textPtr);
+#endif
+#ifndef TkTextInsertDisplayProc_TCL_DECLARED
+#define TkTextInsertDisplayProc_TCL_DECLARED
+/* 168 */
+EXTERN void TkTextInsertDisplayProc (struct TkText * textPtr,
+ struct TkTextDispChunk * chunkPtr, int x,
+ int y, int height, int baseline,
+ Display * display, Drawable dst, int screenY);
+#endif
typedef struct TkIntStubs {
int magic;
@@ -1225,6 +1303,16 @@ typedef struct TkIntStubs {
int (*tkpTestembedCmd) (ClientData clientData, Tcl_Interp * interp, int argc, const char ** argv); /* 156 */
int (*tkpTesttextCmd) (ClientData dummy, Tcl_Interp * interp, int argc, const char ** argv); /* 157 */
int (*tkSelGetSelection) (Tcl_Interp * interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc * proc, ClientData clientData); /* 158 */
+ int (*tkTextGetIndex) (Tcl_Interp * interp, struct TkText * textPtr, const char * string, struct TkTextIndex * indexPtr); /* 159 */
+ int (*tkTextIndexBackBytes) (const struct TkText * textPtr, const struct TkTextIndex * srcPtr, int count, struct TkTextIndex * dstPtr); /* 160 */
+ int (*tkTextIndexForwBytes) (const struct TkText * textPtr, const struct TkTextIndex * srcPtr, int count, struct TkTextIndex * dstPtr); /* 161 */
+ struct TkTextIndex * (*tkTextMakeByteIndex) (const TkTextBTree tree, const struct TkText * textPtr, int lineIndex, int byteIndex, struct TkTextIndex * indexPtr); /* 162 */
+ int (*tkTextPrintIndex) (const struct TkText * textPtr, const struct TkTextIndex * indexPtr, char * string); /* 163 */
+ struct TkTextSegment * (*tkTextSetMark) (struct TkText * textPtr, const char * name, struct TkTextIndex * indexPtr); /* 164 */
+ int (*tkTextXviewCmd) (struct TkText * textPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 165 */
+ void (*tkTextChanged) (struct TkSharedText * sharedTextPtr, struct TkText * textPtr, const struct TkTextIndex * index1Ptr, const struct TkTextIndex * index2Ptr); /* 166 */
+ int (*tkBTreeNumLines) (TkTextBTree tree, const struct TkText * textPtr); /* 167 */
+ void (*tkTextInsertDisplayProc) (struct TkText * textPtr, struct TkTextDispChunk * chunkPtr, int x, int y, int height, int baseline, Display * display, Drawable dst, int screenY); /* 168 */
} TkIntStubs;
#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
@@ -1898,6 +1986,46 @@ extern const TkIntStubs *tkIntStubsPtr;
#define TkSelGetSelection \
(tkIntStubsPtr->tkSelGetSelection) /* 158 */
#endif
+#ifndef TkTextGetIndex
+#define TkTextGetIndex \
+ (tkIntStubsPtr->tkTextGetIndex) /* 159 */
+#endif
+#ifndef TkTextIndexBackBytes
+#define TkTextIndexBackBytes \
+ (tkIntStubsPtr->tkTextIndexBackBytes) /* 160 */
+#endif
+#ifndef TkTextIndexForwBytes
+#define TkTextIndexForwBytes \
+ (tkIntStubsPtr->tkTextIndexForwBytes) /* 161 */
+#endif
+#ifndef TkTextMakeByteIndex
+#define TkTextMakeByteIndex \
+ (tkIntStubsPtr->tkTextMakeByteIndex) /* 162 */
+#endif
+#ifndef TkTextPrintIndex
+#define TkTextPrintIndex \
+ (tkIntStubsPtr->tkTextPrintIndex) /* 163 */
+#endif
+#ifndef TkTextSetMark
+#define TkTextSetMark \
+ (tkIntStubsPtr->tkTextSetMark) /* 164 */
+#endif
+#ifndef TkTextXviewCmd
+#define TkTextXviewCmd \
+ (tkIntStubsPtr->tkTextXviewCmd) /* 165 */
+#endif
+#ifndef TkTextChanged
+#define TkTextChanged \
+ (tkIntStubsPtr->tkTextChanged) /* 166 */
+#endif
+#ifndef TkBTreeNumLines
+#define TkBTreeNumLines \
+ (tkIntStubsPtr->tkBTreeNumLines) /* 167 */
+#endif
+#ifndef TkTextInsertDisplayProc
+#define TkTextInsertDisplayProc \
+ (tkIntStubsPtr->tkTextInsertDisplayProc) /* 168 */
+#endif
#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 6de9d44..d202a6f 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubInit.c,v 1.65 2008/10/28 22:33:06 nijtmans Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.66 2008/12/04 21:33:25 nijtmans Exp $
*/
#include "tkInt.h"
@@ -310,6 +310,16 @@ static const TkIntStubs tkIntStubs = {
TkpTestembedCmd, /* 156 */
TkpTesttextCmd, /* 157 */
TkSelGetSelection, /* 158 */
+ TkTextGetIndex, /* 159 */
+ TkTextIndexBackBytes, /* 160 */
+ TkTextIndexForwBytes, /* 161 */
+ TkTextMakeByteIndex, /* 162 */
+ TkTextPrintIndex, /* 163 */
+ TkTextSetMark, /* 164 */
+ TkTextXviewCmd, /* 165 */
+ TkTextChanged, /* 166 */
+ TkBTreeNumLines, /* 167 */
+ TkTextInsertDisplayProc, /* 168 */
};
static const TkIntPlatStubs tkIntPlatStubs = {
diff --git a/generic/tkText.h b/generic/tkText.h
index 521d99c..eb650ea 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -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: tkText.h,v 1.34 2007/12/13 15:24:17 dgp Exp $
+ * RCS: @(#) $Id: tkText.h,v 1.35 2008/12/04 21:33:25 nijtmans Exp $
*/
#ifndef _TKTEXT
@@ -29,12 +29,6 @@
#endif
/*
- * Opaque types for structures whose guts are only needed by a single file.
- */
-
-typedef struct TkTextBTree_ *TkTextBTree;
-
-/*
* The data structure below defines a single logical line of text (from
* newline to newline, not necessarily what appears on one display line of the
* screen).
@@ -996,8 +990,6 @@ MODULE_SCOPE void TkBTreeLinkSegment(TkTextSegment *segPtr,
MODULE_SCOPE TkTextLine *TkBTreeNextLine(const TkText *textPtr,
TkTextLine *linePtr);
MODULE_SCOPE int TkBTreeNextTag(TkTextSearch *searchPtr);
-MODULE_SCOPE int TkBTreeNumLines(TkTextBTree tree,
- const TkText *textPtr);
MODULE_SCOPE int TkBTreeNumPixels(TkTextBTree tree,
const TkText *textPtr);
MODULE_SCOPE TkTextLine *TkBTreePreviousLine(TkText *textPtr,
@@ -1017,9 +1009,6 @@ MODULE_SCOPE void TkBTreeUnlinkSegment(TkTextSegment *segPtr,
MODULE_SCOPE void TkTextBindProc(ClientData clientData,
XEvent *eventPtr);
MODULE_SCOPE void TkTextSelectionEvent(TkText *textPtr);
-MODULE_SCOPE void TkTextChanged(TkSharedText *sharedTextPtr,
- TkText *textPtr, const TkTextIndex *index1Ptr,
- const TkTextIndex *index2Ptr);
MODULE_SCOPE int TkTextIndexBbox(TkText *textPtr,
const TkTextIndex *indexPtr, int *xPtr, int *yPtr,
int *widthPtr, int *heightPtr, int *charWidthPtr);
@@ -1040,8 +1029,6 @@ MODULE_SCOPE TkTextTag *TkTextCreateTag(TkText *textPtr,
MODULE_SCOPE void TkTextFreeDInfo(TkText *textPtr);
MODULE_SCOPE void TkTextDeleteTag(TkText *textPtr, TkTextTag *tagPtr);
MODULE_SCOPE void TkTextFreeTag(TkText *textPtr, TkTextTag *tagPtr);
-MODULE_SCOPE int TkTextGetIndex(Tcl_Interp *interp, TkText *textPtr,
- const char *string, TkTextIndex *indexPtr);
MODULE_SCOPE int TkTextGetObjIndex(Tcl_Interp *interp, TkText *textPtr,
Tcl_Obj *idxPtr, TkTextIndex *indexPtr);
MODULE_SCOPE int TkTextSharedGetObjIndex(Tcl_Interp *interp,
@@ -1053,9 +1040,6 @@ MODULE_SCOPE TkTextTabArray *TkTextGetTabs(Tcl_Interp *interp,
TkText *textPtr, Tcl_Obj *stringPtr);
MODULE_SCOPE void TkTextFindDisplayLineEnd(TkText *textPtr,
TkTextIndex *indexPtr, int end, int *xOffset);
-MODULE_SCOPE int TkTextIndexBackBytes(const TkText *textPtr,
- const TkTextIndex *srcPtr, int count,
- TkTextIndex *dstPtr);
MODULE_SCOPE void TkTextIndexBackChars(const TkText *textPtr,
const TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr, TkTextCountType type);
@@ -1065,9 +1049,6 @@ MODULE_SCOPE int TkTextIndexCount(const TkText *textPtr,
const TkTextIndex *index1Ptr,
const TkTextIndex *index2Ptr,
TkTextCountType type);
-MODULE_SCOPE int TkTextIndexForwBytes(const TkText *textPtr,
- const TkTextIndex *srcPtr, int count,
- TkTextIndex *dstPtr);
MODULE_SCOPE void TkTextIndexForwChars(const TkText *textPtr,
const TkTextIndex *srcPtr, int count,
TkTextIndex *dstPtr, TkTextCountType type);
@@ -1077,10 +1058,6 @@ MODULE_SCOPE int TkTextIndexYPixels(TkText *textPtr,
const TkTextIndex *indexPtr);
MODULE_SCOPE TkTextSegment *TkTextIndexToSeg(const TkTextIndex *indexPtr,
int *offsetPtr);
-MODULE_SCOPE void TkTextInsertDisplayProc(TkText *textPtr,
- TkTextDispChunk *chunkPtr, int x, int y,
- int height, int baseline, Display *display,
- Drawable dst, int screenY);
MODULE_SCOPE void TkTextLostSelection(ClientData clientData);
MODULE_SCOPE TkTextIndex *TkTextMakeCharIndex(TkTextBTree tree, TkText *textPtr,
int lineIndex, int charIndex,
@@ -1091,9 +1068,6 @@ MODULE_SCOPE void TkTextFreeElideInfo(TkTextElideInfo *infoPtr);
MODULE_SCOPE int TkTextIsElided(const TkText *textPtr,
const TkTextIndex *indexPtr,
TkTextElideInfo *infoPtr);
-MODULE_SCOPE TkTextIndex *TkTextMakeByteIndex(TkTextBTree tree,
- const TkText *textPtr, int lineIndex,
- int byteIndex, TkTextIndex *indexPtr);
MODULE_SCOPE int TkTextMakePixelIndex(TkText *textPtr,
int pixelIndex, TkTextIndex *indexPtr);
MODULE_SCOPE void TkTextInvalidateLineMetrics(
@@ -1114,8 +1088,6 @@ MODULE_SCOPE void TkTextEventuallyRepick(TkText *textPtr);
MODULE_SCOPE void TkTextPickCurrent(TkText *textPtr, XEvent *eventPtr);
MODULE_SCOPE void TkTextPixelIndex(TkText *textPtr, int x, int y,
TkTextIndex *indexPtr, int *nearest);
-MODULE_SCOPE int TkTextPrintIndex(const TkText *textPtr,
- const TkTextIndex *indexPtr, char *string);
MODULE_SCOPE Tcl_Obj * TkTextNewIndexObj(TkText *textPtr,
const TkTextIndex *indexPtr);
MODULE_SCOPE void TkTextRedrawRegion(TkText *textPtr, int x, int y,
@@ -1131,8 +1103,6 @@ MODULE_SCOPE int TkTextSeeCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
MODULE_SCOPE int TkTextSegToOffset(const TkTextSegment *segPtr,
const TkTextLine *linePtr);
-MODULE_SCOPE TkTextSegment *TkTextSetMark(TkText *textPtr,
- const char *name, TkTextIndex *indexPtr);
MODULE_SCOPE void TkTextSetYView(TkText *textPtr,
TkTextIndex *indexPtr, int pickPlace);
MODULE_SCOPE int TkTextTagCmd(TkText *textPtr, Tcl_Interp *interp,
@@ -1145,8 +1115,6 @@ MODULE_SCOPE int TkTextWindowCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
MODULE_SCOPE int TkTextWindowIndex(TkText *textPtr, const char *name,
TkTextIndex *indexPtr);
-MODULE_SCOPE int TkTextXviewCmd(TkText *textPtr, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
MODULE_SCOPE int TkTextYviewCmd(TkText *textPtr, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
MODULE_SCOPE void TkTextWinFreeClient(Tcl_HashEntry *hPtr,