diff options
author | James Meyer <james.meyer@operamail.com> | 2009-02-23 21:19:04 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-02-23 21:19:04 (GMT) |
commit | 577c09bc1ea57e3fc5fe459ad91aafa4412b2297 (patch) | |
tree | 5fdcf480f545a75514783b155e3b23dea397eaf6 /abs/mv-core/ghosd/ghosd-0.0.1/doc/xml | |
parent | 1552b1b0221ed6a7e26e486187be25031408b453 (diff) | |
download | linhes_pkgbuild-577c09bc1ea57e3fc5fe459ad91aafa4412b2297.zip linhes_pkgbuild-577c09bc1ea57e3fc5fe459ad91aafa4412b2297.tar.gz linhes_pkgbuild-577c09bc1ea57e3fc5fe459ad91aafa4412b2297.tar.bz2 |
adding in ghosd
Diffstat (limited to 'abs/mv-core/ghosd/ghosd-0.0.1/doc/xml')
-rw-r--r-- | abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/ghosd.xml | 209 | ||||
-rw-r--r-- | abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/main-loop.xml | 126 | ||||
-rw-r--r-- | abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/text.xml | 77 |
3 files changed, 412 insertions, 0 deletions
diff --git a/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/ghosd.xml b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/ghosd.xml new file mode 100644 index 0000000..5aac1c0 --- /dev/null +++ b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/ghosd.xml @@ -0,0 +1,209 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<refentry id="ghosd-Basics"> +<refmeta> +<refentrytitle>Basics</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo>GHOSD Library</refmiscinfo> +</refmeta> + +<refnamediv> +<refname>Basics</refname><refpurpose>Creation, rendering, destruction.</refpurpose> +</refnamediv> + +<refsynopsisdiv><title>Synopsis</title> + +<synopsis> + +#include <ghosd/ghosd.h> + + + <link linkend="Ghosd">Ghosd</link>; +<link linkend="void">void</link> (<link linkend="GhosdRenderFunc">*GhosdRenderFunc</link>) (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="cairo-t">cairo_t</link> *cr, + <link linkend="void">void</link> *user_data); +<link linkend="Ghosd">Ghosd</link>* <link linkend="ghosd-new">ghosd_new</link> (void); +<link linkend="void">void</link> <link linkend="ghosd-set-transparent">ghosd_set_transparent</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> transparent); +#define <link linkend="GHOSD-COORD-CENTER:CAPS">GHOSD_COORD_CENTER</link> +<link linkend="void">void</link> <link linkend="ghosd-set-position">ghosd_set_position</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> x, + <link linkend="int">int</link> y, + <link linkend="int">int</link> width, + <link linkend="int">int</link> height); +<link linkend="void">void</link> <link linkend="ghosd-set-render">ghosd_set_render</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="GhosdRenderFunc">GhosdRenderFunc</link> render_func, + <link linkend="void">void</link> *data); +<link linkend="void">void</link> <link linkend="ghosd-render">ghosd_render</link> (<link linkend="Ghosd">Ghosd</link> *ghosd); +<link linkend="void">void</link> <link linkend="ghosd-show">ghosd_show</link> (<link linkend="Ghosd">Ghosd</link> *ghosd); +</synopsis> +</refsynopsisdiv> + + + + + + + + + +<refsect1> +<title>Description</title> +<para> + +</para> +</refsect1> + +<refsect1> +<title>Details</title> +<refsect2> +<title><anchor id="Ghosd"/>Ghosd</title> +<indexterm><primary>Ghosd</primary></indexterm><programlisting>typedef struct _Ghosd Ghosd;</programlisting> +<para> +An opaque Ghosd object. Think of it as the window that the content is +displayed in. +</para></refsect2> +<refsect2> +<title><anchor id="GhosdRenderFunc"/>GhosdRenderFunc ()</title> +<indexterm><primary>GhosdRenderFunc</primary></indexterm><programlisting><link linkend="void">void</link> (*GhosdRenderFunc) (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="cairo-t">cairo_t</link> *cr, + <link linkend="void">void</link> *user_data);</programlisting> +<para> +The type of callback called when Ghosd needs to render the content. +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara>A <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>cr</parameter> :</term> +<listitem><simpara>A <link linkend="cairo-t"><type>cairo_t</type></link> to draw on. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>user_data</parameter> :</term> +<listitem><simpara>User data that was passed to <link linkend="ghosd-set-render"><function>ghosd_set_render()</function></link>. + + +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-new"/>ghosd_new ()</title> +<indexterm><primary>ghosd_new</primary></indexterm><programlisting><link linkend="Ghosd">Ghosd</link>* ghosd_new (void);</programlisting> +<para> +Create a new <link linkend="Ghosd"><type>Ghosd</type></link> object. +</para> +<para> +Can return <literal>NULL</literal> if unable to connect to the X server.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-set-transparent"/>ghosd_set_transparent ()</title> +<indexterm><primary>ghosd_set_transparent</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_set_transparent (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> transparent);</programlisting> +<para> +Change the "transparent" setting. Setting <parameter>transparent</parameter> to <literal>FALSE</literal> is +mostly useful for debugging.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>transparent</parameter> :</term> +<listitem><simpara> a boolean indicating the transparent setting. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="GHOSD-COORD-CENTER:CAPS"/>GHOSD_COORD_CENTER</title> +<indexterm><primary>GHOSD_COORD_CENTER</primary></indexterm><programlisting>#define GHOSD_COORD_CENTER MAXINT +</programlisting> +<para> +Pass this as a coordinate to <link linkend="ghosd-set-position"><function>ghosd_set_position()</function></link> to center along that axis. +</para></refsect2> +<refsect2> +<title><anchor id="ghosd-set-position"/>ghosd_set_position ()</title> +<indexterm><primary>ghosd_set_position</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_set_position (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> x, + <link linkend="int">int</link> y, + <link linkend="int">int</link> width, + <link linkend="int">int</link> height);</programlisting> +<para> +Position the initial <link linkend="Ghosd"><type>Ghosd</type></link>. Must be called before <link linkend="ghosd-render"><function>ghosd_render()</function></link> and +<link linkend="ghosd-show"><function>ghosd_show()</function></link>, and can only be called once. +</para> +<para> +Positive x,y are interpreted as normal coordinates. +Pass <literal>GHOSD_COORD_CENTER</literal> to center on a given dimension, +and negative coordinates right-align (like CSS right).</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>x</parameter> :</term> +<listitem><simpara> x coordinate in screen pixels. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>y</parameter> :</term> +<listitem><simpara> y coordinate in screen pixels. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>width</parameter> :</term> +<listitem><simpara> width in screen pixels. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>height</parameter> :</term> +<listitem><simpara> width in screen pixels. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-set-render"/>ghosd_set_render ()</title> +<indexterm><primary>ghosd_set_render</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_set_render (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="GhosdRenderFunc">GhosdRenderFunc</link> render_func, + <link linkend="void">void</link> *data);</programlisting> +<para> +Register a function to draw on the <link linkend="Ghosd"><type>Ghosd</type></link>.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>render_func</parameter> :</term> +<listitem><simpara> a <link linkend="GhosdRenderFunc"><type>GhosdRenderFunc</type></link> callback. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>data</parameter> :</term> +<listitem><simpara> user data to pass to the callback. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-render"/>ghosd_render ()</title> +<indexterm><primary>ghosd_render</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_render (<link linkend="Ghosd">Ghosd</link> *ghosd);</programlisting> +<para> +Makes the Ghosd redraw itself.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-show"/>ghosd_show ()</title> +<indexterm><primary>ghosd_show</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_show (<link linkend="Ghosd">Ghosd</link> *ghosd);</programlisting> +<para> +Show the <link linkend="Ghosd"><type>Ghosd</type></link>.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + + + + +</refentry> diff --git a/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/main-loop.xml b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/main-loop.xml new file mode 100644 index 0000000..645bd96 --- /dev/null +++ b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/main-loop.xml @@ -0,0 +1,126 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<refentry id="ghosd-Main-Loop"> +<refmeta> +<refentrytitle>Main Loop</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo>GHOSD Library</refmiscinfo> +</refmeta> + +<refnamediv> +<refname>Main Loop</refname><refpurpose>Running an app using Ghosd.</refpurpose> +</refnamediv> + +<refsynopsisdiv><title>Synopsis</title> + +<synopsis> + +#include <ghosd/ghosd.h> + + +<link linkend="void">void</link> <link linkend="ghosd-main-iterations">ghosd_main_iterations</link> (<link linkend="Ghosd">Ghosd</link> *ghosd); +<link linkend="void">void</link> <link linkend="ghosd-main-until">ghosd_main_until</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + struct <link linkend="timeval">timeval</link> *until); +<link linkend="void">void</link> <link linkend="ghosd-flash">ghosd_flash</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> fade_ms, + <link linkend="int">int</link> total_display_ms); +<link linkend="int">int</link> <link linkend="ghosd-get-socket">ghosd_get_socket</link> (<link linkend="Ghosd">Ghosd</link> *ghosd); +</synopsis> +</refsynopsisdiv> + + + + + + + + + +<refsect1> +<title>Description</title> +<para> + +</para> +</refsect1> + +<refsect1> +<title>Details</title> +<refsect2> +<title><anchor id="ghosd-main-iterations"/>ghosd_main_iterations ()</title> +<indexterm><primary>ghosd_main_iterations</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_main_iterations (<link linkend="Ghosd">Ghosd</link> *ghosd);</programlisting> +<para> +Iterate the main loop on the <link linkend="Ghosd"><type>Ghosd</type></link>, handling all pending X events. +This function does not wait for X events, so it returns immediately +unless there are already events pending.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-main-until"/>ghosd_main_until ()</title> +<indexterm><primary>ghosd_main_until</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_main_until (<link linkend="Ghosd">Ghosd</link> *ghosd, + struct <link linkend="timeval">timeval</link> *until);</programlisting> +<para> +Efficiently iterate the main loop on the <link linkend="Ghosd"><type>Ghosd</type></link>, handling all pending X +events, until the current time reaches the time specified in <parameter>until</parameter>.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>until</parameter> :</term> +<listitem><simpara> a pointer to a timeval to update until. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-flash"/>ghosd_flash ()</title> +<indexterm><primary>ghosd_flash</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_flash (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> fade_ms, + <link linkend="int">int</link> total_display_ms);</programlisting> +<para> +Fade in a <link linkend="Ghosd"><type>Ghosd</type></link>, display at full opacity for a while, fade out, and then +return. +This is easy enough to implement using <link linkend="ghosd-main-until"><function>ghosd_main_until()</function></link>, but is a +a common enough use of Ghosd to make it a builtin.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>fade_ms</parameter> :</term> +<listitem><simpara> how long to fade, in milliseconds. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>total_display_ms</parameter> :</term> +<listitem><simpara> total display time, including fades, in milliseconds. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2> +<title><anchor id="ghosd-get-socket"/>ghosd_get_socket ()</title> +<indexterm><primary>ghosd_get_socket</primary></indexterm><programlisting><link linkend="int">int</link> ghosd_get_socket (<link linkend="Ghosd">Ghosd</link> *ghosd);</programlisting> +<para> +Get the file descriptor of the Ghosd X socket. When this file descriptor +has data available, call <link linkend="ghosd-main-iterations"><function>ghosd_main_iterations()</function></link> to process the pending X +events. Use this with <link linkend="select"><function>select()</function></link>/<link linkend="poll"><function>poll()</function></link> etc. to multiplex Ghosd with other +processing.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a file descriptor, suitable for use in <link linkend="select"><function>select()</function></link> or <link linkend="poll"><function>poll()</function></link>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + + + + +</refentry> diff --git a/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/text.xml b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/text.xml new file mode 100644 index 0000000..777d78b --- /dev/null +++ b/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/text.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<refentry id="ghosd-Text"> +<refmeta> +<refentrytitle>Text</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo>GHOSD Library</refmiscinfo> +</refmeta> + +<refnamediv> +<refname>Text</refname><refpurpose>Rendering text.</refpurpose> +</refnamediv> + +<refsynopsisdiv><title>Synopsis</title> + +<synopsis> + +#include <ghosd/ghosd-text.h> + + +<link linkend="void">void</link> <link linkend="ghosd-text-set-position">ghosd_text_set_position</link> (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> x, + <link linkend="int">int</link> y, + <link linkend="PangoLayout">PangoLayout</link> *layout); +</synopsis> +</refsynopsisdiv> + + + + + + + + + +<refsect1> +<title>Description</title> +<para> +I expect to flesh out this API, so this is mostly a placeholder for now. +</para> +</refsect1> + +<refsect1> +<title>Details</title> +<refsect2> +<title><anchor id="ghosd-text-set-position"/>ghosd_text_set_position ()</title> +<indexterm><primary>ghosd_text_set_position</primary></indexterm><programlisting><link linkend="void">void</link> ghosd_text_set_position (<link linkend="Ghosd">Ghosd</link> *ghosd, + <link linkend="int">int</link> x, + <link linkend="int">int</link> y, + <link linkend="PangoLayout">PangoLayout</link> *layout);</programlisting> +<para> +Set ghosd dimensions based on a <link linkend="PangoLayout"><type>PangoLayout</type></link>. +See <link linkend="ghosd-set-position"><function>ghosd_set_position()</function></link> for interpretation of the x and y coordinates.</para> +<para> + +</para><variablelist role="params"> +<varlistentry><term><parameter>ghosd</parameter> :</term> +<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object; +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>x</parameter> :</term> +<listitem><simpara> x coordinate in screen pixels. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>y</parameter> :</term> +<listitem><simpara> y coordinate in screen pixels. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>layout</parameter> :</term> +<listitem><simpara> the <link linkend="PangoLayout"><type>PangoLayout</type></link> to draw. +</simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + + + + +</refentry> |