xenocara/xserver/hw/dmx/doc/html/dmxcommon_8h-source.html

152 lines
13 KiB
HTML
Raw Normal View History

2006-11-26 11:13:41 -07:00
<!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>dmxcommon.h</h1><a href="dmxcommon_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/* $XFree86$ */</span>
00002 <span class="comment">/*</span>
00003 <span class="comment"> * Copyright 2002,2003 Red Hat Inc., Durham, North Carolina.</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * All Rights Reserved.</span>
00006 <span class="comment"> *</span>
00007 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span>
00008 <span class="comment"> * a copy of this software and associated documentation files (the</span>
00009 <span class="comment"> * "Software"), to deal in the Software without restriction, including</span>
00010 <span class="comment"> * without limitation on the rights to use, copy, modify, merge,</span>
00011 <span class="comment"> * publish, distribute, sublicense, and/or sell copies of the Software,</span>
00012 <span class="comment"> * and to permit persons to whom the Software is furnished to do so,</span>
00013 <span class="comment"> * subject to the following conditions:</span>
00014 <span class="comment"> *</span>
00015 <span class="comment"> * The above copyright notice and this permission notice (including the</span>
00016 <span class="comment"> * next paragraph) shall be included in all copies or substantial</span>
00017 <span class="comment"> * portions of the Software.</span>
00018 <span class="comment"> *</span>
00019 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
00020 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
00021 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
00022 <span class="comment"> * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS</span>
00023 <span class="comment"> * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</span>
00024 <span class="comment"> * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span>
00025 <span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
00026 <span class="comment"> * SOFTWARE.</span>
00027 <span class="comment"> */</span>
00028
00029 <span class="comment">/*</span>
00030 <span class="comment"> * Authors:</span>
00031 <span class="comment"> * Rickard E. (Rik) Faith &lt;faith@redhat.com&gt;</span>
00032 <span class="comment"> *</span>
00033 <span class="comment"> */</span>
00034
00039 <span class="preprocessor">#ifndef _DMXCOMMON_H_</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#define _DMXCOMMON_H_</span>
00041 <span class="preprocessor"></span>
00042 <span class="preprocessor">#define DMX_COMMON_OTHER \</span>
00043 <span class="preprocessor"> Display *display; \</span>
00044 <span class="preprocessor"> Window window; \</span>
00045 <span class="preprocessor"> DMXScreenInfo *be; \</span>
00046 <span class="preprocessor"> DMXLocalInputInfoPtr dmxLocal; \</span>
00047 <span class="preprocessor"> int initPointerX; \</span>
00048 <span class="preprocessor"> int initPointerY; \</span>
00049 <span class="preprocessor"> long eventMask; \</span>
00050 <span class="preprocessor"> KeybdCtrl kctrl; \</span>
00051 <span class="preprocessor"> PtrCtrl mctrl; \</span>
00052 <span class="preprocessor"> int kctrlset; \</span>
00053 <span class="preprocessor"> int mctrlset; \</span>
00054 <span class="preprocessor"> KeybdCtrl savedKctrl; \</span>
00055 <span class="preprocessor"> XModifierKeymap *savedModMap; \</span>
00056 <span class="preprocessor"> int stateSaved</span>
00057 <span class="preprocessor"></span>
00058 <span class="preprocessor">#ifdef XKB</span>
00059 <span class="preprocessor"></span><span class="preprocessor">#define DMX_COMMON_XKB \</span>
00060 <span class="preprocessor"> DMX_COMMON_OTHER; \</span>
00061 <span class="preprocessor"> XkbDescPtr xkb; \</span>
00062 <span class="preprocessor"> XkbIndicatorRec savedIndicators</span>
00063 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00064 <span class="preprocessor"></span><span class="preprocessor">#define DMX_COMMON_XKB DMX_COMMON_OTHER</span>
00065 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00066 <span class="preprocessor"></span>
00067 <span class="preprocessor">#ifdef XINPUT</span>
00068 <span class="preprocessor"></span><span class="preprocessor">#define DMX_COMMON_PRIVATE \</span>
00069 <span class="preprocessor"> DMX_COMMON_XKB; \</span>
00070 <span class="preprocessor"> XDevice *xi</span>
00071 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00072 <span class="preprocessor"></span><span class="preprocessor">#define DMX_COMMON_PRIVATE DMX_COMMON_OTHER</span>
00073 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00074 <span class="preprocessor"></span>
00075 <span class="preprocessor">#define GETONLYPRIVFROMPRIVATE \</span>
00076 <span class="preprocessor"> myPrivate *priv = private</span>
00077 <span class="preprocessor"></span>
00078 <span class="preprocessor">#define GETPRIVFROMPRIVATE \</span>
00079 <span class="preprocessor"> GETONLYPRIVFROMPRIVATE; \</span>
00080 <span class="preprocessor"> DMXInputInfo *dmxInput = &amp;dmxInputs[priv-&gt;dmxLocal-&gt;inputIdx]</span>
00081 <span class="preprocessor"></span>
00082 <span class="preprocessor">#define GETDMXLOCALFROMPDEVICE \</span>
00083 <span class="preprocessor"> DevicePtr pDev = &amp;pDevice-&gt;public; \</span>
00084 <span class="preprocessor"> DMXLocalInputInfoPtr dmxLocal = pDev-&gt;devicePrivate</span>
00085 <span class="preprocessor"></span>
00086 <span class="preprocessor">#define GETDMXINPUTFROMPRIV \</span>
00087 <span class="preprocessor"> DMXInputInfo *dmxInput = &amp;dmxInputs[priv-&gt;dmxLocal-&gt;inputIdx]</span>
00088 <span class="preprocessor"></span>
00089 <span class="preprocessor">#define GETDMXINPUTFROMPDEVICE \</span>
00090 <span class="preprocessor"> GETDMXLOCALFROMPDEVICE; \</span>
00091 <span class="preprocessor"> DMXInputInfo *dmxInput = &amp;dmxInputs[dmxLocal-&gt;inputIdx]</span>
00092 <span class="preprocessor"></span>
00093 <span class="preprocessor">#define GETDMXLOCALFROMPDEV \</span>
00094 <span class="preprocessor"> DMXLocalInputInfoPtr dmxLocal = pDev-&gt;devicePrivate</span>
00095 <span class="preprocessor"></span>
00096 <span class="preprocessor">#define GETDMXINPUTFROMPDEV \</span>
00097 <span class="preprocessor"> GETDMXLOCALFROMPDEV; \</span>
00098 <span class="preprocessor"> DMXInputInfo *dmxInput = &amp;dmxInputs[dmxLocal-&gt;inputIdx]</span>
00099 <span class="preprocessor"></span>
00100 <span class="preprocessor">#define GETPRIVFROMPDEV \</span>
00101 <span class="preprocessor"> GETDMXLOCALFROMPDEV; \</span>
00102 <span class="preprocessor"> myPrivate *priv = dmxLocal-&gt;private</span>
00103 <span class="preprocessor"></span>
00104 <span class="preprocessor">#define DMX_KEYBOARD_EVENT_MASK \</span>
00105 <span class="preprocessor"> (KeyPressMask | KeyReleaseMask | KeymapStateMask)</span>
00106 <span class="preprocessor"></span>
00107 <span class="preprocessor">#define DMX_POINTER_EVENT_MASK \</span>
00108 <span class="preprocessor"> (ButtonPressMask | ButtonReleaseMask | PointerMotionMask)</span>
00109 <span class="preprocessor"></span>
00110 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a13">dmxCommonKbdGetInfo</a>(DevicePtr pDev, <a class="code" href="struct__DMXLocalInitInfo.html">DMXLocalInitInfoPtr</a> info);
00111 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a12">dmxCommonKbdGetMap</a>(DevicePtr pDev,
00112 KeySymsPtr pKeySyms, CARD8 *pModMap);
00113 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a9">dmxCommonKbdCtrl</a>(DevicePtr pDev, KeybdCtrl *ctrl);
00114 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a11">dmxCommonKbdBell</a>(DevicePtr pDev, <span class="keywordtype">int</span> percent,
00115 <span class="keywordtype">int</span> volume, <span class="keywordtype">int</span> pitch, <span class="keywordtype">int</span> duration);
00116 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="dmxcommon_8c.html#a14">dmxCommonKbdOn</a>(DevicePtr pDev);
00117 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a15">dmxCommonKbdOff</a>(DevicePtr pDev);
00118 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a19">dmxCommonMouGetMap</a>(DevicePtr pDev,
00119 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *map, <span class="keywordtype">int</span> *nButtons);
00120 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a10">dmxCommonMouCtrl</a>(DevicePtr pDev, PtrCtrl *ctrl);
00121 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="dmxcommon_8c.html#a23">dmxCommonMouOn</a>(DevicePtr pDev);
00122 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a24">dmxCommonMouOff</a>(DevicePtr pDev);
00123 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="dmxcommon_8c.html#a25">dmxFindPointerScreen</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);
00124
00125 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="dmxcommon_8c.html#a16">dmxCommonOthOn</a>(DevicePtr pDev);
00126 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a17">dmxCommonOthOff</a>(DevicePtr pDev);
00127 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a18">dmxCommonOthGetInfo</a>(DevicePtr pDev, <a class="code" href="struct__DMXLocalInitInfo.html">DMXLocalInitInfoPtr</a> info);
00128
00129 <span class="comment">/* helper functions */</span>
00130 <span class="keyword">extern</span> pointer <a class="code" href="dmxcommon_8c.html#a26">dmxCommonCopyPrivate</a>(DeviceIntPtr pDevice);
00131 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a27">dmxCommonSaveState</a>(pointer <span class="keyword">private</span>);
00132 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="dmxcommon_8c.html#a28">dmxCommonRestoreState</a>(pointer <span class="keyword">private</span>);
00133 <span class="preprocessor">#endif</span>
</pre></div> <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>