| 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=US-ASCII"> |
|---|
| 5 | <title>xklavier</title> |
|---|
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.68.1"> |
|---|
| 7 | <link rel="start" href="index.html" title="Libxklavier Reference Manual"> |
|---|
| 8 | <link rel="up" href="ch02.html" title="Libxklavier Utilities"> |
|---|
| 9 | <link rel="prev" href="ch02.html" title="Libxklavier Utilities"> |
|---|
| 10 | <meta name="generator" content="GTK-Doc V1.7 (XML mode)"> |
|---|
| 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
|---|
| 12 | <link rel="chapter" href="ch01.html" title="Libxklavier Objects"> |
|---|
| 13 | <link rel="chapter" href="ch02.html" title="Libxklavier Utilities"> |
|---|
| 14 | </head> |
|---|
| 15 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
|---|
| 16 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
|---|
| 17 | <tr valign="middle"> |
|---|
| 18 | <td><a accesskey="p" href="ch02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
|---|
| 19 | <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
|---|
| 20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
|---|
| 21 | <th width="100%" align="center">Libxklavier Reference Manual</th> |
|---|
| 22 | <td> </td> |
|---|
| 23 | </tr> |
|---|
| 24 | <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2562062" class="shortcut">Top</a> |
|---|
| 25 |  |  |
|---|
| 26 | <a href="#id2553273" class="shortcut">Description</a></nobr></td></tr> |
|---|
| 27 | </table> |
|---|
| 28 | <div class="refentry" lang="en"> |
|---|
| 29 | <a name="libxklavier-xklavier"></a><div class="titlepage"></div> |
|---|
| 30 | <div class="refnamediv"><table width="100%"><tr> |
|---|
| 31 | <td valign="top"> |
|---|
| 32 | <h2> |
|---|
| 33 | <a name="id2562062"></a><span class="refentrytitle">xklavier</span> |
|---|
| 34 | </h2> |
|---|
| 35 | <p>xklavier — Utility functions</p> |
|---|
| 36 | </td> |
|---|
| 37 | <td valign="top" align="right"></td> |
|---|
| 38 | </tr></table></div> |
|---|
| 39 | <div class="refsynopsisdiv"> |
|---|
| 40 | <h2>Synopsis</h2> |
|---|
| 41 | <pre class="synopsis"> |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | const gchar* <a href="libxklavier-xklavier.html#xkl-get-last-error">xkl_get_last_error</a> (void); |
|---|
| 46 | void (<a href="libxklavier-xklavier.html#XklLogAppender">*XklLogAppender</a>) (const gchar file[], |
|---|
| 47 | const gchar function[], |
|---|
| 48 | gint level, |
|---|
| 49 | const gchar format[], |
|---|
| 50 | va_list args); |
|---|
| 51 | void <a href="libxklavier-xklavier.html#xkl-default-log-appender">xkl_default_log_appender</a> (const gchar file[], |
|---|
| 52 | const gchar function[], |
|---|
| 53 | gint level, |
|---|
| 54 | const gchar format[], |
|---|
| 55 | va_list args); |
|---|
| 56 | void <a href="libxklavier-xklavier.html#xkl-set-log-appender">xkl_set_log_appender</a> (<a href="libxklavier-xklavier.html#XklLogAppender">XklLogAppender</a> fun); |
|---|
| 57 | void <a href="libxklavier-xklavier.html#xkl-set-debug-level">xkl_set_debug_level</a> (gint level); |
|---|
| 58 | #define <a href="libxklavier-xklavier.html#xkl-debug">xkl_debug</a> ( level, ... ) |
|---|
| 59 | </pre> |
|---|
| 60 | </div> |
|---|
| 61 | <div class="refsect1" lang="en"> |
|---|
| 62 | <a name="id2553273"></a><h2>Description</h2> |
|---|
| 63 | <p> |
|---|
| 64 | |
|---|
| 65 | </p> |
|---|
| 66 | </div> |
|---|
| 67 | <div class="refsect1" lang="en"> |
|---|
| 68 | <a name="id2553289"></a><h2>Details</h2> |
|---|
| 69 | <div class="refsect2" lang="en"> |
|---|
| 70 | <a name="id2536644"></a><h3> |
|---|
| 71 | <a name="xkl-get-last-error"></a>xkl_get_last_error ()</h3> |
|---|
| 72 | <a class="indexterm" name="id2536656"></a><pre class="programlisting">const gchar* xkl_get_last_error (void);</pre> |
|---|
| 73 | <p> |
|---|
| 74 | </p> |
|---|
| 75 | <p> |
|---|
| 76 | |
|---|
| 77 | </p> |
|---|
| 78 | <div class="variablelist"><table border="0"> |
|---|
| 79 | <col align="left" valign="top"> |
|---|
| 80 | <tbody><tr> |
|---|
| 81 | <td> |
|---|
| 82 | <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> |
|---|
| 83 | <td> the text message (statically allocated) of the last error |
|---|
| 84 | </td> |
|---|
| 85 | </tr></tbody> |
|---|
| 86 | </table></div> |
|---|
| 87 | </div> |
|---|
| 88 | <hr> |
|---|
| 89 | <div class="refsect2" lang="en"> |
|---|
| 90 | <a name="id2536697"></a><h3> |
|---|
| 91 | <a name="XklLogAppender"></a>XklLogAppender ()</h3> |
|---|
| 92 | <a class="indexterm" name="id2536709"></a><pre class="programlisting">void (*XklLogAppender) (const gchar file[], |
|---|
| 93 | const gchar function[], |
|---|
| 94 | gint level, |
|---|
| 95 | const gchar format[], |
|---|
| 96 | va_list args);</pre> |
|---|
| 97 | <p> |
|---|
| 98 | Custom log output method for _xkl_debug. This appender is NOT called if the |
|---|
| 99 | level of the message is greater than currently set debug level.</p> |
|---|
| 100 | <p> |
|---|
| 101 | |
|---|
| 102 | </p> |
|---|
| 103 | <div class="variablelist"><table border="0"> |
|---|
| 104 | <col align="left" valign="top"> |
|---|
| 105 | <tbody> |
|---|
| 106 | <tr> |
|---|
| 107 | <td> |
|---|
| 108 | <span class="term"><em class="parameter"><code>file</code></em> :</span></td> |
|---|
| 109 | <td> name of the source file. |
|---|
| 110 | Preprocessor symbol__FILE__ should be used here |
|---|
| 111 | </td> |
|---|
| 112 | </tr> |
|---|
| 113 | <tr> |
|---|
| 114 | <td> |
|---|
| 115 | <span class="term"><em class="parameter"><code>function</code></em> :</span></td> |
|---|
| 116 | <td> name of the function |
|---|
| 117 | Preprocessor symbol__func__ should be used here |
|---|
| 118 | </td> |
|---|
| 119 | </tr> |
|---|
| 120 | <tr> |
|---|
| 121 | <td> |
|---|
| 122 | <span class="term"><em class="parameter"><code>level</code></em> :</span></td> |
|---|
| 123 | <td> level of the message |
|---|
| 124 | </td> |
|---|
| 125 | </tr> |
|---|
| 126 | <tr> |
|---|
| 127 | <td> |
|---|
| 128 | <span class="term"><em class="parameter"><code>format</code></em> :</span></td> |
|---|
| 129 | <td> format (like in printf) |
|---|
| 130 | </td> |
|---|
| 131 | </tr> |
|---|
| 132 | <tr> |
|---|
| 133 | <td> |
|---|
| 134 | <span class="term"><em class="parameter"><code>args</code></em> :</span></td> |
|---|
| 135 | <td> list of parameters |
|---|
| 136 | </td> |
|---|
| 137 | </tr> |
|---|
| 138 | </tbody> |
|---|
| 139 | </table></div> |
|---|
| 140 | </div> |
|---|
| 141 | <hr> |
|---|
| 142 | <div class="refsect2" lang="en"> |
|---|
| 143 | <a name="id2525601"></a><h3> |
|---|
| 144 | <a name="xkl-default-log-appender"></a>xkl_default_log_appender ()</h3> |
|---|
| 145 | <a class="indexterm" name="id2525612"></a><pre class="programlisting">void xkl_default_log_appender (const gchar file[], |
|---|
| 146 | const gchar function[], |
|---|
| 147 | gint level, |
|---|
| 148 | const gchar format[], |
|---|
| 149 | va_list args);</pre> |
|---|
| 150 | <p> |
|---|
| 151 | Default log output method. Sends everything to stdout.</p> |
|---|
| 152 | <p> |
|---|
| 153 | |
|---|
| 154 | </p> |
|---|
| 155 | <div class="variablelist"><table border="0"> |
|---|
| 156 | <col align="left" valign="top"> |
|---|
| 157 | <tbody> |
|---|
| 158 | <tr> |
|---|
| 159 | <td> |
|---|
| 160 | <span class="term"><em class="parameter"><code>file</code></em> :</span></td> |
|---|
| 161 | <td> name of the source file. |
|---|
| 162 | Preprocessor symbol__FILE__ should be used here |
|---|
| 163 | </td> |
|---|
| 164 | </tr> |
|---|
| 165 | <tr> |
|---|
| 166 | <td> |
|---|
| 167 | <span class="term"><em class="parameter"><code>function</code></em> :</span></td> |
|---|
| 168 | <td> name of the function |
|---|
| 169 | Preprocessor symbol__func__ should be used here |
|---|
| 170 | </td> |
|---|
| 171 | </tr> |
|---|
| 172 | <tr> |
|---|
| 173 | <td> |
|---|
| 174 | <span class="term"><em class="parameter"><code>level</code></em> :</span></td> |
|---|
| 175 | <td> level of the message |
|---|
| 176 | </td> |
|---|
| 177 | </tr> |
|---|
| 178 | <tr> |
|---|
| 179 | <td> |
|---|
| 180 | <span class="term"><em class="parameter"><code>format</code></em> :</span></td> |
|---|
| 181 | <td> format (like in printf) |
|---|
| 182 | </td> |
|---|
| 183 | </tr> |
|---|
| 184 | <tr> |
|---|
| 185 | <td> |
|---|
| 186 | <span class="term"><em class="parameter"><code>args</code></em> :</span></td> |
|---|
| 187 | <td> list of parameters |
|---|
| 188 | </td> |
|---|
| 189 | </tr> |
|---|
| 190 | </tbody> |
|---|
| 191 | </table></div> |
|---|
| 192 | </div> |
|---|
| 193 | <hr> |
|---|
| 194 | <div class="refsect2" lang="en"> |
|---|
| 195 | <a name="id2525748"></a><h3> |
|---|
| 196 | <a name="xkl-set-log-appender"></a>xkl_set_log_appender ()</h3> |
|---|
| 197 | <a class="indexterm" name="id2525759"></a><pre class="programlisting">void xkl_set_log_appender (<a href="libxklavier-xklavier.html#XklLogAppender">XklLogAppender</a> fun);</pre> |
|---|
| 198 | <p> |
|---|
| 199 | Installs the custom log appender.function</p> |
|---|
| 200 | <p> |
|---|
| 201 | |
|---|
| 202 | </p> |
|---|
| 203 | <div class="variablelist"><table border="0"> |
|---|
| 204 | <col align="left" valign="top"> |
|---|
| 205 | <tbody><tr> |
|---|
| 206 | <td> |
|---|
| 207 | <span class="term"><em class="parameter"><code>fun</code></em> :</span></td> |
|---|
| 208 | <td> new log appender |
|---|
| 209 | </td> |
|---|
| 210 | </tr></tbody> |
|---|
| 211 | </table></div> |
|---|
| 212 | </div> |
|---|
| 213 | <hr> |
|---|
| 214 | <div class="refsect2" lang="en"> |
|---|
| 215 | <a name="id2525808"></a><h3> |
|---|
| 216 | <a name="xkl-set-debug-level"></a>xkl_set_debug_level ()</h3> |
|---|
| 217 | <a class="indexterm" name="id2524229"></a><pre class="programlisting">void xkl_set_debug_level (gint level);</pre> |
|---|
| 218 | <p> |
|---|
| 219 | Sets maximum debug level. |
|---|
| 220 | Message of the level more than the one set here - will be ignored</p> |
|---|
| 221 | <p> |
|---|
| 222 | |
|---|
| 223 | </p> |
|---|
| 224 | <div class="variablelist"><table border="0"> |
|---|
| 225 | <col align="left" valign="top"> |
|---|
| 226 | <tbody><tr> |
|---|
| 227 | <td> |
|---|
| 228 | <span class="term"><em class="parameter"><code>level</code></em> :</span></td> |
|---|
| 229 | <td> new debug level |
|---|
| 230 | </td> |
|---|
| 231 | </tr></tbody> |
|---|
| 232 | </table></div> |
|---|
| 233 | </div> |
|---|
| 234 | <hr> |
|---|
| 235 | <div class="refsect2" lang="en"> |
|---|
| 236 | <a name="id2524279"></a><h3> |
|---|
| 237 | <a name="xkl-debug"></a>xkl_debug()</h3> |
|---|
| 238 | <a class="indexterm" name="id2524291"></a><pre class="programlisting">#define xkl_debug( level, ... )</pre> |
|---|
| 239 | <p> |
|---|
| 240 | Output (optionally) some debug info</p> |
|---|
| 241 | <p> |
|---|
| 242 | |
|---|
| 243 | </p> |
|---|
| 244 | <div class="variablelist"><table border="0"> |
|---|
| 245 | <col align="left" valign="top"> |
|---|
| 246 | <tbody> |
|---|
| 247 | <tr> |
|---|
| 248 | <td> |
|---|
| 249 | <span class="term"><em class="parameter"><code>level</code></em> :</span></td> |
|---|
| 250 | <td> level of the message |
|---|
| 251 | </td> |
|---|
| 252 | </tr> |
|---|
| 253 | <tr> |
|---|
| 254 | <td> |
|---|
| 255 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 256 | <td> |
|---|
| 257 | </td> |
|---|
| 258 | </tr> |
|---|
| 259 | <tr> |
|---|
| 260 | <td> |
|---|
| 261 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 262 | <td> |
|---|
| 263 | </td> |
|---|
| 264 | </tr> |
|---|
| 265 | <tr> |
|---|
| 266 | <td> |
|---|
| 267 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 268 | <td> |
|---|
| 269 | </td> |
|---|
| 270 | </tr> |
|---|
| 271 | <tr> |
|---|
| 272 | <td> |
|---|
| 273 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 274 | <td> |
|---|
| 275 | </td> |
|---|
| 276 | </tr> |
|---|
| 277 | <tr> |
|---|
| 278 | <td> |
|---|
| 279 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 280 | <td> |
|---|
| 281 | </td> |
|---|
| 282 | </tr> |
|---|
| 283 | <tr> |
|---|
| 284 | <td> |
|---|
| 285 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 286 | <td> |
|---|
| 287 | </td> |
|---|
| 288 | </tr> |
|---|
| 289 | <tr> |
|---|
| 290 | <td> |
|---|
| 291 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 292 | <td> |
|---|
| 293 | </td> |
|---|
| 294 | </tr> |
|---|
| 295 | <tr> |
|---|
| 296 | <td> |
|---|
| 297 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 298 | <td> |
|---|
| 299 | </td> |
|---|
| 300 | </tr> |
|---|
| 301 | <tr> |
|---|
| 302 | <td> |
|---|
| 303 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 304 | <td> |
|---|
| 305 | </td> |
|---|
| 306 | </tr> |
|---|
| 307 | <tr> |
|---|
| 308 | <td> |
|---|
| 309 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 310 | <td> |
|---|
| 311 | </td> |
|---|
| 312 | </tr> |
|---|
| 313 | <tr> |
|---|
| 314 | <td> |
|---|
| 315 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 316 | <td> |
|---|
| 317 | </td> |
|---|
| 318 | </tr> |
|---|
| 319 | <tr> |
|---|
| 320 | <td> |
|---|
| 321 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 322 | <td> |
|---|
| 323 | </td> |
|---|
| 324 | </tr> |
|---|
| 325 | <tr> |
|---|
| 326 | <td> |
|---|
| 327 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 328 | <td> |
|---|
| 329 | </td> |
|---|
| 330 | </tr> |
|---|
| 331 | <tr> |
|---|
| 332 | <td> |
|---|
| 333 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 334 | <td> |
|---|
| 335 | </td> |
|---|
| 336 | </tr> |
|---|
| 337 | <tr> |
|---|
| 338 | <td> |
|---|
| 339 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 340 | <td> |
|---|
| 341 | </td> |
|---|
| 342 | </tr> |
|---|
| 343 | <tr> |
|---|
| 344 | <td> |
|---|
| 345 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 346 | <td> |
|---|
| 347 | </td> |
|---|
| 348 | </tr> |
|---|
| 349 | <tr> |
|---|
| 350 | <td> |
|---|
| 351 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 352 | <td> |
|---|
| 353 | </td> |
|---|
| 354 | </tr> |
|---|
| 355 | <tr> |
|---|
| 356 | <td> |
|---|
| 357 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 358 | <td> |
|---|
| 359 | </td> |
|---|
| 360 | </tr> |
|---|
| 361 | <tr> |
|---|
| 362 | <td> |
|---|
| 363 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 364 | <td> |
|---|
| 365 | </td> |
|---|
| 366 | </tr> |
|---|
| 367 | <tr> |
|---|
| 368 | <td> |
|---|
| 369 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 370 | <td> |
|---|
| 371 | </td> |
|---|
| 372 | </tr> |
|---|
| 373 | <tr> |
|---|
| 374 | <td> |
|---|
| 375 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 376 | <td> |
|---|
| 377 | </td> |
|---|
| 378 | </tr> |
|---|
| 379 | <tr> |
|---|
| 380 | <td> |
|---|
| 381 | <span class="term"><em class="parameter"><code>...</code></em> :</span></td> |
|---|
| 382 | <td> |
|---|
| 383 | |
|---|
| 384 | |
|---|
| 385 | </td> |
|---|
| 386 | </tr> |
|---|
| 387 | </tbody> |
|---|
| 388 | </table></div> |
|---|
| 389 | </div> |
|---|
| 390 | </div> |
|---|
| 391 | </div> |
|---|
| 392 | </body> |
|---|
| 393 | </html> |
|---|