Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 18b54cd0250a7489168a038c67771391 > files > 72

evas-devel-1.0.1-1.fc16.i686.rpm

<html>
<head>
    <title>Evas: Top Level Functions</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" media="screen" href="e.css">
    <link rel="stylesheet" type="text/css" media="screen" 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>

    <div class="menu-container">
        <div class="menu">
            <ul>
	        <li class="current"><a href="http://web.enlightenment.org/p.php?p=docs">Docs</a></li>
                <li><a href="http://trac.enlightenment.org/e">Tracker</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=contact">Contact</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=support">Support</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=download">Download</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=about">About</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=news">News</a></li>
                <li><a href="http://www.enlightenment.org/">Home</a></li>
            </ul>
        </div>
    </div>

    <div class="doxytitle">
        Evas Documentation <small>at Thu Jul 14 2011</small>
    </div>

    <div class="menu-container">
        <div class="submenu">
            <ul class="current">
                <li><a href="todo.html">Todo</a></li>
                <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.7.4 -->
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Top Level Functions</div>  </div>
</div>
<div class="contents">

<p>Functions that affect Evas as a whole.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga7e59dbbc6b37d4ce63bea067851ceedd">evas_async_events_fd_get</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get evas' internal asynchronous events read file descriptor.  <a href="#ga7e59dbbc6b37d4ce63bea067851ceedd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga9f99c6cd0bf0621bdd61d1085999ef47">evas_async_events_process</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Trigger the processing of all events waiting on the file descriptor returned by <a class="el" href="group__Evas__Group.html#ga7e59dbbc6b37d4ce63bea067851ceedd" title="Get evas&#39; internal asynchronous events read file descriptor.">evas_async_events_fd_get()</a>.  <a href="#ga9f99c6cd0bf0621bdd61d1085999ef47"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI Eina_Bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga5c1059b55fbca7f55037c4ce52d5d6ca">evas_async_events_put</a> (const void *target, <a class="el" href="Evas_8h.html#a076b2a9b2de2b2144a4193b1d12ed448">Evas_Callback_Type</a> type, void *event_info, Evas_Async_Events_Put_Cb func)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert asynchronous events on the canvas.  <a href="#ga5c1059b55fbca7f55037c4ce52d5d6ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga939a904ec53bf80796a8ad763cbb4c3c">evas_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Evas.  <a href="#ga939a904ec53bf80796a8ad763cbb4c3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga3170193ec2e0ce4d7f0eb55de71060ed">evas_shutdown</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown Evas.  <a href="#ga3170193ec2e0ce4d7f0eb55de71060ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="Evas_8h.html#ae0181b78df8e248703a72a978d271208">Evas_Alloc_Error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Evas__Group.html#ga1c782b4511e3b8678a2166c651053ac9">evas_alloc_error</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return if any allocation errors have occurred during the prior function.  <a href="#ga1c782b4511e3b8678a2166c651053ac9"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Functions that affect Evas as a whole. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga1c782b4511e3b8678a2166c651053ac9"></a><!-- doxytag: member="main.c::evas_alloc_error" ref="ga1c782b4511e3b8678a2166c651053ac9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="Evas_8h.html#ae0181b78df8e248703a72a978d271208">Evas_Alloc_Error</a> evas_alloc_error </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return if any allocation errors have occurred during the prior function. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The allocation error flag</dd></dl>
<p>This function will return if any memory allocation errors occurred during, and what kind they were. The return value will be one of EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED with each meaning something different.</p>
<p>EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function worked as expected.</p>
<p>EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform its job and will have exited as cleanly as possible. The programmer should consider this as a sign of very low memory and should try and safely recover from the prior functions failure (or try free up memory elsewhere and try again after more memory is freed).</p>
<p>EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was recovered from by evas finding memory of its own it has allocated and freeing what it sees as not really usefully allocated memory. What is freed may vary. Evas may reduce the resolution of images, free cached images or fonts, trhow out pre-rendered data, reduce the complexity of change lists etc. Evas and the program will function as per normal after this, but this is a sign of low memory, and it is suggested that the program try and identify memory it doesn't need, and free it.</p>
<p>Example: </p>
<div class="fragment"><pre class="fragment"> <span class="keyword">extern</span> <a class="code" href="group__Evas__Object__Group.html#ga9e19e6dd1f517a0ba437c0114d3e7c97" title="An Evas Object handle.">Evas_Object</a> *object;
 <span class="keywordtype">void</span> callback (<span class="keywordtype">void</span> *data, <a class="code" href="group__Evas__Canvas.html#ga5ff87cc4ce6bc43e3b640a6d37f73043" title="An Evas canvas handle.">Evas</a> *e, <a class="code" href="group__Evas__Object__Group.html#ga9e19e6dd1f517a0ba437c0114d3e7c97" title="An Evas Object handle.">Evas_Object</a> *obj, <span class="keywordtype">void</span> *event_info);

 <a class="code" href="group__Evas__Object__Group__Events.html#ga0147a80fc21895dc40165f208ec8cf55" title="Add a callback function to an object.">evas_object_event_callback_add</a>(<span class="keywordtype">object</span>, <a class="code" href="Evas_8h.html#a99e208e463a20499aabe6faac8a8cb8aa9fa52651ccf7e47cd3b7785fc4cf393f" title="Mouse Button Down Event.">EVAS_CALLBACK_MOUSE_DOWN</a>, callback, NULL);
 <span class="keywordflow">if</span> (<a class="code" href="group__Evas__Group.html#ga1c782b4511e3b8678a2166c651053ac9" title="Return if any allocation errors have occurred during the prior function.">evas_alloc_error</a>() == <a class="code" href="Evas_8h.html#a1adf9f604f763f2a8db12a484ca199cbaba4052a7c95452ff5c6f2b615a655d8e" title="Allocation failed despite attempts to free up memory.">EVAS_ALLOC_ERROR_FATAL</a>)
   {
     fprintf(stderr, <span class="stringliteral">&quot;ERROR: Completely unable to attach callabck. Must\n&quot;</span>);
     fprintf(stderr, <span class="stringliteral">&quot;       destroy object now as it cannot be used.\n&quot;</span>);
     <a class="code" href="group__Evas__Object__Group__Basic.html#ga6d840e8d5670db3ae32e00c4ecbb6abd" title="Deletes the given evas object and frees its memory.">evas_object_del</a>(<span class="keywordtype">object</span>);
     <span class="keywordtype">object</span> = NULL;
     fprintf(stderr, <span class="stringliteral">&quot;WARNING: Memory is really low. Cleaning out RAM.\n&quot;</span>);
     my_memory_cleanup();
   }
 <span class="keywordflow">if</span> (<a class="code" href="group__Evas__Group.html#ga1c782b4511e3b8678a2166c651053ac9" title="Return if any allocation errors have occurred during the prior function.">evas_alloc_error</a>() == <a class="code" href="Evas_8h.html#a1adf9f604f763f2a8db12a484ca199cba5c6259613c3d063813f3b094f9d5bf8e" title="Allocation succeeded, but extra memory had to be found by freeing up speculative resources.">EVAS_ALLOC_ERROR_RECOVERED</a>)
   {
     fprintf(stderr, <span class="stringliteral">&quot;WARNING: Memory is really low. Cleaning out RAM.\n&quot;</span>);
     my_memory_cleanup();
   }
</pre></div> 
</div>
</div>
<a class="anchor" id="ga7e59dbbc6b37d4ce63bea067851ceedd"></a><!-- doxytag: member="evas_async_events.c::evas_async_events_fd_get" ref="ga7e59dbbc6b37d4ce63bea067851ceedd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int evas_async_events_fd_get </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get evas' internal asynchronous events read file descriptor. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The canvas' asynchronous events read file descriptor.</dd></dl>
<p>Evas' asynchronous events are meant to be dealt with internally, i. e., when building stuff to be glued together into the EFL infrastructure -- a module, for example. The context which demands its use is when calculations need to be done out of the main thread, asynchronously, and some action must be performed after that.</p>
<p>An example of actual use of this API is for image asynchronous preload inside evas. If the canvas was instantiated through ecore-evas usage, ecore itself will take care of calling those events' processing.</p>
<p>This function returns the read file descriptor where to get the asynchronous events of the canvas. Naturally, other mainloops, apart from ecore, may make use of it. </p>

</div>
</div>
<a class="anchor" id="ga9f99c6cd0bf0621bdd61d1085999ef47"></a><!-- doxytag: member="evas_async_events.c::evas_async_events_process" ref="ga9f99c6cd0bf0621bdd61d1085999ef47" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int evas_async_events_process </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Trigger the processing of all events waiting on the file descriptor returned by <a class="el" href="group__Evas__Group.html#ga7e59dbbc6b37d4ce63bea067851ceedd" title="Get evas&#39; internal asynchronous events read file descriptor.">evas_async_events_fd_get()</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of events processed.</dd></dl>
<p>All asynchronous events queued up by <a class="el" href="group__Evas__Group.html#ga5c1059b55fbca7f55037c4ce52d5d6ca" title="Insert asynchronous events on the canvas.">evas_async_events_put()</a> are processed here. More precisely, the callback functions, informed together with other event parameters, when queued, get called (with those parameters), in that order. </p>

</div>
</div>
<a class="anchor" id="ga5c1059b55fbca7f55037c4ce52d5d6ca"></a><!-- doxytag: member="evas_async_events.c::evas_async_events_put" ref="ga5c1059b55fbca7f55037c4ce52d5d6ca" args="(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI Eina_Bool evas_async_events_put </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="Evas_8h.html#a076b2a9b2de2b2144a4193b1d12ed448">Evas_Callback_Type</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>event_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Evas_Async_Events_Put_Cb&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert asynchronous events on the canvas. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">target</td><td>The target to be affected by the events. </td></tr>
    <tr><td class="paramname">type</td><td>The type of callback function. </td></tr>
    <tr><td class="paramname">event_info</td><td>Information about the event. </td></tr>
    <tr><td class="paramname">func</td><td>The callback function pointer.</td></tr>
  </table>
  </dd>
</dl>
<p>This is the way, for a routine running outside evas' main thread, to report an asynchronous event. A callback function is informed, whose call is to happen after <a class="el" href="group__Evas__Group.html#ga9f99c6cd0bf0621bdd61d1085999ef47" title="Trigger the processing of all events waiting on the file descriptor returned by evas_async_events_fd_...">evas_async_events_process()</a> is called. </p>

</div>
</div>
<a class="anchor" id="ga939a904ec53bf80796a8ad763cbb4c3c"></a><!-- doxytag: member="evas_main.c::evas_init" ref="ga939a904ec53bf80796a8ad763cbb4c3c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int evas_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize Evas. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The init counter value.</dd></dl>
<p>This function initialize evas, increments a counter of the number of calls to this function and returns this value.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Evas__Group.html#ga3170193ec2e0ce4d7f0eb55de71060ed" title="Shutdown Evas.">evas_shutdown()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3170193ec2e0ce4d7f0eb55de71060ed"></a><!-- doxytag: member="evas_main.c::evas_shutdown" ref="ga3170193ec2e0ce4d7f0eb55de71060ed" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int evas_shutdown </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shutdown Evas. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The init counter value.</dd></dl>
<p>This function finalize evas, decrements the counter of the number of calls to the function <a class="el" href="group__Evas__Group.html#ga939a904ec53bf80796a8ad763cbb4c3c" title="Initialize Evas.">evas_init()</a> and returns this value.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Evas__Group.html#ga939a904ec53bf80796a8ad763cbb4c3c" title="Initialize Evas.">evas_init()</a>. </dd></dl>

</div>
</div>
</div>
 
 <div id="push"></div>
 </div> <!-- #content -->
  </div> <!-- .layout -->
 
 </div> <!-- #container -->
 
 
  <div id="footer">
    <table><tr>
      <td class="poweredby"><img src="doxygen.png"></td>
      <td class="copyright">Copyright &copy;2011 Enlightenment</td>
      <td class="generated">Docs generated Thu Jul 14 2011 20:45:33</td>
    </tr></table>
  </div>


</body>
</html>