Classes | Defines | Functions | Variables

mcl_gtk.h File Reference

#include <gtk/gtk.h>
Include dependency graph for mcl_gtk.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  prog_opt
struct  pixmap_obj
struct  moveable_obj

Defines

#define SCENE_REFRESH   500
#define BORDER   15
#define FWIDTH   3000
#define FHEIGHT   2100
#define OPT_GTK_TEST   0x1000
#define OPT_TEXT_MODE   0x2000
#define DEBUG
 DEBUG MACROS.
#define DBG(f, a...)   do { } while(0);
#define DBGPROG(f, a...)   do { } while(0);

Functions

void quit ()
 FUNCTION PROTOTYPES.
void get_size (GdkPixmap *xpm, unsigned int *width, unsigned int *height)
void load_pixmaps (GtkWidget *widget, struct moveable_obj *moveable, struct pixmap_obj *pixmaps)
 Get the width and height for the xpm data.
void load_scene_pixmap (GtkWidget *widget)
 Load all scene pixmaps.
gint expose_event (GtkWidget *widget, GdkEventExpose *event)
gint repaint (gpointer data)
void test_repaint ()
 GKT test function.
void test_animation (int argc, char *argv[])
 Test GTK animation.
void init_animation (int argc, char *argv[], void(*repaint_func)())
 Initialization of the animation.
void scene_repaint ()
 Repaint the scene (background, points, ...).
void print_usage ()
 Print usage.
int parseopt (int argc, char **argv)
 Parse program arguments.

Variables

struct prog_opt option
FILE * file_out
FILE * file_err
int argc
char ** argv
pthread_mutex_t mcl_mutex
GtkWidget * window
GtkWidget * drawing_area
struct pixmap_obj xpm_background []
struct pixmap_obj xpm_robot []
struct pixmap_obj xpm_sample []
struct moveable_objmoveable

Define Documentation

#define BORDER   15
#define DBG (   f,
  a... 
)    do { } while(0);
#define DBGPROG (   f,
  a... 
)    do { } while(0);
#define DEBUG

DEBUG MACROS.

#define FHEIGHT   2100
#define FWIDTH   3000
#define OPT_GTK_TEST   0x1000
#define OPT_TEXT_MODE   0x2000
#define SCENE_REFRESH   500

Function Documentation

gint expose_event ( GtkWidget *  widget,
GdkEventExpose *  event 
)

Here is the caller graph for this function:

void get_size ( GdkPixmap *  xpm,
unsigned int *  width,
unsigned int *  height 
)
void init_animation ( int  argc,
char *  argv[],
void(*)()  repaint_func 
)

Initialization of the animation.

Parameters:
argc program`s arguments count
argv program`s arguments
repaint_func repaint function

Here is the call graph for this function:

Here is the caller graph for this function:

void load_pixmaps ( GtkWidget *  widget,
struct moveable_obj moveable,
struct pixmap_obj pixmaps 
)

Get the width and height for the xpm data.

Load pixmaps according to predefined data struct.

Here is the caller graph for this function:

void load_scene_pixmap ( GtkWidget *  widget  ) 

Load all scene pixmaps.

Here is the call graph for this function:

Here is the caller graph for this function:

int parseopt ( int  argc,
char **  argv 
)

Parse program arguments.

Store flags to a global variable.

Parameters:
argc Arguments counter (given from main())
argv Arguments array (given from main())

Here is the call graph for this function:

Here is the caller graph for this function:

void print_usage (  ) 

Print usage.

Here is the call graph for this function:

Here is the caller graph for this function:

void quit (  ) 

FUNCTION PROTOTYPES.

Here is the caller graph for this function:

gint repaint ( gpointer  data  ) 

Here is the caller graph for this function:

void scene_repaint (  ) 

Repaint the scene (background, points, ...).

Here is the call graph for this function:

Here is the caller graph for this function:

void test_animation ( int  argc,
char *  argv[] 
)

Test GTK animation.

Here is the call graph for this function:

Here is the caller graph for this function:

void test_repaint (  ) 

GKT test function.

Here is the caller graph for this function:


Variable Documentation

int argc
char** argv
GtkWidget* drawing_area
FILE * file_err
FILE* file_out
pthread_mutex_t mcl_mutex
struct prog_opt option
GtkWidget* window
Initial value:
 {
        { "images/background.xpm", NULL, NULL, 0, 632, 452}, 
        { NULL, NULL, NULL, 0, 0, 0 }   
}
Initial value:
 {
        { "images/robot.xpm", NULL, NULL, 0, 19, 19 }, 
        { NULL, NULL, NULL, 0, 0, 0 }   
}
Initial value:
 {
        { "images/point3x3r.xpm", NULL, NULL, 0, 3, 3 }, 
        { "images/point3x3b.xpm", NULL, NULL, 0, 3, 3 }, 
        { "images/point3x3c.xpm", NULL, NULL, 0, 3, 3 }, 
        { "images/point3x3y.xpm", NULL, NULL, 0, 3, 3 }, 
        { "images/point3x3g.xpm", NULL, NULL, 0, 3, 3 }, 
        { NULL, NULL, NULL, 0, 0, 0 }   
}