\hypertarget{control_8c}{
\section{control.c File Reference}
\label{control_8c}\index{control.c@{control.c}}
}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{control_8c_ef9ce0749995832bd9b6aa3394c41807}{CHECK\_\-CTRL}(NAME, BIT)
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef SceCtrlData \hyperlink{control_8c_eb715486ced7b17db9b965de24d8d5c2}{Controls}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void \hyperlink{control_8c_2bbdb5889f9970384417aee432b533b8}{initController} ()
\item 
void \hyperlink{control_8c_148a95d0036b591afdedce1a0b19219c}{readButtons} (SceCtrlData $\ast$pad\_\-data, int count)
\item 
\hyperlink{control_8c_87f536f5536022f7b254cb7e3f7a7470}{UserdataStubs} (\hyperlink{control_8c_eb715486ced7b17db9b965de24d8d5c2}{Controls}, \hyperlink{control_8c_eb715486ced7b17db9b965de24d8d5c2}{Controls})
\item 
static int \hyperlink{control_8c_dc6e34870407e02876b9b0a97e6a5d08}{Controls\_\-read} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{control_8c_ca014e5638b3b61eebc278acabc24966}{Controls\_\-buttons} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{control_8c_dc89dc51e45196edee45659aa9205e4b}{Controls\_\-analogX} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{control_8c_623c476cc3b411d859eff154b88cfce0}{Controls\_\-analogY} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{control_8c_eaf29975a3062bfa7e721cd4ebe1e0da}{Controls\_\-equal} (lua\_\-State $\ast$L)
\item 
static int \hyperlink{control_8c_b026f7f5d5750ccfdaa47ec2aa849540}{Controls\_\-wlan} (lua\_\-State $\ast$L)
\item 
\hyperlink{control_8c_a1c2d58ca13f0920bdcdf85c15958613}{UserdataRegister} (\hyperlink{control_8c_eb715486ced7b17db9b965de24d8d5c2}{Controls}, \hyperlink{control_8c_5233262bad19be7b09de256edd401705}{Controls\_\-methods}, \hyperlink{control_8c_4f014aebddee23e701ae5f4c92d2ce1f}{Controls\_\-meta})
\item 
void \hyperlink{control_8c_40b44de3dc0be7a8f2f231f5ec15f7fe}{control\_\-init} (lua\_\-State $\ast$L)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static const luaL\_\-reg \hyperlink{control_8c_5233262bad19be7b09de256edd401705}{Controls\_\-methods} \mbox{[}$\,$\mbox{]}
\item 
static const luaL\_\-reg \hyperlink{control_8c_4f014aebddee23e701ae5f4c92d2ce1f}{Controls\_\-meta} \mbox{[}$\,$\mbox{]}
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{control_8c_ef9ce0749995832bd9b6aa3394c41807}{
\index{control.c@{control.c}!CHECK\_\-CTRL@{CHECK\_\-CTRL}}
\index{CHECK\_\-CTRL@{CHECK\_\-CTRL}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define CHECK\_\-CTRL(NAME, \/  BIT)}}
\label{control_8c_ef9ce0749995832bd9b6aa3394c41807}


\textbf{Value:}

\begin{Code}\begin{verbatim}static int NAME(lua_State *L) \
{ \
        Controls *a = toControls(L, 1);\
        lua_pushboolean(L, (a->Buttons & BIT) == BIT); \
        return 1; \
}
\end{verbatim}
\end{Code}


\subsection{Typedef Documentation}
\hypertarget{control_8c_eb715486ced7b17db9b965de24d8d5c2}{
\index{control.c@{control.c}!Controls@{Controls}}
\index{Controls@{Controls}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef SceCtrlData {\bf Controls}}}
\label{control_8c_eb715486ced7b17db9b965de24d8d5c2}




\subsection{Function Documentation}
\hypertarget{control_8c_40b44de3dc0be7a8f2f231f5ec15f7fe}{
\index{control.c@{control.c}!control\_\-init@{control\_\-init}}
\index{control\_\-init@{control\_\-init}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void control\_\-init (lua\_\-State $\ast$ {\em L})}}
\label{control_8c_40b44de3dc0be7a8f2f231f5ec15f7fe}


\hypertarget{control_8c_dc89dc51e45196edee45659aa9205e4b}{
\index{control.c@{control.c}!Controls\_\-analogX@{Controls\_\-analogX}}
\index{Controls\_\-analogX@{Controls\_\-analogX}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-analogX (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_dc89dc51e45196edee45659aa9205e4b}


\hypertarget{control_8c_623c476cc3b411d859eff154b88cfce0}{
\index{control.c@{control.c}!Controls\_\-analogY@{Controls\_\-analogY}}
\index{Controls\_\-analogY@{Controls\_\-analogY}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-analogY (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_623c476cc3b411d859eff154b88cfce0}


\hypertarget{control_8c_ca014e5638b3b61eebc278acabc24966}{
\index{control.c@{control.c}!Controls\_\-buttons@{Controls\_\-buttons}}
\index{Controls\_\-buttons@{Controls\_\-buttons}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-buttons (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_ca014e5638b3b61eebc278acabc24966}


\hypertarget{control_8c_eaf29975a3062bfa7e721cd4ebe1e0da}{
\index{control.c@{control.c}!Controls\_\-equal@{Controls\_\-equal}}
\index{Controls\_\-equal@{Controls\_\-equal}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-equal (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_eaf29975a3062bfa7e721cd4ebe1e0da}


\hypertarget{control_8c_dc6e34870407e02876b9b0a97e6a5d08}{
\index{control.c@{control.c}!Controls\_\-read@{Controls\_\-read}}
\index{Controls\_\-read@{Controls\_\-read}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-read (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_dc6e34870407e02876b9b0a97e6a5d08}


\hypertarget{control_8c_b026f7f5d5750ccfdaa47ec2aa849540}{
\index{control.c@{control.c}!Controls\_\-wlan@{Controls\_\-wlan}}
\index{Controls\_\-wlan@{Controls\_\-wlan}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int Controls\_\-wlan (lua\_\-State $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_b026f7f5d5750ccfdaa47ec2aa849540}


\hypertarget{control_8c_2bbdb5889f9970384417aee432b533b8}{
\index{control.c@{control.c}!initController@{initController}}
\index{initController@{initController}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void initController ()\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_2bbdb5889f9970384417aee432b533b8}


\hypertarget{control_8c_148a95d0036b591afdedce1a0b19219c}{
\index{control.c@{control.c}!readButtons@{readButtons}}
\index{readButtons@{readButtons}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void readButtons (SceCtrlData $\ast$ {\em pad\_\-data}, \/  int {\em count})}}
\label{control_8c_148a95d0036b591afdedce1a0b19219c}


\hypertarget{control_8c_a1c2d58ca13f0920bdcdf85c15958613}{
\index{control.c@{control.c}!UserdataRegister@{UserdataRegister}}
\index{UserdataRegister@{UserdataRegister}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}UserdataRegister ({\bf Controls}, \/  {\bf Controls\_\-methods}, \/  {\bf Controls\_\-meta})}}
\label{control_8c_a1c2d58ca13f0920bdcdf85c15958613}


\hypertarget{control_8c_87f536f5536022f7b254cb7e3f7a7470}{
\index{control.c@{control.c}!UserdataStubs@{UserdataStubs}}
\index{UserdataStubs@{UserdataStubs}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}UserdataStubs ({\bf Controls}, \/  {\bf Controls})}}
\label{control_8c_87f536f5536022f7b254cb7e3f7a7470}




\subsection{Variable Documentation}
\hypertarget{control_8c_4f014aebddee23e701ae5f4c92d2ce1f}{
\index{control.c@{control.c}!Controls\_\-meta@{Controls\_\-meta}}
\index{Controls\_\-meta@{Controls\_\-meta}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const luaL\_\-reg {\bf Controls\_\-meta}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_4f014aebddee23e701ae5f4c92d2ce1f}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
  {"__tostring", Controls_tostring},
  {"__eq", Controls_equal},
  {0, 0}
}
\end{verbatim}
\end{Code}
\hypertarget{control_8c_5233262bad19be7b09de256edd401705}{
\index{control.c@{control.c}!Controls\_\-methods@{Controls\_\-methods}}
\index{Controls\_\-methods@{Controls\_\-methods}!control.c@{control.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const luaL\_\-reg {\bf Controls\_\-methods}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{control_8c_5233262bad19be7b09de256edd401705}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
        {"read", Controls_read},
        {"select", Controls_select },
        {"start", Controls_start },
        {"up", Controls_up },
        {"right", Controls_right },
        {"down", Controls_down },
        {"left", Controls_left },
        {"l", Controls_l },
        {"r", Controls_r },
        {"triangle", Controls_triangle },
        {"circle", Controls_circle },
        {"cross", Controls_cross },
        {"square", Controls_square },
        {"home", Controls_home },
        {"hold", Controls_hold },
        {"note", Controls_note },
        {"volup", Controls_volup },
        {"voldown", Controls_voldown },
        {"screen", Controls_screen },
        {"analogX", Controls_analogX},
        {"analogY", Controls_analogY},
        {"buttons", Controls_buttons },
        {"wlan", Controls_wlan },
  {0, 0}
}
\end{verbatim}
\end{Code}
