File: cairo-types.xml

package info (click to toggle)
libcairo 1.2.4-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 10,404 kB
  • ctags: 6,985
  • sloc: ansic: 59,757; xml: 9,125; sh: 8,864; makefile: 1,035; cpp: 864; perl: 155
file content (109 lines) | stat: -rw-r--r-- 3,693 bytes parent folder | download | duplicates (2)
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
<?xml version='1.0' encoding='UTF-8'?> 
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cairo-Types">
<refmeta>
<refentrytitle role="top_of_page">Types</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAIRO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Types</refname>
<refpurpose>Generic data types used in the cairo API</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>



typedef     <link linkend="cairo-bool-t">cairo_bool_t</link>;
            <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link>;
<link linkend="void">void</link>        (<link linkend="cairo-destroy-func-t">*cairo_destroy_func_t</link>)         (<link linkend="void">void</link> *data);
</synopsis>
</refsynopsisdiv>









<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="cairo-bool-t" role="typedef"/>cairo_bool_t</title>
<indexterm><primary>cairo_bool_t</primary></indexterm><programlisting>typedef int cairo_bool_t;
</programlisting>
<para>
<link linkend="cairo-bool-t"><type>cairo_bool_t</type></link> is used for boolean values. Returns of type
<link linkend="cairo-bool-t"><type>cairo_bool_t</type></link> will always be either 0 or 1, but testing against
these values explicitly is not encouraged; just use the
value as a boolean condition.
</para>
<para>
<informalexample><programlisting>
 if (cairo_in_stroke (cr, x, y)) {
     /<!-- -->* do something *<!-- -->/
 }
</programlisting></informalexample></para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-user-data-key-t" role="struct"/>cairo_user_data_key_t</title>
<indexterm><primary>cairo_user_data_key_t</primary></indexterm><programlisting>typedef struct {
    int unused;
} cairo_user_data_key_t;
</programlisting>
<para>
<link linkend="cairo-user-data-key-t"><type>cairo_user_data_key_t</type></link> is used for attaching user data to cairo
data structures.  The actual contents of the struct is never used,
and there is no need to initialize the object; only the unique
address of a <link linkend="cairo-data-key-t"><type>cairo_data_key_t</type></link> object is used.  Typically, you
would just use the address of a static <link linkend="cairo-data-key-t"><type>cairo_data_key_t</type></link> object.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>unused</structfield>;</term>
<listitem><simpara> not used; ignore.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-destroy-func-t" role="function"/>cairo_destroy_func_t ()</title>
<indexterm><primary>cairo_destroy_func_t</primary></indexterm><programlisting><link linkend="void">void</link>        (*cairo_destroy_func_t)         (<link linkend="void">void</link> *data);</programlisting>
<para>
<link linkend="cairo-destroy-func-t"><type>cairo_destroy_func_t</type></link> the type of function which is called when a
data element is destroyed. It is passed the pointer to the data
element and should free any memory and resources allocated for it.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> The data element being destroyed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>