summaryrefslogtreecommitdiffstats
path: root/doc/tk.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tk.n')
-rw-r--r--doc/tk.n42
1 files changed, 31 insertions, 11 deletions
diff --git a/doc/tk.n b/doc/tk.n
index 6e807e6..377aa91 100644
--- a/doc/tk.n
+++ b/doc/tk.n
@@ -26,13 +26,17 @@ The command can take any of a number of different forms
depending on the \fIoption\fR argument. The legal forms are:
.TP
\fBtk appname \fR?\fInewName\fR?
-If \fInewName\fR isn't specified, this command returns the name
+.
+If \fInewName\fR is not specified, this command returns the name
of the application (the name that may be used in \fBsend\fR
commands to communicate with the application).
If \fInewName\fR is specified, then the name of the application
is changed to \fInewName\fR.
If the given name is already in use, then a suffix of the form
-``\fB #2\fR'' or ``\fB #3\fR'' is appended in order to make the name unique.
+.QW "\fB #2\fR"
+or
+.QW "\fB #3\fR"
+is appended in order to make the name unique.
The command's result is the name actually chosen.
\fInewName\fR should not start with a capital letter.
This will interfere with option processing, since names starting with
@@ -41,7 +45,6 @@ be able to find some options for the application.
If sends have been disabled by deleting the \fBsend\fR command,
this command will reenable them and recreate the \fBsend\fR
command.
-.VS 8.4
.TP
\fBtk caret window \fR?\fB\-x \fIx\fR? ?\fB\-y \fIy\fR? ?\fB\-height \fIheight\fR?
.
@@ -54,7 +57,6 @@ the last values used for setting the caret are return in option-value pair
format. \fI\-x\fR and \fI\-y\fR represent window-relative coordinates, and
\fI\-height\fR is the height of the current cursor location, or the height
of the specified \fIwindow\fR if none is given.
-.VE
.TP
\fBtk scaling \fR?\fB\-displayof \fIwindow\fR? ?\fInumber\fR?
.
@@ -66,7 +68,9 @@ omitted, it defaults to the main window. If the \fInumber\fR argument is
omitted, the current value of the scaling factor is returned.
.RS
.PP
-A ``point'' is a unit of measurement equal to 1/72 inch. A scaling factor
+A
+.QW point
+is a unit of measurement equal to 1/72 inch. A scaling factor
of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard
72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point,
which is the setting for a 90 dpi monitor; setting the scaling factor to
@@ -78,25 +82,41 @@ after the scaling factor is changed will use the new scaling factor, but it
is undefined whether existing widgets will resize themselves dynamically to
accommodate the new scaling factor.
.RE
-.VS 8.3
+.TP
+\fBtk inactive \fR?\fB\-displayof \fIwindow\fR? ?\fBreset\fR?
+.
+Returns a positive integer, the number of milliseconds since the last
+time the user interacted with the system. If the \fB\-displayof\fR
+option is given then the return value refers to the display of
+\fIwindow\fR; otherwise it refers to the display of the application's
+main window.
+.RS
+.PP
+\fBtk inactive\fR will return \-1, if querying the user inactive time
+is not supported by the system, and in safe interpreters.
+.PP
+If the literal string \fBreset\fR is given as an additional argument,
+the timer is reset and an empty string is returned. Resetting the
+inactivity time is forbidden in safe interpreters and will throw and
+error if tried.
+.RE
.TP
\fBtk useinputmethods \fR?\fB\-displayof \fIwindow\fR? ?\fIboolean\fR?
.
Sets and queries the state of whether Tk should use XIM (X Input Methods)
for filtering events. The resulting state is returned. XIM is used in
-some locales (ie: Japanese, Korean), to handle special input devices. This
+some locales (i.e., Japanese, Korean), to handle special input devices. This
feature is only significant on X. If XIM support is not available, this
will always return 0. If the \fIwindow\fR argument is omitted, it defaults
to the main window. If the \fIboolean\fR argument is omitted, the current
state is returned. This is turned on by default for the main display.
-.VE
-.VS 8.4
.TP
\fBtk windowingsystem\fR
.
Returns the current Tk windowing system, one of
\fBx11\fR (X11-based), \fBwin32\fR (MS Windows),
-\fBclassic\fR (Mac OS Classic), or \fBaqua\fR (Mac OS X Aqua).
-.VE
+or \fBaqua\fR (Mac OS X Aqua).
+.SH "SEE ALSO"
+send(n), winfo(n)
.SH KEYWORDS
application name, send