summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/ghosd/ghosd-0.0.1/doc/xml/ghosd.xml
blob: 5aac1c00e81b8b2058d82b988438d9c38c22290c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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 &lt;ghosd/ghosd.h&gt;


            <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>&nbsp;:</term>
<listitem><simpara>A <link linkend="Ghosd"><type>Ghosd</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cr</parameter>&nbsp;:</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>&nbsp;:</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>&nbsp;:</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>&nbsp;:</term>
<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>transparent</parameter>&nbsp;:</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>&nbsp;:</term>
<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> x coordinate in screen pixels.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> y coordinate in screen pixels.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> width in screen pixels.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</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>&nbsp;:</term>
<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>render_func</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GhosdRenderFunc"><type>GhosdRenderFunc</type></link> callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</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>&nbsp;:</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>&nbsp;:</term>
<listitem><simpara> a <link linkend="Ghosd"><type>Ghosd</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>