Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 2a9a0500ba8dfb95025148f22d49b751 > files > 62

lib64caca-devel-0.99-0.beta18.13.mga6.x86_64.rpm

<!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>libcaca documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
<!-- Generated by Doxygen 1.8.11 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">libcaca canvas frame handling</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7dca169ceb67f3ea770a8aaaf7214957"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#ga7dca169ceb67f3ea770a8aaaf7214957">caca_get_frame_count</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> const *)</td></tr>
<tr class="memdesc:ga7dca169ceb67f3ea770a8aaaf7214957"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of frames in a canvas.  <a href="#ga7dca169ceb67f3ea770a8aaaf7214957">More...</a><br /></td></tr>
<tr class="separator:ga7dca169ceb67f3ea770a8aaaf7214957"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6a09db01455121e5e58d081b71c55e81"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#ga6a09db01455121e5e58d081b71c55e81">caca_set_frame</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, int)</td></tr>
<tr class="memdesc:ga6a09db01455121e5e58d081b71c55e81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activate a given canvas frame.  <a href="#ga6a09db01455121e5e58d081b71c55e81">More...</a><br /></td></tr>
<tr class="separator:ga6a09db01455121e5e58d081b71c55e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9af838cf9f8d9a048051eba86119a2d2"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#ga9af838cf9f8d9a048051eba86119a2d2">caca_get_frame_name</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> const *)</td></tr>
<tr class="memdesc:ga9af838cf9f8d9a048051eba86119a2d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current frame's name.  <a href="#ga9af838cf9f8d9a048051eba86119a2d2">More...</a><br /></td></tr>
<tr class="separator:ga9af838cf9f8d9a048051eba86119a2d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1b410619a95aa459f80d574162cb25d8"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#ga1b410619a95aa459f80d574162cb25d8">caca_set_frame_name</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, char const *)</td></tr>
<tr class="memdesc:ga1b410619a95aa459f80d574162cb25d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current frame's name.  <a href="#ga1b410619a95aa459f80d574162cb25d8">More...</a><br /></td></tr>
<tr class="separator:ga1b410619a95aa459f80d574162cb25d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5fb0c9573f9f0ad85c4192df067c009"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#gab5fb0c9573f9f0ad85c4192df067c009">caca_create_frame</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, int)</td></tr>
<tr class="memdesc:gab5fb0c9573f9f0ad85c4192df067c009"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a frame to a canvas.  <a href="#gab5fb0c9573f9f0ad85c4192df067c009">More...</a><br /></td></tr>
<tr class="separator:gab5fb0c9573f9f0ad85c4192df067c009"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22531e94edf3e44b124ed84aa425372a"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, int)</td></tr>
<tr class="memdesc:ga22531e94edf3e44b124ed84aa425372a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a frame from a canvas.  <a href="#ga22531e94edf3e44b124ed84aa425372a">More...</a><br /></td></tr>
<tr class="separator:ga22531e94edf3e44b124ed84aa425372a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions provide high level routines for canvas frame insertion, removal, copying etc. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7dca169ceb67f3ea770a8aaaf7214957"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_get_frame_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> const *&#160;</td>
          <td class="paramname"><em>cv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the current canvas' frame count.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The frame count </dd></dl>

<p>Referenced by <a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame()</a>, <a class="el" href="group__caca__importexport.html#gaf49776c6092b0d3f47624e837acaa8a6">caca_get_import_list()</a>, and <a class="el" href="group__caca__canvas.html#ga194b440e32158e876bb25849105db74d">caca_set_canvas_boundaries()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6a09db01455121e5e58d081b71c55e81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_frame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td>
          <td class="paramname"><em>cv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the active canvas frame. All subsequent drawing operations will be performed on that frame. The current painting context set by <a class="el" href="group__caca__attributes.html#ga3d19c3d519489534585901e0ca0516c9" title="Set the default character attribute. ">caca_set_attr()</a> is inherited.</p>
<p>If the frame index is outside the canvas' frame range, nothing happens.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Requested frame is out of range.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas </td></tr>
    <tr><td class="paramname">id</td><td>The canvas frame to activate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>References <a class="el" href="group__caca__dirty.html#ga97855769d4e2742d6e52c0466e88fe11">caca_add_dirty_rect()</a>.</p>

<p>Referenced by <a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame()</a>, <a class="el" href="group__caca__importexport.html#gaf49776c6092b0d3f47624e837acaa8a6">caca_get_import_list()</a>, and <a class="el" href="group__caca__canvas.html#ga194b440e32158e876bb25849105db74d">caca_set_canvas_boundaries()</a>.</p>

</div>
</div>
<a class="anchor" id="ga9af838cf9f8d9a048051eba86119a2d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_frame_name </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> const *&#160;</td>
          <td class="paramname"><em>cv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the current frame's name. The returned string is valid until the frame is deleted or <a class="el" href="group__caca__frame.html#ga1b410619a95aa459f80d574162cb25d8" title="Set the current frame&#39;s name. ">caca_set_frame_name()</a> is called to change the frame name again.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current frame's name. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame()</a>.</p>

</div>
</div>
<a class="anchor" id="ga1b410619a95aa459f80d574162cb25d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_frame_name </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td>
          <td class="paramname"><em>cv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the current frame's name. Upon creation, a frame has a default name of <code>"frame#xxxxxxxx"</code> where <code>xxxxxxxx</code> is a self-incrementing hexadecimal number.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOMEM</code> Not enough memory to allocate new frame.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas. </td></tr>
    <tr><td class="paramname">name</td><td>The name to give to the current frame. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame()</a>.</p>

</div>
</div>
<a class="anchor" id="gab5fb0c9573f9f0ad85c4192df067c009"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_create_frame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td>
          <td class="paramname"><em>cv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a new frame within the given canvas. Its contents and attributes are copied from the currently active frame.</p>
<p>The frame index indicates where the frame should be inserted. Valid values range from 0 to the current canvas frame count. If the frame index is greater than or equals the current canvas frame count, the new frame is appended at the end of the canvas. If the frame index is less than zero, the new frame is inserted at index 0.</p>
<p>The active frame does not change, but its index may be renumbered due to the insertion.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOMEM</code> Not enough memory to allocate new frame.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas </td></tr>
    <tr><td class="paramname">id</td><td>The index where to insert the new frame </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__frame.html#ga22531e94edf3e44b124ed84aa425372a">caca_free_frame()</a>, <a class="el" href="group__caca__importexport.html#gaf49776c6092b0d3f47624e837acaa8a6">caca_get_import_list()</a>, and <a class="el" href="group__caca__canvas.html#ga194b440e32158e876bb25849105db74d">caca_set_canvas_boundaries()</a>.</p>

</div>
</div>
<a class="anchor" id="ga22531e94edf3e44b124ed84aa425372a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_free_frame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td>
          <td class="paramname"><em>cv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Delete a frame from a given canvas.</p>
<p>The frame index indicates the frame to delete. Valid values range from 0 to the current canvas frame count minus 1. If the frame index is greater than or equals the current canvas frame count, the last frame is deleted.</p>
<p>If the active frame is deleted, frame 0 becomes the new active frame. Otherwise, the active frame does not change, but its index may be renumbered due to the deletion.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Requested frame is out of range, or attempt to delete the last frame of the canvas.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A libcaca canvas </td></tr>
    <tr><td class="paramname">id</td><td>The index of the frame to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>References <a class="el" href="group__caca__dirty.html#ga97855769d4e2742d6e52c0466e88fe11">caca_add_dirty_rect()</a>, <a class="el" href="group__caca__frame.html#gab5fb0c9573f9f0ad85c4192df067c009">caca_create_frame()</a>, <a class="el" href="group__caca__frame.html#ga7dca169ceb67f3ea770a8aaaf7214957">caca_get_frame_count()</a>, <a class="el" href="group__caca__frame.html#ga9af838cf9f8d9a048051eba86119a2d2">caca_get_frame_name()</a>, <a class="el" href="group__caca__frame.html#ga6a09db01455121e5e58d081b71c55e81">caca_set_frame()</a>, and <a class="el" href="group__caca__frame.html#ga1b410619a95aa459f80d574162cb25d8">caca_set_frame_name()</a>.</p>

<p>Referenced by <a class="el" href="group__caca__importexport.html#gaf49776c6092b0d3f47624e837acaa8a6">caca_get_import_list()</a>.</p>

</div>
</div>
</div><!-- contents -->
  </body>
</html>