12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><GKeyFile>: </title>
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
- <link rel="home" href="index.html" title="">
- <link rel="up" href="ch01.html" title="GLib">
- <link rel="prev" href="re27.html" title="<%GLibIOStatus>">
- <link rel="next" href="re29.html" title="<%GLibKeyFileError>">
- <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"></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
- <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
- <td><a accesskey="p" href="re27.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
- <td><a accesskey="n" href="re29.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
- </tr></table>
- <div class="refentry">
- <a name="id-1.1.29"></a><div class="titlepage"></div>
- <div class="refnamediv">
- <h2><GKeyFile></h2>
- <p><GKeyFile></p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.29.2"></a><h2>Description</h2>
- <p>The GKeyFile struct contains only private data
- and should not be accessed directly.</p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.29.3"></a><h2>Functions</h2>
- <div class="refsect2">
- <a name="id-1.1.29.3.2"></a><h3>get-boolean?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-boolean? self group-name key))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
- boolean.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">FALSE</code> is returned and <em class="parameter"><code>error</code></em> is set
- to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value
- associated with <em class="parameter"><code>key</code></em> cannot be interpreted as a boolean then <code class="constant">FALSE</code>
- is returned and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.2.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.3"></a><h3>get-boolean-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return length)
- (key-file:get-boolean-list self group-name key))
- </pre></div>
- <p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
- booleans.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted as booleans then <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.3.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>the number of booleans returned</p>
- <p>Inferred from <code class="code">%return</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.4"></a><h3>get-comment</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-comment self group-name key))
- </pre></div>
- <p>Retrieves a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be read from above
- <em class="parameter"><code>group_name</code></em>. If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <code class="constant">NULL</code>, then
- <em class="parameter"><code>comment</code></em> will be read from above the first group in the file.
- </p>
- <p>Note that the returned string does not include the '#' comment markers,
- but does include any whitespace after them (on each line). It includes
- the line breaks between lines, but does not include the final line break.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.4.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.5"></a><h3>get-double</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-double self group-name key))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
- double. If <em class="parameter"><code>group_name</code></em> is <code class="constant">NULL</code>, the start_group is used.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then 0.0 is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted as a double then 0.0 is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.5.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.6"></a><h3>get-double-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return length)
- (key-file:get-double-list self group-name key))
- </pre></div>
- <p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
- doubles.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted as doubles then <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.6.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>the number of doubles returned</p>
- <p>Inferred from <code class="code">%return</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.7"></a><h3>get-groups</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:get-groups self))
- </pre></div>
- <p>Returns all groups in the key file loaded with <em class="parameter"><code>key_file</code></em>.
- The array of returned groups will be <code class="constant">NULL</code>-terminated, so
- <em class="parameter"><code>length</code></em> may optionally be <code class="constant">NULL</code>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.7.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>return location for the number of returned groups, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">length</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.8"></a><h3>get-int64</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-int64 self group-name key))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a signed
- 64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
- 64-bit results without truncation.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.8.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.9"></a><h3>get-integer</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-integer self group-name key))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an
- integer.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then 0 is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted as an integer, or is out of range
- for a <span class="type">gint</span>, then 0 is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.9.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.10"></a><h3>get-integer-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return length)
- (key-file:get-integer-list self group-name key))
- </pre></div>
- <p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
- integers.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted as integers, or are out of range for
- <span class="type">gint</span>, then <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.10.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>the number of integers returned</p>
- <p>Inferred from <code class="code">%return</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.11"></a><h3>get-keys</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:get-keys self group-name))
- </pre></div>
- <p>Returns all keys for the group name <em class="parameter"><code>group_name</code></em>. The array of
- returned keys will be <code class="constant">NULL</code>-terminated, so <em class="parameter"><code>length</code></em> may
- optionally be <code class="constant">NULL</code>. In the event that the <em class="parameter"><code>group_name</code></em> cannot
- be found, <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
- <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.11.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>return location for the number of keys returned, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">length</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.12"></a><h3>get-locale-for-key</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return)
- (key-file:get-locale-for-key self group-name key locale))
- </pre></div>
- <p>Returns the actual locale which the result of
- <code class="function">g_key_file_get_locale_string()</code> or <code class="function">g_key_file_get_locale_string_list()</code>
- came from.
- </p>
- <p>If calling <code class="function">g_key_file_get_locale_string()</code> or
- <code class="function">g_key_file_get_locale_string_list()</code> with exactly the same <em class="parameter"><code>key_file</code></em>,
- <em class="parameter"><code>group_name</code></em>, <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em>, the result of those functions will
- have originally been tagged with the locale that is the result of
- this function.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.12.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>locale</p></td>
- <td class="parameter_description">
- <p>a locale identifier or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">locale</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.13"></a><h3>get-locale-string</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return)
- (key-file:get-locale-string self group-name key locale))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
- translated in the given <em class="parameter"><code>locale</code></em> if available. If <em class="parameter"><code>locale</code></em> is
- <code class="constant">NULL</code> then the current locale is assumed.
- </p>
- <p>If <em class="parameter"><code>locale</code></em> is to be non-<code class="constant">NULL</code>, or if the current locale will change over
- the lifetime of the <span class="type">GKeyFile</span>, it must be loaded with
- <code class="constant">G_KEY_FILE_KEEP_TRANSLATIONS</code> in order to load strings for all locales.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set
- to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. If the value associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translation can
- be found then the untranslated value is returned.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.13.6"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>locale</p></td>
- <td class="parameter_description">
- <p>a locale identifier or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">locale</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.14"></a><h3>get-locale-string-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return length)
- (key-file:get-locale-string-list self group-name key locale))
- </pre></div>
- <p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
- translated in the given <em class="parameter"><code>locale</code></em> if available. If <em class="parameter"><code>locale</code></em> is
- <code class="constant">NULL</code> then the current locale is assumed.
- </p>
- <p>If <em class="parameter"><code>locale</code></em> is to be non-<code class="constant">NULL</code>, or if the current locale will change over
- the lifetime of the <span class="type">GKeyFile</span>, it must be loaded with
- <code class="constant">G_KEY_FILE_KEEP_TRANSLATIONS</code> in order to load strings for all locales.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set
- to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. If the values associated
- with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translations
- can be found then the untranslated values are returned. The
- returned array is <code class="constant">NULL</code>-terminated, so <em class="parameter"><code>length</code></em> may optionally
- be <code class="constant">NULL</code>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.14.6"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>locale</p></td>
- <td class="parameter_description">
- <p>a locale identifier or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">locale</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>return location for the number of returned strings or <code class="constant">NULL</code></p>
- <p>Inferred from <code class="code">%return</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.15"></a><h3>get-start-group</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-start-group self))
- </pre></div>
- <p>Returns the name of the start group of the file.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.15.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.16"></a><h3>get-string</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-string self group-name key))
- </pre></div>
- <p>Returns the string value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- Unlike <code class="function">g_key_file_get_value()</code>, this function handles escape sequences
- like \s.
- </p>
- <p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
- <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. In the
- event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.16.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.17"></a><h3>get-string-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return length)
- (key-file:get-string-list self group-name key))
- </pre></div>
- <p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- </p>
- <p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
- <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. In the
- event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.17.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>return location for the number of returned strings, or <code class="constant">NULL</code></p>
- <p>Inferred from <code class="code">%return</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.18"></a><h3>get-uint64</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-uint64 self group-name key))
- </pre></div>
- <p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an unsigned
- 64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
- large positive results without truncation.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.18.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a non-<code class="constant">NULL</code> key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.19"></a><h3>get-value</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-value self group-name key))
- </pre></div>
- <p>Returns the raw value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- Use <code class="function">g_key_file_get_string()</code> to retrieve an unescaped UTF-8 string.
- </p>
- <p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
- <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. In the
- event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
- and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.19.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.20"></a><h3>has-group?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:has-group? self group-name))
- </pre></div>
- <p>Looks whether the key file has the group <em class="parameter"><code>group_name</code></em>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.20.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.21"></a><h3>load-from-bytes?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-bytes? self bytes flags))
- </pre></div>
- <p>Loads a key file from the data in <em class="parameter"><code>bytes</code></em> into an empty <span class="type">GKeyFile</span> structure.
- If the object cannot be created then <code class="constant">error</code> is set to a <span class="type">GKeyFileError</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.21.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>an empty <span class="type">GKeyFile</span> struct</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>bytes</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GBytes</span></p>
- <p>Passed as <code class="code">bytes</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>flags</p></td>
- <td class="parameter_description">
- <p>flags from <span class="type">GKeyFileFlags</span></p>
- <p>Passed as <code class="code">flags</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.22"></a><h3>load-from-data?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-data? self data length flags))
- </pre></div>
- <p>Loads a key file from memory into an empty <span class="type">GKeyFile</span> structure.
- If the object cannot be created then <code class="constant">error</code> is set to a <span class="type">GKeyFileError</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.22.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>an empty <span class="type">GKeyFile</span> struct</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>data</p></td>
- <td class="parameter_description">
- <p>key file loaded in memory</p>
- <p>Passed as <code class="code">data</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>the length of <em class="parameter"><code>data</code></em> in bytes (or (gsize)-1 if data is nul-terminated)</p>
- <p>Passed as <code class="code">length</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>flags</p></td>
- <td class="parameter_description">
- <p>flags from <span class="type">GKeyFileFlags</span></p>
- <p>Passed as <code class="code">flags</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.23"></a><h3>load-from-data-dirs</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return full-path)
- (key-file:load-from-data-dirs self file flags))
- </pre></div>
- <p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths
- returned from <code class="function">g_get_user_data_dir()</code> and <code class="function">g_get_system_data_dirs()</code>,
- loads the file into <em class="parameter"><code>key_file</code></em> and returns the file's full path in
- <em class="parameter"><code>full_path</code></em>. If the file could not be loaded then an <code class="constant">error</code> is
- set to either a <span class="type">GFileError</span> or <span class="type">GKeyFileError</span>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.23.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>an empty <span class="type">GKeyFile</span> struct</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>file</p></td>
- <td class="parameter_description">
- <p>a relative path to a filename to open and parse</p>
- <p>Passed as <code class="code">file</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>full_path</p></td>
- <td class="parameter_description">
- <p>return location for a string containing the full path
- of the file, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">full-path</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>flags</p></td>
- <td class="parameter_description">
- <p>flags from <span class="type">GKeyFileFlags</span></p>
- <p>Passed as <code class="code">flags</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.24"></a><h3>load-from-dirs</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- (%return full-path)
- (key-file:load-from-dirs self file search-dirs flags))
- </pre></div>
- <p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths
- specified in <em class="parameter"><code>search_dirs</code></em>, loads the file into <em class="parameter"><code>key_file</code></em> and
- returns the file's full path in <em class="parameter"><code>full_path</code></em>.
- </p>
- <p>If the file could not be found in any of the <em class="parameter"><code>search_dirs</code></em>,
- <code class="constant">G_KEY_FILE_ERROR_NOT_FOUND</code> is returned. If
- the file is found but the OS returns an error when opening or reading the
- file, a <code class="constant">G_FILE_ERROR</code> is returned. If there is a problem parsing the file, a
- <code class="constant">G_KEY_FILE_ERROR</code> is returned.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.24.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>an empty <span class="type">GKeyFile</span> struct</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>file</p></td>
- <td class="parameter_description">
- <p>a relative path to a filename to open and parse</p>
- <p>Passed as <code class="code">file</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>search_dirs</p></td>
- <td class="parameter_description">
- <p><code class="constant">NULL</code>-terminated array of directories to search</p>
- <p>Passed as <code class="code">search-dirs</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>full_path</p></td>
- <td class="parameter_description">
- <p>return location for a string containing the full path
- of the file, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">full-path</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>flags</p></td>
- <td class="parameter_description">
- <p>flags from <span class="type">GKeyFileFlags</span></p>
- <p>Passed as <code class="code">flags</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.25"></a><h3>load-from-file?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-file? self file flags))
- </pre></div>
- <p>Loads a key file into an empty <span class="type">GKeyFile</span> structure.
- </p>
- <p>If the OS returns an error when opening or reading the file, a
- <code class="constant">G_FILE_ERROR</code> is returned. If there is a problem parsing the file, a
- <code class="constant">G_KEY_FILE_ERROR</code> is returned.
- </p>
- <p>This function will never return a <code class="constant">G_KEY_FILE_ERROR_NOT_FOUND</code> error. If the
- <em class="parameter"><code>file</code></em> is not found, <code class="constant">G_FILE_ERROR_NOENT</code> is returned.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.25.6"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>an empty <span class="type">GKeyFile</span> struct</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>file</p></td>
- <td class="parameter_description">
- <p>the path of a filename to load, in the GLib filename encoding</p>
- <p>Passed as <code class="code">file</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>flags</p></td>
- <td class="parameter_description">
- <p>flags from <span class="type">GKeyFileFlags</span></p>
- <p>Passed as <code class="code">flags</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.26"></a><h3>remove-comment?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-comment? self group-name key))
- </pre></div>
- <p>Removes a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be removed above <em class="parameter"><code>group_name</code></em>.
- If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <code class="constant">NULL</code>, then <em class="parameter"><code>comment</code></em> will
- be removed above the first group in the file.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.26.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.27"></a><h3>remove-group?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-group? self group-name))
- </pre></div>
- <p>Removes the specified group, <em class="parameter"><code>group_name</code></em>,
- from the key file.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.27.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.28"></a><h3>remove-key?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-key? self group-name key))
- </pre></div>
- <p>Removes <em class="parameter"><code>key</code></em> in <em class="parameter"><code>group_name</code></em> from the key file.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.28.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key name to remove</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.29"></a><h3>save-to-file?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:save-to-file? self filename))
- </pre></div>
- <p>Writes the contents of <em class="parameter"><code>key_file</code></em> to <em class="parameter"><code>filename</code></em> using
- <code class="function">g_file_set_contents()</code>. If you need stricter guarantees about durability of
- the written file than are provided by <code class="function">g_file_set_contents()</code>, use
- <code class="function">g_file_set_contents_full()</code> with the return value of <code class="function">g_key_file_to_data()</code>.
- </p>
- <p>This function can fail for any of the reasons that
- <code class="function">g_file_set_contents()</code> may fail.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.29.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>filename</p></td>
- <td class="parameter_description">
- <p>the name of the file to write to</p>
- <p>Passed as <code class="code">filename</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.30"></a><h3>set-boolean</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-boolean self group-name key value))
- </pre></div>
- <p>Associates a new boolean value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.30.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p><code class="constant">TRUE</code> or <code class="constant">FALSE</code></p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.31"></a><h3>set-boolean-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-boolean-list self group-name key list))
- </pre></div>
- <p>Associates a list of boolean values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.
- If <em class="parameter"><code>group_name</code></em> is <code class="constant">NULL</code>, the start_group is used.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.31.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>list</p></td>
- <td class="parameter_description">
- <p>an array of boolean values</p>
- <p>Passed as <code class="code">list</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>length of <em class="parameter"><code>list</code></em></p>
- <p>Inferred from <code class="code">list</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.32"></a><h3>set-comment?</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:set-comment? self group-name key comment))
- </pre></div>
- <p>Places a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
- </p>
- <p>If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be written above <em class="parameter"><code>group_name</code></em>.
- If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <code class="constant">NULL</code>, then <em class="parameter"><code>comment</code></em> will be
- written above the first group in the file.
- </p>
- <p>Note that this function prepends a '#' comment marker to
- each line of <em class="parameter"><code>comment</code></em>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.32.6"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>comment</p></td>
- <td class="parameter_description">
- <p>a comment</p>
- <p>Passed as <code class="code">comment</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.33"></a><h3>set-double</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-double self group-name key value))
- </pre></div>
- <p>Associates a new double value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.33.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p>a double value</p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.34"></a><h3>set-double-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-double-list self group-name key list))
- </pre></div>
- <p>Associates a list of double values with <em class="parameter"><code>key</code></em> under
- <em class="parameter"><code>group_name</code></em>. If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.34.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>list</p></td>
- <td class="parameter_description">
- <p>an array of double values</p>
- <p>Passed as <code class="code">list</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>number of double values in <em class="parameter"><code>list</code></em></p>
- <p>Inferred from <code class="code">list</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.35"></a><h3>set-int64</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-int64 self group-name key value))
- </pre></div>
- <p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.35.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p>an integer value</p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.36"></a><h3>set-integer</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-integer self group-name key value))
- </pre></div>
- <p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.36.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p>an integer value</p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.37"></a><h3>set-integer-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-integer-list self group-name key list))
- </pre></div>
- <p>Associates a list of integer values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.37.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>list</p></td>
- <td class="parameter_description">
- <p>an array of integer values</p>
- <p>Passed as <code class="code">list</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>number of integer values in <em class="parameter"><code>list</code></em></p>
- <p>Inferred from <code class="code">list</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.38"></a><h3>set-list-separator</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-list-separator self separator))
- </pre></div>
- <p>Sets the character which is used to separate
- values in lists. Typically ';' or ',' are used
- as separators. The default list separator is ';'.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.38.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>separator</p></td>
- <td class="parameter_description">
- <p>the separator</p>
- <p>Passed as <code class="code">separator</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.39"></a><h3>set-locale-string</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- ()
- (key-file:set-locale-string self group-name key locale string))
- </pre></div>
- <p>Associates a string value for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under <em class="parameter"><code>group_name</code></em>.
- If the translation for <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.39.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>locale</p></td>
- <td class="parameter_description">
- <p>a locale identifier</p>
- <p>Passed as <code class="code">locale</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>string</p></td>
- <td class="parameter_description">
- <p>a string</p>
- <p>Passed as <code class="code">string</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.40"></a><h3>set-locale-string-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values
- ()
- (key-file:set-locale-string-list self group-name key locale list))
- </pre></div>
- <p>Associates a list of string values for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under
- <em class="parameter"><code>group_name</code></em>. If the translation for <em class="parameter"><code>key</code></em> cannot be found then
- it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.40.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>locale</p></td>
- <td class="parameter_description">
- <p>a locale identifier</p>
- <p>Passed as <code class="code">locale</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>list</p></td>
- <td class="parameter_description">
- <p>a <code class="constant">NULL</code>-terminated array of locale string values</p>
- <p>Passed as <code class="code">list</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>the length of <em class="parameter"><code>list</code></em></p>
- <p>Inferred from <code class="code">list</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.41"></a><h3>set-string</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-string self group-name key string))
- </pre></div>
- <p>Associates a new string value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.
- If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.
- Unlike <code class="function">g_key_file_set_value()</code>, this function handles characters
- that need escaping, such as newlines.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.41.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>string</p></td>
- <td class="parameter_description">
- <p>a string</p>
- <p>Passed as <code class="code">string</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.42"></a><h3>set-string-list</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-string-list self group-name key list))
- </pre></div>
- <p>Associates a list of string values for <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.
- If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.42.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>list</p></td>
- <td class="parameter_description">
- <p>an array of string values</p>
- <p>Passed as <code class="code">list</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>number of string values in <em class="parameter"><code>list</code></em></p>
- <p>Inferred from <code class="code">list</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.43"></a><h3>set-uint64</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-uint64 self group-name key value))
- </pre></div>
- <p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.43.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p>an integer value</p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.44"></a><h3>set-value</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-value self group-name key value))
- </pre></div>
- <p>Associates a new value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
- </p>
- <p>If <em class="parameter"><code>key</code></em> cannot be found then it is created. If <em class="parameter"><code>group_name</code></em> cannot
- be found then it is created. To set an UTF-8 string which may contain
- characters that need escaping (such as newlines or spaces), use
- <code class="function">g_key_file_set_string()</code>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.44.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>group_name</p></td>
- <td class="parameter_description">
- <p>a group name</p>
- <p>Passed as <code class="code">group-name</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>key</p></td>
- <td class="parameter_description">
- <p>a key</p>
- <p>Passed as <code class="code">key</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>value</p></td>
- <td class="parameter_description">
- <p>a string</p>
- <p>Passed as <code class="code">value</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.45"></a><h3>to-data</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:to-data self))
- </pre></div>
- <p>This function outputs <em class="parameter"><code>key_file</code></em> as a string.
- </p>
- <p>Note that this function never reports an error,
- so it is safe to pass <code class="constant">NULL</code> as <em class="parameter"><code>error</code></em>.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.45.5"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>return location for the length of the
- returned string, or <code class="constant">NULL</code></p>
- <p>Passed as <code class="code">length</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.46"></a><h3>unref</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (key-file:unref self))
- </pre></div>
- <p>Decreases the reference count of <em class="parameter"><code>key_file</code></em> by 1. If the reference count
- reaches zero, frees the key file and all its allocated memory.</p>
- <div class="refsect3">
- <a name="id-1.1.29.3.46.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>key_file</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GKeyFile</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.47"></a><h3>key-file:new</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:new))
- </pre></div>
- <p>Undocumented</p>
- </div>
- <div class="refsect2">
- <a name="id-1.1.29.3.48"></a><h3>key-file:error-quark</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:error-quark))
- </pre></div>
- <p>Undocumented</p>
- </div>
- </div>
- </div>
- <div class="footer">
- <hr>Generated by GTK-Doc V1.33.1</div>
- </body>
- </html>
|