<html> <head><title>ClanLib Reference: CL_InputDevice</title></head> <body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0> <table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr> <tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table> <table align=center border=0 cellspacing=10> <tr> <td><a href="entire_class_index.html">Entire Class Index</a></td> <td><a href="class_index.html">Main Class Index</a></td> <td><a href="cross_index.html">Cross Index</a></td> <td><a href="global_index.html">Global Index</a></td> </table><h1 align=center>Class CL_InputDevice</h1><p> <b> Input device interface.</b><br> Contained in: <a href="global_index.html">global</a><br> Derived from: <i>none</i> <br> Derived by: <a href="CL_Keyboard.html">CL_Keyboard</a> <a href="CL_Mouse.html">CL_Mouse</a> <br>Group: Display (Input) <p> #include <ClanLib/display.h> <p> <hr noshade> <table border=0> <tr><td colspan=3><h3>public function member index:</h3></td> <tr valign=top><td align=left><h3>Construction:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_InputDevice.html#2016"><tt><font color=blue><b>~CL_InputDevice</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=left><h3>Attributes:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>char</font></tt>*</tt> </td><td align=right><a href="CL_InputDevice.html#2017"><tt><font color=blue><b>get_name</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>InputDeviceType</font></tt></tt> </td><td align=right><a href="CL_InputDevice.html#2018"><tt><font color=blue><b>get_type</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_InputDevice.html#2019"><tt><font color=blue><b>get_num_buttons</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_InputButton.html"><tt><font color=navy><b>CL_InputButton</b></font></tt></a>*</tt> </td><td align=right><a href="CL_InputDevice.html#2020"><tt><font color=blue><b>get_button</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>button_num</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_InputDevice.html#2021"><tt><font color=blue><b>get_num_axes</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_InputAxis.html"><tt><font color=navy><b>CL_InputAxis</b></font></tt></a>*</tt> </td><td align=right><a href="CL_InputDevice.html#2022"><tt><font color=blue><b>get_axis</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>axis_num</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_InputDevice.html#2023"><tt><font color=blue><b>get_num_hats</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_InputHat.html"><tt><font color=navy><b>CL_InputHat</b></font></tt></a>*</tt> </td><td align=right><a href="CL_InputDevice.html#2024"><tt><font color=blue><b>get_hat</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>hat_num</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_InputDevice.html#2025"><tt><font color=blue><b>get_num_cursors</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_InputCursor.html"><tt><font color=navy><b>CL_InputCursor</b></font></tt></a>*</tt> </td><td align=right><a href="CL_InputDevice.html#2026"><tt><font color=blue><b>get_cursor</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>cursor_num</font></tt>)</tt>;</td> <tr><td> </td></table> <hr noshade> <h2>Description:</h2> Class interface representing an input device, such as a keyboard, mouse, joystick, gamepad or digitizer.<br><p> <hr noshade> <h2>Function Member Descriptions:</h2> <a name="2022"><font size=+1><b>CL_InputDevice::get_axis</b></font></a> - Returns a input axis interface used to access the specified axis number. <br> NULL is returned if axis doesn't exist.<br><tt><tt>virtual</tt> <a href="CL_InputAxis.html"><tt><font color=navy><b>CL_InputAxis</b></font></tt></a>*</tt> <a href="CL_InputDevice.html#2022"><tt><font color=blue><b>get_axis</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>axis_num</font></tt>)</tt>;<br><blockquote> axis_num - Number of the axis to be returned.<br> Returns - Pointer to axis requested (or NULL if none).</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2020"><font size=+1><b>CL_InputDevice::get_button</b></font></a> - Returns a input button interface used to access the specified button number. <br> NULL is returned if button doesn't exist.<br><tt><tt>virtual</tt> <a href="CL_InputButton.html"><tt><font color=navy><b>CL_InputButton</b></font></tt></a>*</tt> <a href="CL_InputDevice.html#2020"><tt><font color=blue><b>get_button</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>button_num</font></tt>)</tt>;<br><blockquote> button_num - Number of the button to be returned.<br> Returns - Pointer to the button requested (or NULL if none).</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2026"><font size=+1><b>CL_InputDevice::get_cursor</b></font></a> - Returns a input cursor interface used to access the specified cursor number. NULL is returned if the cursor doesn't exist.<br><tt><tt>virtual</tt> <a href="CL_InputCursor.html"><tt><font color=navy><b>CL_InputCursor</b></font></tt></a>*</tt> <a href="CL_InputDevice.html#2026"><tt><font color=blue><b>get_cursor</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>cursor_num</font></tt>)</tt>;<br><blockquote> cursor_num - Number of the cursor to be returned.<br> Returns - Pointer to cursor requested (or NULL if none).</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2024"><font size=+1><b>CL_InputDevice::get_hat</b></font></a> - Returns a input hat interface used to access the specified hat number. <br> NULL is returned if the hat doesn't exist.<br><tt><tt>virtual</tt> <a href="CL_InputHat.html"><tt><font color=navy><b>CL_InputHat</b></font></tt></a>*</tt> <a href="CL_InputDevice.html#2024"><tt><font color=blue><b>get_hat</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>hat_num</font></tt>)</tt>;<br><blockquote> hat_num - Number of the hat to be returned.<br> Returns - Pointer to input hat requested (or NULL if none).</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2017"><font size=+1><b>CL_InputDevice::get_name</b></font></a> - Returns the name of the input device.<br><tt><tt>virtual</tt> <tt><font color=purple>char</font></tt>*</tt> <a href="CL_InputDevice.html#2017"><tt><font color=blue><b>get_name</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - Name of the device.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2021"><font size=+1><b>CL_InputDevice::get_num_axes</b></font></a> - Returns the number of axes on this device.<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_InputDevice.html#2021"><tt><font color=blue><b>get_num_axes</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - Number of axes available.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2019"><font size=+1><b>CL_InputDevice::get_num_buttons</b></font></a> - Returns the number of buttons on this device.<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_InputDevice.html#2019"><tt><font color=blue><b>get_num_buttons</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - Return the number of buttons available.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2025"><font size=+1><b>CL_InputDevice::get_num_cursors</b></font></a> - Returns the number of input cursors available on this device.<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_InputDevice.html#2025"><tt><font color=blue><b>get_num_cursors</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - Number of cursors available.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2023"><font size=+1><b>CL_InputDevice::get_num_hats</b></font></a> - Returns the number of hats available on this device.<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_InputDevice.html#2023"><tt><font color=blue><b>get_num_hats</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - Number of input hats available.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2018"><font size=+1><b>CL_InputDevice::get_type</b></font></a> - Return the type of the inputdevice.<br><tt><tt>virtual</tt> <tt><font color=navy>InputDeviceType</font></tt></tt> <a href="CL_InputDevice.html#2018"><tt><font color=blue><b>get_type</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="2016"><font size=+1><b>CL_InputDevice::~CL_InputDevice</b></font></a> - Input Device Destructor<br><tt><tt>virtual</tt> </tt> <a href="CL_InputDevice.html#2016"><tt><font color=blue><b>~CL_InputDevice</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <hr noshade> </body> </html>