Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5a48463e56bd4803e99af0ff1341e8fe > files > 154

ecore-devel-0.9.9.49898-1.fc14.i686.rpm

<html>
<head>
    <title>Ecore: Idle Handlers</title>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <meta name="author" content="Andres Blanc" >
    
    <link rel="icon" href="img/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
    <link rel="icon" href="img/favicon.png" type="image/ico">
    <link rel="shortcut icon" href="img/favicon.png" type="image/ico">

    <link rel="stylesheet" type="text/css" href="e.css">
    <link rel="stylesheet" type="text/css" href="edoxy.css">
</head>

<body>

<div id="container">

<div id="header">
<div class="layout">
    
    <h1><span>Enlightenment</span></h1>
    <h2><span>Beauty at your fingertips</span></h2>

    <table cellspacing="0" cellpadding="0" width="100%"><tr>
      <td id="header_logo">
        <a href="http://www.enlightenment.org"></a>
      </td>
      <td id="header_menu">
        <table cellspacing="0" cellpadding="0" align="right"><tr>
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=home">Home</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=news">News</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=about">About</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=download">Download</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=support">Support</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=contact">Contact</a></td> 
          <td class="nav_passive"><a class="nav_passive" href="http://trac.enlightenment.org/e">Tracker</a></td>
          <td class="nav_passive"><a class="nav_passive" href="http://www.enlightenment.org/p.php?p=docs">Docs</a></td> 
        </tr></table>          
      </td>
      <td id="header_last"></td>
    </tr></table>

    <div class="doxytitle">
        Ecore Documentation <small>at 2 Jul 2010</small>
    </div>

    <div class="menu-container">
        <div class="submenu">
            <ul class="current">
                <li><a href="files.html">Files</a></li>
                <li><a href="annotated.html">Data Structures</a></li>
                <li><a href="globals.html">Globals</a></li>
                <li><a href="modules.html">Modules</a></li>
                <li><a href="pages.html">Related Pages</a></li>
	        <li class="current"><a  href="index.html">Main Page</a></li>
            </ul>
        </div>
    </div>


    <div class="clear"></div>
</div>
</div>

<div id="content">
<div class="layout">
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="contents">
<h1>Idle Handlers</h1>
<p>Callbacks that are called when the program enters or exits an idle state.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#gaa890c94e129ef330b4cd814f3a800225">ecore_idle_enterer_add</a> (Eina_Bool(*func)(void *data), const void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an idle enterer handler.  <a href="#gaa890c94e129ef330b4cd814f3a800225"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#gae346c666804c3d63e523eb44c7a6f1ad">ecore_idle_enterer_before_add</a> (Eina_Bool(*func)(void *data), const void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an idle enterer handler at the start of the list so it gets called earlier than others.  <a href="#gae346c666804c3d63e523eb44c7a6f1ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#ga27c437b6e8838785aff5df4861ae7649">ecore_idle_enterer_del</a> (<a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a> *idle_enterer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete an idle enterer callback.  <a href="#ga27c437b6e8838785aff5df4861ae7649"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#abc1923e21a85882731a2c3be7ba3cb94">Ecore_Idle_Exiter</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#gaf54a4f6f1e71ed43b5b0d1b6c57d6fdd">ecore_idle_exiter_add</a> (Eina_Bool(*func)(void *data), const void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an idle exiter handler.  <a href="#gaf54a4f6f1e71ed43b5b0d1b6c57d6fdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#gaee428c5d4cfe03779cb19e44acb11823">ecore_idle_exiter_del</a> (<a class="el" href="Ecore_8h.html#abc1923e21a85882731a2c3be7ba3cb94">Ecore_Idle_Exiter</a> *idle_exiter)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete an idle exiter handler from the list to be run on exiting idle state.  <a href="#gaee428c5d4cfe03779cb19e44acb11823"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Ecore_8h.html#afa631f9b2ed1c20c44e8fc32fcaa2492">Ecore_Idler</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#ga44727d1ba1ea8a656b8ba51f3ac7c588">ecore_idler_add</a> (Eina_Bool(*func)(void *data), const void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an idler handler.  <a href="#ga44727d1ba1ea8a656b8ba51f3ac7c588"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Idle__Group.html#ga280c1e88b0af4e829b4c543d51d14d7b">ecore_idler_del</a> (<a class="el" href="Ecore_8h.html#afa631f9b2ed1c20c44e8fc32fcaa2492">Ecore_Idler</a> *idler)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete an idler callback from the list to be executed.  <a href="#ga280c1e88b0af4e829b4c543d51d14d7b"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Callbacks that are called when the program enters or exits an idle state. </p>
<p>The ecore main loop enters an idle state when it is waiting for timers to time out, data to come in on a file descriptor or any other event to occur. You can set callbacks to be called when the main loop enters an idle state, during an idle state or just after the program wakes up.</p>
<p>Enterer callbacks are good for updating your program's state, if it has a state engine. Once all of the enterer handlers are called, the program will enter a "sleeping" state.</p>
<p>Idler callbacks are called when the main loop has called all enterer handlers. They are useful for interfaces that require polling and timers would be too slow to use.</p>
<p>If no idler callbacks are specified, then the process literally goes to sleep. Otherwise, the idler callbacks are called continuously while the loop is "idle", using as much CPU as is available to the process.</p>
<p>Exiter callbacks are called when the main loop wakes up from an idle state. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa890c94e129ef330b4cd814f3a800225"></a><!-- doxytag: member="ecore_idle_enterer.c::ecore_idle_enterer_add" ref="gaa890c94e129ef330b4cd814f3a800225" args="(Eina_Bool(*func)(void *data), const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a>* ecore_idle_enterer_add </td>
          <td>(</td>
          <td class="paramtype">Eina_Bool(*)(void *data)&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an idle enterer handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>The function to call when entering an idle state. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to be passed to the <code>func</code> call </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A handle to the idle enterer callback if successful. Otherwise, NULL is returned. </dd></dl>

<p>Referenced by <a class="el" href="ecore__evas_8c_source.html#l00198">ecore_evas_init()</a>.</p>

</div>
</div>
<a class="anchor" id="gae346c666804c3d63e523eb44c7a6f1ad"></a><!-- doxytag: member="ecore_idle_enterer.c::ecore_idle_enterer_before_add" ref="gae346c666804c3d63e523eb44c7a6f1ad" args="(Eina_Bool(*func)(void *data), const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a>* ecore_idle_enterer_before_add </td>
          <td>(</td>
          <td class="paramtype">Eina_Bool(*)(void *data)&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an idle enterer handler at the start of the list so it gets called earlier than others. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>The function to call when entering an idle state. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to be passed to the <code>func</code> call </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A handle to the idle enterer callback if successful. Otherwise, NULL is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="ga27c437b6e8838785aff5df4861ae7649"></a><!-- doxytag: member="ecore_idle_enterer.c::ecore_idle_enterer_del" ref="ga27c437b6e8838785aff5df4861ae7649" args="(Ecore_Idle_Enterer *idle_enterer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI void* ecore_idle_enterer_del </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Ecore_8h.html#a3e47441188c0658f929e83696ec1ab78">Ecore_Idle_Enterer</a> *&nbsp;</td>
          <td class="paramname"> <em>idle_enterer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete an idle enterer callback. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>idle_enterer</em>&nbsp;</td><td>The idle enterer to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The data pointer passed to the idler enterer callback on success. NULL otherwise. </dd></dl>

<p>Referenced by <a class="el" href="ecore__evas_8c_source.html#l00247">ecore_evas_shutdown()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf54a4f6f1e71ed43b5b0d1b6c57d6fdd"></a><!-- doxytag: member="ecore_idle_exiter.c::ecore_idle_exiter_add" ref="gaf54a4f6f1e71ed43b5b0d1b6c57d6fdd" args="(Eina_Bool(*func)(void *data), const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="Ecore_8h.html#abc1923e21a85882731a2c3be7ba3cb94">Ecore_Idle_Exiter</a>* ecore_idle_exiter_add </td>
          <td>(</td>
          <td class="paramtype">Eina_Bool(*)(void *data)&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an idle exiter handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>The function to call when exiting an idle state. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to be passed to the <code>func</code> call </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A handle to the idle exiter callback on success. NULL otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="gaee428c5d4cfe03779cb19e44acb11823"></a><!-- doxytag: member="ecore_idle_exiter.c::ecore_idle_exiter_del" ref="gaee428c5d4cfe03779cb19e44acb11823" args="(Ecore_Idle_Exiter *idle_exiter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI void* ecore_idle_exiter_del </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Ecore_8h.html#abc1923e21a85882731a2c3be7ba3cb94">Ecore_Idle_Exiter</a> *&nbsp;</td>
          <td class="paramname"> <em>idle_exiter</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete an idle exiter handler from the list to be run on exiting idle state. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>idle_exiter</em>&nbsp;</td><td>The idle exiter to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The data pointer that was being being passed to the handler if successful. NULL otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="ga44727d1ba1ea8a656b8ba51f3ac7c588"></a><!-- doxytag: member="ecore_idler.c::ecore_idler_add" ref="ga44727d1ba1ea8a656b8ba51f3ac7c588" args="(Eina_Bool(*func)(void *data), const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="Ecore_8h.html#afa631f9b2ed1c20c44e8fc32fcaa2492">Ecore_Idler</a>* ecore_idler_add </td>
          <td>(</td>
          <td class="paramtype">Eina_Bool(*)(void *data)&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add an idler handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>The function to call when idling. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to be passed to this <code>func</code> call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A idler handle if successfully added. NULL otherwise.</dd></dl>
<p>Add an idler handle to the event loop, returning a handle on success and NULL otherwise. The function <code>func</code> will be called repeatedly while no other events are ready to be processed, as long as it returns 1 (or ECORE_CALLBACK_RENEW). A return of 0 (or ECORE_CALLBACK_CANCEL) deletes the idler.</p>
<p>Idlers are useful for progressively prossessing data without blocking. </p>

</div>
</div>
<a class="anchor" id="ga280c1e88b0af4e829b4c543d51d14d7b"></a><!-- doxytag: member="ecore_idler.c::ecore_idler_del" ref="ga280c1e88b0af4e829b4c543d51d14d7b" args="(Ecore_Idler *idler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI void* ecore_idler_del </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Ecore_8h.html#afa631f9b2ed1c20c44e8fc32fcaa2492">Ecore_Idler</a> *&nbsp;</td>
          <td class="paramname"> <em>idler</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete an idler callback from the list to be executed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>idler</em>&nbsp;</td><td>The handle of the idler callback to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The data pointer passed to the idler callback on success. NULL otherwise. </dd></dl>

<p>Referenced by <a class="el" href="ecore__con__url_8c_source.html#l00190">ecore_con_url_shutdown()</a>.</p>

</div>
</div>
</div>
 
 <div id="push"></div>
 </div> <!-- #content -->
  </div> <!-- .layout -->
 
 </div> <!-- #container -->
 
 
  <div id="footer">
    <table><tr>
      <td class="copyright">Copyright &copy;2010 Enlightenment</td>
      <td class="generated">Docs generated Fri Jul 2 12:11:49 2010</td>
    </tr></table>
  </div>


</body>
</html>