xenocara/xserver/hw/dmx/doc/html/lnx-keyboard_8h.html
2006-11-26 18:13:41 +00:00

389 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>File Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.3.4 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>lnx-keyboard.h File Reference</h1>
<p>
<a href="lnx-keyboard_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>pointer&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a0">kbdLinuxCreatePrivate</a> (DeviceIntPtr pKeyboard)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a1">kbdLinuxDestroyPrivate</a> (pointer private)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a2">kbdLinuxInit</a> (DevicePtr pDev)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a3">kbdLinuxGetInfo</a> (DevicePtr pDev, <a class="el" href="struct__DMXLocalInitInfo.html">DMXLocalInitInfoPtr</a> info)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a4">kbdLinuxOn</a> (DevicePtr pDev)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a5">kbdLinuxOff</a> (DevicePtr pDev)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a6">kbdLinuxVTPreSwitch</a> (pointer p)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a7">kbdLinuxVTPostSwitch</a> (pointer p)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a10">kbdLinuxCtrl</a> (DevicePtr pDev, KeybdCtrl *ctrl)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="lnx-keyboard_8h.html#a11">kbdLinuxBell</a> (DevicePtr pDev, int percent, int volume, int pitch, int duration)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface to Linux keyboard driver. <dl compact><dt><b>See also:</b></dt><dd>lnx-keyboard.c</dd></dl>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a11" doxytag="lnx-keyboard.h::kbdLinuxBell" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxBell </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname" nowrap> <em>pDev</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>percent</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>volume</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>pitch</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>duration</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Ring the bell.<p>
Note: we completely ignore the <em>volume</em>, since Linux's ioctl() interface does not provide a way to control it. If it did, the XBell manpage tells how the actual volume is a function of the percent and the (base) volume.<p>
Note that most of the other PC-based bell drivers compute the duration for KDMKTONE as a function of the volume and the duration. For some drivers, the duration is only measured in mS if the volume is 50, and is scaled by the volume for other values. This seems confusing and possibly incorrect (the xset man page says that the bell will be "as closely as it can to the user's specifications" -- if we ignore the volume and set the duration correctly, then we'll get one parameter "wrong" -- but if we use the volume to scale the duration, then we'll get both parameters "wrong"). </td>
</tr>
</table>
<a class="anchor" name="a0" doxytag="lnx-keyboard.h::kbdLinuxCreatePrivate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> pointer kbdLinuxCreatePrivate </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DeviceIntPtr&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>pKeyboard</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Create a private structure for use within this file. </td>
</tr>
</table>
<a class="anchor" name="a10" doxytag="lnx-keyboard.h::kbdLinuxCtrl" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxCtrl </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname" nowrap> <em>pDev</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>KeybdCtrl *&nbsp;</td>
<td class="mdname" nowrap> <em>ctrl</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the LEDs. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="lnx-keyboard.h::kbdLinuxDestroyPrivate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxDestroyPrivate </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">pointer&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>priv</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destroy a private structure. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="lnx-keyboard.h::kbdLinuxGetInfo" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxGetInfo </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname" nowrap> <em>pDev</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="struct__DMXLocalInitInfo.html">DMXLocalInitInfoPtr</a>&nbsp;</td>
<td class="mdname" nowrap> <em>info</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Fill the <em>info</em> structure with information needed to initialize <em>pDev</em>. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="lnx-keyboard.h::kbdLinuxInit" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxInit </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>pDev</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Initialize the <em>pDev</em> as a Linux keyboard. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="lnx-keyboard.h::kbdLinuxOff" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxOff </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>pDev</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Turn <em>pDev</em> off (i.e., stop taking input from <em>pDev</em>). </td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="lnx-keyboard.h::kbdLinuxOn" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int kbdLinuxOn </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">DevicePtr&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>pDev</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Turn <em>pDev</em> on (i.e., take input from <em>pDev</em>). </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="lnx-keyboard.h::kbdLinuxVTPostSwitch" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxVTPostSwitch </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">pointer&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>p</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Currently unused hook called after returning from a VT switch. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="lnx-keyboard.h::kbdLinuxVTPreSwitch" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void kbdLinuxVTPreSwitch </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">pointer&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>p</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Currently unused hook called prior to an VT switch. </td>
</tr>
</table>
<hr>
<address>
<small>
Generated June 29, 2004 for <a
href="http://dmx.sourceforge.net">Distributed Multihead X</a> by
<a href="http://www.doxygen.org/index.html">doxygen</a>
1.3.4.
</small>
</addres>
</hr>
</body>
</html>