Gem-graph 0.1.0
A modelling tool based on rewriting of geometric graphs.
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
util.h File Reference

utilities header More...

#include <stdbool.h>
#include <stddef.h>
#include <gtk-4.0/gtk/gtk.h>
#include "../include/fsm.h"

Classes

struct  pile
 phantom documentation used to test the functioning of doxygen More...
 
struct  elem
 phantom documentation used to test the functioning of doxygen More...
 
struct  dblist
 phantom documentation used to test the functioning of doxygen More...
 
struct  slist
 phantom documentation used to test the functioning of doxygen More...
 

Typedefs

typedef struct pile pile
 phantom documentation used to test the functioning of doxygen
 
typedef struct elem elem
 phantom documentation used to test the functioning of doxygen
 
typedef struct slist slist
 phantom documentation used to test the functioning of doxygen
 

Functions

char * util_read_file (char *filename)
 reads a file from filename into a provided buffer
 
char * util_concat (const char *str,...)
 https://sourceware.org/glibc/manual/latest/html_mono/libc.html#Variadic-Prototypes
 
void util_pile_clear (pile **)
 
void util_pile_view (pile *)
 
int util_pile_push (pile **, int)
 
int util_pile_pop (pile **)
 
int util_pile_length (pile *p)
 
void util_list_2x2_init (dblist *l)
 Phantom documentation.
 
void util_list_2x2_clear (dblist *l)
 Phantom documentation.
 
void util_list_2x2_view (dblist l)
 Phantom documentation.
 
int util_list_2x2_push_back (dblist *l, int val)
 Phantom documentation.
 
int util_list_2x2_push_front (dblist *l, int val)
 Phantom documentation.
 
int util_list_2x2_pop_back (dblist *l)
 Phantom documentation.
 
int util_list_2x2_pop_front (dblist *l)
 Phantom documentation.
 
int util_list_2x2_length (dblist l)
 Phantom documentation.
 
void util_sorted_list_clear (slist **sl)
 
void util_sorted_list_view (slist *sl)
 
int util_sorted_list_insert (slist **sl, int val)
 
int util_sorted_list_pop (slist **sl)
 
int util_sorted_list_length (slist *sl)
 
void util_trigger_test ()
 simplifying utilities tests
 
void util_test_pile ()
 sample test
 
void util_test_double_list ()
 sample test
 
void util_test_sorted_list ()
 sample test
 
long util_gl_get_stack (void *container_widget)
 Look for stack entry and returns stack_id.
 
long util_gl_is_util_ready (void *container_widget)
 Look for stack entry and returns stack_id.
 
bool util_gl_init_stack (void *container_widget, GError *error_buffer)
 Look for stack entry and initializes OpenGL for it.
 
bool util_gl_shutdown_stack (void *container_widget, GError *error_buffer)
 Look for stack entry and shutdowns OpenGL for it.
 
void util_gl_clean_stack_index (void)
 phantom documentation used to test the functioning of doxygen
 
bool util_gl_render_stack (GtkWidget *container_widget)
 Look for stack entry and triggers OpenGL for drawing.
 
bool util_gl_update_axis (GtkWidget *container_widget, int axis, int value)
 Look for stack entry and triggers OpenGL for drawing.
 
void util_gl_shutdown_all_stacks (void)
 Look for every stack entry and shutdowns OpenGL for it.
 
GtkWidget * create_axis_slider (int axis)
 Creates a slider widget.
 

Detailed Description

utilities header

This file is part of Gem-graph.

Function Documentation

◆ create_axis_slider()

GtkWidget * create_axis_slider ( int  axis)

Creates a slider widget.

Parameters
axismeaning which axis we're building (for label)
Returns
GtkWidget* pointer to the new widget
Parameters
axis
Returns
GtkWidget *

◆ util_concat()

char * util_concat ( const char *  str,
  ... 
)

https://sourceware.org/glibc/manual/latest/html_mono/libc.html#Variadic-Prototypes

See also
(in glibc/manual) > ellipsis (‘…’) A.2.2.2 Receiving the Argument Values
Parameters
*str
...
Returns
*

◆ util_gl_get_stack()

long util_gl_get_stack ( void *  container_widget)

Look for stack entry and returns stack_id.

Parameters
*container_widgetgenerally the GtkBox that contains the GLArea
Returns
stack_id
Parameters
*container_widget
Returns
stack_id

◆ util_gl_init_stack()

bool util_gl_init_stack ( void *  container_widget,
GError *  error_buffer 
)

Look for stack entry and initializes OpenGL for it.

Parameters
*container_widgetgenerally the GtkBox that contains the GLArea
Returns
bool true if success
Parameters
*container_widget
*error_buffer
Returns
success

◆ util_gl_is_util_ready()

long util_gl_is_util_ready ( void *  container_widget)

Look for stack entry and returns stack_id.

Parameters
*container_widgetgenerally the GtkBox that contains the GLArea
Returns
stack_id

◆ util_gl_render_stack()

bool util_gl_render_stack ( GtkWidget *  container_widget)

Look for stack entry and triggers OpenGL for drawing.

Parameters
*container_widgetgenerally the GtkBox that contains the GLArea
Returns
bool true if success
Parameters
container_widgetgenerally the GtkBox that contains the GLArea
Returns
bool: true if success

◆ util_gl_shutdown_all_stacks()

void util_gl_shutdown_all_stacks ( void  )

Look for every stack entry and shutdowns OpenGL for it.

Parameters
void
Returns
bool true if success

returns true if success ? TODO why not bool ?

◆ util_gl_shutdown_stack()

bool util_gl_shutdown_stack ( void *  container_widget,
GError *  error_buffer 
)

Look for stack entry and shutdowns OpenGL for it.

Parameters
*container_widgetgenerally the GtkBox that contains the GLArea
*error_buffer
Returns
bool: true if success

◆ util_gl_update_axis()

bool util_gl_update_axis ( GtkWidget *  container_widget,
int  axis,
int  value 
)

Look for stack entry and triggers OpenGL for drawing.

Parameters
*container_widget
axis
value
Returns
bool: true if success

◆ util_list_2x2_clear()

void util_list_2x2_clear ( dblist l)

Phantom documentation.

Parameters
*l

◆ util_list_2x2_init()

void util_list_2x2_init ( dblist l)

Phantom documentation.

Parameters
*l

◆ util_list_2x2_length()

int util_list_2x2_length ( dblist  l)

Phantom documentation.

Parameters
*l
Returns
int

◆ util_list_2x2_pop_back()

int util_list_2x2_pop_back ( dblist l)

Phantom documentation.

Parameters
*l
Returns
int

◆ util_list_2x2_pop_front()

int util_list_2x2_pop_front ( dblist l)

Phantom documentation.

Parameters
*l
Returns
int

◆ util_list_2x2_push_back()

int util_list_2x2_push_back ( dblist l,
int  val 
)

Phantom documentation.

Parameters
*l
val
Returns
int

◆ util_list_2x2_push_front()

int util_list_2x2_push_front ( dblist l,
int  val 
)

Phantom documentation.

Parameters
*l
val
Returns
int

◆ util_list_2x2_view()

void util_list_2x2_view ( dblist  l)

Phantom documentation.

Parameters
*l

◆ util_pile_clear()

void util_pile_clear ( pile **  p)
Parameters
**p

◆ util_pile_length()

int util_pile_length ( pile p)
Parameters
**p
Returns
length

◆ util_pile_pop()

int util_pile_pop ( pile **  p)
Parameters
**p
Returns
value

◆ util_pile_push()

int util_pile_push ( pile **  p,
int  value 
)
Parameters
**p
value
Returns
value

◆ util_pile_view()

void util_pile_view ( pile p)
Parameters
**p

◆ util_read_file()

char * util_read_file ( char *  filename)

reads a file from filename into a provided buffer

Parameters
*filename
Returns
char

◆ util_sorted_list_clear()

void util_sorted_list_clear ( slist **  sl)
Parameters
**sl

◆ util_sorted_list_insert()

int util_sorted_list_insert ( slist **  sl,
int  value 
)
Parameters
**sl
value
Returns
value

◆ util_sorted_list_length()

int util_sorted_list_length ( slist sl)
Parameters
**sl
Returns
length

◆ util_sorted_list_pop()

int util_sorted_list_pop ( slist **  sl)
Parameters
**sl
Returns
value

◆ util_sorted_list_view()

void util_sorted_list_view ( slist sl)
Parameters
**sl