Sophie

Sophie

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

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 display functions</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:gac393d4446d813f6e4ba93d2b583c1edb"><td class="memItemLeft" align="right" valign="top">__extern <a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gac393d4446d813f6e4ba93d2b583c1edb">caca_create_display</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *)</td></tr>
<tr class="memdesc:gac393d4446d813f6e4ba93d2b583c1edb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a caca graphical context to a caca canvas.  <a href="#gac393d4446d813f6e4ba93d2b583c1edb">More...</a><br /></td></tr>
<tr class="separator:gac393d4446d813f6e4ba93d2b583c1edb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b2517558ff72b670a1e747b5415417e"><td class="memItemLeft" align="right" valign="top">__extern <a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga4b2517558ff72b670a1e747b5415417e">caca_create_display_with_driver</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, char const *)</td></tr>
<tr class="memdesc:ga4b2517558ff72b670a1e747b5415417e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a specific caca graphical context to a caca canvas.  <a href="#ga4b2517558ff72b670a1e747b5415417e">More...</a><br /></td></tr>
<tr class="separator:ga4b2517558ff72b670a1e747b5415417e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacec026e270ea7238c3b5858e21ccd8f7"><td class="memItemLeft" align="right" valign="top">__extern char const *const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gacec026e270ea7238c3b5858e21ccd8f7">caca_get_display_driver_list</a> (void)</td></tr>
<tr class="memdesc:gacec026e270ea7238c3b5858e21ccd8f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get available display drivers.  <a href="#gacec026e270ea7238c3b5858e21ccd8f7">More...</a><br /></td></tr>
<tr class="separator:gacec026e270ea7238c3b5858e21ccd8f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7acc7d0f71f249fc0d64226e747fa623"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga7acc7d0f71f249fc0d64226e747fa623">caca_get_display_driver</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *)</td></tr>
<tr class="memdesc:ga7acc7d0f71f249fc0d64226e747fa623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a caca graphical context's current output driver.  <a href="#ga7acc7d0f71f249fc0d64226e747fa623">More...</a><br /></td></tr>
<tr class="separator:ga7acc7d0f71f249fc0d64226e747fa623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae525895a379b7f5ae99561613c99b41"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gaae525895a379b7f5ae99561613c99b41">caca_set_display_driver</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *, char const *)</td></tr>
<tr class="memdesc:gaae525895a379b7f5ae99561613c99b41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the output driver.  <a href="#gaae525895a379b7f5ae99561613c99b41">More...</a><br /></td></tr>
<tr class="separator:gaae525895a379b7f5ae99561613c99b41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1b5b4540a500dd59eaa673d784fab1f"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gac1b5b4540a500dd59eaa673d784fab1f">caca_free_display</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *)</td></tr>
<tr class="memdesc:gac1b5b4540a500dd59eaa673d784fab1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach a caca graphical context from a caca backend context.  <a href="#gac1b5b4540a500dd59eaa673d784fab1f">More...</a><br /></td></tr>
<tr class="separator:gac1b5b4540a500dd59eaa673d784fab1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65670cdec61ba57879b893c997cd26da"><td class="memItemLeft" align="right" valign="top">__extern <a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga65670cdec61ba57879b893c997cd26da">caca_get_canvas</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *)</td></tr>
<tr class="memdesc:ga65670cdec61ba57879b893c997cd26da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the canvas attached to a caca graphical context.  <a href="#ga65670cdec61ba57879b893c997cd26da">More...</a><br /></td></tr>
<tr class="separator:ga65670cdec61ba57879b893c997cd26da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c710eac721d05d807491a1534d1cbe7"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7">caca_refresh_display</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *)</td></tr>
<tr class="memdesc:ga8c710eac721d05d807491a1534d1cbe7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush pending changes and redraw the screen.  <a href="#ga8c710eac721d05d807491a1534d1cbe7">More...</a><br /></td></tr>
<tr class="separator:ga8c710eac721d05d807491a1534d1cbe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0340d64c3e7f23e11af749c4da83dfde"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga0340d64c3e7f23e11af749c4da83dfde">caca_set_display_time</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *, int)</td></tr>
<tr class="memdesc:ga0340d64c3e7f23e11af749c4da83dfde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the refresh delay.  <a href="#ga0340d64c3e7f23e11af749c4da83dfde">More...</a><br /></td></tr>
<tr class="separator:ga0340d64c3e7f23e11af749c4da83dfde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74339a36233beeee2ca5fe531885538a"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga74339a36233beeee2ca5fe531885538a">caca_get_display_time</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *)</td></tr>
<tr class="memdesc:ga74339a36233beeee2ca5fe531885538a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the display's average rendering time.  <a href="#ga74339a36233beeee2ca5fe531885538a">More...</a><br /></td></tr>
<tr class="separator:ga74339a36233beeee2ca5fe531885538a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0cc5bc7835df240b242929cc77024ac"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gae0cc5bc7835df240b242929cc77024ac">caca_get_display_width</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *)</td></tr>
<tr class="memdesc:gae0cc5bc7835df240b242929cc77024ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the display width.  <a href="#gae0cc5bc7835df240b242929cc77024ac">More...</a><br /></td></tr>
<tr class="separator:gae0cc5bc7835df240b242929cc77024ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf540716e9e5faa22a3dc5d0c68761a1f"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gaf540716e9e5faa22a3dc5d0c68761a1f">caca_get_display_height</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *)</td></tr>
<tr class="memdesc:gaf540716e9e5faa22a3dc5d0c68761a1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the display height.  <a href="#gaf540716e9e5faa22a3dc5d0c68761a1f">More...</a><br /></td></tr>
<tr class="separator:gaf540716e9e5faa22a3dc5d0c68761a1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadab2bf1e8d0bf5c3cfb3e29ab07d5641"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#gadab2bf1e8d0bf5c3cfb3e29ab07d5641">caca_set_display_title</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *, char const *)</td></tr>
<tr class="memdesc:gadab2bf1e8d0bf5c3cfb3e29ab07d5641"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the display title.  <a href="#gadab2bf1e8d0bf5c3cfb3e29ab07d5641">More...</a><br /></td></tr>
<tr class="separator:gadab2bf1e8d0bf5c3cfb3e29ab07d5641"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2a1d361cd5accd39925fb0e92bf15579"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga2a1d361cd5accd39925fb0e92bf15579">caca_set_mouse</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *, int)</td></tr>
<tr class="memdesc:ga2a1d361cd5accd39925fb0e92bf15579"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show or hide the mouse pointer.  <a href="#ga2a1d361cd5accd39925fb0e92bf15579">More...</a><br /></td></tr>
<tr class="separator:ga2a1d361cd5accd39925fb0e92bf15579"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6a15546ac2f6e48e0efa7843ee195b7d"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__display.html#ga6a15546ac2f6e48e0efa7843ee195b7d">caca_set_cursor</a> (<a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *, int)</td></tr>
<tr class="memdesc:ga6a15546ac2f6e48e0efa7843ee195b7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show or hide the cursor.  <a href="#ga6a15546ac2f6e48e0efa7843ee195b7d">More...</a><br /></td></tr>
<tr class="separator:ga6a15546ac2f6e48e0efa7843ee195b7d"><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 the basic <em>libcaca</em> routines for display initialisation, system information retrieval and configuration. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gac393d4446d813f6e4ba93d2b583c1edb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern <a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a>* caca_create_display </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a graphical context using device-dependent features (ncurses for terminals, an X11 window, a DOS command window...) that attaches to a libcaca canvas. Everything that gets drawn in the libcaca canvas can then be displayed by the libcaca driver.</p>
<p>If no caca canvas is provided, a new one is created. Its handle can be retrieved using <a class="el" href="group__caca__display.html#ga65670cdec61ba57879b893c997cd26da" title="Get the canvas attached to a caca graphical context. ">caca_get_canvas()</a> and it is automatically destroyed when <a class="el" href="group__caca__display.html#gac1b5b4540a500dd59eaa673d784fab1f" title="Detach a caca graphical context from a caca backend context. ">caca_free_display()</a> is called.</p>
<p>See also <a class="el" href="group__caca__display.html#ga4b2517558ff72b670a1e747b5415417e" title="Attach a specific caca graphical context to a caca canvas. ">caca_create_display_with_driver()</a>.</p>
<p>If an error occurs, NULL is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOMEM</code> Not enough memory.</li>
<li><code>ENODEV</code> Graphical device could not be initialised.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>The caca canvas or NULL to create a canvas automatically. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The caca graphical context or NULL if an error occurred. </dd></dl>

<p>References <a class="el" href="group__caca__display.html#ga4b2517558ff72b670a1e747b5415417e">caca_create_display_with_driver()</a>.</p>

<p>Referenced by <a class="el" href="group__conio.html#gad736275d1dd50c2ad3afcb5d63303f18">caca_conio_window()</a>.</p>

</div>
</div>
<a class="anchor" id="ga4b2517558ff72b670a1e747b5415417e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern <a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a>* caca_create_display_with_driver </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>driver</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a graphical context using device-dependent features (ncurses for terminals, an X11 window, a DOS command window...) that attaches to a libcaca canvas. Everything that gets drawn in the libcaca canvas can then be displayed by the libcaca driver.</p>
<p>If no caca canvas is provided, a new one is created. Its handle can be retrieved using <a class="el" href="group__caca__display.html#ga65670cdec61ba57879b893c997cd26da" title="Get the canvas attached to a caca graphical context. ">caca_get_canvas()</a> and it is automatically destroyed when <a class="el" href="group__caca__display.html#gac1b5b4540a500dd59eaa673d784fab1f" title="Detach a caca graphical context from a caca backend context. ">caca_free_display()</a> is called.</p>
<p>If no driver name is provided, <em>libcaca</em> will try to autodetect the best output driver it can.</p>
<p>See also <a class="el" href="group__caca__display.html#gac393d4446d813f6e4ba93d2b583c1edb" title="Attach a caca graphical context to a caca canvas. ">caca_create_display()</a>.</p>
<p>If an error occurs, NULL is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOMEM</code> Not enough memory.</li>
<li><code>ENODEV</code> Graphical device could not be initialised.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>The caca canvas or NULL to create a canvas automatically. </td></tr>
    <tr><td class="paramname">driver</td><td>A string describing the desired output driver or NULL to choose the best driver automatically. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The caca graphical context or NULL if an error occurred. </dd></dl>

<p>References <a class="el" href="group__libcaca.html#ga00caafb33b9d7033d064a642bcad83da">caca_create_canvas()</a>, <a class="el" href="group__libcaca.html#ga12394c16c9ca94b61198be929ef8580d">caca_free_canvas()</a>, <a class="el" href="group__libcaca.html#gab5f079a934949a06c100b0db604d697e">caca_manage_canvas()</a>, and <a class="el" href="group__libcaca.html#ga9a793c6b42c90884e650fa03f4640b17">caca_unmanage_canvas()</a>.</p>

<p>Referenced by <a class="el" href="group__caca__display.html#gac393d4446d813f6e4ba93d2b583c1edb">caca_create_display()</a>.</p>

</div>
</div>
<a class="anchor" id="gacec026e270ea7238c3b5858e21ccd8f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* const* caca_get_display_driver_list </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 a list of available display drivers. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the display driver, and a string containing the natural language description for that driver.</p>
<p>This function never fails.</p>
<dl class="section return"><dt>Returns</dt><dd>An array of strings. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7acc7d0f71f249fc0d64226e747fa623"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_display_driver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the given display's current output driver.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The caca display. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A static string. </dd></dl>

</div>
</div>
<a class="anchor" id="gaae525895a379b7f5ae99561613c99b41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_display_driver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>driver</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Dynamically change the given display's output driver.</p>
<p>FIXME: decide what to do in case of failure</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The caca display. </td></tr>
    <tr><td class="paramname">driver</td><td>A string describing the desired output driver or NULL to choose the best driver automatically. </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>

</div>
</div>
<a class="anchor" id="gac1b5b4540a500dd59eaa673d784fab1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_free_display </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Detach a graphical context from its caca backend and destroy it. The libcaca canvas continues to exist and other graphical contexts can be attached to it afterwards.</p>
<p>If the caca canvas was automatically created by <a class="el" href="group__caca__display.html#gac393d4446d813f6e4ba93d2b583c1edb" title="Attach a caca graphical context to a caca canvas. ">caca_create_display()</a>, it is automatically destroyed and any handle to it becomes invalid.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca graphical context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This function always returns 0. </dd></dl>

<p>References <a class="el" href="group__libcaca.html#ga12394c16c9ca94b61198be929ef8580d">caca_free_canvas()</a>, and <a class="el" href="group__libcaca.html#ga9a793c6b42c90884e650fa03f4640b17">caca_unmanage_canvas()</a>.</p>

<p>Referenced by <a class="el" href="group__conio.html#gad736275d1dd50c2ad3afcb5d63303f18">caca_conio_window()</a>.</p>

</div>
</div>
<a class="anchor" id="ga65670cdec61ba57879b893c997cd26da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern <a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a>* caca_get_canvas </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a handle on the <em>caca_canvas_t</em> object that was either attached or created by <a class="el" href="group__caca__display.html#gac393d4446d813f6e4ba93d2b583c1edb" title="Attach a caca graphical context to a caca canvas. ">caca_create_display()</a>.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca graphical context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The libcaca canvas. </dd></dl>

</div>
</div>
<a class="anchor" id="ga8c710eac721d05d807491a1534d1cbe7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_refresh_display </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Flush all graphical operations and print them to the display device. Nothing will show on the screen until this function is called.</p>
<p>If <a class="el" href="group__caca__display.html#ga0340d64c3e7f23e11af749c4da83dfde" title="Set the refresh delay. ">caca_set_display_time()</a> was called with a non-zero value, <a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7" title="Flush pending changes and redraw the screen. ">caca_refresh_display()</a> will use that value to achieve constant framerate: if two consecutive calls to <a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7" title="Flush pending changes and redraw the screen. ">caca_refresh_display()</a> are within a time range shorter than the value set with <a class="el" href="group__caca__display.html#ga0340d64c3e7f23e11af749c4da83dfde" title="Set the refresh delay. ">caca_set_display_time()</a>, the second call will be delayed before performing the screen refresh.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This function always returns 0. </dd></dl>

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

<p>Referenced by <a class="el" href="group__conio.html#gad736275d1dd50c2ad3afcb5d63303f18">caca_conio_window()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0340d64c3e7f23e11af749c4da83dfde"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_display_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>usec</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the refresh delay in microseconds. The refresh delay is used by <a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7" title="Flush pending changes and redraw the screen. ">caca_refresh_display()</a> to achieve constant framerate. See the <a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7" title="Flush pending changes and redraw the screen. ">caca_refresh_display()</a> documentation for more details.</p>
<p>If the argument is zero, constant framerate is disabled. This is the default behaviour.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Refresh delay value is invalid.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
    <tr><td class="paramname">usec</td><td>The refresh delay in microseconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 upon success, -1 if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="ga74339a36233beeee2ca5fe531885538a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_get_display_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the average rendering time, which is the average measured time between two <a class="el" href="group__caca__display.html#ga8c710eac721d05d807491a1534d1cbe7" title="Flush pending changes and redraw the screen. ">caca_refresh_display()</a> calls, in microseconds. If constant framerate was activated by calling <a class="el" href="group__caca__display.html#ga0340d64c3e7f23e11af749c4da83dfde" title="Set the refresh delay. ">caca_set_display_time()</a>, the average rendering time will be close to the requested delay even if the real rendering time was shorter.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The render time in microseconds. </dd></dl>

</div>
</div>
<a class="anchor" id="gae0cc5bc7835df240b242929cc77024ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_get_display_width </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If libcaca runs in a window, get the usable window width. This value can be used for aspect ratio calculation. If libcaca does not run in a window or if there is no way to know the font size, most drivers will assume a 6x10 font is being used. Note that the units are not necessarily pixels.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The display width. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf540716e9e5faa22a3dc5d0c68761a1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_get_display_height </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> const *&#160;</td>
          <td class="paramname"><em>dp</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If libcaca runs in a window, get the usable window height. This value can be used for aspect ratio calculation. If libcaca does not run in a window or if there is no way to know the font size, assume a 6x10 font is being used. Note that the units are not necessarily pixels.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The display height. </dd></dl>

</div>
</div>
<a class="anchor" id="gadab2bf1e8d0bf5c3cfb3e29ab07d5641"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_display_title </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>title</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If libcaca runs in a window, try to change its title. This works with the ncurses, S-Lang, OpenGL, X11 and Win32 drivers.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOSYS</code> Display driver does not support setting the window title.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
    <tr><td class="paramname">title</td><td>The desired display title. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 upon success, -1 if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2a1d361cd5accd39925fb0e92bf15579"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_mouse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Show or hide the mouse pointer. This function works with the ncurses, S-Lang and X11 drivers.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOSYS</code> Display driver does not support hiding the mouse pointer.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
    <tr><td class="paramname">flag</td><td>0 hides the pointer, 1 shows the system's default pointer (usually an arrow). Other values are reserved for future use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 upon success, -1 if an error occurred. </dd></dl>

<p>References <a class="el" href="group__libcaca.html#gaa529140e8cf31379a6b57af7c37c9d2f">caca_get_canvas_height()</a>, <a class="el" href="group__libcaca.html#gad85b2ff4c7f952b3cc32f117343a6375">caca_get_canvas_width()</a>, and <a class="el" href="group__libcaca.html#ga8814d2faa76cad0d7d15381b7eeacab6">caca_set_canvas_size()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6a15546ac2f6e48e0efa7843ee195b7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_cursor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#ada5af7a20f3e2f6c103078181b07393e">caca_display_t</a> *&#160;</td>
          <td class="paramname"><em>dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Show or hide the cursor, for devices that support such a feature.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>ENOSYS</code> Display driver does not support showing the cursor.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dp</td><td>The libcaca display context. </td></tr>
    <tr><td class="paramname">flag</td><td>0 hides the cursor, 1 shows the system's default cursor (usually a white rectangle). Other values are reserved for future use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 upon success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__conio.html#ga99339e3a998328b93e4d6d6a7bb5f40d">caca_conio__setcursortype()</a>, and <a class="el" href="group__conio.html#gad736275d1dd50c2ad3afcb5d63303f18">caca_conio_window()</a>.</p>

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