PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/cairo-1.12.2/usr/local/share/gtk-doc/html/cairo/cairo-Error-handling.html

https://bitbucket.org/Clesio/ios-built-software
HTML | 389 lines | 387 code | 2 blank | 0 comment | 0 complexity | ffa6515021c666dcc2b8d62121df436c MD5 | raw file
Possible License(s): LGPL-2.1, EPL-1.0, BSD-3-Clause, GPL-3.0, LGPL-2.0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>Error handling</title>
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
  7. <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
  8. <link rel="up" href="cairo-support.html" title="Utilities">
  9. <link rel="prev" href="cairo-cairo-matrix-t.html" title="cairo_matrix_t">
  10. <link rel="next" href="cairo-Types.html" title="Types">
  11. <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
  12. <link rel="stylesheet" href="style.css" type="text/css">
  13. </head>
  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">
  16. <tr valign="middle">
  17. <td><a accesskey="p" href="cairo-cairo-matrix-t.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
  18. <td><a accesskey="u" href="cairo-support.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">Cairo: A Vector Graphics Library</th>
  21. <td><a accesskey="n" href="cairo-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
  22. </tr>
  23. <tr><td colspan="5" class="shortcuts">
  24. <a href="#cairo-Error-handling.synopsis" class="shortcut">Top</a>
  25.  | 
  26. <a href="#cairo-Error-handling.description" class="shortcut">Description</a>
  27. </td></tr>
  28. </table>
  29. <div class="refentry">
  30. <a name="cairo-Error-handling"></a><div class="titlepage"></div>
  31. <div class="refnamediv"><table width="100%"><tr>
  32. <td valign="top">
  33. <h2><span class="refentrytitle"><a name="cairo-Error-handling.top_of_page"></a>Error handling</span></h2>
  34. <p>Error handling Decoding cairo's status</p>
  35. </td>
  36. <td valign="top" align="right"></td>
  37. </tr></table></div>
  38. <div class="refsynopsisdiv">
  39. <a name="cairo-Error-handling.synopsis"></a><h2>Synopsis</h2>
  40. <pre class="synopsis">enum <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>;
  41. const <span class="returnvalue">char</span> * <a class="link" href="cairo-Error-handling.html#cairo-status-to-string" title="cairo_status_to_string ()">cairo_status_to_string</a> (<em class="parameter"><code><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> status</code></em>);
  42. <span class="returnvalue">void</span> <a class="link" href="cairo-Error-handling.html#cairo-debug-reset-static-data" title="cairo_debug_reset_static_data ()">cairo_debug_reset_static_data</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
  43. </pre>
  44. </div>
  45. <div class="refsect1">
  46. <a name="cairo-Error-handling.description"></a><h2>Description</h2>
  47. <p>
  48. Cairo uses a single status type to represent all kinds of errors. A status
  49. value of <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> represents no error and has an integer value
  50. of zero. All other status values represent an error.
  51. </p>
  52. <p>
  53. Cairo's error handling is designed to be easy to use and safe. All major
  54. cairo objects <em class="firstterm">retain</em> an error status internally which
  55. can be queried anytime by the users using cairo*_status() calls. In
  56. the mean time, it is safe to call all cairo functions normally even if the
  57. underlying object is in an error status. This means that no error handling
  58. code is required before or after each individual cairo function call.
  59. </p>
  60. </div>
  61. <div class="refsect1">
  62. <a name="cairo-Error-handling.details"></a><h2>Details</h2>
  63. <div class="refsect2">
  64. <a name="cairo-status-t"></a><h3>enum cairo_status_t</h3>
  65. <pre class="programlisting">typedef enum {
  66. CAIRO_STATUS_SUCCESS = 0,
  67. CAIRO_STATUS_NO_MEMORY,
  68. CAIRO_STATUS_INVALID_RESTORE,
  69. CAIRO_STATUS_INVALID_POP_GROUP,
  70. CAIRO_STATUS_NO_CURRENT_POINT,
  71. CAIRO_STATUS_INVALID_MATRIX,
  72. CAIRO_STATUS_INVALID_STATUS,
  73. CAIRO_STATUS_NULL_POINTER,
  74. CAIRO_STATUS_INVALID_STRING,
  75. CAIRO_STATUS_INVALID_PATH_DATA,
  76. CAIRO_STATUS_READ_ERROR,
  77. CAIRO_STATUS_WRITE_ERROR,
  78. CAIRO_STATUS_SURFACE_FINISHED,
  79. CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
  80. CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
  81. CAIRO_STATUS_INVALID_CONTENT,
  82. CAIRO_STATUS_INVALID_FORMAT,
  83. CAIRO_STATUS_INVALID_VISUAL,
  84. CAIRO_STATUS_FILE_NOT_FOUND,
  85. CAIRO_STATUS_INVALID_DASH,
  86. CAIRO_STATUS_INVALID_DSC_COMMENT,
  87. CAIRO_STATUS_INVALID_INDEX,
  88. CAIRO_STATUS_CLIP_NOT_REPRESENTABLE,
  89. CAIRO_STATUS_TEMP_FILE_ERROR,
  90. CAIRO_STATUS_INVALID_STRIDE,
  91. CAIRO_STATUS_FONT_TYPE_MISMATCH,
  92. CAIRO_STATUS_USER_FONT_IMMUTABLE,
  93. CAIRO_STATUS_USER_FONT_ERROR,
  94. CAIRO_STATUS_NEGATIVE_COUNT,
  95. CAIRO_STATUS_INVALID_CLUSTERS,
  96. CAIRO_STATUS_INVALID_SLANT,
  97. CAIRO_STATUS_INVALID_WEIGHT,
  98. CAIRO_STATUS_INVALID_SIZE,
  99. CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED,
  100. CAIRO_STATUS_DEVICE_TYPE_MISMATCH,
  101. CAIRO_STATUS_DEVICE_ERROR,
  102. CAIRO_STATUS_INVALID_MESH_CONSTRUCTION,
  103. CAIRO_STATUS_DEVICE_FINISHED,
  104. CAIRO_STATUS_LAST_STATUS
  105. } cairo_status_t;
  106. </pre>
  107. <p>
  108. <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> is used to indicate errors that can occur when
  109. using Cairo. In some cases it is returned directly by functions.
  110. but when using <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, the last error, if any, is stored in
  111. the context and can be retrieved with <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.
  112. </p>
  113. <p>
  114. New entries may be added in future versions. Use <a class="link" href="cairo-Error-handling.html#cairo-status-to-string" title="cairo_status_to_string ()"><code class="function">cairo_status_to_string()</code></a>
  115. to get a human-readable representation of an error message.
  116. </p>
  117. <div class="variablelist"><table border="0">
  118. <col align="left" valign="top">
  119. <tbody>
  120. <tr>
  121. <td><p><a name="CAIRO-STATUS-SUCCESS:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_SUCCESS</code></span></p></td>
  122. <td>no error has occurred (Since 1.0)
  123. </td>
  124. </tr>
  125. <tr>
  126. <td><p><a name="CAIRO-STATUS-NO-MEMORY:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></span></p></td>
  127. <td>out of memory (Since 1.0)
  128. </td>
  129. </tr>
  130. <tr>
  131. <td><p><a name="CAIRO-STATUS-INVALID-RESTORE:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_RESTORE</code></span></p></td>
  132. <td>cairo_restore() called without matching <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> (Since 1.0)
  133. </td>
  134. </tr>
  135. <tr>
  136. <td><p><a name="CAIRO-STATUS-INVALID-POP-GROUP:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_POP_GROUP</code></span></p></td>
  137. <td>no saved group to pop, i.e. <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> without matching <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> (Since 1.0)
  138. </td>
  139. </tr>
  140. <tr>
  141. <td><p><a name="CAIRO-STATUS-NO-CURRENT-POINT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></span></p></td>
  142. <td>no current point defined (Since 1.0)
  143. </td>
  144. </tr>
  145. <tr>
  146. <td><p><a name="CAIRO-STATUS-INVALID-MATRIX:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></span></p></td>
  147. <td>invalid matrix (not invertible) (Since 1.0)
  148. </td>
  149. </tr>
  150. <tr>
  151. <td><p><a name="CAIRO-STATUS-INVALID-STATUS:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_STATUS</code></span></p></td>
  152. <td>invalid value for an input <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> (Since 1.0)
  153. </td>
  154. </tr>
  155. <tr>
  156. <td><p><a name="CAIRO-STATUS-NULL-POINTER:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_NULL_POINTER</code></span></p></td>
  157. <td>
  158. <a href="/usr/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> pointer (Since 1.0)
  159. </td>
  160. </tr>
  161. <tr>
  162. <td><p><a name="CAIRO-STATUS-INVALID-STRING:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_STRING</code></span></p></td>
  163. <td>input string not valid UTF-8 (Since 1.0)
  164. </td>
  165. </tr>
  166. <tr>
  167. <td><p><a name="CAIRO-STATUS-INVALID-PATH-DATA:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_PATH_DATA</code></span></p></td>
  168. <td>input path data not valid (Since 1.0)
  169. </td>
  170. </tr>
  171. <tr>
  172. <td><p><a name="CAIRO-STATUS-READ-ERROR:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_READ_ERROR</code></span></p></td>
  173. <td>error while reading from input stream (Since 1.0)
  174. </td>
  175. </tr>
  176. <tr>
  177. <td><p><a name="CAIRO-STATUS-WRITE-ERROR:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></span></p></td>
  178. <td>error while writing to output stream (Since 1.0)
  179. </td>
  180. </tr>
  181. <tr>
  182. <td><p><a name="CAIRO-STATUS-SURFACE-FINISHED:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_SURFACE_FINISHED</code></span></p></td>
  183. <td>target surface has been finished (Since 1.0)
  184. </td>
  185. </tr>
  186. <tr>
  187. <td><p><a name="CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></span></p></td>
  188. <td>the surface type is not appropriate for the operation (Since 1.0)
  189. </td>
  190. </tr>
  191. <tr>
  192. <td><p><a name="CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></span></p></td>
  193. <td>the pattern type is not appropriate for the operation (Since 1.0)
  194. </td>
  195. </tr>
  196. <tr>
  197. <td><p><a name="CAIRO-STATUS-INVALID-CONTENT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_CONTENT</code></span></p></td>
  198. <td>invalid value for an input <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> (Since 1.0)
  199. </td>
  200. </tr>
  201. <tr>
  202. <td><p><a name="CAIRO-STATUS-INVALID-FORMAT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_FORMAT</code></span></p></td>
  203. <td>invalid value for an input <a class="link" href="cairo-Image-Surfaces.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a> (Since 1.0)
  204. </td>
  205. </tr>
  206. <tr>
  207. <td><p><a name="CAIRO-STATUS-INVALID-VISUAL:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_VISUAL</code></span></p></td>
  208. <td>invalid value for an input Visual* (Since 1.0)
  209. </td>
  210. </tr>
  211. <tr>
  212. <td><p><a name="CAIRO-STATUS-FILE-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_FILE_NOT_FOUND</code></span></p></td>
  213. <td>file not found (Since 1.0)
  214. </td>
  215. </tr>
  216. <tr>
  217. <td><p><a name="CAIRO-STATUS-INVALID-DASH:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_DASH</code></span></p></td>
  218. <td>invalid value for a dash setting (Since 1.0)
  219. </td>
  220. </tr>
  221. <tr>
  222. <td><p><a name="CAIRO-STATUS-INVALID-DSC-COMMENT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_DSC_COMMENT</code></span></p></td>
  223. <td>invalid value for a DSC comment (Since 1.2)
  224. </td>
  225. </tr>
  226. <tr>
  227. <td><p><a name="CAIRO-STATUS-INVALID-INDEX:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></span></p></td>
  228. <td>invalid index passed to getter (Since 1.4)
  229. </td>
  230. </tr>
  231. <tr>
  232. <td><p><a name="CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></span></p></td>
  233. <td>clip region not representable in desired format (Since 1.4)
  234. </td>
  235. </tr>
  236. <tr>
  237. <td><p><a name="CAIRO-STATUS-TEMP-FILE-ERROR:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_TEMP_FILE_ERROR</code></span></p></td>
  238. <td>error creating or writing to a temporary file (Since 1.6)
  239. </td>
  240. </tr>
  241. <tr>
  242. <td><p><a name="CAIRO-STATUS-INVALID-STRIDE:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_STRIDE</code></span></p></td>
  243. <td>invalid value for stride (Since 1.6)
  244. </td>
  245. </tr>
  246. <tr>
  247. <td><p><a name="CAIRO-STATUS-FONT-TYPE-MISMATCH:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_FONT_TYPE_MISMATCH</code></span></p></td>
  248. <td>the font type is not appropriate for the operation (Since 1.8)
  249. </td>
  250. </tr>
  251. <tr>
  252. <td><p><a name="CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_USER_FONT_IMMUTABLE</code></span></p></td>
  253. <td>the user-font is immutable (Since 1.8)
  254. </td>
  255. </tr>
  256. <tr>
  257. <td><p><a name="CAIRO-STATUS-USER-FONT-ERROR:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></span></p></td>
  258. <td>error occurred in a user-font callback function (Since 1.8)
  259. </td>
  260. </tr>
  261. <tr>
  262. <td><p><a name="CAIRO-STATUS-NEGATIVE-COUNT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_NEGATIVE_COUNT</code></span></p></td>
  263. <td>negative number used where it is not allowed (Since 1.8)
  264. </td>
  265. </tr>
  266. <tr>
  267. <td><p><a name="CAIRO-STATUS-INVALID-CLUSTERS:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_CLUSTERS</code></span></p></td>
  268. <td>input clusters do not represent the accompanying text and glyph array (Since 1.8)
  269. </td>
  270. </tr>
  271. <tr>
  272. <td><p><a name="CAIRO-STATUS-INVALID-SLANT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_SLANT</code></span></p></td>
  273. <td>invalid value for an input <a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t"><span class="type">cairo_font_slant_t</span></a> (Since 1.8)
  274. </td>
  275. </tr>
  276. <tr>
  277. <td><p><a name="CAIRO-STATUS-INVALID-WEIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_WEIGHT</code></span></p></td>
  278. <td>invalid value for an input <a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t"><span class="type">cairo_font_weight_t</span></a> (Since 1.8)
  279. </td>
  280. </tr>
  281. <tr>
  282. <td><p><a name="CAIRO-STATUS-INVALID-SIZE:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_SIZE</code></span></p></td>
  283. <td>invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
  284. </td>
  285. </tr>
  286. <tr>
  287. <td><p><a name="CAIRO-STATUS-USER-FONT-NOT-IMPLEMENTED:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED</code></span></p></td>
  288. <td>user-font method not implemented (Since 1.10)
  289. </td>
  290. </tr>
  291. <tr>
  292. <td><p><a name="CAIRO-STATUS-DEVICE-TYPE-MISMATCH:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_DEVICE_TYPE_MISMATCH</code></span></p></td>
  293. <td>the device type is not appropriate for the operation (Since 1.10)
  294. </td>
  295. </tr>
  296. <tr>
  297. <td><p><a name="CAIRO-STATUS-DEVICE-ERROR:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_DEVICE_ERROR</code></span></p></td>
  298. <td>an operation to the device caused an unspecified error (Since 1.10)
  299. </td>
  300. </tr>
  301. <tr>
  302. <td><p><a name="CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></span></p></td>
  303. <td>a mesh pattern
  304. construction operation was used outside of a
  305. <a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-begin-patch" title="cairo_mesh_pattern_begin_patch ()"><code class="function">cairo_mesh_pattern_begin_patch()</code></a>/<a class="link" href="cairo-cairo-pattern-t.html#cairo-mesh-pattern-end-patch" title="cairo_mesh_pattern_end_patch ()"><code class="function">cairo_mesh_pattern_end_patch()</code></a>
  306. pair (Since 1.12)
  307. </td>
  308. </tr>
  309. <tr>
  310. <td><p><a name="CAIRO-STATUS-DEVICE-FINISHED:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_DEVICE_FINISHED</code></span></p></td>
  311. <td>target device has been finished (Since 1.12)
  312. </td>
  313. </tr>
  314. <tr>
  315. <td><p><a name="CAIRO-STATUS-LAST-STATUS:CAPS"></a><span class="term"><code class="literal">CAIRO_STATUS_LAST_STATUS</code></span></p></td>
  316. <td>this is a special value indicating the number of
  317. status values defined in this enumeration. When using this value, note
  318. that the version of cairo at run-time may have additional status values
  319. defined than the value of this symbol at compile-time. (Since 1.10)
  320. </td>
  321. </tr>
  322. </tbody>
  323. </table></div>
  324. <p class="since">Since 1.0</p>
  325. </div>
  326. <hr>
  327. <div class="refsect2">
  328. <a name="cairo-status-to-string"></a><h3>cairo_status_to_string ()</h3>
  329. <pre class="programlisting">const <span class="returnvalue">char</span> * cairo_status_to_string (<em class="parameter"><code><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> status</code></em>);</pre>
  330. <p>
  331. Provides a human-readable description of a <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a>.
  332. </p>
  333. <div class="variablelist"><table border="0">
  334. <col align="left" valign="top">
  335. <tbody>
  336. <tr>
  337. <td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
  338. <td>a cairo status</td>
  339. </tr>
  340. <tr>
  341. <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
  342. <td>a string representation of the status</td>
  343. </tr>
  344. </tbody>
  345. </table></div>
  346. <p class="since">Since 1.0</p>
  347. </div>
  348. <hr>
  349. <div class="refsect2">
  350. <a name="cairo-debug-reset-static-data"></a><h3>cairo_debug_reset_static_data ()</h3>
  351. <pre class="programlisting"><span class="returnvalue">void</span> cairo_debug_reset_static_data (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
  352. <p>
  353. Resets all static data within cairo to its original state,
  354. (ie. identical to the state at the time of program invocation). For
  355. example, all caches within cairo will be flushed empty.
  356. </p>
  357. <p>
  358. This function is intended to be useful when using memory-checking
  359. tools such as valgrind. When valgrind's memcheck analyzes a
  360. cairo-using program without a call to <a class="link" href="cairo-Error-handling.html#cairo-debug-reset-static-data" title="cairo_debug_reset_static_data ()"><code class="function">cairo_debug_reset_static_data()</code></a>,
  361. it will report all data reachable via cairo's static objects as
  362. "still reachable". Calling <a class="link" href="cairo-Error-handling.html#cairo-debug-reset-static-data" title="cairo_debug_reset_static_data ()"><code class="function">cairo_debug_reset_static_data()</code></a> just prior
  363. to program termination will make it easier to get squeaky clean
  364. reports from valgrind.
  365. </p>
  366. <p>
  367. WARNING: It is only safe to call this function when there are no
  368. active cairo objects remaining, (ie. the appropriate destroy
  369. functions have been called as necessary). If there are active cairo
  370. objects, this call is likely to cause a crash, (eg. an assertion
  371. failure due to a hash table being destroyed when non-empty).
  372. </p>
  373. <p class="since">Since 1.0</p>
  374. </div>
  375. </div>
  376. <div class="refsect1">
  377. <a name="cairo-Error-handling.see-also"></a><h2>See Also</h2>
  378. cairo_status(), <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>, <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>,
  379. <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-status" title="cairo_font_face_status ()"><code class="function">cairo_font_face_status()</code></a>, <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-status" title="cairo_scaled_font_status ()"><code class="function">cairo_scaled_font_status()</code></a>,
  380. <a class="link" href="cairo-Regions.html#cairo-region-status" title="cairo_region_status ()"><code class="function">cairo_region_status()</code></a>
  381. </div>
  382. </div>
  383. <div class="footer">
  384. <hr>
  385. Generated by GTK-Doc V1.18</div>
  386. </body>
  387. </html>