cuikplay_callbacks.c
Go to the documentation of this file.
1 #include "cuikplay.h"
2 
3 #include "cuikplay_callbacks.h"
4 #include "cuikplay_interface.h"
5 #include "cuikplay_support.h"
6 
7 #include <gtk/gtk.h>
8 
9 #include <sys/time.h>
10 
21 void on_cuikplay_play_clicked(GtkButton *button,
22  gpointer user_data)
23 {
25  struct timeval tp;
26 
27  c=(TCuikPlayControl *)user_data;
28  c->mode=0;
29 
30  gettimeofday(&tp,NULL);
31  c->time=(tp.tv_sec+tp.tv_usec/1000);
32 }
33 
34 void on_cuikplay_pause_clicked(GtkButton *button,
35  gpointer user_data)
36 {
38 
39  c=(TCuikPlayControl *)user_data;
40  c->mode=1;
41 }
42 
43 void on_cuikplay_slider_changed(GtkRange *range,
44  gpointer user_data)
45 {
47  gdouble v;
48 
49  c=(TCuikPlayControl *)user_data;
50 
51  v=gtk_range_get_value(range);
52  c->nextFrame=(unsigned int)v;
53 
54  #if (_DEBUG>1)
55  fprintf(stderr,"NextFrame is: %u\n",c->nextFrame);
56  #endif
57 }
58 
59 void on_cuikplay_quit(GtkButton *button,
60  gpointer user_data)
61 
62 {
64 
65  c=(TCuikPlayControl *)user_data;
66  c->end=TRUE;
67 }
void on_cuikplay_pause_clicked(GtkButton *button, gpointer user_data)
Callback function for the pause button.
#define TRUE
TRUE.
Definition: boolean.h:21
Headers of the GTK interface functions for cuikplay.
Definition of the cuikplay control structure.
unsigned int mode
Definition: cuikplay.h:23
void on_cuikplay_play_clicked(GtkButton *button, gpointer user_data)
Callback function for the play button.
Headers of the GTK callback functions for cuikplay.
Definition of the cuikplay control structure.
Definition: cuikplay.h:21
void on_cuikplay_slider_changed(GtkRange *range, gpointer user_data)
Callback function for the slider bar.
unsigned int nextFrame
Definition: cuikplay.h:25
boolean end
Definition: cuikplay.h:22
void on_cuikplay_quit(GtkButton *button, gpointer user_data)
Callback function for the quit button.
Headers of the GTK support functions for cuikplay.