#include <gtk/gtk.h>
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_obj * | moveable |
#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 |
gint expose_event | ( | GtkWidget * | widget, | |
GdkEventExpose * | event | |||
) |
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.
argc | program`s arguments count | |
argv | program`s arguments | |
repaint_func | repaint 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.
void load_scene_pixmap | ( | GtkWidget * | widget | ) |
Load all scene pixmaps.
int parseopt | ( | int | argc, | |
char ** | argv | |||
) |
void print_usage | ( | ) |
Print usage.
void quit | ( | ) |
FUNCTION PROTOTYPES.
gint repaint | ( | gpointer | data | ) |
void scene_repaint | ( | ) |
Repaint the scene (background, points, ...).
void test_animation | ( | int | argc, | |
char * | argv[] | |||
) |
Test GTK animation.
void test_repaint | ( | ) |
GKT test function.
int argc |
char** argv |
GtkWidget* drawing_area |
FILE * file_err |
FILE* file_out |
pthread_mutex_t mcl_mutex |
struct moveable_obj* moveable |
GtkWidget* window |
struct pixmap_obj xpm_background[] |
{
{ "images/background.xpm", NULL, NULL, 0, 632, 452},
{ NULL, NULL, NULL, 0, 0, 0 }
}
struct pixmap_obj xpm_robot[] |
{
{ "images/robot.xpm", NULL, NULL, 0, 19, 19 },
{ NULL, NULL, NULL, 0, 0, 0 }
}
struct pixmap_obj xpm_sample[] |
{ { "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 } }