gem-graph-client/doc/docbook/d8/d0c/util_8h.xml

387 lines
18 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_util_8h" xml:lang="en-US">
<title>include/util.h File Reference</title>
<indexterm><primary>include/util.h</primary></indexterm>
<para>
<para>utilities header </para>
</para>
<programlisting linenumbering="unnumbered">#include &lt;stdbool.h&gt;<?linebreak?>#include &lt;stddef.h&gt;<?linebreak?>#include &lt;gtk-4.0/gtk/gtk.h&gt;<?linebreak?>#include &quot;../include/fsm.h&quot;<?linebreak?></programlisting><simplesect>
<title>Classes </title>
<itemizedlist>
<listitem><para>struct <link linkend="_structpile">pile</link></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para>struct <link linkend="_structelem">elem</link></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para>struct <link linkend="_structdblist">dblist</link></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para>struct <link linkend="_structslist">slist</link></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
</itemizedlist>
</simplesect>
<simplesect>
<title>Typedefs </title>
<itemizedlist>
<listitem><para><anchor xml:id="_util_8h_1a8b1be516cd670e3808f29fa7576017db"/>typedef struct <link linkend="_structpile">pile</link> <emphasis role="strong">pile</emphasis></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a03f28ef452dbb87c629a2b39da6fc63c"/>typedef struct <link linkend="_structelem">elem</link> <emphasis role="strong">elem</emphasis></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a6f169a5dcb2ec0f7ab8120292cf14d9e"/>typedef struct <link linkend="_structslist">slist</link> <emphasis role="strong">slist</emphasis></para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
</itemizedlist>
</simplesect>
<simplesect>
<title>Functions </title>
<itemizedlist>
<listitem><para><anchor xml:id="_util_8h_1a40bb126a021a338b20022e741bbd4ae1"/>char * <emphasis role="strong">util_read_file</emphasis> (char *filename)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a7a9bfe2d249e5da19a1117c7d5636b8a"/>char * <emphasis role="strong">util_concat</emphasis> (const char *str,...)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a87a9dcc9beba6b65e30ce4294c20713d"/>void <emphasis role="strong">util_pile_clear</emphasis> (<link linkend="_structpile">pile</link> **)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1afbc42bf42f66e0aa969de04212c4e07a"/>void <emphasis role="strong">util_pile_view</emphasis> (<link linkend="_structpile">pile</link> *)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1ae6f16aafebd809c62cacd9abc3892925"/>int <emphasis role="strong">util_pile_push</emphasis> (<link linkend="_structpile">pile</link> **, int)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a121e2ed13ed9448f33173ebaefba3679"/>int <emphasis role="strong">util_pile_pop</emphasis> (<link linkend="_structpile">pile</link> **)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1afbb61183d866a834bdf9cae2be6c84f5"/>int <emphasis role="strong">util_pile_length</emphasis> (<link linkend="_structpile">pile</link> *p)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a3133311b2fe84f2d9745f67f2cc02bd3"/>void <emphasis role="strong">util_list_2x2_init</emphasis> (<link linkend="_structdblist">dblist</link> *l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1abfc7d5a8fff1bd14f16a501ee1755349"/>void <emphasis role="strong">util_list_2x2_clear</emphasis> (<link linkend="_structdblist">dblist</link> *l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1aad019969171d29bf58df2740fe15d738"/>void <emphasis role="strong">util_list_2x2_view</emphasis> (<link linkend="_structdblist">dblist</link> l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1ae173600429156cca4e5755d5aa628b81"/>int <emphasis role="strong">util_list_2x2_push_back</emphasis> (<link linkend="_structdblist">dblist</link> *l, int val)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a41d729a609f850d89a40e161c4cf189d"/>int <emphasis role="strong">util_list_2x2_push_front</emphasis> (<link linkend="_structdblist">dblist</link> *l, int val)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a275a40c54b4c7ec73191a4ed1aba4936"/>int <emphasis role="strong">util_list_2x2_pop_back</emphasis> (<link linkend="_structdblist">dblist</link> *l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a838636447589eb073de9b8a0f20346d5"/>int <emphasis role="strong">util_list_2x2_pop_front</emphasis> (<link linkend="_structdblist">dblist</link> *l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1ae764753e3beb9811561b0ced2a625981"/>int <emphasis role="strong">util_list_2x2_length</emphasis> (<link linkend="_structdblist">dblist</link> l)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a1133cba5111479ea7d7c4a79778560e1"/>void <emphasis role="strong">util_sorted_list_clear</emphasis> (<link linkend="_structslist">slist</link> **sl)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a87a5b344dd2c0ea1af5d36ea67b12517"/>void <emphasis role="strong">util_sorted_list_view</emphasis> (<link linkend="_structslist">slist</link> *sl)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1ad75bea7d8dfb1dad20cd99a92a045f19"/>int <emphasis role="strong">util_sorted_list_insert</emphasis> (<link linkend="_structslist">slist</link> **sl, int val)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1aee1f73cdb28ee531042c9f84875d3e5f"/>int <emphasis role="strong">util_sorted_list_pop</emphasis> (<link linkend="_structslist">slist</link> **sl)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a35eb9fbef7ed4d3e9dc93f74d0e9934a"/>int <emphasis role="strong">util_sorted_list_length</emphasis> (<link linkend="_structslist">slist</link> *sl)</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1aaa9fc96cf3047e5a323156c7f500d5fb"/>void <emphasis role="strong">util_trigger_test</emphasis> ()</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a05aec803518f49ffdeff1db6045a6652"/>void <emphasis role="strong">util_test_pile</emphasis> ()</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a2237b720be9f32414c3caccc1bec0d97"/>void <emphasis role="strong">util_test_double_list</emphasis> ()</para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a94626d7f8c95811287f249c2db85448f"/>void <emphasis role="strong">util_test_sorted_list</emphasis> ()</para>
</listitem>
<listitem><para>long <link linkend="_util_8h_1adbe03a3d239b22390e9de809443c8df9">util_gl_get_stack</link> (void *container_widget)</para>
<para>Look for stack entry and returns stack_id. </para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1a133e79c96135a44a4d4df48051aafbef"/>long <emphasis role="strong">util_gl_is_util_ready</emphasis> (void *container_widget)</para>
</listitem>
<listitem><para>bool <link linkend="_util_8h_1a28b44187c7ae713705874288323e10a6">util_gl_init_stack</link> (void *container_widget, GError *error_buffer)</para>
<para>Look for stack entry and initializes OpenGL for it. </para>
</listitem>
<listitem><para>bool <link linkend="_util_8h_1a9d41985e1832e0a798e722d2341752f1">util_gl_shutdown_stack</link> (void *container_widget, GError *error_buffer)</para>
<para>Look for stack entry and shutdowns OpenGL for it. </para>
</listitem>
<listitem><para><anchor xml:id="_util_8h_1ab0a523986944f809fac9acc1693f3029"/>void <emphasis role="strong">util_gl_clean_stack_index</emphasis> (void)</para>
<para>phantom documentation used to test the functioning of doxygen </para>
</listitem>
<listitem><para>bool <link linkend="_util_8h_1a8132a1a797f4f12eaff04b4c3610f054">util_gl_render_stack</link> (GtkWidget *container_widget)</para>
<para>Look for stack entry and triggers OpenGL for drawing. </para>
</listitem>
<listitem><para>bool <link linkend="_util_8h_1ad830e66002a24806e3617946dc988e95">util_gl_update_axis</link> (GtkWidget *container_widget, int axis, int value)</para>
<para>Look for stack entry and triggers OpenGL for drawing. </para>
</listitem>
<listitem><para>void <link linkend="_util_8h_1ae2198c050662c486c8e66c6e6b5a7e0b">util_gl_shutdown_all_stacks</link> (void)</para>
<para>Look for every stack entry and shutdowns OpenGL for it. </para>
</listitem>
<listitem><para>GtkWidget * <link linkend="_util_8h_1a2cb205bd6556250d019b4de59eee3894">create_axis_slider</link> (int axis)</para>
<para>Creates a slider widget. </para>
</listitem>
</itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>
<para>utilities header </para>
<para>This file is part of Gem-graph. </para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_util_8h_1a2cb205bd6556250d019b4de59eee3894"/><section>
<title>create_axis_slider()</title>
<indexterm><primary>create_axis_slider</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>create_axis_slider</secondary></indexterm>
<para><computeroutput>GtkWidget * create_axis_slider (int axis)</computeroutput></para><para>
<para>Creates a slider widget. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>axis</entry><entry>
<para>the axis we&apos;re building a label for</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>GtkWidget*: pointer to the new widget </para>
</formalpara>
</para>
</section>
<anchor xml:id="_util_8h_1adbe03a3d239b22390e9de809443c8df9"/><section>
<title>util_gl_get_stack()</title>
<indexterm><primary>util_gl_get_stack</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_get_stack</secondary></indexterm>
<para><computeroutput>long util_gl_get_stack (void * container_widget)</computeroutput></para><para>
<para>Look for stack entry and returns stack_id. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>container_widget</entry><entry>
<para>generally the GtkBox that contains the GLArea</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>stack_id </para>
</formalpara>
</para>
</section>
<anchor xml:id="_util_8h_1a28b44187c7ae713705874288323e10a6"/><section>
<title>util_gl_init_stack()</title>
<indexterm><primary>util_gl_init_stack</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_init_stack</secondary></indexterm>
<para><computeroutput>bool util_gl_init_stack (void * container_widget, GError * error_buffer)</computeroutput></para><para>
<para>Look for stack entry and initializes OpenGL for it. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>container_widget</entry><entry>
<para>generally the GtkBox that contains the GLArea </para>
</entry>
</row>
<row>
<entry>error_buffer</entry><entry>
<para>phantom documentation used to test the functioning of doxygen</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>bool: true if success </para>
</formalpara>
</para>
</section>
<anchor xml:id="_util_8h_1a8132a1a797f4f12eaff04b4c3610f054"/><section>
<title>util_gl_render_stack()</title>
<indexterm><primary>util_gl_render_stack</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_render_stack</secondary></indexterm>
<para><computeroutput>bool util_gl_render_stack (GtkWidget * container_widget)</computeroutput></para><para>
<para>Look for stack entry and triggers OpenGL for drawing. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>container_widget</entry><entry>
<para>generally the GtkBox that contains the GLArea</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>bool: true if success </para>
</formalpara>
</para>
</section>
<anchor xml:id="_util_8h_1ae2198c050662c486c8e66c6e6b5a7e0b"/><section>
<title>util_gl_shutdown_all_stacks()</title>
<indexterm><primary>util_gl_shutdown_all_stacks</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_shutdown_all_stacks</secondary></indexterm>
<para><computeroutput>void util_gl_shutdown_all_stacks (void )</computeroutput></para><para>
<para>Look for every stack entry and shutdowns OpenGL for it. </para>
</para>
<para>returns true if success ? TODO why not bool ? </para>
</section>
<anchor xml:id="_util_8h_1a9d41985e1832e0a798e722d2341752f1"/><section>
<title>util_gl_shutdown_stack()</title>
<indexterm><primary>util_gl_shutdown_stack</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_shutdown_stack</secondary></indexterm>
<para><computeroutput>bool util_gl_shutdown_stack (void * container_widget, GError * error_buffer)</computeroutput></para><para>
<para>Look for stack entry and shutdowns OpenGL for it. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>container_widget</entry><entry>
<para>generally the GtkBox that contains the GLArea </para>
</entry>
</row>
<row>
<entry>error_buffer</entry><entry>
<para>phantom documentation used to test the functioning of doxygen</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>bool: true if success </para>
</formalpara>
</para>
</section>
<anchor xml:id="_util_8h_1ad830e66002a24806e3617946dc988e95"/><section>
<title>util_gl_update_axis()</title>
<indexterm><primary>util_gl_update_axis</primary><secondary>util.h</secondary></indexterm>
<indexterm><primary>util.h</primary><secondary>util_gl_update_axis</secondary></indexterm>
<para><computeroutput>bool util_gl_update_axis (GtkWidget * container_widget, int axis, int value)</computeroutput></para><para>
<para>Look for stack entry and triggers OpenGL for drawing. </para>
</para>
<para>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>container_widget</entry><entry>
<para>generally the GtkBox that contains the GLArea </para>
</entry>
</row>
<row>
<entry>axis</entry><entry>
<para>phantom documentation used to test the functioning of doxygen </para>
</entry>
</row>
<row>
<entry>value</entry><entry>
<para>phantom documentation used to test the functioning of doxygen</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
<formalpara><title>Returns</title>
<para>bool: true if success </para>
</formalpara>
</para>
</section>
</section>
</section>