\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 = NULL)
\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 or more device names as a character vector,
or \code{NULL} to give the existing list.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{X11} (Unix), \code{windows} (Windows) and \code{quartz}
(Mac OS X, on-screen types only) are regarded as interactive, together
with \code{JavaGD} (from the package of the same name) and
\code{CairoWin} and \code{CairoX11} (from package \pkg{Cairo}).
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 unless \code{name = NULL}.
\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}

