else
GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
- vehicle_demo=no; vehicle_demo_reason="not yet supported without glib"
vehicle_file=no; vehicle_file_reason="not yet supported without glib"
fi
#include "transform.h"
#include "plugin.h"
#include "vehicle.h"
+#include "event.h"
struct vehicle_priv {
int interval;
double config_speed;
double speed;
double direction;
+ struct callback *timer_callback;
+ struct event_timeout *timer;
+
};
static void
vehicle_demo_set_attr,
};
-static int
+static void
vehicle_demo_timer(struct vehicle_priv *priv)
{
struct coord c, c2, pos, ci;
}
if (mr)
map_rect_destroy(mr);
- return 1;
}
dbg(0,"position_set %f %f\n", ret->geo.lat, ret->geo.lng);
}
*meth = vehicle_demo_methods;
- g_timeout_add(ret->interval, (GSourceFunc) vehicle_demo_timer, ret);
+ ret->timer_callback=callback_new_1(callback_cast(vehicle_demo_timer), ret);
+ ret->timer=event_add_timeout(ret->interval, 1, ret->timer_callback);
return ret;
}