Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NMABarCode: libnma Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="libnma Reference Manual">
<link rel="up" href="api-reference.html" title="libnma API reference">
<link rel="prev" href="NMACertChooser.html" title="NMACertChooser">
<link rel="next" href="object-tree.html" title="Object Hierarchy">
<meta name="generator" content="GTK-Doc V1.29.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="#NMABarCode.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#NMABarCode.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#NMABarCode.properties" class="shortcut">Properties</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="api-reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="NMACertChooser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="object-tree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="NMABarCode"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="NMABarCode.top_of_page"></a>NMABarCode</span></h2>
<p>NMABarCode</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="NMABarCode.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="NMABarCode.html" title="NMABarCode"><span class="returnvalue">NMABarCode</span></a> *
</td>
<td class="function_name">
<a class="link" href="NMABarCode.html#nma-bar-code-new" title="nma_bar_code_new ()">nma_bar_code_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="NMABarCode.html#nma-bar-code-set-text" title="nma_bar_code_set_text ()">nma_bar_code_set_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="NMABarCode.html#nma-bar-code-get-size" title="nma_bar_code_get_size ()">nma_bar_code_get_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="NMABarCode.html#nma-bar-code-draw" title="nma_bar_code_draw ()">nma_bar_code_draw</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="NMABarCode.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="NMABarCode.html#NMABarCode--size" title="The “size” property">size</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="NMABarCode.html#NMABarCode--text" title="The “text” property">text</a></td>
<td class="property_flags">Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="NMABarCode.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="NMABarCode.html#NMA-BAR-CODE-TEXT:CAPS" title="NMA_BAR_CODE_TEXT">NMA_BAR_CODE_TEXT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="NMABarCode.html#NMA-BAR-CODE-SIZE:CAPS" title="NMA_BAR_CODE_SIZE">NMA_BAR_CODE_SIZE</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="NMABarCode.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> NMABarCode
</pre>
</div>
<div class="refsect1">
<a name="NMABarCode.description"></a><h2>Description</h2>
<p>A Bar Code object provides the means of drawing a QR code onto a cairo
context. Useful for rendering Wi-Fi network credential in a form that
can be optically scanned with a phone camera.</p>
</div>
<div class="refsect1">
<a name="NMABarCode.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="nma-bar-code-new"></a><h3>nma_bar_code_new ()</h3>
<pre class="programlisting"><a class="link" href="NMABarCode.html" title="NMABarCode"><span class="returnvalue">NMABarCode</span></a> *
nma_bar_code_new (<em class="parameter"><code>const <span class="type">char</span> *text</code></em>);</pre>
<div class="refsect3">
<a name="nma-bar-code-new.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>text</p></td>
<td class="parameter_description"><p>set the bar code text</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nma-bar-code-new.returns"></a><h4>Returns</h4>
<p>the bar code instance. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.8.22</p>
</div>
<hr>
<div class="refsect2">
<a name="nma-bar-code-set-text"></a><h3>nma_bar_code_set_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
nma_bar_code_set_text (<em class="parameter"><code><a class="link" href="NMABarCode.html" title="NMABarCode"><span class="type">NMABarCode</span></a> *self</code></em>,
                       <em class="parameter"><code>const <span class="type">char</span> *text</code></em>);</pre>
<p>Regenerates the QR code for a different text.</p>
<div class="refsect3">
<a name="nma-bar-code-set-text.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>self</p></td>
<td class="parameter_description"><p>bar code instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>new bar code text</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.8.22</p>
</div>
<hr>
<div class="refsect2">
<a name="nma-bar-code-get-size"></a><h3>nma_bar_code_get_size ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
nma_bar_code_get_size (<em class="parameter"><code><a class="link" href="NMABarCode.html" title="NMABarCode"><span class="type">NMABarCode</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="nma-bar-code-get-size.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>self</p></td>
<td class="parameter_description"><p>bar code instance</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="nma-bar-code-get-size.returns"></a><h4>Returns</h4>
<p> the side of a QR code square.</p>
</div>
<p class="since">Since: 1.8.22</p>
</div>
<hr>
<div class="refsect2">
<a name="nma-bar-code-draw"></a><h3>nma_bar_code_draw ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
nma_bar_code_draw (<em class="parameter"><code><a class="link" href="NMABarCode.html" title="NMABarCode"><span class="type">NMABarCode</span></a> *self</code></em>,
                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>Draws the QR code onto the given context.</p>
<div class="refsect3">
<a name="nma-bar-code-draw.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>self</p></td>
<td class="parameter_description"><p>bar code instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cr</p></td>
<td class="parameter_description"><p>cairo context</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.8.22</p>
</div>
</div>
<div class="refsect1">
<a name="NMABarCode.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="NMA-BAR-CODE-TEXT:CAPS"></a><h3>NMA_BAR_CODE_TEXT</h3>
<pre class="programlisting">#define NMA_BAR_CODE_TEXT "text"
</pre>
</div>
<hr>
<div class="refsect2">
<a name="NMA-BAR-CODE-SIZE:CAPS"></a><h3>NMA_BAR_CODE_SIZE</h3>
<pre class="programlisting">#define NMA_BAR_CODE_SIZE "size"
</pre>
</div>
</div>
<div class="refsect1">
<a name="NMABarCode.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="NMABarCode--size"></a><h3>The <code class="literal">“size”</code> property</h3>
<pre class="programlisting">  “size”                     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Flags: Read</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="NMABarCode--text"></a><h3>The <code class="literal">“text”</code> property</h3>
<pre class="programlisting">  “text”                     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Flags: Write</p>
<p>Default value: ""</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29.1</div>
</body>
</html>