diff options
Diffstat (limited to 'abs/mv-core/ghosd/ghosd-0.0.1/doc/html/ghosd-Main-Loop.html')
-rw-r--r-- | abs/mv-core/ghosd/ghosd-0.0.1/doc/html/ghosd-Main-Loop.html | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/abs/mv-core/ghosd/ghosd-0.0.1/doc/html/ghosd-Main-Loop.html b/abs/mv-core/ghosd/ghosd-0.0.1/doc/html/ghosd-Main-Loop.html new file mode 100644 index 0000000..07a6e51 --- /dev/null +++ b/abs/mv-core/ghosd/ghosd-0.0.1/doc/html/ghosd-Main-Loop.html @@ -0,0 +1,183 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Main Loop</title> +<meta name="generator" content="DocBook XSL Stylesheets V1.68.1"> +<link rel="start" href="index.html" title="Ghosd Manual"> +<link rel="up" href="ch01.html" title="Reference"> +<link rel="prev" href="ghosd-Basics.html" title="Basics"> +<link rel="next" href="ghosd-Text.html" title="Text"> +<meta name="generator" content="GTK-Doc V1.4 (XML mode)"> +<link rel="stylesheet" href="style.css" type="text/css"> +<link rel="chapter" href="ch01.html" title="Reference"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> +<td><a accesskey="p" href="ghosd-Basics.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> +<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> +<th width="100%" align="center">Ghosd Manual</th> +<td><a accesskey="n" href="ghosd-Text.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> +</tr></table> +<div class="refentry" lang="en"> +<a name="ghosd-Main-Loop"></a><div class="titlepage"></div> +<div class="refnamediv"><table width="100%"><tr> +<td valign="top"> +<h2><span class="refentrytitle">Main Loop</span></h2> +<p>Main Loop — Running an app using Ghosd.</p> +</td> +<td valign="top" align="right"></td> +</tr></table></div> +<div class="refsynopsisdiv"> +<h2>Synopsis</h2> +<pre class="synopsis"> + +#include <ghosd/ghosd.h> + + +void <a href="ghosd-Main-Loop.html#ghosd-main-iterations">ghosd_main_iterations</a> (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd); +void <a href="ghosd-Main-Loop.html#ghosd-main-until">ghosd_main_until</a> (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd, + struct timeval *until); +void <a href="ghosd-Main-Loop.html#ghosd-flash">ghosd_flash</a> (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd, + int fade_ms, + int total_display_ms); +int <a href="ghosd-Main-Loop.html#ghosd-get-socket">ghosd_get_socket</a> (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd); +</pre> +</div> +<div class="refsect1" lang="en"> +<a name="id2545628"></a><h2>Description</h2> +<p> + +</p> +</div> +<div class="refsect1" lang="en"> +<a name="id2545639"></a><h2>Details</h2> +<div class="refsect2" lang="en"> +<a name="id2545646"></a><h3> +<a name="ghosd-main-iterations"></a>ghosd_main_iterations ()</h3> +<a class="indexterm" name="id2545654"></a><pre class="programlisting">void ghosd_main_iterations (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd);</pre> +<p> +Iterate the main loop on the <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a>, handling all pending X events. +This function does not wait for X events, so it returns immediately +unless there are already events pending.</p> +<p> + +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody><tr> +<td> +<span class="term"><em class="parameter"><code>ghosd</code></em> :</span></td> +<td> a <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a> object. +</td> +</tr></tbody> +</table></div> +</div> +<hr> +<div class="refsect2" lang="en"> +<a name="id2545719"></a><h3> +<a name="ghosd-main-until"></a>ghosd_main_until ()</h3> +<a class="indexterm" name="id2545729"></a><pre class="programlisting">void ghosd_main_until (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd, + struct timeval *until);</pre> +<p> +Efficiently iterate the main loop on the <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a>, handling all pending X +events, until the current time reaches the time specified in <em class="parameter"><code>until</code></em>.</p> +<p> + +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td> +<span class="term"><em class="parameter"><code>ghosd</code></em> :</span></td> +<td> a <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a> object. +</td> +</tr> +<tr> +<td> +<span class="term"><em class="parameter"><code>until</code></em> :</span></td> +<td> a pointer to a timeval to update until. +</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2" lang="en"> +<a name="id2540527"></a><h3> +<a name="ghosd-flash"></a>ghosd_flash ()</h3> +<a class="indexterm" name="id2540537"></a><pre class="programlisting">void ghosd_flash (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd, + int fade_ms, + int total_display_ms);</pre> +<p> +Fade in a <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a>, display at full opacity for a while, fade out, and then +return. +This is easy enough to implement using <a href="ghosd-Main-Loop.html#ghosd-main-until"><code class="function">ghosd_main_until()</code></a>, but is a +a common enough use of Ghosd to make it a builtin.</p> +<p> + +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td> +<span class="term"><em class="parameter"><code>ghosd</code></em> :</span></td> +<td> a <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a> object. +</td> +</tr> +<tr> +<td> +<span class="term"><em class="parameter"><code>fade_ms</code></em> :</span></td> +<td> how long to fade, in milliseconds. +</td> +</tr> +<tr> +<td> +<span class="term"><em class="parameter"><code>total_display_ms</code></em> :</span></td> +<td> total display time, including fades, in milliseconds. +</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2" lang="en"> +<a name="id2552181"></a><h3> +<a name="ghosd-get-socket"></a>ghosd_get_socket ()</h3> +<a class="indexterm" name="id2552191"></a><pre class="programlisting">int ghosd_get_socket (<a href="ghosd-Basics.html#Ghosd">Ghosd</a> *ghosd);</pre> +<p> +Get the file descriptor of the Ghosd X socket. When this file descriptor +has data available, call <a href="ghosd-Main-Loop.html#ghosd-main-iterations"><code class="function">ghosd_main_iterations()</code></a> to process the pending X +events. Use this with <code class="function">select()</code>/<code class="function">poll()</code> etc. to multiplex Ghosd with other +processing.</p> +<p> + +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td> +<span class="term"><em class="parameter"><code>ghosd</code></em> :</span></td> +<td> a <a href="ghosd-Basics.html#Ghosd"><span class="type">Ghosd</span></a> object. +</td> +</tr> +<tr> +<td> +<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> +<td> a file descriptor, suitable for use in <code class="function">select()</code> or <code class="function">poll()</code>. +</td> +</tr> +</tbody> +</table></div> +</div> +</div> +</div> +<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"> +<td align="left"><a accesskey="p" href="ghosd-Basics.html"><b><< Basics</b></a></td> +<td align="right"><a accesskey="n" href="ghosd-Text.html"><b>Text >></b></a></td> +</tr></table> +</body> +</html> |