\hypertarget{class_qore_1_1_term_i_o_s}{}\section{Qore\+:\+:Term\+I\+OS Class Reference}
\label{class_qore_1_1_term_i_o_s}\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}


This class allows Qore scripts to get or set terminal settings on U\+N\+IX platforms.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}{constructor}} ()
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object with random contents. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}{copy}} ()
\begin{DoxyCompactList}\small\item\em Returns a copy of the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}{get\+CC}} (softint cc)
\begin{DoxyCompactList}\small\item\em Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}{get\+C\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}{get\+I\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}{get\+L\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}{get\+O\+Flag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}{is\+Equal}} (Termios termios)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}{set\+CC}} (softint offset, softint value)
\begin{DoxyCompactList}\small\item\em Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}{set\+C\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}{set\+I\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}{set\+L\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}{set\+O\+Flag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}{get\+Window\+Size}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class allows Qore scripts to get or set terminal settings on U\+N\+IX platforms. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
On platforms without \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} support (such as Windows), none of the methods in this class are available; to write a portable program, check the \mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}} constant at runtime before using this functionality.

This class contains the data structure used to read and set terminal attributes on terminal I/O constants (\mbox{\hyperlink{group__io__constants_ga0cfa7aea34f3c921036623600e42b21f}{stdin}}, \mbox{\hyperlink{group__io__constants_ga44ab38fe66ed7aa87731a2de976017c6}{stdout}}, \mbox{\hyperlink{group__io__constants_ga697e4968984d273562f14bfed155b4a8}{stderr}}).

This class is used with \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}}, \mbox{\hyperlink{class_qore_1_1_file_aa1d7a62aa8f383cad5b8bdee78c350dd}{File\+::set\+Terminal\+Attributes()}}, and the terminal I/O constants to manipulate terminal attributes.

For example, here is some code to set terminal attributes, read in a character from standard input with a timeout, and reset the terminal attributes\+: 
\begin{DoxyCode}
TermIOS t();
stdin.getTerminalAttributes(t);
TermIOS orig = t.copy();
on\_exit
    stdin.setTerminalAttributes(TCSADRAIN, orig);

int lflag = t.getLFlag();
lflag &= ~ICANON;
lflag &= ~ECHO;
lflag &= ~ISIG;
t.setLFlag(lflag);
t.setCC(VMIN, 1);
t.setCC(VTIME, 0);
stdin.setTerminalAttributes(TCSADRAIN, t);

stdout.printf(\textcolor{stringliteral}{"Press any key: "});
\textcolor{keywordflow}{while} (!stdin.isDataAvailable(20ms)) \{
    stdout.printf(\textcolor{stringliteral}{"."});
    stdout.sync();
    \mbox{\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep}}(1ms);
\}
string c = stdin.read(1);
stdout.printf(\textcolor{stringliteral}{" GOT ASCII 0x%02x (%d) '%s'\(\backslash\)n"}, \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord}}(c), \mbox{\hyperlink{group__string__functions_gab1aedfc4b3b7aed6dffead7e46c72b07}{ord}}(c), c);
\end{DoxyCode}


For more information on terminal attributes, see your system\textquotesingle{}s manual pages for \char`\"{}termios\char`\"{}.

\begin{DoxyNote}{Note}
This class is not available with the \mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}} parse option. 
\end{DoxyNote}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}\label{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Term\+I\+O\+S\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object with random contents. 

Use \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}} with a terminal I/O constant to initialize the object with terminal settings

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TermIOS termios();
stdin.getTerminalAttributes(termios);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}\label{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!copy@{copy}}
\index{copy@{copy}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Term\+I\+O\+S\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a copy of the object. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
TermIOS t2 = t.copy();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}\label{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+CC@{get\+CC}}
\index{get\+CC@{get\+CC}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+C\+C()}{getCC()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+CC (\begin{DoxyParamCaption}\item[{softint}]{cc }\end{DoxyParamCaption})}



Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. 


\begin{DoxyParams}{Parameters}
{\em cc} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}} for the character to retrieve\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# get minimum characters to return on a read}
int vmin = t.getCC(VMIN);
\textcolor{comment}{# get character input timer in 0.1 second increments}
int vtime = t.getCC(VTIME);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em T\+E\+R\+M\+I\+O\+S-\/\+C\+C-\/\+E\+R\+R\+OR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}\label{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+C\+Flag@{get\+C\+Flag}}
\index{get\+C\+Flag@{get\+C\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+C\+Flag()}{getCFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+C\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int flag = termios.getCFlag();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}\label{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+I\+Flag@{get\+I\+Flag}}
\index{get\+I\+Flag@{get\+I\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+I\+Flag()}{getIFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+I\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int flag = termios.getIFlag();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}\label{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+L\+Flag@{get\+L\+Flag}}
\index{get\+L\+Flag@{get\+L\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+L\+Flag()}{getLFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+L\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int flag = termios.getLFlag();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}\label{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+O\+Flag@{get\+O\+Flag}}
\index{get\+O\+Flag@{get\+O\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+O\+Flag()}{getOFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+I\+O\+S\+::get\+O\+Flag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int flag = termios.getOFlag();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}\label{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!get\+Window\+Size@{get\+Window\+Size}}
\index{get\+Window\+Size@{get\+Window\+Size}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{get\+Window\+Size()}{getWindowSize()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} Qore\+::\+Term\+I\+O\+S\+::get\+Window\+Size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. 

\begin{DoxyReturn}{Returns}
a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+T\+E\+R\+M\+I\+N\+A\+L\+\_\+\+IO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}
hash wh = termios.\+get\+Window\+Size(); 
\begin{DoxyCode}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}\label{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!is\+Equal@{is\+Equal}}
\index{is\+Equal@{is\+Equal}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{is\+Equal()}{isEqual()}}
{\footnotesize\ttfamily bool Qore\+::\+Term\+I\+O\+S\+::is\+Equal (\begin{DoxyParamCaption}\item[{Termios}]{termios }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+I\+OS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = termios.isEqual(termios2);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}\label{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!set\+CC@{set\+CC}}
\index{set\+CC@{set\+CC}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{set\+C\+C()}{setCC()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+CC (\begin{DoxyParamCaption}\item[{softint}]{offset,  }\item[{softint}]{value }\end{DoxyParamCaption})}



Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. 


\begin{DoxyParams}{Parameters}
{\em offset} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} to set \\
\hline
{\em value} & the value to set for the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{comment}{# set minimum characters to return on a read}
t.setCC(VMIN, 1);

\textcolor{comment}{# set character input timer in 0.1 second increments (= no timer)}
t.setCC(VTIME, 0);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em T\+E\+R\+M\+I\+O\+S-\/\+C\+C-\/\+E\+R\+R\+OR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}\label{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!set\+C\+Flag@{set\+C\+Flag}}
\index{set\+C\+Flag@{set\+C\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{set\+C\+Flag()}{setCFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+C\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the control mode (see \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int cflag = termios.getCFlag();
cflag = (cflag & ~CSIZE) | CS8 | CSTOPB;
cflag = (cflag | CLOCAL | CREAD) & ~CRTSCTS;
termios.setCFlag(cflag);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}\label{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!set\+I\+Flag@{set\+I\+Flag}}
\index{set\+I\+Flag@{set\+I\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{set\+I\+Flag()}{setIFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+I\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int iflag = termios.getIFlag();
\textcolor{comment}{# ring bell on input queue full}
iflag |= IMAXBEL;
termios.setIFlag(iflag);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}\label{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!set\+L\+Flag@{set\+L\+Flag}}
\index{set\+L\+Flag@{set\+L\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{set\+L\+Flag()}{setLFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+L\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the local mode (see \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int lflag = termios.getLFlag();
\textcolor{comment}{# disable canonical input mode (= turn on "raw" mode)}
lflag &= ~ICANON;
\textcolor{comment}{# turn off echo mode}
lflag &= ~ECHO;
\textcolor{comment}{# do not check for special input characters (INTR, QUIT, and SUSP)}
lflag &= ~ISIG;
termios.setLFlag(lflag);
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}\label{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}} 
\index{Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}!set\+O\+Flag@{set\+O\+Flag}}
\index{set\+O\+Flag@{set\+O\+Flag}!Qore\+::\+Term\+I\+OS@{Qore\+::\+Term\+I\+OS}}
\subsubsection{\texorpdfstring{set\+O\+Flag()}{setOFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+I\+O\+S\+::set\+O\+Flag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the output mode (see \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+T\+E\+R\+M\+I\+OS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int oflag = termios.getOFlag();
\textcolor{comment}{# translate linefeeds to crlf}
oflag |= ONLCR;
termios.setOFlag(oflag);
\end{DoxyCode}
 
\end{DoxyParagraph}
