****/
#include "callbacks.h"
+#include "appdata.h"
// this is just here for debugging and tracing purposes
static void print_location(LocationGPSDevice* device) {
return FALSE;
}
+
+gboolean top_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data) {
+ gdouble x = event->x;
+ g_print("Top event box pressed at: %f\n", x);
+ AppData* appdata = (AppData*) data;
+
+ if(x > 750) {
+ g_print("Exiting..\n");
+ stop_gps(appdata);
+ g_signal_emit_by_name(appdata->window, "delete_event");
+ }
+ else {
+ randomize(appdata);
+ }
+ return TRUE;
+}
+
+
+gboolean bottom_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data) {
+ gdouble x = event->x;
+ g_print("Bottom event box pressed at: %f\n", x);
+ AppData* appdata = (AppData*) data;
+
+ randomize(data);
+ return TRUE;
+}
+