1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>X11 Texture From Pixmap</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
8 <link rel="up" href="cogl-meta-textures.html" title="Meta Textures">
9 <link rel="prev" href="cogl-2.0-experimental-Sliced-Textures.html" title="Sliced Textures">
10 <link rel="next" href="cogl-framebuffer-apis.html" title="Framebuffers">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="cogl-2.0-experimental-Sliced-Textures.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="cogl-meta-textures.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Cogl 2.0 Reference Manual</th>
21 <td><a accesskey="n" href="cogl-framebuffer-apis.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#cogl-2.0-experimental-X11-Texture-From-Pixmap.synopsis" class="shortcut">Top</a>
26 <a href="#cogl-2.0-experimental-X11-Texture-From-Pixmap.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="cogl-2.0-experimental-X11-Texture-From-Pixmap"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="cogl-2.0-experimental-X11-Texture-From-Pixmap.top_of_page"></a>X11 Texture From Pixmap</span></h2>
34 <p>X11 Texture From Pixmap — Functions for creating and manipulating 2D meta
35 textures derived from X11 pixmaps.</p>
37 <td valign="top" align="right"></td>
39 <div class="refsynopsisdiv">
40 <a name="cogl-2.0-experimental-X11-Texture-From-Pixmap.synopsis"></a><h2>Synopsis</h2>
41 <pre class="synopsis"><span class="returnvalue">CoglTexturePixmapX11</span> * <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-new" title="cogl_texture_pixmap_x11_new ()">cogl_texture_pixmap_x11_new</a> (<em class="parameter"><code><span class="type">CoglContext</span> *context</code></em>,
42 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> pixmap</code></em>,
43 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> automatic_updates</code></em>,
44 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
45 <span class="returnvalue">void</span> <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-update-area" title="cogl_texture_pixmap_x11_update_area ()">cogl_texture_pixmap_x11_update_area</a> (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>,
46 <em class="parameter"><code><span class="type">int</span> x</code></em>,
47 <em class="parameter"><code><span class="type">int</span> y</code></em>,
48 <em class="parameter"><code><span class="type">int</span> width</code></em>,
49 <em class="parameter"><code><span class="type">int</span> height</code></em>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-is-using-tfp-extension" title="cogl_texture_pixmap_x11_is_using_tfp_extension ()">cogl_texture_pixmap_x11_is_using_tfp_extension</a>
51 (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>);
52 <span class="returnvalue">void</span> <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-set-damage-object" title="cogl_texture_pixmap_x11_set_damage_object ()">cogl_texture_pixmap_x11_set_damage_object</a>
53 (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>,
54 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> damage</code></em>,
55 <em class="parameter"><code><span class="type">CoglTexturePixmapX11ReportLevel</span> report_level</code></em>);
56 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-is-texture-pixmap-x11" title="cogl_is_texture_pixmap_x11 ()">cogl_is_texture_pixmap_x11</a> (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
59 <div class="refsect1">
60 <a name="cogl-2.0-experimental-X11-Texture-From-Pixmap.description"></a><h2>Description</h2>
62 These functions allow high-level meta textures (See the
63 <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> interface) that derive their contents from an X11
67 <div class="refsect1">
68 <a name="cogl-2.0-experimental-X11-Texture-From-Pixmap.details"></a><h2>Details</h2>
69 <div class="refsect2">
70 <a name="cogl-texture-pixmap-x11-new"></a><h3>cogl_texture_pixmap_x11_new ()</h3>
71 <pre class="programlisting"><span class="returnvalue">CoglTexturePixmapX11</span> * cogl_texture_pixmap_x11_new (<em class="parameter"><code><span class="type">CoglContext</span> *context</code></em>,
72 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> pixmap</code></em>,
73 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> automatic_updates</code></em>,
74 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
76 Creates a texture that contains the contents of <em class="parameter"><code>pixmap</code></em>. If
77 <em class="parameter"><code>automatic_updates</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then Cogl will attempt to listen for
78 damage events on the pixmap and automatically update the texture
81 <div class="variablelist"><table border="0">
82 <col align="left" valign="top">
85 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
86 <td>A <span class="type">CoglContext</span>
90 <td><p><span class="term"><em class="parameter"><code>pixmap</code></em> :</span></p></td>
91 <td>A X11 pixmap ID</td>
94 <td><p><span class="term"><em class="parameter"><code>automatic_updates</code></em> :</span></p></td>
95 <td>Whether to automatically copy the contents of
96 the pixmap to the texture.</td>
99 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
100 <td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for exceptions</td>
103 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
104 <td>a new <span class="type">CoglTexturePixmapX11</span> instance</td>
108 <p class="since">Since 1.10</p>
109 <p class="stability">Stability Level: Unstable</p>
112 <div class="refsect2">
113 <a name="cogl-texture-pixmap-x11-update-area"></a><h3>cogl_texture_pixmap_x11_update_area ()</h3>
114 <pre class="programlisting"><span class="returnvalue">void</span> cogl_texture_pixmap_x11_update_area (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>,
115 <em class="parameter"><code><span class="type">int</span> x</code></em>,
116 <em class="parameter"><code><span class="type">int</span> y</code></em>,
117 <em class="parameter"><code><span class="type">int</span> width</code></em>,
118 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
120 Forces an update of the given <em class="parameter"><code>texture</code></em> so that it is refreshed with
121 the contents of the pixmap that was given to
122 <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-new" title="cogl_texture_pixmap_x11_new ()"><code class="function">cogl_texture_pixmap_x11_new()</code></a>.
124 <div class="variablelist"><table border="0">
125 <col align="left" valign="top">
128 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
129 <td>A <span class="type">CoglTexturePixmapX11</span> instance</td>
132 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
133 <td>x coordinate of the area to update</td>
136 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
137 <td>y coordinate of the area to update</td>
140 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
141 <td>width of the area to update</td>
144 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
145 <td>height of the area to update</td>
149 <p class="since">Since 1.4</p>
150 <p class="stability">Stability Level: Unstable</p>
153 <div class="refsect2">
154 <a name="cogl-texture-pixmap-x11-is-using-tfp-extension"></a><h3>cogl_texture_pixmap_x11_is_using_tfp_extension ()</h3>
155 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> cogl_texture_pixmap_x11_is_using_tfp_extension
156 (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>);</pre>
158 Checks whether the given <em class="parameter"><code>texture</code></em> is using the
159 GLX_EXT_texture_from_pixmap or similar extension to copy the
160 contents of the pixmap to the texture. This extension is usually
161 implemented as zero-copy operation so it implies the updates are
164 <div class="variablelist"><table border="0">
165 <col align="left" valign="top">
168 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
169 <td>A <span class="type">CoglTexturePixmapX11</span> instance</td>
172 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
174 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the texture is using an efficient extension
175 and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
179 <p class="since">Since 1.4</p>
180 <p class="stability">Stability Level: Unstable</p>
183 <div class="refsect2">
184 <a name="cogl-texture-pixmap-x11-set-damage-object"></a><h3>cogl_texture_pixmap_x11_set_damage_object ()</h3>
185 <pre class="programlisting"><span class="returnvalue">void</span> cogl_texture_pixmap_x11_set_damage_object
186 (<em class="parameter"><code><span class="type">CoglTexturePixmapX11</span> *texture</code></em>,
187 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> damage</code></em>,
188 <em class="parameter"><code><span class="type">CoglTexturePixmapX11ReportLevel</span> report_level</code></em>);</pre>
190 Sets the damage object that will be used to track automatic updates
191 to the <em class="parameter"><code>texture</code></em>. Damage tracking can be disabled by passing 0 for
192 <em class="parameter"><code>damage</code></em>. Otherwise this damage will replace the one used if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
193 was passed for automatic_updates to <a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#cogl-texture-pixmap-x11-new" title="cogl_texture_pixmap_x11_new ()"><code class="function">cogl_texture_pixmap_x11_new()</code></a>.
196 Note that Cogl will subtract from the damage region as it processes
199 <div class="variablelist"><table border="0">
200 <col align="left" valign="top">
203 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
204 <td>A <span class="type">CoglTexturePixmapX11</span> instance</td>
207 <td><p><span class="term"><em class="parameter"><code>damage</code></em> :</span></p></td>
208 <td>A X11 Damage object or 0</td>
211 <td><p><span class="term"><em class="parameter"><code>report_level</code></em> :</span></p></td>
212 <td>The report level which describes how to interpret
213 the damage events. This should match the level that the damage
214 object was created with.</td>
218 <p class="since">Since 1.4</p>
219 <p class="stability">Stability Level: Unstable</p>
222 <div class="refsect2">
223 <a name="cogl-is-texture-pixmap-x11"></a><h3>cogl_is_texture_pixmap_x11 ()</h3>
224 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> cogl_is_texture_pixmap_x11 (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
226 Checks whether <em class="parameter"><code>object</code></em> points to a <span class="type">CoglTexturePixmapX11</span> instance.
228 <div class="variablelist"><table border="0">
229 <col align="left" valign="top">
232 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
233 <td>A pointer to a <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a>
237 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
239 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object is a <span class="type">CoglTexturePixmapX11</span>, and
240 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
244 <p class="since">Since 1.4</p>
245 <p class="stability">Stability Level: Unstable</p>
251 Generated by GTK-Doc V1.18.1</div>