| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/gtk-doc/html/cairo/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Surface Observer: Cairo: A Vector Graphics Library</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="cairo-surfaces.html" title="Surfaces">
<link rel="prev" href="cairo-Script-Surfaces.html" title="Script Surfaces">
<link rel="next" href="cairo-Tee-surface.html" title="Tee surface">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#cairo-Surface-Observer.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="cairo-Script-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="cairo-Tee-surface.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="cairo-Surface-Observer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cairo-Surface-Observer.top_of_page"></a>Surface Observer</span></h2>
<p>Surface Observer — Observing other surfaces</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="cairo-Surface-Observer.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-create-observer" title="cairo_surface_create_observer ()">cairo_surface_create_observer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-fill-callback" title="cairo_surface_observer_add_fill_callback ()">cairo_surface_observer_add_fill_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-finish-callback" title="cairo_surface_observer_add_finish_callback ()">cairo_surface_observer_add_finish_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-flush-callback" title="cairo_surface_observer_add_flush_callback ()">cairo_surface_observer_add_flush_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-glyphs-callback" title="cairo_surface_observer_add_glyphs_callback ()">cairo_surface_observer_add_glyphs_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-mask-callback" title="cairo_surface_observer_add_mask_callback ()">cairo_surface_observer_add_mask_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-paint-callback" title="cairo_surface_observer_add_paint_callback ()">cairo_surface_observer_add_paint_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-add-stroke-callback" title="cairo_surface_observer_add_stroke_callback ()">cairo_surface_observer_add_stroke_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()">*cairo_surface_observer_callback_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">double</span>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-elapsed" title="cairo_surface_observer_elapsed ()">cairo_surface_observer_elapsed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
</td>
<td class="function_name">
<a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-print" title="cairo_surface_observer_print ()">cairo_surface_observer_print</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cairo-Surface-Observer.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="cairo-Surface-Observer.html#CAIRO-HAS-OBSERVER-SURFACE:CAPS" title="CAIRO_HAS_OBSERVER_SURFACE">CAIRO_HAS_OBSERVER_SURFACE</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-mode-t" title="enum cairo_surface_observer_mode_t">cairo_surface_observer_mode_t</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cairo-Surface-Observer.description"></a><h2>Description</h2>
<p>A surface that exists solely to watch what another surface is doing.</p>
</div>
<div class="refsect1">
<a name="cairo-Surface-Observer.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cairo-surface-create-observer"></a><h3>cairo_surface_create_observer ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
cairo_surface_create_observer (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-mode-t" title="enum cairo_surface_observer_mode_t"><span class="type">cairo_surface_observer_mode_t</span></a> mode</code></em>);</pre>
<p>Create a new surface that exists solely to watch another is doing. In
the process it will log operations and times, which are fast, which are
slow, which are frequent, etc.</p>
<p>The <em class="parameter"><code>mode</code></em>
parameter can be set to either <a class="link" href="cairo-Surface-Observer.html#CAIRO-SURFACE-OBSERVER-NORMAL:CAPS"><code class="literal">CAIRO_SURFACE_OBSERVER_NORMAL</code></a>
or <a class="link" href="cairo-Surface-Observer.html#CAIRO-SURFACE-OBSERVER-RECORD-OPERATIONS:CAPS"><code class="literal">CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS</code></a>, to control whether or not
the internal observer should record operations.</p>
<div class="refsect3">
<a name="cairo-surface-create-observer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>an existing surface for which the observer will watch</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>sets the mode of operation (normal vs. record)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-create-observer.returns"></a><h4>Returns</h4>
<p> a pointer to the newly allocated surface. The caller
owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
with it.</p>
<p>This function always returns a valid pointer, but it will return a
pointer to a "nil" surface if <em class="parameter"><code>other</code></em>
is already in an error state
or any other error occurs.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-fill-callback"></a><h3>cairo_surface_observer_add_fill_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_fill_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for fill operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-fill-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for fill operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-fill-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-finish-callback"></a><h3>cairo_surface_observer_add_finish_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_finish_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for finish operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-finish-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for the finish operation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-finish-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-10.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-flush-callback"></a><h3>cairo_surface_observer_add_flush_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_flush_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for flush operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-flush-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback for flush operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-flush-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-10.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-glyphs-callback"></a><h3>cairo_surface_observer_add_glyphs_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_glyphs_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for glyph operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-glyphs-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for glyph operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-glyphs-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-10.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-mask-callback"></a><h3>cairo_surface_observer_add_mask_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_mask_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for mask operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-mask-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for mask operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-mask-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-paint-callback"></a><h3>cairo_surface_observer_add_paint_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_paint_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for paint operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-paint-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for paint operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-paint-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-add-stroke-callback"></a><h3>cairo_surface_observer_add_stroke_callback ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_add_stroke_callback
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-Surface-Observer.html#cairo-surface-observer-callback-t" title="cairo_surface_observer_callback_t ()"><span class="type">cairo_surface_observer_callback_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>Adds a callback for stroke operations on the observed surface.</p>
<div class="refsect3">
<a name="cairo-surface-observer-add-stroke-callback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>callback function for stroke operations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-add-stroke-callback.returns"></a><h4>Returns</h4>
<p> the status of the surface</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-callback-t"></a><h3>cairo_surface_observer_callback_t ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*cairo_surface_observer_callback_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *observer</code></em>,
<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>);</pre>
<p>A generic callback function for surface operations.</p>
<div class="refsect3">
<a name="cairo-surface-observer-callback-t.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>observer</p></td>
<td class="parameter_description"><p>the <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>the observed surface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>closure used when adding the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-elapsed"></a><h3>cairo_surface_observer_elapsed ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span>
cairo_surface_observer_elapsed (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>);</pre>
<p>Returns the total observation time.</p>
<div class="refsect3">
<a name="cairo-surface-observer-elapsed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-elapsed.returns"></a><h4>Returns</h4>
<p> the elapsed time, in nanoseconds</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-print"></a><h3>cairo_surface_observer_print ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
cairo_surface_observer_print (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *abstract_surface</code></em>,
<em class="parameter"><code><a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> write_func</code></em>,
<em class="parameter"><code><span class="type">void</span> *closure</code></em>);</pre>
<p>Prints the observer log using the given callback.</p>
<div class="refsect3">
<a name="cairo-surface-observer-print.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>abstract_surface</p></td>
<td class="parameter_description"><p>a <span class="type">cairo_surface_observer_t</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>write_func</p></td>
<td class="parameter_description"><p>callback for writing on a stream</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>write_func</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cairo-surface-observer-print.returns"></a><h4>Returns</h4>
<p> the status of the print operation</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
</div>
<div class="refsect1">
<a name="cairo-Surface-Observer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CAIRO-HAS-OBSERVER-SURFACE:CAPS"></a><h3>CAIRO_HAS_OBSERVER_SURFACE</h3>
<pre class="programlisting">#define CAIRO_HAS_OBSERVER_SURFACE
</pre>
<p>Defined if the observer surface backend is available.
This macro can be used to conditionally compile backend-specific code.</p>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="cairo-surface-observer-mode-t"></a><h3>enum cairo_surface_observer_mode_t</h3>
<p>Whether operations should be recorded.</p>
<div class="refsect3">
<a name="cairo-surface-observer-mode-t.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="CAIRO-SURFACE-OBSERVER-NORMAL:CAPS"></a>CAIRO_SURFACE_OBSERVER_NORMAL</p></td>
<td class="enum_member_description">
<p>no recording is done</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="CAIRO-SURFACE-OBSERVER-RECORD-OPERATIONS:CAPS"></a>CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS</p></td>
<td class="enum_member_description">
<p>operations are recorded</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
</div>
<div class="refsect1">
<a name="cairo-Surface-Observer.see-also"></a><h2>See Also</h2>
<p><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>