aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r--src/mainwindow.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 8c2b256..f226049 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -28,33 +28,10 @@
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <math.h>
#include "types.h"
-#include "accelerometers.h"
-#include "audio.h"
-#include "physics.h"
-
-static gboolean mainwindow_timeout(gpointer data) {
-
- MainWindow *mw = data;
-
- accelerometer_update(mw->accel);
-
- physics_update(mw->physics, mw->accel->lval);
- if ( mw->physics->moo ) {
- audio_trigger_moo(mw->audio);
- mw->physics->moo = 0;
- }
-
- return TRUE; /* Call back again */
-
-}
static gint mainwindow_closed(GtkWidget *widget, MainWindow *mw) {
- audio_shutdown(mw->audio);
gtk_exit(0);
return 0;
}
@@ -62,7 +39,6 @@ static gint mainwindow_closed(GtkWidget *widget, MainWindow *mw) {
MainWindow *mainwindow_open(void) {
MainWindow *mw;
- GtkWidget *label;
mw = malloc(sizeof(*mw));
if ( mw == NULL ) return NULL;
@@ -74,13 +50,6 @@ MainWindow *mainwindow_open(void) {
mw->cow = gtk_image_new_from_file(PIXMAPDIR"/cow.png");
gtk_container_add(GTK_CONTAINER(mw->window), mw->cow);
- mw->accel = accelerometer_open();
- mw->accel_timeout = g_timeout_add(10, mainwindow_timeout, mw);
- accelerometer_update(mw->accel);
-
- mw->audio = audio_setup();
- mw->physics = physics_setup();
-
g_signal_connect(G_OBJECT(mw->window), "destroy", G_CALLBACK(mainwindow_closed), mw);
gtk_widget_show_all(mw->window);