\HeaderA{dev.interactive}{Is the Current Graphics Device Interactive ?}{dev.interactive}
\aliasA{deviceIsInteractive}{dev.interactive}{deviceIsInteractive}
\keyword{device}{dev.interactive}
\begin{Description}\relax
Test if the current graphics device (or that which would be opened) is
interactive.
\end{Description}
\begin{Usage}
\begin{verbatim}
dev.interactive(orNone = FALSE)

deviceIsInteractive(name)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{orNone}] logical; if \code{TRUE}, the function also returns
\code{TRUE} when \code{\LinkA{.Device}{.Device} == "null device"} and
\code{\LinkA{getOption}{getOption}("device")} is among the known
interactive devices.
\item[\code{name}] one of more device names, as a character vector, or \code{NULL}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
There is a list of known interactive devices, and in
addition a current device is regarded as interactive if its
displaylist is enabled (see \code{\LinkA{dev.control}{dev.control}}).

The \code{X11} (Unix), \code{windows} (Windows) and \code{quartz}
(MacOS X) are regarded as interactive, together with \code{GTK}
(available in package \pkg{gtkDevice}) and \code{JavaGD} (from the
package of the same name).  Packages can add their devices to the list
by calling \code{deviceIsInteractive}.
\end{Details}
\begin{Value}
\code{dev.interactive()} returns a logical, \code{TRUE} if and only if an
interactive (screen) device is in use.

\code{deviceIsInteractive} returns the updated list of known
interactive devices, invisibly.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{Devices}{Devices}} for the available devices on your platform.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
dev.interactive()
print(deviceIsInteractive(NULL))
\end{ExampleCode}
\end{Examples}

