summaryrefslogtreecommitdiffstats
path: root/generic/tkTextPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextPriv.h')
-rw-r--r--generic/tkTextPriv.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/generic/tkTextPriv.h b/generic/tkTextPriv.h
index bfb63f1..d7e0e2d 100644
--- a/generic/tkTextPriv.h
+++ b/generic/tkTextPriv.h
@@ -55,6 +55,31 @@ MODULE_SCOPE bool TkpTextGetIndex(Tcl_Interp *interp, TkSharedText *sharedTextPt
/*
*----------------------------------------------------------------------
*
+ * TkTextIsMark --
+ *
+ * Test whether this is a mark.
+ *
+ * Results:
+ * Whether this is a mark.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+inline
+bool
+TkTextIsMark(
+ const TkTextSegment *segPtr)
+{
+ assert(segPtr);
+ return segPtr->typePtr == &tkTextLeftMarkType || segPtr->typePtr == &tkTextRightMarkType;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TkTextIsSpecialMark --
*
* Test whether this is a special mark: "insert", or "current".