Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 48aebc76604d00e261fd2a64f42d7eb8 > files > 63

liblomoco-devel-1.0-9mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <title>lomoco: lomoco/lomoco.h Source File</title>

<style type="text/css">
  .cp-doNotDisplay { display: none; }
  @media aural, braille, handheld, tty { .cp-doNotDisplay { display: inline; speak: normal; }}
  .cp-edit { text-align: right; }
  @media print, embossed { .cp-edit { display: none; }}
</style>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />
  <link rel="stylesheet" type="text/css" href="doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" href="csync.css" />
  <link rel="stylesheet" media="print, embossed" type="text/css" href="print.css" />
</head>

<body>

<ul class="cp-doNotDisplay">
  <li><a href="#cp-content" accesskey="2">Skip to content</a></li>
  <li><a href="#cp-menu" accesskey="5">Skip to link menu</a></li>
</ul>

<div id="container">
<div id="header">
  <div id="header_top"><div><div style="padding: 10px 30px;">
  <!-- <img alt ="" src="top-kde.jpg"/> -->
    csync API Reference  </div></div></div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li><a href="index.html">csync</a></li>
      </ul>
    </div>

    <div id="menu">
<ul><li><a href="http://www.csync.org/">Sitemap</a></li>
<li><a href="http://www.csync.org/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>
<!-- End page header -->
    <div id="body_wrapper">
      <div id="body">
        <!-- begin main content -->
        <div id="right">
          <div class="content">
          <div id="main">
            <div class="clearer">&nbsp;</div>
    <!-- <h2><a name="content"></a>lomoco</h2> -->

<!-- BC -->
<!-- Generated by Doxygen 1.5.9 -->
  <div class="navpath"><a class="el" href="dir_77ee8add767687b3d3811ff476d1a4f3.html">lomoco</a>
  </div>
<div class="contents">
<h1>lomoco.h</h1><a href="lomoco_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * lomoco - Logitech Mouse Control for Linux</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2007 by Andreas Schneider &lt;mail@cynapses.org&gt;</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the GNU General Public License</span>
<a name="l00008"></a>00008 <span class="comment"> * as published by the Free Software Foundation; either version 2</span>
<a name="l00009"></a>00009 <span class="comment"> * of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with this program; if not, write to the Free Software Foundation,</span>
<a name="l00018"></a>00018 <span class="comment"> * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * vim: ts=2 sw=2 et cindent</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef _LOMOCO_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define _LOMOCO_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00026"></a>00026 <span class="comment">/**</span>
<a name="l00027"></a>00027 <span class="comment"> * @struct lomoco_device_s</span>
<a name="l00028"></a>00028 <span class="comment"> *</span>
<a name="l00029"></a>00029 <span class="comment"> * Used to store all needed information of a lomoco device</span>
<a name="l00030"></a>00030 <span class="comment"> */</span>
<a name="l00031"></a>00031 <span class="comment"></span>
<a name="l00032"></a>00032 <span class="comment">/**</span>
<a name="l00033"></a>00033 <span class="comment"> * @typedef logitech_device_t</span>
<a name="l00034"></a>00034 <span class="comment"> * Creates a type name for logitech_device_s</span>
<a name="l00035"></a>00035 <span class="comment"> */</span>
<a name="l00036"></a><a class="code" href="structlomoco__device__s.html">00036</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structlomoco__device__s.html" title="Used to store all needed information of a lomoco device.">lomoco_device_s</a> {
<a name="l00037"></a><a class="code" href="structlomoco__device__s.html#222903c0e07fb58108303a38efd78113">00037</a>   <span class="keywordtype">char</span> *<a class="code" href="structlomoco__device__s.html#222903c0e07fb58108303a38efd78113">name</a>;
<a name="l00038"></a><a class="code" href="structlomoco__device__s.html#e81d08cce42002a48be18a26e216990f">00038</a>   <span class="keywordtype">int</span> <a class="code" href="structlomoco__device__s.html#e81d08cce42002a48be18a26e216990f">vid</a>;
<a name="l00039"></a><a class="code" href="structlomoco__device__s.html#5059bf83425a54d08fe10f398ef6fb8e">00039</a>   <span class="keywordtype">int</span> <a class="code" href="structlomoco__device__s.html#5059bf83425a54d08fe10f398ef6fb8e">pid</a>;
<a name="l00040"></a>00040 } <a class="code" href="structlomoco__device__s.html" title="Used to store all needed information of a lomoco device.">lomoco_device_t</a>;
<a name="l00041"></a>00041 <span class="comment"></span>
<a name="l00042"></a>00042 <span class="comment">/**</span>
<a name="l00043"></a>00043 <span class="comment"> * @struct lomoco_base_s</span>
<a name="l00044"></a>00044 <span class="comment"> *</span>
<a name="l00045"></a>00045 <span class="comment"> * Used to store all needed information for lomoco</span>
<a name="l00046"></a>00046 <span class="comment"> */</span>
<a name="l00047"></a>00047 <span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">/**</span>
<a name="l00049"></a>00049 <span class="comment"> * @typedef logitech_base_t</span>
<a name="l00050"></a>00050 <span class="comment"> * Creates a type name for logitech_base_s</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a><a class="code" href="structlomoco__base__s.html">00052</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structlomoco__base__s.html" title="Used to store all needed information for lomoco.">lomoco_base_s</a> {<span class="comment"></span>
<a name="l00053"></a>00053 <span class="comment">  /** List of Logitech Corded Mice */</span>
<a name="l00054"></a><a class="code" href="structlomoco__base__s.html#088b397ef0708c43719887ab13ec304f">00054</a>   <span class="keyword">struct </span><a class="code" href="structlomoco__list__s.html" title="Used for each element in a doubly-linked list.">lomoco_list_s</a> *<a class="code" href="structlomoco__base__s.html#088b397ef0708c43719887ab13ec304f" title="List of Logitech Corded Mice.">logitech_mice_corded</a>;<span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">  /** List of Logitech Cordless Mice */</span>
<a name="l00056"></a><a class="code" href="structlomoco__base__s.html#5cd707aedbd998098976f3dcd49be0f3">00056</a>   <span class="keyword">struct </span><a class="code" href="structlomoco__list__s.html" title="Used for each element in a doubly-linked list.">lomoco_list_s</a> *<a class="code" href="structlomoco__base__s.html#5cd707aedbd998098976f3dcd49be0f3" title="List of Logitech Cordless Mice.">logitech_mice_cordless</a>;<span class="comment"></span>
<a name="l00057"></a>00057 <span class="comment">  /** List of Logitech receivers */</span>
<a name="l00058"></a><a class="code" href="structlomoco__base__s.html#ef3d7addca59ebceb81630a0b270f68b">00058</a>   <span class="keyword">struct </span><a class="code" href="structlomoco__list__s.html" title="Used for each element in a doubly-linked list.">lomoco_list_s</a> *<a class="code" href="structlomoco__base__s.html#ef3d7addca59ebceb81630a0b270f68b" title="List of Logitech receivers.">logitech_receiver</a>;<span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">  /** Logitech vendor id */</span>
<a name="l00060"></a><a class="code" href="structlomoco__base__s.html#047fe157ca556da4c54ff57525175494">00060</a>   <span class="keywordtype">int</span> <a class="code" href="structlomoco__base__s.html#047fe157ca556da4c54ff57525175494" title="Logitech vendor id.">logitech_vid</a>;
<a name="l00061"></a>00061 
<a name="l00062"></a><a class="code" href="structlomoco__base__s.html#85b40289cb3776a8f0a9804e215c7845">00062</a>   <span class="keywordtype">int</span> <a class="code" href="structlomoco__base__s.html#85b40289cb3776a8f0a9804e215c7845">err_mask</a>;
<a name="l00063"></a>00063 } <a class="code" href="structlomoco__base__s.html" title="Used to store all needed information for lomoco.">lomoco_base_t</a>;
<a name="l00064"></a>00064 
<a name="l00065"></a><a class="code" href="lomoco_8h.html#ee48fb6347bfbfaf86412befb6bc729e">00065</a> <span class="keyword">typedef</span> int (*<a class="code" href="lomoco_8h.html#ee48fb6347bfbfaf86412befb6bc729e">lomoco_device_func</a>) (<a class="code" href="structlomoco__device__s.html" title="Used to store all needed information of a lomoco device.">lomoco_device_t</a> *device);
<a name="l00066"></a>00066 <span class="comment"></span>
<a name="l00067"></a>00067 <span class="comment">/**</span>
<a name="l00068"></a>00068 <span class="comment"> * @brief Initializes all needed structures and reads the config file.</span>
<a name="l00069"></a>00069 <span class="comment"> *</span>
<a name="l00070"></a>00070 <span class="comment"> * This function has to be called before you can use any other function. It</span>
<a name="l00071"></a>00071 <span class="comment"> * reads the config file, allocates the base structure and add all information.</span>
<a name="l00072"></a>00072 <span class="comment"> *</span>
<a name="l00073"></a>00073 <span class="comment"> * @param debug_level  Set the debug level of lomoco</span>
<a name="l00074"></a>00074 <span class="comment"> *</span>
<a name="l00075"></a>00075 <span class="comment"> * @return  Returns the initialized base structure</span>
<a name="l00076"></a>00076 <span class="comment"> */</span>
<a name="l00077"></a>00077 <a class="code" href="structlomoco__base__s.html" title="Used to store all needed information for lomoco.">lomoco_base_t</a> *<a class="code" href="lomoco_8h.html#9425f7da0a89da665a00bb3d6c6fc36e" title="Initializes all needed structures and reads the config file.">lomoco_init</a>(<span class="keywordtype">int</span> debug_level);
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">/**</span>
<a name="l00081"></a>00081 <span class="comment"> * @brief Get all attached supported devices by lomoco.</span>
<a name="l00082"></a>00082 <span class="comment"> *</span>
<a name="l00083"></a>00083 <span class="comment"> * This function will search for all attached and supported devices. It will</span>
<a name="l00084"></a>00084 <span class="comment"> * call a callback function on every found device.</span>
<a name="l00085"></a>00085 <span class="comment"> *</span>
<a name="l00086"></a>00086 <span class="comment"> * @param base  The initialized base structure.</span>
<a name="l00087"></a>00087 <span class="comment"> * @param fn  The callback function called on every device found.</span>
<a name="l00088"></a>00088 <span class="comment"> * </span>
<a name="l00089"></a>00089 <span class="comment"> * @return 1 on success, 0 if no device has been found and -1 on an error.</span>
<a name="l00090"></a>00090 <span class="comment"> */</span>
<a name="l00091"></a>00091 <span class="keywordtype">int</span> <a class="code" href="lomoco_8h.html#475c7d201c06f17f24b3ae87397f71df" title="Get all attached supported devices by lomoco.">lomoco_get_devices</a>(<a class="code" href="structlomoco__base__s.html" title="Used to store all needed information for lomoco.">lomoco_base_t</a> *base, <a class="code" href="lomoco_8h.html#ee48fb6347bfbfaf86412befb6bc729e">lomoco_device_func</a> fn);
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <span class="comment"></span>
<a name="l00094"></a>00094 <span class="comment">/**</span>
<a name="l00095"></a>00095 <span class="comment"> * @brief Frees the allocated memory of the base structure.</span>
<a name="l00096"></a>00096 <span class="comment"> *</span>
<a name="l00097"></a>00097 <span class="comment"> * Frees all lists and allocated memory. This function should be called before</span>
<a name="l00098"></a>00098 <span class="comment"> * you exit.</span>
<a name="l00099"></a>00099 <span class="comment"> *</span>
<a name="l00100"></a>00100 <span class="comment"> * @param base  The initialized base structure.</span>
<a name="l00101"></a>00101 <span class="comment"> */</span>
<a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="lomoco_8h.html#5e8c28bb9f4cd7edb4cdc917ebd96e65" title="Frees the allocated memory of the base structure.">lomoco_finish</a>(<a class="code" href="structlomoco__base__s.html" title="Used to store all needed information for lomoco.">lomoco_base_t</a> *base);
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 <span class="preprocessor">#endif </span><span class="comment">/* _LOMOCO_H */</span>
<a name="l00105"></a>00105 
</pre></div></div>
            </div>
          </div>
        </div>
        <div id="left">
          <div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">lomoco</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "lomoco"</a>
</div></div>
<!-- menu -->

<div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">API Documentation</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "@topname@"</a>
</div></div>
<div class="nav_list">
<ul>
<!-- gmenu -->
</ul></div></div>

          </div>
        </div>
        <div class="clearer"></div>
      </div>
      <div class="clearer"></div>
    </div>


    <div id="end_body"></div>

    <div id="footer"><div id="footer_text">
    Generated with <a href="http://www.stack.nl/~dimitri/doxygen/" target="_blank">Doxygen</a>
    </div></div>
  </div>

</body>
</html>