# memberdef

name: first
definition: fsm_struct_journal_unit* fsm_struct_journal::first
type: fsm_struct_journal_unit *
scope: fsm_struct_journal
kind: variable
detaileddescription:
<para><itemizedlist>
<listitem><para>phantom documentation </para>
</listitem></itemizedlist>
</para>


name: fsm_enum_journal_severity
kind: enumeration
detaileddescription:
<para><itemizedlist>
<listitem><para>* * * - J O U R N A L M E T A R U L E S - * * * *</para>
<para>ref: sudo cat /var/log/messages</para>
<para>structure d'un log:</para>
</listitem><listitem><para>date</para>
</listitem><listitem><para>rang (n° d'ordre)</para>
</listitem><listitem><para>fichier</para>
</listitem><listitem><para>fonction</para>
</listitem><listitem><para>valeur, paramètre, descriptif, contexte,... (tout ce qui peut contribuer à améliorer la compréhension du journal) any value that can qualify the event and provides useful information when reading the log.</para>
</listitem></itemizedlist>
</para>
<para><hruler/>
</para>
<para>Un seul fsm_journal_event() par fonction ? sauf si cette fonction génère plusieurs autres fonctions d'intérêt ?</para>
<para>S'il y a deux fsm_journal_event() (begin / end) dans une fonction, ils doivent avoir la même étiquette (les mêmes valeurs) : SEVERITY & SOURCE</para>
<para><itemizedlist>
<listitem><para>* * * - J O U R N A L M E T A R U L E S - * * * <linebreak/>
 </para>
</listitem></itemizedlist>
</para>


name: fsm_journal_publish
definition: void fsm_journal_publish
type: void
argsstring: (fsm_struct_journal jj)
kind: function
detaileddescription:
<para><simplesect kind="date"><para></para>
</simplesect>
<simplesect kind="author"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
</parameternamelist>
<parameterdescription>
</parameterdescription>
</parameteritem>
</parameterlist>
return </para>


name: fsm_journal_init
definition: void fsm_journal_init
type: void
argsstring: (fsm_struct_journal *jj)
kind: function
detaileddescription:
<para>date clé (rank) fichier source fonction source +/- valeur <linebreak/>
 <verbatim>time_t current_time = time(NULL);
</verbatim> Check if the time retrieval was successful if (current_time == ((time_t)-1)) printf("Error getting current time.\n"); Convert to local time format and print printf("    Current timestamp: %ld  %s\n", current_time, message); printf("    Current time: %s", ctime(&current_time));</para>
<para><simplesect kind="date"><para></para>
</simplesect>
<simplesect kind="author"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
</parameternamelist>
<parameterdescription>
</parameterdescription>
</parameteritem>
</parameterlist>
return </para>

briefdescription:
<para>2024-09-22 What types of events should be reported ? (fsm, widgets, ... ) For what purpose ? What information must be collected and transmitted ? How do you name and classify this information ? How do you present it ? </para>


name: fsm_journal_push_front
definition: void fsm_journal_push_front
type: void
kind: function
argsstring:
(fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value)

detaileddescription:
<para><simplesect kind="date"><para></para>
</simplesect>
<simplesect kind="author"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<simplesect kind="see"><para></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
</parameternamelist>
<parameterdescription>
</parameterdescription>
</parameteritem>
</parameterlist>
return </para>


name: fsm_journal_seek
definition: void fsm_journal_seek
type: void
kind: function
argsstring:
(fsm_struct_journal jj, long usec, const char *file_source, const char *function_source, const char *string_value)


name: fsm_journal_publication_request
definition: void fsm_journal_publication_request
type: void
argsstring: ()
kind: function
detaileddescription:
<para>This is to guarantee the chronological order of the events in the journal.</para>
<para>The log is modified for each event but events can be send asynchronously. This is why the journal is only published once, before the end of "main()", Its chronological order is therefore guaranteed.</para>
<para>src/journal.c/fsm_journal_publish() (called here) is the last function of the program to be executed.</para>
<para>The <ref refid="d9/d03/structfsm__struct__journal" kindref="compound">fsm_struct_journal</ref> (gg_logs) is a static instance in this file. Therefore, all the functions that read or write it are in this file. This is to avoid uncontrolled operations on it.</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/main/main()</para>
</simplesect>
<simplesect kind="see"><para>src/journal/fsm_journal_publish() </para>
</simplesect>
</para>

briefdescription:
<para>The <ref refid="d4/d07/fsm_2dispatch_8c_1a435d1a5171a7d69662d701234722fee2" kindref="member">fsm_journal_publication_request()</ref> is called only once, by <ref refid="d0/d09/main_8c_1a3c04138a5bfe5d72780bb7e82a18e627" kindref="member">main()</ref>, just after closing the app and before ending the program. </para>


name: fsm_journal_event
definition: void fsm_journal_event
type: void
kind: function
briefdescription: <para>It is mandatory for any event to call this function to be published in the journal. </para>
argsstring:
(int severity, int source, const char *file_source, const char *function_source, const char *string_value)

detaileddescription:
<para>Before publication, a filter can be applied here (and only here) to select only some events of interest (during debugging, for example).</para>
<para>If there are too many events, a filter can be applied here to select a few interesting events for publication in the log.</para>
<para>This filter can operate on any the following five parameters: severity, source, *file_source, *function_source, *string_value. <simplesect kind="see"><para>below (params)</para>
</simplesect>
Simple filters (on a single parameter) can be combined using the logical operators 'and' and 'or' and parentheses.</para>
<para>Use: $ grep -r "fsm_journal_event" to confirm the callergraph calls.</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/journal.c/fsm_journal_push_front()</para>
</simplesect>
<simplesect kind="see"><para>src/main/main() </para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/modal.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/right.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/dialog.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/left.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/dispatch.c * 3 </para>
</simplesect>
<simplesect kind="see"><para>src/widget/one_rule/dispatch.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/one_rule/algebra/conditions.c * 2 </para>
</simplesect>
<simplesect kind="see"><para>src/widget/measure/dispatch.c </para>
</simplesect>
<simplesect kind="see"><para>src/widget/dispatch.c * 3 </para>
</simplesect>
<simplesect kind="see"><para>src/widget/all_rules/dispatch.c </para>
</simplesect>
<simplesect kind="see"><para><ref refid="d9/d06/preferences_2manager_8c" kindref="compound">src/fsm/preferences/manager.c</ref> * 8 </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/measures/manager.c * 2 </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/measures/tools_list.c * 4 </para>
</simplesect>
<simplesect kind="see"><para><ref refid="d4/d07/fsm_2dispatch_8c" kindref="compound">src/fsm/dispatch.c</ref> * 10 </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/results/manager.c </para>
</simplesect>
<simplesect kind="see"><para>src/util/tree.c </para>
</simplesect>
<simplesect kind="see"><para>src/signal.c * 38</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>severity</parametername>
</parameternamelist>
<parameterdescription>
<para><> </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="see"><para>enum fsm_enum_journal_severity in include/fsm.h 'severity' is a pre-defined value that must be associated to each event. It ranges from zero to six : CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 0 1 2 3 4 5 6</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>source</parametername>
</parameternamelist>
<parameterdescription>
<para><> </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="see"><para>enum fsm_enum_journal_source in include/fsm.h 'source' is a pre-defined value that can be associated to each event. It is not mandatory. It can be set to 'NULL'.</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>*file_source</parametername>
</parameternamelist>
<parameterdescription>
<para><> the name of the file that emits the event. </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>*function_source</parametername>
</parameternamelist>
<parameterdescription>
<para><> the function that emits the event. </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>*string_value</parametername>
</parameternamelist>
<parameterdescription>
<para><> any value that can qualify the event and provides useful information when reading the log. </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>


name: fsm_init
definition: void fsm_init
type: void
argsstring: (char *initial_message_from_main)
kind: function
briefdescription: <para>F S M I N I T *. </para>
detaileddescription:
<para>This is the first function called by '<ref refid="d0/d09/main_8c" kindref="compound">main.c</ref>' It initiates the journal and four lists which are: 'measures', 'results', 'displayables results' and 'preferences'. These lists will be used to define the current state of the fsm.</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/main/main()</para>
</simplesect>
<simplesect kind="see"><para>src/journal/fsm_journal_init() </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/dispatch/fsm_journal_event() </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/measures/manager/fsm_list_init_measures() </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/results/manager/fsm_list_init_results() </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/preferences/manager/fsm_list_init_displayables() </para>
</simplesect>
<simplesect kind="see"><para>src/fsm/preferences/manager/fsm_list_init_preferences()</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>*initial_message_from_main</parametername>
</parameternamelist>
<parameterdescription>
<para></para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>


name: fsm_set_exec_edit
definition: void fsm_set_exec_edit
type: void
argsstring: (int choice)
kind: function
briefdescription: <para>setter for the static value: 'choice_STATE_RULES_DATA' (in this file) </para>
detaileddescription:
<para>see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT }</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>(none)</para>
</simplesect>
<simplesect kind="see"><para>src/signal * 2</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>choice</parametername>
</parameternamelist>
<parameterdescription>
<para>< a boolean value which can be "EXEC" or "EDIT" </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>


name: fsm_set_preferences_modified
definition: void fsm_set_preferences_modified
type: void
argsstring: (bool value)
kind: function
briefdescription: <para>setter for the static boolean: 'preferences_have_been_modified' </para>
detaileddescription:
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>TODO To be used by any function that modifies the current user <ref refid="d3/d0f/structpreferences" kindref="compound">preferences</ref></para>
</simplesect>
<simplesect kind="see"><para><ref refid="d4/d07/fsm_2dispatch_8c_1a8c67f42f95d48ee2469c9a27d65db3e6" kindref="member">fsm_journal_event()</ref></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>value</parametername>
</parameternamelist>
<parameterdescription>
<para>= TRUE if preferences_have_been_modified. </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>


name: fsm_set_state_rules_data
definition: void fsm_set_state_rules_data
type: void
argsstring: (int choice)
kind: function
briefdescription: <para>setter for the static value: 'choice_STATE_RULES_DATA' (in this file) </para>
detaileddescription:
<para>see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA } Today (2024-10) the initial page is set to 'SYNTH'. <simplesect kind="see"><para>line 292 choice_STATE_RULES_DATA = SYNTH; NB This choice can be temporarily modified for debugging purpose: </para>
</simplesect>
<simplesect kind="see"><para>end of the function: <ref refid="d4/d07/fsm_2dispatch_8c" kindref="compound">fsm/dispatch.c</ref> window_design_topbar_left()</para>
</simplesect>
<simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/signal * 4</para>
</simplesect>
<simplesect kind="see"><para>(none)</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>choice</parametername>
</parameternamelist>
<parameterdescription>
<para></para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>


name: fsm_get_exec_edit
definition: int fsm_get_exec_edit
type: int
argsstring: ()
kind: function
briefdescription: <para>Any function that modifies the client window must obtain this boolean. </para>
detaileddescription:
<para>The 'state' and 'rules' pages appearance depends heavily on this.</para>
<para>see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT } The current int may be replaced by a boolean before publication. TODO</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/widget/one_rule/dispatch </para>
</simplesect>
<simplesect kind="see"><para>src/widget/state/dispatch * 2 </para>
</simplesect>
<simplesect kind="see"><para>src/signal</para>
</simplesect>
<simplesect kind="see"><para>include/fsm enum fsm_enum_exec_edit { EXEC, EDIT } << TODO check this</para>
</simplesect>
<simplesect kind="return"><para>choice_EXEC_EDIT </para>
</simplesect>
</para>


name: fsm_get_state_rules_data
definition: int fsm_get_state_rules_data
type: int
argsstring: ()
kind: function
briefdescription: <para>Any function that modifies the client window must obtain this value. </para>
detaileddescription:
<para>The pages selection and the window appearance depends heavily on this.</para>
<para>see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA }</para>
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/widget/topbar/left </para>
</simplesect>
<simplesect kind="see"><para>src/signal</para>
</simplesect>
<simplesect kind="see"><para>(none)</para>
</simplesect>
<simplesect kind="return"><para>choice_STATE_RULES_DATA </para>
</simplesect>
</para>


name: fsm_get_preferences_state
definition: bool fsm_get_preferences_state
type: bool
argsstring: ()
kind: function
briefdescription: <para>getter for the static boolean: 'preferences_have_been_modified' </para>
detaileddescription:
<para><simplesect kind="date"><para>2024-08 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>TODO A function must obtain this boolean when it stores the current state of the fsm (including <ref refid="d3/d0f/structpreferences" kindref="compound">preferences</ref>) before closing the current session.</para>
</simplesect>
<simplesect kind="see"><para>(none)</para>
</simplesect>
<simplesect kind="return"><para>preferences_have_been_modified </para>
</simplesect>
</para>


name: graphics_render_stack
definition: bool graphics_render_stack
type: bool
argsstring: (GtkWidget *container_widget)
kind: function
briefdescription:
<para>Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas. </para>


name: graphics_init
definition: int graphics_init
type: int
argsstring: (void *error_buffer)
kind: function
briefdescription: <para>Initializes a gl_area. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>gl_area</parametername>
<parametername>ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>to the gl_area widget</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>true if initialized </para>
</simplesect>
</para>


name: graphics_draw
definition: void graphics_draw
type: void
argsstring: (const int graphics_stack_id)
kind: function
briefdescription: <para>Draws the current buffer to a gl_area. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>gl_area</parametername>
<parametername>ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>to the gl_area widget</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_shutdown
definition: bool graphics_shutdown
type: bool
argsstring: (const int graphics_stack_id, void *error_buffer)
kind: function
briefdescription: <para>Draws the current buffer to a gl_area. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>gl_area</parametername>
<parametername>ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>to the gl_area widget</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void Shutdowns a gl_area</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>gl_area</parametername>
<parametername>ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>to the gl_area widget</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>true if success </para>
</simplesect>
</para>


name: graphics_init_buffers
definition: void graphics_init_buffers
type: void
argsstring: (const int graphics_stack_id)
kind: function
briefdescription: <para>Initializes the buffer of a gl_area Calls according to the user preferences. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>gl_area</parametername>
<parametername>ptr</parametername>
</parameternamelist>
<parameterdescription>
<para>to the gl_area widget </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_draw_vertex
definition: void graphics_draw_vertex
type: void
argsstring: (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)
kind: function
briefdescription: <para>Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>GLfloat</parametername>
</parameternamelist>
<parameterdescription>
<para>x, GLfloat y, GLfloat z</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_draw_line
definition: void graphics_draw_line
type: void
argsstring: (const int graphics_stack_id, GLuint a, GLuint b)
kind: function
detaileddescription:
<para>Writes values to describe a line from a to b into the line buffer.</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>GLfloat</parametername>
</parameternamelist>
<parameterdescription>
<para>r, GLfloat g, GLfloat b</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void Writes values to describe a line from a to b into the line buffer</para>
</simplesect>
@use liste de fonctions GTK</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>coords</parametername>
</parameternamelist>
<parameterdescription>
<para>GLuint (a,b)</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>coords</parametername>
</parameternamelist>
<parameterdescription>
<para>GLuint (a,b)</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>

briefdescription:
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </para>


name: graphics_draw_plan
definition: void graphics_draw_plan
type: void
argsstring: (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)
kind: function
briefdescription: <para>Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>coords</parametername>
</parameternamelist>
<parameterdescription>
<para>GLuint (a,b,c)</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_create_shader
definition: static GLuint graphics_create_shader
type: GLuint
argsstring: (const int graphics_stack_id, int type, const char *src)
kind: function
briefdescription: <para>Created and compile a shader. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>type</parametername>
<parametername>shader</parametername>
</parameternamelist>
<parameterdescription>
<para>type src, source code of shader</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>shader id </para>
</simplesect>
</para>


name: graphics_draw_color
definition: void graphics_draw_color
type: void
argsstring: (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)
kind: function
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>GLfloat</parametername>
</parameternamelist>
<parameterdescription>
<para>r, GLfloat g, GLfloat b</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>

briefdescription:
<para>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console. </para>


name: graphics_draw_one_arrow_vertex
definition: int graphics_draw_one_arrow_vertex
type: int
kind: function
argsstring:
(const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)


name: graphics_draw_space_ridges_vertex
definition: int graphics_draw_space_ridges_vertex
type: int
argsstring: (const int graphics_stack_id, long offset_vertex, long x, long y, long z)
kind: function
briefdescription: <para>Writes grid ridges to vertex and color buffers. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>coords</parametername>
</parameternamelist>
<parameterdescription>
<para>long (x,y,z), step_x, step_y, step_z</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_draw_grids_on_space_faces_vertex
definition: long graphics_draw_grids_on_space_faces_vertex
type: long
argsstring: (const int graphics_stack_id, long x, long y, long z)
kind: function
briefdescription: <para>Writes grid lines on space faces. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>coords</parametername>
</parameternamelist>
<parameterdescription>
<para>long (x,y,z)</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>void </para>
</simplesect>
</para>


name: graphics_set_arrow
definition: int graphics_set_arrow
type: int
kind: function
argsstring:
(int graphics_stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)


name: util_gl_get_stack
definition: long util_gl_get_stack
type: long
argsstring: (void *container_widget)
kind: function
briefdescription: <para>Look for stack entry and returns stack_id. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>container_widget</parametername>
</parameternamelist>
<parameterdescription>
<para>generally the GtkBox that contains the GLArea</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>stack_id </para>
</simplesect>
</para>


name: util_gl_init_stack
definition: bool util_gl_init_stack
type: bool
argsstring: (void *container_widget, GError *error_buffer)
kind: function
briefdescription: <para>Look for stack entry and initializes OpenGL for it. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>container_widget</parametername>
</parameternamelist>
<parameterdescription>
<para>generally the GtkBox that contains the GLArea </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>error_buffer</parametername>
</parameternamelist>
<parameterdescription>
<para>phantom documentation used to test the functioning of doxygen</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>bool: true if success </para>
</simplesect>
</para>


name: util_gl_render_stack
definition: bool util_gl_render_stack
type: bool
argsstring: (GtkWidget *container_widget)
kind: function
briefdescription: <para>Look for stack entry and triggers OpenGL for drawing. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>container_widget</parametername>
</parameternamelist>
<parameterdescription>
<para>generally the GtkBox that contains the GLArea</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>bool: true if success </para>
</simplesect>
</para>


name: util_gl_update_axis
definition: bool util_gl_update_axis
type: bool
argsstring: (GtkWidget *container_widget, int axis, int value)
kind: function
briefdescription: <para>Look for stack entry and triggers OpenGL for drawing. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>container_widget</parametername>
</parameternamelist>
<parameterdescription>
<para>generally the GtkBox that contains the GLArea </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>axis</parametername>
</parameternamelist>
<parameterdescription>
<para>phantom documentation used to test the functioning of doxygen </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>value</parametername>
</parameternamelist>
<parameterdescription>
<para>phantom documentation used to test the functioning of doxygen</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>bool: true if success </para>
</simplesect>
</para>


name: create_axis_slider
definition: GtkWidget * create_axis_slider
type: GtkWidget *
argsstring: (int axis)
kind: function
briefdescription: <para>Creates a slider widget. </para>
detaileddescription:
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>axis</parametername>
</parameternamelist>
<parameterdescription>
<para>the axis we're building a label for</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>GtkWidget*: pointer to the new widget </para>
</simplesect>
</para>


name: graphics_debug_callback
definition: static void graphics_debug_callback
type: void
kind: function
argsstring:
(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *msg, const void *data)


name: main
definition: int main
type: int
argsstring: (int argc, char **argv)
kind: function
detaileddescription:
<para><simplesect kind="date"><para>2024-04 </para>
</simplesect>
<simplesect kind="author"><para>Jean</para>
</simplesect>
<simplesect kind="see"><para>src/fsm/dispatch </para>
</simplesect>
<simplesect kind="see"><para>src/signal</para>
</simplesect>
<simplesect kind="see"><para>(none)</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>argc</parametername>
</parameternamelist>
<parameterdescription>
<para></para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>**argv</parametername>
</parameternamelist>
<parameterdescription>
<para></para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>status </para>
</simplesect>
</para>

briefdescription:
<para>gem-graph-client <ref refid="d0/d09/main_8c_1a3c04138a5bfe5d72780bb7e82a18e627" kindref="member">main()</ref> </para>


name: util_gl_set_arrow
definition: int util_gl_set_arrow
type: int
kind: function
briefdescription: <para>phantom documentation used to test the functioning of doxygen </para>
argsstring:
(int stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)


name: main_window
definition: GtkWindow* main_window
type: GtkWindow *
kind: variable
briefdescription:
<para>Comment gerer l'image du curseur ? <ulink url="https://docs.gtk.org/gdk4/class.Cursor.html">https://docs.gtk.org/gdk4/class.Cursor.html</ulink> TODO. </para>


name: vertex_shader_src
definition: const char* vertex_shader_src
type: const char *
kind: variable
initializer:
= "#version 460 core\n"
                                "layout (location = 0) in vec3 aPos;\n"
                                "layout (location = 2) in mat4 instanceMatrix;\n"
                                "uniform mat4 projection;\n"
                                "uniform mat4 view;\n"
                                "void main() {\n"
                                "    gl_Position = projection * view * instanceMatrix * vec4(aPos, 1.0);\n"
                                "}\n"


name: fragment_shader_src
definition: const char* fragment_shader_src
type: const char *
kind: variable
initializer:
= "#version 460 core\n"
                                  "uniform vec4 FragColor;\n"
                                  "out vec4 finalColor;\n"
                                  "void main() {\n"
                                  "    finalColor = vec4(FragColor.rgb, 0.3);  // Set alpha to 30%\n"
                                  "}\n"


name: vertices
definition: GLfloat vertices[]
type: GLfloat
argsstring: []
kind: variable
initializer:
= {
    -0.5f, -0.5f, -0.5f,  
     0.5f, -0.5f, -0.5f,  
     0.5f,  0.5f, -0.5f,  
    -0.5f,  0.5f, -0.5f,  
    -0.5f, -0.5f,  0.5f,  
     0.5f, -0.5f,  0.5f,  
     0.5f,  0.5f,  0.5f,  
    -0.5f,  0.5f,  0.5f   
}


name: indices
definition: GLuint indices[]
type: GLuint
argsstring: []
kind: variable
initializer:
= {
    4, 5, 6, 6, 7, 4,  
    0, 3, 2, 2, 1, 0,  
    0, 4, 7, 7, 3, 0,  
    1, 2, 6, 6, 5, 1,  
    3, 7, 6, 6, 2, 3,  
    0, 1, 5, 5, 4, 0   
}


name: edge_indices
definition: GLuint edge_indices[]
type: GLuint
argsstring: []
kind: variable
initializer:
= {
    
    0, 1,
    1, 5,
    5, 4,
    4, 0,

    
    3, 2,
    2, 6,
    6, 7,
    7, 3,

    
    0, 3,
    1, 2,
    5, 6,
    4, 7
}


name: arrow_vertices
definition: GLfloat arrow_vertices[]
type: GLfloat
argsstring: []
kind: variable
initializer:
= {
    0.0f, 0.0f, 0.0f,  
    0.5f, 0.0f, 0.0f,  
    -0.5f, 0.0f, 0.0f, 
    0.0f, 0.5f, 0.0f,  
    0.0f, -0.5f, 0.0f, 
    0.0f, 0.0f, 0.5f,  
    0.0f, 0.0f, -0.5f  
}


# compounddef

name: preferences
title: preferences Struct Reference
kind: struct
detaileddescription:
<para>const char <emphasis>fsm_get_button_icon_name (int n) {return (const char</emphasis>) icon_name [n];} phantom documentation used to test the functioning of doxygen </para>

briefdescription:
<para>use this ? static const char *icon_name [3] = { "document-revert-rtl-symbolic", "edit-undo-symbolic", "view-refresh-symbolic" }; </para>


name: Stack
title: Stack Struct Reference
kind: struct
detaileddescription: <para>phantom documentation used to test the functioning of doxygen </para>
briefdescription:
<para>struct images_bff {GtkWidget *arr[MAX_SIZE]; int top;}; static struct images_bff *my_list = NULL;//, *babar = NULL; static struct images_bff *alloc_images_bff () { struct images_bff *p; p = malloc (sizeof (struct images_bff)); if (p == NULL) printf ("fatal: ran out of storage"); p->arr[MAX_SIZE] = NULL; p->top = 0; return p; } static void add_to_mylist (int my_int) { struct images_bff *p = alloc_images_bff (); p->arr[MAX_SIZE] = NULL; // TODO p->top = my_int; my_list = p; } static void free_intlist (struct images_bff *p) { TODO } TODO free_intlist (mylist); TODO mylist = NULL; TODO offsetof (type, field) </para>


name: main.c
title: main.c File Reference
kind: file
briefdescription: <para>Gem-graph client Main functions. </para>
detaileddescription:
<para>Copyright © 2021 Libre en Communs <ulink url="mailto:contact@a-lec.org">contact@a-lec.org</ulink> Copyright © 2021 Arthur Menges <ulink url="mailto:arthur.menges@a-lec.org">arthur.menges@a-lec.org</ulink> Copyright © 2021-2024 Adrien Bourmault <ulink url="mailto:neox@a-lec.org">neox@a-lec.org</ulink> Copyright © 2021-2024 Jean Sirmai <ulink url="mailto:jean@a-lec.org">jean@a-lec.org</ulink></para>
<para>This file is part of Gem-graph. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</para>
<para>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.</para>
<para>You should have received a copy of the GNU Affero General Public License along with this program. If not, see <ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>.</para>
<para>gem-graph-client main file</para>
<para>Sur quel modèle se guider pour structurer le client gem-graph ?</para>
<para><ulink url="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel">https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel</ulink> <ulink url="https://en.wikipedia.org/wiki/Multitier_architecture">https://en.wikipedia.org/wiki/Multitier_architecture</ulink></para>
<para>ORGANISATION ACTUELLE (Octobre 2024)</para>
<sect2 id="d0/d09/main_8c_1autotoc_md0">
<title>1) Les structures hierarchiques.</title>
<para>La description du 'design' des fenêtres se trouve dans le dossier 'widget' et s'organise naturellement en arborescence, en se calquant sur l'arborescence des widgets eux-mêmes.</para>
<para>Il sera donc facile de répartir cette description en dossiers et fichiers au fur à mesure de son développement.</para>
<para>Actuellement, par exemple, la fenêtre principale comporte : <blockquote><para><zwj/>une barre de titre (décrite dans 'topbar') et un widget 'child' (la partie sous la barre de titre) qui peut prendre au moins trois apparences différentes :<itemizedlist>
<listitem><para>state (montre l'état de l'espace et les commandes associées)</para>
</listitem><listitem><para>rules (les règles et les commandes associées)</para>
</listitem><listitem><para>stock (les données provenant des mesures, les outils d'analyse, etc.) (nom provisoire : mal défini à ce stade; fonctions à répartir...) </para>
</listitem></itemizedlist>
</para>
</blockquote>La fenêtre principale s'ouvre sur la vue de l'état ('state.c') en mode 'EXEC'. Cette vue comporte trois panneaux (widgets) principaux: sup, moyen, inf ou encore: CONTRAST, CAMERA, CONTROL ou EDIT si on veut les nommer d'après leur fonction.</para>
<para>Lorsque la description de chaque widget s'affinera et demandera plus de place, ces trois widgets principaux deviendront des dossiers et les widgets qu'ils contiennent des fichiers (ou des dossiers si besoin) et ainsi de suite...</para>
</sect2>
<sect2 id="d0/d09/main_8c_1autotoc_md1">
<title>2) Les structures transversales.</title>
<para>Les fonctions 'transversales' comme celles de 'graphics', 'parse', 'fsm', 'prefer', et peut-être des structures communes à tous les arbres, listes, etc. doivent pouvoir être accédées directement sans avoir à passer par la hiérarchie des widgets et/ou callbacks. Elles restent à la racine: 'src/</para>
<para>'finite state machine' ('fsm') va centraliser l'identification des états (apparences) de la fenêtre et des transitions entre ces apparences; Elle sera probablement décomposée en de nombreux 'sous-automates' tels que chaque état de la fenêtre soit une combinaison unique des états de ces sous-automates.</para>
<para>Exemple, muni des deux 'sous-automates' : <blockquote><para><zwj/> { EXEC, EDIT }; // xor { STATE, RULES, DATA }; // xor </para>
</blockquote>la 'finite state machine' peut se trouver dans 2 x 3 = 6 états. (voir fsm.h lignes 40-41)</para>
<para>Les grandes fonctions du client seront lancées par cette state machine :<itemizedlist>
<listitem><para>édition automatique (optimisation) de l'arbre des conditions</para>
</listitem><listitem><para>tests sur un mini-serveur local</para>
</listitem><listitem><para>analyses de données...</para>
</listitem></itemizedlist>
</para>
<para>Leur recueil et la mémorisation des préférences des utilisateurs sont des fonctions centrales mais leur mise en oeuvre suivra probalement des voies hiérarchiques.</para>
<para>On peut prévoir des préférences concernant l'apparence des widgets, les traductions, les 'disabilities'; etc. mais aussi concernant les méthodes de travail, l'usage des outils d'analyse, etc. >> des 'scripts' pour des 'méta-fonctions' (des 'macros') ? </para>
</sect2>


name: dispatch.c
title: dispatch.c File Reference
kind: file
detaileddescription:
<para>This Finite State Machine (fsm) describes all the possible states of the Gem-graph client and all the transitions between these states.</para>
<para>gem-graph-client fsm (Finite State Machine) manages four topics:<itemizedlist>
<listitem><para>engine (window appearance)</para>
</listitem><listitem><para>measures (current measurements)</para>
</listitem><listitem><para>results (current data acquisition and displays)</para>
</listitem><listitem><para>preferences (current user preferences)</para>
</listitem></itemizedlist>
</para>
<para>Each state of the finite state machine (fsm) is a combination of their states.</para>
<para>It must be<itemizedlist>
<listitem><para>saved at the end of a work session and</para>
</listitem><listitem><para>reread (available) at the start of a new session.</para>
</listitem></itemizedlist>
</para>
<para>No state of the fsm should be defined in another module. No fsm transition needs to be executed in another module.</para>
<para>The journal is created, edited and published from here. </para>

briefdescription:
<para><itemizedlist>
<listitem><para>OOOOOOOOOOO OOOOO OOO OOO * OO OO OO OOOO OOOO * OO OO OO OO OO OO * OOOOOO OO OO OO OO OO * OO OO OO OOO OO * OO OO OO OO * OO OO OOO OO OO * OO OOOOOO OO OO *<itemizedlist>
<listitem></listitem></itemizedlist>
</para>
</listitem></itemizedlist>
</para>


