diff --git a/Makefile b/Makefile index 711edd4..4f308d8 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,7 @@ clean: for i in $(NCURSESDIRS); do make -C $$i clean; done for i in $(GTKDIRS); do make -C $$i clean; done for i in $(WINCEDIRS); do make -C $$i clean; done + for i in $(SDLGLDIRS); do make -C $$i clean; done for i in $(ANDROIDDIRS); do rm -f android/jni/$$i; done cd android; make clean; cd .. rm -rf Makefile.rules diff --git a/gui/gui.c b/gui/gui.c index b1ec983..8808aeb 100644 --- a/gui/gui.c +++ b/gui/gui.c @@ -1,4 +1,4 @@ -/* $Id: gui.c,v 1.5 2013/02/18 00:06:44 steffen Exp $ */ +/* $Id: gui.c,v 1.6 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui.c * @@ -65,8 +65,10 @@ void gui_draw () { if (currentwin == NULL) gui_buttons_show (); if (currentwin->screen == NULL) { currentwin->screen = gfx_img_alloc (currentwin->w, currentwin->h); + currentwin->screen_changed = 1; } - // d_printf ("GUI draw: %p %s screen:%p(changed:%d) pos: %d,%d size:%d,%d", currentwin, currentwin->title, currentwin->screen, currentwin->screen_changed, currentwin->x, currentwin->y, currentwin->w, currentwin->h); + +// d_printf ("GUI draw: %p %s screen:%p(changed:%d) pos: %d,%d size:%d,%d", currentwin, currentwin->title, currentwin->screen, currentwin->screen_changed, currentwin->x, currentwin->y, currentwin->w, currentwin->h); if (currentwin && (currentwin->screen_changed || now-1 > lastupdate || now < lastupdate)) { lastupdate = now; if ((currentwin->style & WGUI_S_NOTITLE) == WGUI_S_NOTITLE) { diff --git a/gui/gui.h b/gui/gui.h index 569fa51..d25ad8b 100644 --- a/gui/gui.h +++ b/gui/gui.h @@ -153,7 +153,7 @@ extern GUIButton *gui_button_new (char *name, int x, int y, int w, int h); /* label functions */ extern void gui_label_draw (GUILabel *label); -extern GUILabel *gui_label_new (char *name, int x, int y); +extern GUILabel *gui_label_new (char *text, int x, int y); /* entry functions */ extern void gui_entry_draw (GUIEntry *entry); diff --git a/gui/gui_button.c b/gui/gui_button.c index 7508c49..de02c71 100644 --- a/gui/gui_button.c +++ b/gui/gui_button.c @@ -1,4 +1,4 @@ -/* $Id: gui_button.c,v 1.1 2013/02/17 00:52:20 steffen Exp $ */ +/* $Id: gui_button.c,v 1.2 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_button.c * @@ -46,3 +46,21 @@ void gui_button_draw (GUIButton *button) { draw_polygonfinish (currentwin->screen, ls, *button->col, 1); gfx_draw_text (currentwin->screen, button->x + 2, button->y + 2, button->caption, button->textcol); }; + + +GUIButton *gui_button_new (char *caption, int x, int y, int w, int h) { + GUIButton *item = (GUIButton*) ml_malloc (sizeof (GUIButton)); + + if (caption == NULL) item->caption[0] = 0; + else strncpy (item->caption, caption, GUI_TEXTLEN); + item->x = x; + item->y = y; + item->w = w; + item->h = h; + item->col = &color[COLOR_white][1]; + item->textcol = &color[COLOR_white][3]; + item->callback_clicked = NULL; + item->callback_draw = NULL; + + return item; +}; diff --git a/gui/gui_entry.c b/gui/gui_entry.c index a7b68c6..0db8f82 100644 --- a/gui/gui_entry.c +++ b/gui/gui_entry.c @@ -1,4 +1,4 @@ -/* $Id: gui_entry.c,v 1.1 2013/02/17 00:52:20 steffen Exp $ */ +/* $Id: gui_entry.c,v 1.2 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_entry.c * @@ -110,3 +110,17 @@ void gui_entry_event (GUIEntry *entry, GUIEvent *event) { }; +GUIEntry *gui_entry_new (char *text, int x, int y, int w, int h) { + GUIEntry *item = (GUIEntry*) ml_malloc (sizeof (GUIEntry)); + + if (text == NULL) item->text[0] = 0; + else strncpy (item->text, text, GUI_TEXTLEN); + item->x = x; + item->y = y; + item->w = w; + item->h = h; + item->callback_changed = NULL; + item->callback_enter = NULL; + + return item; +}; diff --git a/gui/gui_label.c b/gui/gui_label.c index d7112fc..215efd2 100644 --- a/gui/gui_label.c +++ b/gui/gui_label.c @@ -1,4 +1,4 @@ -/* $Id: gui_label.c,v 1.1 2013/02/17 00:52:20 steffen Exp $ */ +/* $Id: gui_label.c,v 1.2 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_label.c * @@ -40,3 +40,17 @@ void gui_label_draw (GUILabel *label) { gfx_draw_text (currentwin->screen, label->x, label->y, label->text, label->textcol); }; + + +GUILabel *gui_label_new (char *text, int x, int y) { + GUILabel *item = (GUILabel*) ml_malloc (sizeof (GUILabel)); + + if (text == NULL) item->text[0] = 0; + else strncpy (item->text, text, GUI_TEXTLEN); + item->x = x; + item->y = y; + item->textcol = &color[COLOR_white][2]; + + return item; +}; + diff --git a/gui/gui_list.c b/gui/gui_list.c index c1c452f..606a647 100644 --- a/gui/gui_list.c +++ b/gui/gui_list.c @@ -1,4 +1,4 @@ -/* $Id: gui_list.c,v 1.2 2013/02/18 00:06:44 steffen Exp $ */ +/* $Id: gui_list.c,v 1.3 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_list.c * @@ -82,7 +82,7 @@ void gui_list_event (GUIList *list, GUIEvent *event) { /* set focus */ if (event->event == EGUI_MOUSERELEASED && x >= 0 && x <= list->w && y >= 0 && y <= list->h) { - currentwin->focus = list; + currentwin->focus = (void *) list; if (y <= 5 && x >= list->w - 10) list->vs--; else if (y >= list->h - 5 && x >= list->w - 10) list->vs++; @@ -96,3 +96,18 @@ void gui_list_event (GUIList *list, GUIEvent *event) { currentwin->screen_changed = 1; draw (); }; + + +GUIList *gui_list_new (int x, int y, int w, int h) { + GUIList *item = (GUIList*) ml_malloc (sizeof (GUIList)); + + item->x = x; + item->y = y; + item->w = w; + item->h = h; + item->data = NULL; + item->selected = -1; + item->vs = 0; + item->callback_selectitem = NULL; + return item; +}; \ No newline at end of file diff --git a/gui/gui_window.c b/gui/gui_window.c index d8069f5..7d500d6 100644 --- a/gui/gui_window.c +++ b/gui/gui_window.c @@ -1,4 +1,4 @@ -/* $Id: gui_window.c,v 1.3 2013/02/18 23:09:11 steffen Exp $ */ +/* $Id: gui_window.c,v 1.4 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_window.c * @@ -40,7 +40,8 @@ void gui_window_new (GUIWindow *win, int w, int h, char *title) { win->items[i].type = GUI_NONE; } - strncpy (win->title, title, GUI_TEXTLEN); + if (title == NULL) win->title[0] = 0; + else strncpy (win->title, title, GUI_TEXTLEN); win->screen = NULL; win->screen_changed = 1; @@ -48,7 +49,7 @@ void gui_window_new (GUIWindow *win, int w, int h, char *title) { win->w = w; win->focus = NULL; - d_printf ("guiwindow_new %p width:%d height:%d", win, w, h); + d_printf ("gui_window_new [%s] %p width:%d height:%d", title, win, w, h); }; @@ -56,20 +57,13 @@ void gui_window_new (GUIWindow *win, int w, int h, char *title) { * closes the window, but does not free the memory. */ void gui_window_close (GUIWindow *win) { - int i; - - for (i = 0; i < GUI_MAX_ITEM; i++) { - win->items[i].type = GUI_NONE; - win->items[i].item = NULL; - } + d_printf ("gui_window_close [%s] %p", win->title, win); - win->title[0] = 0; - - gfx_img_free (win->screen); - win->screen = NULL; + /* delete screen so we know it's disabled.. */ + if (win->screen) gfx_img_free (win->screen); + win->screen = NULL; win->screen_changed = 1; - win->h = 0; - win->w = 0; + if (currentwin == win) currentwin = NULL; }; diff --git a/main/gui_buttons.c b/main/gui_buttons.c index 56f4763..e28410f 100644 --- a/main/gui_buttons.c +++ b/main/gui_buttons.c @@ -53,9 +53,6 @@ void gui_buttons_fav(); void gui_buttons_show () { - d_printf ("GUI: buttons show screen:%p", wbutton.screen); - if (wbutton.screen == NULL) gui_window_new (&wbutton, 192, 32, NULL); - wbutton.screen_changed = 1; wbutton.callback_close = (void*)gui_buttons_closecallback; wbutton.style = WGUI_S_VCENTER | WGUI_S_HTOP; @@ -65,35 +62,39 @@ void gui_buttons_show () { btn_zoomin = gui_button_new (_("+"), 0, 0, 31, 31); btn_zoomin->callback_clicked = (void*)gui_buttons_zoomin; btn_zoomin->callback_draw = (void*)gui_buttons_draw; - gui_window_item_add (&wbutton, GUI_BUTTON, btn_zoomin); } if (btn_zoomout == NULL) { btn_zoomout = gui_button_new (_("-"), 40, 0, 31, 31); btn_zoomout->callback_clicked = (void*)gui_buttons_zoomout; btn_zoomout->callback_draw = (void*)gui_buttons_draw; - gui_window_item_add (&wbutton, GUI_BUTTON, btn_zoomout); } if (btn_gps == NULL) { btn_gps = gui_button_new (_("GPS"), 80, 0, 31, 31); btn_gps->callback_clicked = (void*)gui_buttons_gps; btn_gps->callback_draw = (void*)gui_buttons_draw; - gui_window_item_add (&wbutton, GUI_BUTTON, btn_gps); } if (btn_menu == NULL) { btn_menu = gui_button_new (_("M"), 120, 0, 31, 31); btn_menu->callback_clicked = (void*)gui_buttons_menu; btn_menu->callback_draw = (void*)gui_buttons_draw; - gui_window_item_add (&wbutton, GUI_BUTTON, btn_menu); } if (btn_fav == NULL) { - btn_menu = gui_button_new (_("F"), 160, 0, 31, 31); - btn_menu->callback_clicked = (void*)gui_buttons_fav; - btn_menu->callback_draw = (void*)gui_buttons_draw; + btn_fav = gui_button_new (_("F"), 160, 0, 31, 31); + btn_fav->callback_clicked = (void*)gui_buttons_fav; + btn_fav->callback_draw = (void*)gui_buttons_draw; + } + + if (wbutton.screen == NULL) { + gui_window_new (&wbutton, 192, 32, NULL); gui_window_item_add (&wbutton, GUI_BUTTON, btn_fav); + gui_window_item_add (&wbutton, GUI_BUTTON, btn_zoomin); + gui_window_item_add (&wbutton, GUI_BUTTON, btn_zoomout); + gui_window_item_add (&wbutton, GUI_BUTTON, btn_gps); + gui_window_item_add (&wbutton, GUI_BUTTON, btn_menu); } gui_show (&wbutton); diff --git a/main/gui_mainmenu.c b/main/gui_mainmenu.c index 1204f05..9bf28b2 100644 --- a/main/gui_mainmenu.c +++ b/main/gui_mainmenu.c @@ -1,3 +1,4 @@ +/* $Id: gui_mainmenu.c,v 1.4 2013/02/21 23:07:19 steffen Exp $ */ /*************************************************************************** * gui_mainmenu.c * @@ -27,121 +28,36 @@ #include "system.h" #include "routing.h" - -enum { - MMENWIN_UNDEF = 0, - MMENWIN_SEARCH, - MMENWIN_MAPREFRESH, - MMENWIN_IDXREFRESH, - MMENWIN_GPSCONFIG, - MMENWIN_GPSSTARTSTOP, - MMENWIN_MAPCONFIG, - MMENWIN_CLOSE, - MMENWIN_SETDEST, - MMENWIN_DEBUG, - MMENWIN_QUIT -}; - void gui_mainmenu_close (); void gui_mainmenu_search (); void gui_mainmenu_quit (); -void gui_mainmenu_refresh (); -void gui_mainmenu_refreshidx (); -void gui_mainmenu_gpsconfig (); -void gui_mainmenu_gpsstartstop (); -void gui_mainmenu_mapconfig (); -void gui_mainmenu_setdest (); -void gui_mainmenu_debug (); +void gui_mainmenu_gps (); +void gui_mainmenu_map (); +void gui_mainmenu_routing (); +void gui_mainmenu_config (); + +GUIButton *mbtn_close = NULL; +GUIButton *mbtn_quit = NULL; +GUIButton *mbtn_gps = NULL; +GUIButton *mbtn_map= NULL; +GUIButton *mbtn_search = NULL; +GUIButton *mbtn_routing= NULL; +GUIButton *mbtn_config= NULL; + static GUIWindow wmmenu = {0}; void gui_mainmenu_show () { - int item = 0; - if (wmmenu.screen == NULL) gui_window_new (&wmmenu, 175, 200, _("OSMroute Menu")); wmmenu.screen_changed = 1; wmmenu.style = WGUI_S_VCENTER | WGUI_S_HCENTER; /* add buttons */ - strncpy (wmmenu.buttons[item].caption, _("Close"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_close; - wmmenu.buttons[item].id = MMENWIN_CLOSE; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 170; - - strncpy (wmmenu.buttons[++item].caption, _("Quit"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_quit; - wmmenu.buttons[item].id = MMENWIN_QUIT; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 90; - wmmenu.buttons[item].y = 170; - - strncpy (wmmenu.buttons[++item].caption, _("GPS Config"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_gpsconfig; - wmmenu.buttons[item].id = MMENWIN_GPSCONFIG; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 140; - - strncpy (wmmenu.buttons[++item].caption, _("GPS On/Off"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_gpsstartstop; - wmmenu.buttons[item].id = MMENWIN_GPSSTARTSTOP; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 110; - - strncpy (wmmenu.buttons[++item].caption, _("MAP Config"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_mapconfig; - wmmenu.buttons[item].id = MMENWIN_MAPCONFIG; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 90; - wmmenu.buttons[item].y = 140; - - strncpy (wmmenu.buttons[++item].caption, _("MAP Refresh"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_refresh; - wmmenu.buttons[item].id = MMENWIN_MAPREFRESH; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 90; - wmmenu.buttons[item].y = 110; - - strncpy (wmmenu.buttons[++item].caption, _("Debug"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_debug; - wmmenu.buttons[item].id = MMENWIN_DEBUG; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 80; - - strncpy (wmmenu.buttons[++item].caption, _("IDX Refresh"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_refreshidx; - wmmenu.buttons[item].id = MMENWIN_IDXREFRESH; - wmmenu.buttons[item].w = 80; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 90; - wmmenu.buttons[item].y = 80; - - strncpy (wmmenu.buttons[++item].caption, _("Set Destination"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_setdest; - wmmenu.buttons[item].id = MMENWIN_SETDEST; - wmmenu.buttons[item].w = 165; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 15; - - strncpy (wmmenu.buttons[++item].caption, _("Search"), GUI_TEXTLEN); - wmmenu.buttons[item].callback_clicked = (void*)gui_mainmenu_search; - wmmenu.buttons[item].id = MMENWIN_SEARCH; - wmmenu.buttons[item].w = 165; - wmmenu.buttons[item].h = 25; - wmmenu.buttons[item].x = 5; - wmmenu.buttons[item].y = 45; + if (mbtn_close == NULL) { + mbtn_close = gui_button_new (_("Close"), 5, 155, 190, 20); + mbtn_close->callback_clicked = (void*)gui_mainmenu_close; + gui_window_item_add (&wmmenu, GUI_BUTTON, mbtn_close); + } gui_show (&wmmenu); }; diff --git a/main/gui_search.c b/main/gui_search.c index 73f52c9..2044fd4 100644 --- a/main/gui_search.c +++ b/main/gui_search.c @@ -53,9 +53,7 @@ static GUIWindow wsearch = {0}; void gui_search_show () { - int btn = 0; - - if (wsearch.screen == NULL) guiwindow_new (&wsearch, 220, 60); + if (wsearch.screen == NULL) gui_window_new (&wsearch, 220, 60, _("Search..")); wsearch.screen_changed = 1; // wmmenu.callback_close = (void*)gui_mainmenu_closecallback; @@ -63,67 +61,6 @@ void gui_search_show () { wsearch.style = WGUI_S_VCENTER | WGUI_S_HTOP; wsearch.title[0] = 0; - /* search buttons */ - strncpy (wsearch.buttons[btn].caption, _("<"), GUI_TEXTLEN); - wsearch.buttons[btn].callback_clicked = (void*)gui_search_prev; - wsearch.buttons[btn].id = SEARCHWIN_PREV; - wsearch.buttons[btn].w = 20; - wsearch.buttons[btn].h = 20; - wsearch.buttons[btn].x = 5; - wsearch.buttons[btn].y = 35; - - strncpy (wsearch.buttons[++btn].caption, _(">"), GUI_TEXTLEN); - wsearch.buttons[btn].callback_clicked = (void*)gui_search_next; - wsearch.buttons[btn].id = SEARCHWIN_NEXT; - wsearch.buttons[btn].w = 20; - wsearch.buttons[btn].h = 20; - wsearch.buttons[btn].x = 85; - wsearch.buttons[btn].y = 35; - - strncpy (wsearch.buttons[++btn].caption, _("Search"), GUI_TEXTLEN); - wsearch.buttons[btn].callback_clicked = (void*)gui_search_search; - wsearch.buttons[btn].id = SEARCHWIN_SEARCH; - wsearch.buttons[btn].w = 50; - wsearch.buttons[btn].h = 20; - wsearch.buttons[btn].x = 110; - wsearch.buttons[btn].y = 35; - - strncpy (wsearch.buttons[++btn].caption, _("Ref"), GUI_TEXTLEN); - wsearch.buttons[btn].callback_clicked = (void*)gui_search_refresh; - wsearch.buttons[btn].id = SEARCHWIN_REFRESH; - wsearch.buttons[btn].w = 30; - wsearch.buttons[btn].h = 20; - wsearch.buttons[btn].x = 165; - wsearch.buttons[btn].y = 35; - - strncpy (wsearch.buttons[++btn].caption, _("X"), GUI_TEXTLEN); - wsearch.buttons[btn].callback_clicked = (void*)gui_search_close; - wsearch.buttons[btn].id = SEARCHWIN_CLOSE; - wsearch.buttons[btn].w = 15; - wsearch.buttons[btn].h = 20; - wsearch.buttons[btn].x = 200; - wsearch.buttons[btn].y = 35; - - /* add label */ - btn = 0; - strncpy (wsearch.labels[btn].text, "0/0", GUI_TEXTLEN); - wsearch.labels[btn].x = 35; - wsearch.labels[btn].y = 37; - wsearch.labels[btn].id = SEARCHWIN_LABEL; - wsearch.labels[btn].textcol = &color[COLOR_white][3]; - - /* add entry box */ - btn = 0; - strncpy (wsearch.entrys[btn].text, "", GUI_TEXTLEN); - wsearch.entrys[btn].id = SEARCHWIN_TEXT; - wsearch.entrys[btn].x = 5; - wsearch.entrys[btn].y = 5; - wsearch.entrys[btn].w = 210; - wsearch.entrys[btn].h = 20; - wsearch.entrys[btn].curpos = 4; - wsearch.entrys[btn].overwrite = 0; - wsearch.entrys[btn].callback_enter = (void*)gui_search_search; - gui_show (&wsearch); }; @@ -155,9 +92,8 @@ void gui_search_next () { void gui_search_search () { - d_printf ("search for %s", wsearch.entrys[0].text); - - search_data_cnt = map_search (wsearch.entrys[0].text, search_data, SEARCH_MAXRESULT); + char text[] = "ttttt..."; + search_data_cnt = map_search (text, search_data, SEARCH_MAXRESULT); gui_search_switch (0); }; @@ -168,7 +104,7 @@ void gui_search_switch (int pos) { if (search_data_cnt <= 0) search_data_cur = -1; else if (search_data_cur >= search_data_cnt) search_data_cur = 0; else if (search_data_cur < 0) search_data_cur = search_data_cnt - 1; - +/* if (search_data_cur == -1) strncpy (wsearch.labels[0].text, _("0"), GUI_TEXTLEN); else { snprintf (wsearch.labels[0].text, GUI_TEXTLEN, _("%d of %d"), search_data_cur+1, search_data_cnt); @@ -178,5 +114,5 @@ void gui_search_switch (int pos) { wsearch.screen_changed = 1; wsearch.entrys[0].curpos = strlen (wsearch.entrys[0].text); draw (); - } + } */ }; diff --git a/main/guiw_gpsfile.c b/main/guiw_gpsfile.c index 76cddaf..d66907a 100644 --- a/main/guiw_gpsfile.c +++ b/main/guiw_gpsfile.c @@ -43,14 +43,14 @@ void gpswin_btnclose(int x, int y); void gpswin_show () { d_printf ("GUI: gps file screen"); - if (gpswin.screen == NULL) guiwindow_new (&gpswin, 250, 32); + if (gpswin.screen == NULL) gui_window_new (&gpswin, 250, 32, _("GPS")); gpswin.screen_changed = 1; gpswin.callback_close = (void*)gpswin_closecallback; gpswin.style = WGUI_S_VCENTER | WGUI_S_HBOTTOM; /* add buttons */ - strncpy (gpswin.buttons[0].caption, _("P"), GUI_TEXTLEN); +/* strncpy (gpswin.buttons[0].caption, _("P"), GUI_TEXTLEN); gpswin.buttons[0].callback_clicked = (void*)gpswin_btnpauseplay; gpswin.buttons[0].id = GPSWIN_PAUSEPLAY; gpswin.buttons[0].callback_draw = (void*)gpswin_btndraw; @@ -75,7 +75,7 @@ void gpswin_show () { gpswin.buttons[2].h = 31; gpswin.buttons[2].x = 250-32; gpswin.buttons[2].y = 0; - +*/ gui_show (&gpswin); }; @@ -83,13 +83,12 @@ void gpswin_show () { void gpswin_closecallback () { d_printf ("GUI: gps win close"); - guiwindow_close (&gpswin); + gui_window_close (&gpswin); }; void gpswin_btndraw (GUIButton *btn) { - int i; - if (btn->id == GPSWIN_PAUSEPLAY) { +/* if (btn->id == GPSWIN_PAUSEPLAY) { i = gps_file_get_state (); if (i == GPSF_END) btn->col = &color[COLOR_white][1]; else if (i == GPSF_INIT) btn->col = &color[COLOR_green][0]; @@ -125,6 +124,7 @@ void gpswin_btndraw (GUIButton *btn) { draw_line (currentwin->screen, btn->x + x, btn->y, btn->x + x, btn->y + btn->h, ls); } + */ }; diff --git a/main/osmroute.h b/main/osmroute.h index 48bf9e2..e28a2c3 100644 --- a/main/osmroute.h +++ b/main/osmroute.h @@ -86,6 +86,7 @@ #include "map.h" #include "system.h" +#include "memoryleak.h" enum { /* what we're doing at the moment */ APPSTATUS_nothing,