You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-****/
+ ****/
+#include <hildon/hildon-program.h>
+#include <hildon/hildon-window.h>
#include <stdlib.h>
#include <gtk/gtk.h>
-#include <location/location-gps-device.h>
-#include <location/location-gpsd-control.h>
#include "callbacks.h"
+#include "appdata.h"
+#include "ui.h"
+#include "util.h"
int main(int argc, char** argv) {
- /* We'll have two references to two GTK+ widgets. */
- GtkWindow* window;
- GtkLabel* label;
+ AppData *appdata = g_new0(AppData, 1);
- /* Initialize the GTK+ library. */
- gtk_init(&argc, &argv);
+ gtk_init(&argc, &argv);
+ appdata->program = HILDON_PROGRAM(hildon_program_get_instance());
+ appdata->window = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(appdata->program, appdata->window);
+ // loads images from the disk to the image array
+ load_images(appdata);
+ // set display to 000
+ reset_speed(appdata);
+ // create ui structure
+ create_ui(appdata);
- /* Create a window with window border width of 12 pixels and a
- title text. */
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ // set the window fullscreen
+ gtk_window_fullscreen(GTK_WINDOW(appdata->window));
- /* Show all widgets that are contained by the window. */
- gtk_widget_show_all(GTK_WIDGET(window));
+ gtk_widget_show_all(GTK_WIDGET(appdata->window));
+ g_thread_init(NULL);
+ //g_idle_add(randomize, appdata);
- g_thread_init(NULL);
+ start_gps(appdata);
- // gps device
- LocationGPSDevice *device;
- device = g_object_new (LOCATION_TYPE_GPS_DEVICE, NULL);
+ gtk_main();
- g_signal_connect (device, "changed", G_CALLBACK (location_changed), NULL);
-
-
- LocationGPSDControl *control;
-
- control = location_gpsd_control_get_default();
- location_gpsd_control_start(control);
-
-
-
- /* Start the main event loop. */
- gtk_main();
-
-
-
- return EXIT_SUCCESS;
+ return EXIT_SUCCESS;
}