You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Ehud S. <esh...@us...> - 2005-11-28 19:36:42
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv592/src/gtk2 Modified Files: Makefile roadmap_main.c Log Message: Merged with 1.0.12 Reorganized editor code into subdirectories Implemented export Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 15 Oct 2005 22:19:09 -0000 1.1.1.1 --- Makefile 28 Nov 2005 19:36:34 -0000 1.2 *************** *** 22,26 **** ifeq ($(MODE),DEBUG) STDCFLAGS=-g $(WARNFLAGS) -DROADMAP_DEBUG_HEAP - LDFLAGS=-g else ifeq ($(MODE),PROFILE) --- 22,25 ---- *************** *** 106,111 **** $(RANLIB) libgtkroadmap.a ! gtkroadmap: roadmap_main.o ../libguiroadmap.a $(RDMLIBS) ! $(CC) $(LDFLAGS) roadmap_main.o -o gtkroadmap ../libguiroadmap.a $(LIBS) ../libguiroadmap.a gtkroadgps: roadmap_main.o ../libguiroadgps.a $(RDMLIBS) --- 105,110 ---- $(RANLIB) libgtkroadmap.a ! gtkroadmap: roadmap_main.o ../libguiroadmap.a $(RDMLIBS) ! $(CC) $(LDFLAGS) roadmap_main.o -o gtkroadmap ../libguiroadmap.a $(LIBS) gtkroadgps: roadmap_main.o ../libguiroadgps.a $(RDMLIBS) Index: roadmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/roadmap_main.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_main.c 15 Oct 2005 22:19:09 -0000 1.1.1.1 --- roadmap_main.c 28 Nov 2005 19:36:34 -0000 1.2 *************** *** 318,324 **** void roadmap_main_popup_menu (RoadMapMenu menu, int x, int y) { - //g_signal_connect (GTK_MENU(menu), "deactivate", - // G_CALLBACK (gtk_widget_destroy), NULL); - gtk_menu_popup (GTK_MENU(menu), NULL, --- 318,321 ---- |
From: Pascal F M. <pas...@us...> - 2005-11-27 21:56:36
|
Update of /cvsroot/roadmap/roadmap/src/qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1616 Modified Files: qt_main.cc Log Message: moveDockWindow not available on Zaurus (QPE) Index: qt_main.cc =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/qt_main.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** qt_main.cc 18 Nov 2005 20:21:01 -0000 1.9 --- qt_main.cc 27 Nov 2005 21:56:25 -0000 1.10 *************** *** 132,135 **** --- 132,137 ---- if (toolBar == 0) { toolBar = new QToolBar(this, "map view"); + #ifndef QWS + // moveDockWindow not available on QtE v2.3.10. switch (orientation[0]) { case 't': *************** *** 148,151 **** --- 150,154 ---- "Invalid toolbar orientation %s", orientation); } + #endif toolBar->setFocusPolicy(QWidget::NoFocus); toolBar->setHorizontalStretchable(TRUE); |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:50:25
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30647 Modified Files: roadmap_street.c Log Message: Fix error in previous merge Index: roadmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** roadmap_street.c 27 Nov 2005 06:08:30 -0000 1.17 --- roadmap_street.c 27 Nov 2005 06:50:18 -0000 1.18 *************** *** 820,824 **** roadmap_plugin_set_line ! (¤t.line, ROADMAP_PLUGIN_ID, line, fips, layer); /* Note: the position of a shape point is relative to the position --- 820,824 ---- roadmap_plugin_set_line ! (¤t.line, ROADMAP_PLUGIN_ID, line, layer, fips); /* Note: the position of a shape point is relative to the position |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:09:04
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24593 Modified Files: roadmap_street.h Log Message: Merging in the map editor changes (Ehud) Index: roadmap_street.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** roadmap_street.h 14 Nov 2005 07:17:53 -0000 1.8 --- roadmap_street.h 27 Nov 2005 06:08:56 -0000 1.9 *************** *** 26,29 **** --- 26,30 ---- #include "roadmap_types.h" + #include "roadmap_plugin.h" #include "roadmap_dbread.h" *************** *** 66,83 **** - typedef struct { - - int fips; - int line; - int distance; - RoadMapPosition from; - RoadMapPosition to; - RoadMapPosition intersection; - - } RoadMapNeighbour; - - #define ROADMAP_NEIGHBOUR_NULL {-1, -1, -1, {0,0}, {0,0}, {0,0}} - - /* The function roadmap_street_blocks either returns a positive count * of matching blocks on success, or else an error code (null or negative). --- 67,70 ---- *************** *** 109,114 **** RoadMapPosition *position); ! int roadmap_street_get_distance ! (const RoadMapPosition *position, int line, RoadMapNeighbour *result); int roadmap_street_get_closest --- 96,103 ---- RoadMapPosition *position); ! int roadmap_street_get_distance (const RoadMapPosition *position, ! int line, ! int layer, ! RoadMapNeighbour *result); int roadmap_street_get_closest |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:08:38
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24511 Modified Files: roadmap_street.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** roadmap_street.c 14 Nov 2005 07:17:26 -0000 1.16 --- roadmap_street.c 27 Nov 2005 06:08:30 -0000 1.17 *************** *** 810,814 **** static int roadmap_street_get_distance_with_shape (const RoadMapPosition *position, ! int line, int first_shape, int last_shape, RoadMapNeighbour *neighbour) { --- 810,814 ---- static int roadmap_street_get_distance_with_shape (const RoadMapPosition *position, ! int line, int layer, int first_shape, int last_shape, RoadMapNeighbour *neighbour) { *************** *** 816,822 **** int smallest_distance; RoadMapNeighbour current; ! current.line = line; /* Note: the position of a shape point is relative to the position --- 816,824 ---- int smallest_distance; RoadMapNeighbour current; + int fips = roadmap_locator_active(); ! roadmap_plugin_set_line ! (¤t.line, ROADMAP_PLUGIN_ID, line, fips, layer); /* Note: the position of a shape point is relative to the position *************** *** 867,871 **** static int roadmap_street_get_distance_no_shape ! (const RoadMapPosition *position, int line, RoadMapNeighbour *neighbour) { --- 869,873 ---- static int roadmap_street_get_distance_no_shape ! (const RoadMapPosition *position, int line, int layer, RoadMapNeighbour *neighbour) { *************** *** 880,884 **** &neighbour->intersection); ! neighbour->line = line; return 1; --- 882,890 ---- &neighbour->intersection); ! roadmap_plugin_set_line (&neighbour->line, ! ROADMAP_PLUGIN_ID, ! line, ! layer, ! roadmap_locator_active ()); return 1; *************** *** 902,906 **** neighbours[count] = *this; - neighbours[count].fips = roadmap_locator_active(); return count + 1; --- 908,911 ---- *************** *** 923,927 **** if (farthest >= 0) { neighbours[farthest] = *this; - neighbours[farthest].fips = roadmap_locator_active(); } return max; --- 928,931 ---- *************** *** 929,934 **** ! int roadmap_street_get_distance ! (const RoadMapPosition *position, int line, RoadMapNeighbour *result) { int found = 0; --- 933,940 ---- ! int roadmap_street_get_distance (const RoadMapPosition *position, ! int line, ! int layer, ! RoadMapNeighbour *result) { int found = 0; *************** *** 953,963 **** found = roadmap_street_get_distance_with_shape ! (position, line, first_shape, last_shape, result); } } - found = roadmap_street_get_distance_no_shape (position, line, result); ! if (found) { ! result->fips = roadmap_locator_active(); } return found; --- 959,969 ---- found = roadmap_street_get_distance_with_shape ! (position, line, layer, first_shape, last_shape, result); } } ! if (!found) { ! found = roadmap_street_get_distance_no_shape (position, ! line, layer, result); } return found; *************** *** 966,970 **** static int roadmap_street_get_closest_in_square ! (const RoadMapPosition *position, int square, int cfcc, RoadMapNeighbour *neighbours, int count, int max) { --- 972,976 ---- static int roadmap_street_get_closest_in_square ! (const RoadMapPosition *position, int square, int layer, RoadMapNeighbour *neighbours, int count, int max) { *************** *** 980,985 **** RoadMapNeighbour this; ! if (roadmap_line_in_square (square, cfcc, &first_line, &last_line) > 0) { if (roadmap_shape_in_square (square, &first_shape_line, --- 986,993 ---- RoadMapNeighbour this; + int fips = roadmap_locator_active (); + ! if (roadmap_line_in_square (square, layer, &first_line, &last_line) > 0) { if (roadmap_shape_in_square (square, &first_shape_line, *************** *** 988,991 **** --- 996,1001 ---- for (line = first_line; line <= last_line; line++) { + if (roadmap_plugin_override_line (line, layer, fips)) continue; + if (roadmap_shape_of_line (line, first_shape_line, last_shape_line, *************** *** 994,1005 **** found = roadmap_street_get_distance_with_shape ! (position, line, first_shape, last_shape, &this); } else { found = ! roadmap_street_get_distance_no_shape (position, line, &this); } if (found) { - this.line = line; count = roadmap_street_replace (neighbours, count, max, &this); } --- 1004,1015 ---- found = roadmap_street_get_distance_with_shape ! (position, line, layer, first_shape, last_shape, &this); } else { found = ! roadmap_street_get_distance_no_shape (position, ! line, layer, &this); } if (found) { count = roadmap_street_replace (neighbours, count, max, &this); } *************** *** 1010,1015 **** for (line = first_line; line <= last_line; line++) { ! if (roadmap_street_get_distance_no_shape (position, line, &this)) { ! this.line = line; count = roadmap_street_replace (neighbours, count, max, &this); } --- 1020,1025 ---- for (line = first_line; line <= last_line; line++) { ! if (roadmap_street_get_distance_no_shape (position, ! line, layer, &this)) { count = roadmap_street_replace (neighbours, count, max, &this); } *************** *** 1018,1022 **** } ! if (roadmap_line_in_square2 (square, cfcc, &first_line, &last_line) > 0) { int previous_square = -1; --- 1028,1032 ---- } ! if (roadmap_line_in_square2 (square, layer, &first_line, &last_line) > 0) { int previous_square = -1; *************** *** 1040,1043 **** --- 1050,1055 ---- } + if (roadmap_plugin_override_line (line, layer, fips)) continue; + if (shape_count > 0 && roadmap_shape_of_line (line, first_shape_line, *************** *** 1047,1059 **** found = roadmap_street_get_distance_with_shape ! (position, line, first_shape, last_shape, &this); } else { found = ! roadmap_street_get_distance_no_shape (position, line, &this); } if (found) { - this.line = line; count = roadmap_street_replace (neighbours, count, max, &this); } --- 1059,1071 ---- found = roadmap_street_get_distance_with_shape ! (position, line, layer, first_shape, last_shape, &this); } else { found = ! roadmap_street_get_distance_no_shape (position, ! line, layer, &this); } if (found) { count = roadmap_street_replace (neighbours, count, max, &this); } |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:08:07
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24442 Modified Files: roadmap_screen.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** roadmap_screen.c 20 Nov 2005 00:10:10 -0000 1.57 --- roadmap_screen.c 27 Nov 2005 06:07:59 -0000 1.58 *************** *** 52,55 **** --- 52,56 ---- #include "roadmap_pointer.h" #include "roadmap_display.h" + #include "roadmap_plugin.h" #include "roadmap_factory.h" *************** *** 711,714 **** --- 712,716 ---- int last_shape; RoadMapPen layer_pen; + int fips = roadmap_locator_active (); int drawn = 0; *************** *** 719,723 **** layer_pen = roadmap_layer_get_pen (layer, pen_index); ! if (layer_pen == NULL) return; --- 721,725 ---- layer_pen = roadmap_layer_get_pen (layer, pen_index); ! if (layer_pen == NULL) return 0; *************** *** 734,754 **** for (line = first_line; line <= last_line; ++line) { ! RoadMapPosition from; ! RoadMapPosition to; ! roadmap_line_from (line, &from); ! roadmap_line_to (line, &to); ! if (first_shape_line >= 0) { ! if (roadmap_shape_of_line (line, ! first_shape_line, last_shape_line, ! &first_shape, &last_shape) == 0) { ! first_shape = -1; } } - roadmap_screen_draw_line - (&from, &to, fully_visible, &from, first_shape, last_shape, - roadmap_shape_get_position, layer_pen); - drawn += 1; } } --- 736,772 ---- for (line = first_line; line <= last_line; ++line) { ! /* A plugin may override a line: it can change the pen or ! * decide not to draw the line. ! */ ! if (!roadmap_plugin_override_line (line, layer, fips)) { ! RoadMapPosition from; ! RoadMapPosition to; ! RoadMapPen pen; ! if (first_shape_line >= 0) { ! if (roadmap_shape_of_line (line, ! first_shape_line, last_shape_line, ! &first_shape, &last_shape) == 0) { ! first_shape = -1; ! } ! } ! ! /* Check if the plugin wants to override the pen. */ ! if (! roadmap_plugin_override_pen ! (line, layer, fips, pen_index, &pen)) { ! pen = layer_pen; } + + if (pen == NULL) continue; + + roadmap_line_from (line, &from); + roadmap_line_to (line, &to); + + roadmap_screen_draw_line + (&from, &to, fully_visible, &from, first_shape, last_shape, + roadmap_shape_get_position, layer_pen); + drawn += 1; } } } *************** *** 769,774 **** for (line = first_line; line <= last_line; ++line) { - RoadMapPosition from; - RoadMapPosition to; RoadMapPosition position; --- 787,790 ---- *************** *** 825,844 **** } ! if (first_shape_line >= 0) { ! roadmap_shape_of_line (real_line, ! first_shape_line, last_shape_line, ! &first_shape, &last_shape); ! } else { ! first_shape = last_shape = -1; ! } ! roadmap_line_from (real_line, &from); ! roadmap_line_to (real_line, &to); ! roadmap_screen_draw_line ! (&from, &to, fully_visible, &from, first_shape, last_shape, ! roadmap_shape_get_position, layer_pen); ! drawn += 1; } --- 841,874 ---- } ! if (! roadmap_plugin_override_line (real_line, layer, fips)) { ! RoadMapPosition from; ! RoadMapPosition to; ! RoadMapPen pen; ! if (first_shape_line >= 0) { ! roadmap_shape_of_line (real_line, ! first_shape_line, last_shape_line, ! &first_shape, &last_shape); ! } else { ! first_shape = last_shape = -1; ! } ! /* Check if a plugin wants to override the pen */ ! if (! roadmap_plugin_override_pen ! (real_line, layer, fips, pen_index, &pen)) { ! pen = layer_pen; ! } ! if (pen == NULL) continue; ! ! roadmap_line_from (real_line, &from); ! roadmap_line_to (real_line, &to); ! ! roadmap_screen_draw_line ! (&from, &to, fully_visible, &from, first_shape, last_shape, ! roadmap_shape_get_position, layer_pen); ! ! drawn += 1; ! } } *************** *** 1007,1010 **** --- 1037,1044 ---- } } + + roadmap_plugin_screen_repaint (max_pen); + roadmap_screen_flush_lines (); + roadmap_screen_flush_points (); } *************** *** 1048,1069 **** static void roadmap_screen_short_click (RoadMapGuiPoint *point) { ! int line; ! int distance; ! RoadMapPosition position; ! roadmap_math_to_position (point, &position); ! line = roadmap_navigate_retrieve_line ! (&position, ! roadmap_config_get_integer (&RoadMapConfigAccuracyMouse), ! &distance); ! if (line >= 0) { ! roadmap_trip_set_point ("Selection", &position); ! roadmap_display_activate ("Selected Street", line, &position); ! roadmap_screen_repaint (); ! } } --- 1082,1104 ---- static void roadmap_screen_short_click (RoadMapGuiPoint *point) { ! PluginLine line; ! int distance; ! RoadMapPosition position; ! roadmap_math_to_position (point, &position); ! if (roadmap_navigate_retrieve_line ! (&position, ! roadmap_config_get_integer (&RoadMapConfigAccuracyMouse), ! &line, ! &distance) != -1) { ! PluginStreet street; ! roadmap_trip_set_point ("Selection", &position); ! roadmap_display_activate ("Selected Street", &line, &position, &street); ! roadmap_screen_repaint (); ! } } |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:07:30
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24377 Modified Files: roadmap_navigate.h Log Message: Merging in the map editor changes (Ehud) Index: roadmap_navigate.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_navigate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_navigate.h 5 Oct 2003 10:36:38 -0000 1.5 --- roadmap_navigate.h 27 Nov 2005 06:07:22 -0000 1.6 *************** *** 22,35 **** */ ! #ifndef INCLUDE__ROADMAP_NAVIGATE__H ! #define INCLUDE__ROADMAP_NAVIGATE__H #include "roadmap_gps.h" void roadmap_navigate_disable (void); void roadmap_navigate_enable (void); ! int roadmap_navigate_retrieve_line ! (const RoadMapPosition *position, int accuracy, int *distance); void roadmap_navigate_locate (const RoadMapGpsPosition *gps_position); --- 22,38 ---- */ ! #ifndef INCLUDED__ROADMAP_NAVIGATE__H ! #define INCLUDED__ROADMAP_NAVIGATE__H #include "roadmap_gps.h" + #include "roadmap_plugin.h" void roadmap_navigate_disable (void); void roadmap_navigate_enable (void); ! int roadmap_navigate_retrieve_line (const RoadMapPosition *position, ! int accuracy, ! PluginLine *line, ! int *distance); void roadmap_navigate_locate (const RoadMapGpsPosition *gps_position); *************** *** 37,39 **** void roadmap_navigate_initialize (void); ! #endif // INCLUDE__ROADMAP_NAVIGATE__H --- 40,42 ---- void roadmap_navigate_initialize (void); ! #endif // INCLUDED__ROADMAP_NAVIGATE__H |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:07:11
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24329 Modified Files: roadmap_navigate.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_navigate.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_navigate.c 14 Nov 2005 07:15:17 -0000 1.20 --- roadmap_navigate.c 27 Nov 2005 06:06:59 -0000 1.21 *************** *** 68,72 **** int valid; ! int street; int direction; --- 68,72 ---- int valid; ! PluginStreet street; int direction; *************** *** 74,78 **** RoadMapFuzzy fuzzyfied; ! int intersection; RoadMapPosition entry; --- 74,78 ---- RoadMapFuzzy fuzzyfied; ! PluginLine intersection; RoadMapPosition entry; *************** *** 82,86 **** } RoadMapTracking; ! #define ROADMAP_TRACKING_NULL {0, -1, 0, 0, 0, {0, 0}, {0, 0, 0}}; #define ROADMAP_NEIGHBOURHOUD 16 --- 82,86 ---- } RoadMapTracking; ! #define ROADMAP_TRACKING_NULL {0, PLUGIN_STREET_NULL, 0, 0, PLUGIN_LINE_NULL, {0, 0}, {0, 0, 0}}; #define ROADMAP_NEIGHBOURHOUD 16 *************** *** 92,114 **** ! static void roadmap_navigate_trace (const char *format, int line) { char text[1024]; ! RoadMapStreetProperties properties; if (! roadmap_log_enabled (ROADMAP_DEBUG)) return; ! roadmap_street_get_properties (line, &properties); ! roadmap_message_set ! ('#', roadmap_street_get_street_address (&properties)); ! roadmap_message_set ! ('N', roadmap_street_get_street_name (&properties)); ! roadmap_message_set ! ('C', roadmap_street_get_city_name (&properties)); text[0] = 0; if (roadmap_message_format (text, sizeof(text), format)) { ! printf ("%s (line %d, street %d)\n", text, line, properties.street); } } --- 92,118 ---- ! static void roadmap_navigate_trace (const char *format, PluginLine *line) { char text[1024]; ! PluginStreet street; ! PluginStreetProperties properties; if (! roadmap_log_enabled (ROADMAP_DEBUG)) return; ! roadmap_plugin_get_street (line, &street); ! ! roadmap_plugin_get_street_properties (line, &properties); ! roadmap_message_set ('#', properties.address); ! roadmap_message_set ('N', properties.street); ! roadmap_message_set ('C', properties.city); text[0] = 0; if (roadmap_message_format (text, sizeof(text), format)) { ! printf ("%s (plugin %d, line %d, street %d)\n", ! text, ! roadmap_plugin_get_id(line), ! roadmap_plugin_get_line_id (line), ! roadmap_plugin_get_street_id (&street)); } } *************** *** 150,154 **** ! roadmap_log_push ("roadmap_navigate_retrieve_line"); roadmap_math_coordinate (position, &focus_point); --- 154,158 ---- ! roadmap_log_push ("roadmap_navigate_get_neighbours"); roadmap_math_coordinate (position, &focus_point); *************** *** 211,216 **** ! int roadmap_navigate_retrieve_line ! (const RoadMapPosition *position, int accuracy, int *distance) { RoadMapNeighbour closest; --- 215,222 ---- ! int roadmap_navigate_retrieve_line (const RoadMapPosition *position, ! int accuracy, ! PluginLine *line, ! int *distance) { RoadMapNeighbour closest; *************** *** 224,231 **** *distance = closest.distance; ! if (roadmap_locator_activate (closest.fips) != ROADMAP_US_OK) { return -1; } ! return closest.line; } --- 230,238 ---- *distance = closest.distance; ! if (roadmap_plugin_activate_db (&closest.line) != ROADMAP_US_OK) { return -1; } ! *line = closest.line; ! return 0; } *************** *** 273,291 **** - static int roadmap_delta_direction (int direction1, int direction2) { - - int delta = direction2 - direction1; - - while (delta > 180) delta -= 360; - while (delta < -180) delta += 360; - - if (delta < 0) delta = 0 - delta; - - while (delta >= 360) delta -= 360; - - return delta; - } - - static int roadmap_navigate_confirm_intersection (const RoadMapGpsPosition *position) { --- 280,283 ---- *************** *** 293,300 **** int delta; ! if (RoadMapConfirmedStreet.intersection < 0) return 0; ! delta = roadmap_delta_direction (position->steering, ! RoadMapConfirmedStreet.direction); return (delta < 90 && delta > -90); --- 285,292 ---- int delta; ! if (!PLUGIN_VALID(RoadMapConfirmedStreet.intersection)) return 0; ! delta = roadmap_math_delta_direction (position->steering, ! RoadMapConfirmedStreet.direction); return (delta < 90 && delta > -90); *************** *** 308,312 **** */ static RoadMapFuzzy roadmap_navigate_is_intersection ! (int line, int direction, const RoadMapPosition *crossing) { --- 300,304 ---- */ static RoadMapFuzzy roadmap_navigate_is_intersection ! (PluginLine *line, int direction, const RoadMapPosition *crossing) { *************** *** 315,322 **** RoadMapPosition line_from; ! if (line == RoadMapConfirmedLine.line) return roadmap_fuzzy_false(); ! roadmap_line_to (line, &line_to); ! roadmap_line_from (line, &line_from); if ((line_from.latitude != crossing->latitude) || --- 307,316 ---- RoadMapPosition line_from; ! if (roadmap_plugin_same_line (line, &RoadMapConfirmedLine.line)) { ! return roadmap_fuzzy_false(); ! } ! roadmap_plugin_line_to (line, &line_to); ! roadmap_plugin_line_from (line, &line_from); if ((line_from.latitude != crossing->latitude) || *************** *** 348,356 **** */ static int roadmap_navigate_find_intersection ! (const RoadMapGpsPosition *position) { int cfcc; int square; - int line; int first_line; int last_line; --- 342,349 ---- */ static int roadmap_navigate_find_intersection ! (const RoadMapGpsPosition *position, PluginLine *found) { int cfcc; int square; int first_line; int last_line; *************** *** 360,364 **** RoadMapPosition crossing; - int found; RoadMapFuzzy match; RoadMapFuzzy best_match; --- 353,356 ---- *************** *** 366,372 **** RoadMapStreetProperties properties; delta_from = ! roadmap_delta_direction (position->steering, roadmap_math_azymuth (&RoadMapLatestPosition, --- 358,370 ---- RoadMapStreetProperties properties; + int fips = roadmap_locator_active (); + + PluginLine plugin_lines[100]; + int count; + int i; + delta_from = ! roadmap_math_delta_direction (position->steering, roadmap_math_azymuth (&RoadMapLatestPosition, *************** *** 374,378 **** delta_to = ! roadmap_delta_direction (position->steering, roadmap_math_azymuth (&RoadMapLatestPosition, --- 372,376 ---- delta_to = ! roadmap_math_delta_direction (position->steering, roadmap_math_azymuth (&RoadMapLatestPosition, *************** *** 380,386 **** if (delta_to < delta_from - 30) { ! roadmap_line_to (RoadMapConfirmedLine.line, &crossing); } else if (delta_from < delta_to - 30) { ! roadmap_line_from (RoadMapConfirmedLine.line, &crossing); } else { return 0; /* Not sure enough. */ --- 378,384 ---- if (delta_to < delta_from - 30) { ! roadmap_plugin_line_to (&RoadMapConfirmedLine.line, &crossing); } else if (delta_from < delta_to - 30) { ! roadmap_plugin_line_from (&RoadMapConfirmedLine.line, &crossing); } else { return 0; /* Not sure enough. */ *************** *** 395,451 **** * intersection street. We select the one that matches the best. */ - found = -1; /* Avoid gcc warning. */ best_match = roadmap_fuzzy_false(); square = roadmap_square_search (&crossing); ! for (cfcc = ROADMAP_ROAD_FIRST; cfcc <= ROADMAP_ROAD_LAST; ++cfcc) { ! if (roadmap_line_in_square ! (square, cfcc, &first_line, &last_line) > 0) { ! for (line = first_line; line <= last_line; ++line) { match = roadmap_navigate_is_intersection ! (line, position->steering, &crossing); if (best_match < match) { ! roadmap_street_get_properties (line, &properties); if ((properties.street > 0) && ! (properties.street != RoadMapConfirmedStreet.street)) { ! found = line; best_match = match; } } ! } ! } ! if (roadmap_line_in_square2 ! (square, cfcc, &first_line, &last_line) > 0) { ! int xline; ! for (xline = first_line; xline <= last_line; ++xline) { ! line = roadmap_line_get_from_index2 (xline); ! match = roadmap_navigate_is_intersection ! (line, position->steering, &crossing); ! if (best_match < match) { ! roadmap_street_get_properties (line, &properties); ! if ((properties.street > 0) && ! (properties.street != RoadMapConfirmedStreet.street)) { ! found = line; ! best_match = match; ! } } } } } if (! roadmap_fuzzy_is_acceptable (best_match)) { roadmap_display_hide ("Current Street"); --- 393,509 ---- * intersection street. We select the one that matches the best. */ best_match = roadmap_fuzzy_false(); square = roadmap_square_search (&crossing); ! if (square != -1) { ! for (cfcc = ROADMAP_ROAD_FIRST; cfcc <= ROADMAP_ROAD_LAST; ++cfcc) { ! if (roadmap_line_in_square ! (square, cfcc, &first_line, &last_line) > 0) { ! ! int line; ! ! for (line = first_line; line <= last_line; ++line) { ! ! PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, cfcc, fips); ! ! if (roadmap_plugin_override_line (line, cfcc, fips)) { ! continue; ! } match = roadmap_navigate_is_intersection ! (&p_line, position->steering, &crossing); ! if (best_match < match) { ! PluginStreet street; ! ! roadmap_street_get_properties (line, &properties); ! ! roadmap_plugin_set_street ! (&street, ROADMAP_PLUGIN_ID, properties.street); if ((properties.street > 0) && ! (! roadmap_plugin_same_street ! (&street, &RoadMapConfirmedStreet.street))) { ! *found = p_line; best_match = match; } } ! } ! } ! } ! if (roadmap_line_in_square2 ! (square, cfcc, &first_line, &last_line) > 0) { ! int xline; ! for (xline = first_line; xline <= last_line; ++xline) { ! int line = roadmap_line_get_from_index2 (xline); ! PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, cfcc, fips); ! if (roadmap_plugin_override_line (line, cfcc, fips)) { ! continue; ! } ! match = roadmap_navigate_is_intersection ! (&p_line, position->steering, &crossing); ! if (best_match < match) { ! PluginStreet street; ! ! roadmap_street_get_properties (line, &properties); ! ! roadmap_plugin_set_street ! (&street, ROADMAP_PLUGIN_ID, properties.street); ! ! if ((properties.street > 0) && ! (! roadmap_plugin_same_street ! (&street, &RoadMapConfirmedStreet.street))) { ! ! *found = p_line; ! best_match = match; } + } + } + } + } + + /* Search among the plugin lines. */ + + count = roadmap_plugin_find_connected_lines + (&crossing, + plugin_lines, + sizeof(plugin_lines)/sizeof(*plugin_lines)); + + for (i=0; i<count; ++i) { + + PluginStreet street; + + match = roadmap_navigate_is_intersection + (&plugin_lines[i], position->steering, &crossing); + + if (best_match < match) { + + roadmap_plugin_get_street (&plugin_lines[i], &street); + + if (!roadmap_plugin_same_street + (&street, + &RoadMapConfirmedStreet.street)) { + + *found = plugin_lines[i]; + best_match = match; } } } + if (! roadmap_fuzzy_is_acceptable (best_match)) { roadmap_display_hide ("Current Street"); *************** *** 456,462 **** ("Announce crossing %N, %C|Announce crossing %N", found); ! if (found != RoadMapConfirmedStreet.intersection) { ! RoadMapConfirmedStreet.intersection = found; ! roadmap_display_activate ("Approach", found, &crossing); } --- 514,522 ---- ("Announce crossing %N, %C|Announce crossing %N", found); ! if (! roadmap_plugin_same_line ! (found, &RoadMapConfirmedStreet.intersection)) { ! PluginStreet street; ! RoadMapConfirmedStreet.intersection = *found; ! roadmap_display_activate ("Approach", found, &crossing, &street); } *************** *** 506,516 **** RoadMapFuzzy before = RoadMapConfirmedStreet.fuzzyfied; ! if (roadmap_locator_activate ! (RoadMapConfirmedLine.fips) != ROADMAP_US_OK) { return; } ! roadmap_street_get_distance ! (&RoadMapLatestPosition, ! RoadMapConfirmedLine.line, &RoadMapConfirmedLine); if (roadmap_navigate_fuzzify --- 566,576 ---- RoadMapFuzzy before = RoadMapConfirmedStreet.fuzzyfied; ! if (roadmap_plugin_activate_db ! (&RoadMapConfirmedLine.line) == -1) { return; } ! roadmap_plugin_get_distance (&RoadMapLatestPosition, ! &RoadMapConfirmedLine.line, ! &RoadMapConfirmedLine); if (roadmap_navigate_fuzzify *************** *** 519,523 **** if (! roadmap_navigate_confirm_intersection (gps_position)) { ! roadmap_navigate_find_intersection (gps_position); } --- 579,584 ---- if (! roadmap_navigate_confirm_intersection (gps_position)) { ! PluginLine p_line; ! roadmap_navigate_find_intersection (gps_position, &p_line); } *************** *** 547,562 **** if (roadmap_fuzzy_is_acceptable (best)) { ! if (roadmap_locator_activate ! (RoadMapNeighbourhood[found].fips) != ROADMAP_US_OK) return; ! if (RoadMapConfirmedLine.line != RoadMapNeighbourhood[found].line) { ! if (RoadMapConfirmedLine.line > 0) { roadmap_navigate_trace ! ("Quit street %N", RoadMapConfirmedLine.line); } roadmap_navigate_trace ("Enter street %N, %C|Enter street %N", ! RoadMapNeighbourhood[found].line); roadmap_display_hide ("Approach"); --- 608,627 ---- if (roadmap_fuzzy_is_acceptable (best)) { ! if (roadmap_plugin_activate_db ! (&RoadMapNeighbourhood[found].line) == -1) { return; + } ! if (! roadmap_plugin_same_line ! (&RoadMapConfirmedLine.line, ! &RoadMapNeighbourhood[found].line)) { ! ! if (PLUGIN_VALID(RoadMapConfirmedLine.line)) { roadmap_navigate_trace ! ("Quit street %N", &RoadMapConfirmedLine.line); } roadmap_navigate_trace ("Enter street %N, %C|Enter street %N", ! &RoadMapNeighbourhood[found].line); roadmap_display_hide ("Approach"); *************** *** 568,596 **** RoadMapConfirmedStreet.valid = 1; RoadMapConfirmedStreet.fuzzyfied = best; ! RoadMapConfirmedStreet.intersection = -1; ! RoadMapConfirmedStreet.street = ! roadmap_display_activate ! ("Current Street", RoadMapConfirmedLine.line, NULL); if (gps_position->speed > roadmap_gps_speed_accuracy()) { ! roadmap_navigate_find_intersection (gps_position); } } else { ! if (RoadMapConfirmedLine.line > 0) { ! if (roadmap_locator_activate ! (RoadMapConfirmedLine.fips) != ROADMAP_US_OK) return; roadmap_navigate_trace ("Lost street %N", ! RoadMapConfirmedLine.line); roadmap_display_hide ("Current Street"); roadmap_display_hide ("Approach"); } ! RoadMapConfirmedLine.line = -1; RoadMapConfirmedStreet.valid = 0; } --- 633,665 ---- RoadMapConfirmedStreet.valid = 1; RoadMapConfirmedStreet.fuzzyfied = best; ! INVALIDATE_PLUGIN(RoadMapConfirmedStreet.intersection); ! roadmap_display_activate ! ("Current Street", ! &RoadMapConfirmedLine.line, ! NULL, ! &RoadMapConfirmedStreet.street); if (gps_position->speed > roadmap_gps_speed_accuracy()) { ! PluginLine p_line; ! roadmap_navigate_find_intersection (gps_position, &p_line); } } else { ! if (PLUGIN_VALID(RoadMapConfirmedLine.line)) { ! if (roadmap_plugin_activate_db ! (&RoadMapConfirmedLine.line) == -1) { return; + } roadmap_navigate_trace ("Lost street %N", ! &RoadMapConfirmedLine.line); roadmap_display_hide ("Current Street"); roadmap_display_hide ("Approach"); } ! INVALIDATE_PLUGIN(RoadMapConfirmedLine.line); RoadMapConfirmedStreet.valid = 0; } |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:06:37
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24264 Modified Files: roadmap_math.h Log Message: Merging in the map editor changes (Ehud) Index: roadmap_math.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_math.h 14 Nov 2005 07:14:36 -0000 1.20 --- roadmap_math.h 27 Nov 2005 06:06:28 -0000 1.21 *************** *** 86,93 **** (const RoadMapPosition *position1, const RoadMapPosition *position2); ! int roadmap_math_distance_convert (const char *string, int *explicit); ! int roadmap_math_to_trip_distance (int distance); ! int roadmap_math_to_speed_unit (int knots); --- 86,93 ---- (const RoadMapPosition *position1, const RoadMapPosition *position2); ! int roadmap_math_distance_convert (const char *string, int *explicit); ! int roadmap_math_to_trip_distance (int distance); ! int roadmap_math_to_speed_unit (int knots); *************** *** 101,109 **** RoadMapPosition *intersection); ! int roadmap_math_intersection (RoadMapPosition *from1, ! RoadMapPosition *to1, ! RoadMapPosition *from2, ! RoadMapPosition *to2, ! RoadMapPosition *intersection); void roadmap_math_screen_edges (RoadMapArea *area); --- 101,109 ---- RoadMapPosition *intersection); ! int roadmap_math_intersection (RoadMapPosition *from1, ! RoadMapPosition *to1, ! RoadMapPosition *from2, ! RoadMapPosition *to2, ! RoadMapPosition *intersection); void roadmap_math_screen_edges (RoadMapArea *area); *************** *** 111,116 **** int roadmap_math_street_address (const char *image, int length); ! int roadmap_math_compare_points (const RoadMapPosition *p1, ! const RoadMapPosition *p2); #endif // INCLUDED__ROADMAP_MATH__H --- 111,119 ---- int roadmap_math_street_address (const char *image, int length); ! int roadmap_math_compare_points (const RoadMapPosition *p1, ! const RoadMapPosition *p2); ! ! int roadmap_math_delta_direction (int direction1, int direction2); #endif // INCLUDED__ROADMAP_MATH__H + |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:06:21
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24230 Modified Files: roadmap_math.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** roadmap_math.c 14 Nov 2005 07:14:17 -0000 1.26 --- roadmap_math.c 27 Nov 2005 06:06:11 -0000 1.27 *************** *** 1297,1298 **** --- 1297,1313 ---- } + + int roadmap_math_delta_direction (int direction1, int direction2) { + + int delta = direction2 - direction1; + + while (delta > 180) delta -= 360; + while (delta < -180) delta += 360; + + if (delta < 0) delta = 0 - delta; + + while (delta >= 360) delta -= 360; + + return delta; + } + |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:05:59
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24197 Modified Files: roadmap_line.h Log Message: Merging in the map editor changes (Ehud) Index: roadmap_line.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_line.h 14 Nov 2005 07:13:31 -0000 1.2 --- roadmap_line.h 27 Nov 2005 06:05:52 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- #define INCLUDED__ROADMAP_LINE__H + #include "roadmap_types.h" #include "roadmap_dbread.h" |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:05:41
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24148 Modified Files: roadmap_fuzzy.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_fuzzy.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_fuzzy.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_fuzzy.c 14 Nov 2005 07:10:10 -0000 1.4 --- roadmap_fuzzy.c 27 Nov 2005 06:05:33 -0000 1.5 *************** *** 35,38 **** --- 35,39 ---- #include "roadmap_line.h" #include "roadmap_locator.h" + #include "roadmap_plugin.h" #include "roadmap_fuzzy.h" *************** *** 135,153 **** ! if ((street->fips == reference->fips) && ! (street->line == reference->line)) return FUZZY_TRUTH_MAX; ! if (roadmap_locator_activate (street->fips) != ROADMAP_US_OK) { return 0; } ! roadmap_line_from (street->line, &(line_point[0])); ! roadmap_line_to (street->line, &(line_point[1])); ! if (roadmap_locator_activate (reference->fips) != ROADMAP_US_OK) { return 0; } ! roadmap_line_from (reference->line, &(reference_point[0])); ! roadmap_line_to (reference->line, &(reference_point[1])); for (i = 0; i <= 1; ++i) { --- 136,154 ---- ! if (roadmap_plugin_same_line (&street->line, &reference->line)) ! return FUZZY_TRUTH_MAX; ! if (roadmap_plugin_activate_db (&street->line) == -1) { return 0; } ! roadmap_plugin_line_from (&street->line, &(line_point[0])); ! roadmap_plugin_line_to (&street->line, &(line_point[1])); ! if (roadmap_plugin_activate_db (&reference->line) == -1) { return 0; } ! roadmap_plugin_line_from (&reference->line, &(reference_point[0])); ! roadmap_plugin_line_to (&reference->line, &(reference_point[1])); for (i = 0; i <= 1; ++i) { |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:05:08
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24055 Modified Files: roadmap_display.h Log Message: Merging in the map editor changes (Ehud) Index: roadmap_display.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_display.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** roadmap_display.h 2 Nov 2003 19:44:13 -0000 1.8 --- roadmap_display.h 27 Nov 2005 06:05:01 -0000 1.9 *************** *** 22,29 **** */ ! #ifndef INCLUDE__ROADMAP_DISPLAY__H ! #define INCLUDE__ROADMAP_DISPLAY__H #include "roadmap_canvas.h" void roadmap_display_initialize (void); --- 22,30 ---- */ ! #ifndef INCLUDED__ROADMAP_DISPLAY__H ! #define INCLUDED__ROADMAP_DISPLAY__H #include "roadmap_canvas.h" + #include "roadmap_plugin.h" void roadmap_display_initialize (void); *************** *** 31,36 **** void roadmap_display_page (const char *name); ! int roadmap_display_activate ! (const char *title, int line, const RoadMapPosition *position); void roadmap_display_text (const char *title, const char *format, ...); --- 32,39 ---- void roadmap_display_page (const char *name); ! int roadmap_display_activate (const char *title, ! PluginLine *line, ! const RoadMapPosition *position, ! PluginStreet *street); void roadmap_display_text (const char *title, const char *format, ...); *************** *** 42,44 **** const char *roadmap_display_get_id (const char *title); ! #endif // INCLUDE__ROADMAP_DISPLAY__H --- 45,47 ---- const char *roadmap_display_get_id (const char *title); ! #endif // INCLUDED__ROADMAP_DISPLAY__H |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:04:44
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23985 Modified Files: roadmap_display.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_display.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_display.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** roadmap_display.c 25 Nov 2004 06:29:32 -0000 1.21 --- roadmap_display.c 27 Nov 2005 06:04:37 -0000 1.22 *************** *** 43,46 **** --- 43,47 ---- #include "roadmap_sprite.h" #include "roadmap_voice.h" + #include "roadmap_plugin.h" #include "roadmap_display.h" *************** *** 95,99 **** RoadMapPen foreground; ! int line; RoadMapConfigDescriptor format_descriptor; --- 96,100 ---- RoadMapPen foreground; ! PluginLine line; RoadMapConfigDescriptor format_descriptor; *************** *** 106,110 **** const char *default_foreground; ! RoadMapStreetProperties properties; } RoadMapSign; --- 107,111 ---- const char *default_foreground; ! PluginStreet street; } RoadMapSign; *************** *** 112,120 **** #define ROADMAP_SIGN(p,n,w,t,b,f) \ ! {p, n, NULL, NULL, 0, 0, 0, 0, {0, 0},{{0,0}, {0,0}}, NULL, NULL, -1, \ {n, "Text", NULL}, \ {n, "Background", NULL}, \ {n, "Foreground", NULL}, \ ! w, t, b, f, ROADMAP_STREET_NOPROPERTY} --- 113,122 ---- #define ROADMAP_SIGN(p,n,w,t,b,f) \ ! {p, n, NULL, NULL, 0, 0, 0, 0, {0, 0},{{0,0}, {0,0}}, NULL, NULL, \ ! PLUGIN_LINE_NULL, \ {n, "Text", NULL}, \ {n, "Background", NULL}, \ {n, "Foreground", NULL}, \ ! w, t, b, f, PLUGIN_STREET_NULL} *************** *** 452,465 **** ! int roadmap_display_activate ! (const char *title, int line, const RoadMapPosition *position) { int street_has_changed; int message_has_changed; - int street; const char *format; char text[256]; RoadMapSign *sign; roadmap_log_push ("roadmap_display_activate"); --- 454,470 ---- ! int roadmap_display_activate (const char *title, ! PluginLine *line, ! const RoadMapPosition *position, ! PluginStreet *street) { int street_has_changed; int message_has_changed; const char *format; char text[256]; RoadMapSign *sign; + PluginStreetProperties properties; + roadmap_log_push ("roadmap_display_activate"); *************** *** 477,496 **** street_has_changed = 0; - street = sign->properties.street; ! if (sign->line != line) { ! roadmap_street_get_properties (line, &sign->properties); if (sign->id != NULL) { free (sign->id); } ! sign->id = ! strdup (roadmap_street_get_full_name (&sign->properties)); ! sign->line = line; sign->was_visible = 0; ! if (street != sign->properties.street) { street_has_changed = 1; } --- 482,500 ---- street_has_changed = 0; ! if (! roadmap_plugin_same_line (&sign->line, line)) { ! roadmap_plugin_get_street (line, street); if (sign->id != NULL) { free (sign->id); } ! sign->id = strdup (roadmap_plugin_street_full_name (line)); ! sign->line = *line; sign->was_visible = 0; ! if (! roadmap_plugin_same_street (street, &sign->street)) { ! sign->street = *street; street_has_changed = 1; } *************** *** 500,514 **** roadmap_message_set ('F', sign->id); ! roadmap_message_set ! ('#', roadmap_street_get_street_address (&sign->properties)); ! roadmap_message_set ! ('N', roadmap_street_get_street_name (&sign->properties)); ! roadmap_message_set ! ('C', roadmap_street_get_city_name (&sign->properties)); if (! roadmap_message_format (text, sizeof(text), format)) { roadmap_log_pop (); ! return sign->properties.street; } message_has_changed = --- 504,517 ---- roadmap_message_set ('F', sign->id); ! roadmap_plugin_get_street_properties (line, &properties); ! roadmap_message_set ('#', properties.address); ! roadmap_message_set ('N', properties.street); ! roadmap_message_set ('C', properties.city); if (! roadmap_message_format (text, sizeof(text), format)) { roadmap_log_pop (); ! *street = sign->street; ! return 0; } message_has_changed = *************** *** 536,541 **** } ! roadmap_line_from (line, &sign->endpoint[0]); ! roadmap_line_to (line, &sign->endpoint[1]); if (position == NULL) { --- 539,544 ---- } ! roadmap_plugin_line_from (line, &sign->endpoint[0]); ! roadmap_plugin_line_to (line, &sign->endpoint[1]); if (position == NULL) { *************** *** 547,551 **** roadmap_log_pop (); ! return sign->properties.street; } --- 550,555 ---- roadmap_log_pop (); ! *street = sign->street; ! return 0; } |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:04:03
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23899 Modified Files: roadmap_crossing.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_crossing.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_crossing.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_crossing.c 3 Apr 2005 05:48:33 -0000 1.6 --- roadmap_crossing.c 27 Nov 2005 06:03:56 -0000 1.7 *************** *** 66,73 **** static void roadmap_crossing_done (RoadMapStreetIntersection *selected) { if (roadmap_locator_activate (selected->fips) == ROADMAP_US_OK) { roadmap_display_activate ! ("Selected Street", selected->line1, &selected->position); roadmap_trip_set_point ("Selection", &selected->position); roadmap_trip_set_point ("Address", &selected->position); --- 66,80 ---- static void roadmap_crossing_done (RoadMapStreetIntersection *selected) { + PluginLine line; + PluginStreet street; + + roadmap_plugin_set_line + (&line, ROADMAP_PLUGIN_ID, selected->line1, -1, selected->fips); + if (roadmap_locator_activate (selected->fips) == ROADMAP_US_OK) { roadmap_display_activate ! ("Selected Street", &line, &selected->position, &street); ! roadmap_trip_set_point ("Selection", &selected->position); roadmap_trip_set_point ("Address", &selected->position); |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:01:13
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23463 Modified Files: roadmap_address.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_address.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_address.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** roadmap_address.c 13 Nov 2005 23:46:24 -0000 1.17 --- roadmap_address.c 27 Nov 2005 06:01:05 -0000 1.18 *************** *** 62,83 **** static void roadmap_address_done (RoadMapGeocode *selected) { ! roadmap_locator_activate (selected->fips); ! roadmap_log (ROADMAP_DEBUG, "selected address at %d.%06d %c, %d.%06d %c", ! abs(selected->position.longitude)/1000000, ! abs(selected->position.longitude)%1000000, ! selected->position.longitude >= 0 ? 'E' : 'W', ! abs(selected->position.latitude)/1000000, ! abs(selected->position.latitude)%1000000, ! selected->position.latitude >= 0 ? 'N' : 'S'); ! roadmap_display_activate ! ("Selected Street", selected->line, &selected->position); ! roadmap_trip_set_point ("Selection", &selected->position); ! roadmap_trip_set_point ("Address", &selected->position); ! roadmap_trip_set_focus ("Address"); ! roadmap_screen_refresh (); } --- 62,89 ---- static void roadmap_address_done (RoadMapGeocode *selected) { ! PluginStreet street; ! PluginLine line; ! roadmap_locator_activate (selected->fips); ! roadmap_log (ROADMAP_DEBUG, "selected address at %d.%06d %c, %d.%06d %c", ! abs(selected->position.longitude)/1000000, ! abs(selected->position.longitude)%1000000, ! selected->position.longitude >= 0 ? 'E' : 'W', ! abs(selected->position.latitude)/1000000, ! abs(selected->position.latitude)%1000000, ! selected->position.latitude >= 0 ? 'N' : 'S'); ! roadmap_plugin_set_line ! (&line, ROADMAP_PLUGIN_ID, selected->line, -1, selected->fips); ! roadmap_display_activate ! ("Selected Street", &line, &selected->position, &street); ! ! roadmap_trip_set_point ("Selection", &selected->position); ! roadmap_trip_set_point ("Address", &selected->position); ! roadmap_trip_set_focus ("Address"); ! ! roadmap_screen_refresh (); } |
From: Pascal F M. <pas...@us...> - 2005-11-27 06:00:35
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23289 Modified Files: roadmap_trip.c Log Message: Fix default position. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** roadmap_trip.c 23 Oct 2005 07:39:31 -0000 1.40 --- roadmap_trip.c 27 Nov 2005 06:00:28 -0000 1.41 *************** *** 66,71 **** /* Default location is: 1 market St, san Francisco, California. */ ! #define ROADMAP_INITIAL_LONGITUDE -122394181 ! #define ROADMAP_INITIAL_LATITUDE 37794928 --- 66,70 ---- /* Default location is: 1 market St, san Francisco, California. */ ! #define ROADMAP_DEFAULT_POSITION "-122394181, 37794928" *************** *** 102,106 **** #define ROADMAP_TRIP_ITEM(id,sprite,mobile,in_trip, has_value) \ {{NULL, NULL}, id, sprite, 1, mobile, in_trip, has_value, \ ! {ROADMAP_INITIAL_LONGITUDE, ROADMAP_INITIAL_LATITUDE}, \ ROADMAP_GPS_NULL_POSITION, \ ROADMAP_CONFIG_ITEM(id,"Position"), \ --- 101,105 ---- #define ROADMAP_TRIP_ITEM(id,sprite,mobile,in_trip, has_value) \ {{NULL, NULL}, id, sprite, 1, mobile, in_trip, has_value, \ ! {0, 0}, \ ROADMAP_GPS_NULL_POSITION, \ ROADMAP_CONFIG_ITEM(id,"Position"), \ *************** *** 353,357 **** char *point_name = (char *) roadmap_dialog_get_data ("Names", ".Waypoints"); ! if (point_name[0] != 0) { roadmap_trip_remove_point (point_name); --- 352,356 ---- char *point_name = (char *) roadmap_dialog_get_data ("Names", ".Waypoints"); ! if (point_name && point_name[0] != 0) { roadmap_trip_remove_point (point_name); *************** *** 1027,1031 **** roadmap_config_declare ("session", ! &RoadMapTripPredefined[i].config_position, "0,0"); if (RoadMapTripPredefined[i].mobile) { --- 1026,1031 ---- roadmap_config_declare ("session", ! &RoadMapTripPredefined[i].config_position, ! ROADMAP_DEFAULT_POSITION); if (RoadMapTripPredefined[i].mobile) { |
From: Pascal F M. <pas...@us...> - 2005-11-27 05:59:42
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23086 Modified Files: roadmap_nmea.c Log Message: Silently ignore the GPVTG NMEA sentence Index: roadmap_nmea.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_nmea.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** roadmap_nmea.c 25 Jul 2005 02:35:38 -0000 1.24 --- roadmap_nmea.c 27 Nov 2005 05:59:31 -0000 1.25 *************** *** 569,572 **** --- 569,573 ---- {NULL, "RMB", roadmap_nmea_null_decoder}, {NULL, "BOD", roadmap_nmea_null_decoder}, + {NULL, "VTG", roadmap_nmea_null_decoder}, /* Garmin extensions: */ |
From: Pascal F M. <pas...@us...> - 2005-11-27 05:58:38
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22936 Modified Files: roadmap_layer.c Log Message: Merging in the map editor changes (Ehud) Index: roadmap_layer.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_layer.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** roadmap_layer.c 14 Nov 2005 07:12:36 -0000 1.8 --- roadmap_layer.c 27 Nov 2005 05:58:30 -0000 1.9 *************** *** 36,39 **** --- 36,40 ---- #include "roadmap_canvas.h" #include "roadmap_input.h" + #include "roadmap_plugin.h" #include "roadmap_layer.h" *************** *** 233,237 **** unsigned int pen_index; RoadMapLayer *layer; ! for (i = RoadMapLayerCurrentClass->lines_count - 1; i >= 0; --i) { --- 234,238 ---- unsigned int pen_index; RoadMapLayer *layer; ! for (i = RoadMapLayerCurrentClass->lines_count - 1; i >= 0; --i) { *************** *** 246,249 **** --- 247,252 ---- layer->pen_count > 1); + roadmap_plugin_adjust_layer (i, thickness, layer->pen_count); + /* As a matter of taste, I do dislike roads with a filler * of 1 pixel. Lets force at least a filler of 2. |
From: Pascal F M. <pas...@us...> - 2005-11-27 05:58:09
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22871 Modified Files: Makefile Log Message: Merging in the map editor changes (Ehud) and make the make works again for QPE Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/Makefile,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** Makefile 18 Nov 2005 20:09:43 -0000 1.68 --- Makefile 27 Nov 2005 05:58:02 -0000 1.69 *************** *** 53,70 **** --- 53,76 ---- ifeq ($(DESKTOP),GTK2) RDMODULES=gtk2 + DTCFLAGS= else ifeq ($(DESKTOP),GPE) RDMODULES=gtk2 + DTCFLAGS= else ifeq ($(DESKTOP),GTK) RDMODULES=gtk + DTCFLAGS= else ifeq ($(DESKTOP),QT) RDMODULES=qt + DTCFLAGS= else ifeq ($(DESKTOP),QPE) RDMODULES=qt + DTCFLAGS=-DQWS else RDMODULES=gtk gtk2 qt + DTCFLAGS= endif endif *************** *** 89,93 **** ! CFLAGS=$(MODECFLAGS) $(SQLCFLAGS) $(ROADMAP_USE_SHAPEFILES) -I/usr/local/include LDFLAGS=$(MODELDFLAGS) $(SQLLDFLAGS) $(SHAPELDFLAGS) --- 95,99 ---- ! CFLAGS=$(MODECFLAGS) $(DTCFLAGS) $(SQLCFLAGS) $(ROADMAP_USE_SHAPEFILES) -I/usr/local/include -I$(PWD) LDFLAGS=$(MODELDFLAGS) $(SQLLDFLAGS) $(SHAPELDFLAGS) *************** *** 119,122 **** --- 125,129 ---- roadmap_polygon.c \ roadmap_street.c \ + roadmap_plugin.c \ roadmap_geocode.c \ roadmap_history.c \ *************** *** 140,144 **** roadmap_fuzzy.c \ roadmap_navigate.c \ ! roadmap_pointer.c \ roadmap_screen.c \ roadmap_display.c \ --- 147,151 ---- roadmap_fuzzy.c \ roadmap_navigate.c \ ! roadmap_pointer.c \ roadmap_screen.c \ roadmap_display.c \ |
From: Pascal F M. <pas...@us...> - 2005-11-27 05:56:31
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22670 Added Files: roadmap_plugin.c roadmap_plugin.h Log Message: Merging in the map editor changes (Ehud) and make the pen index unsigned --- NEW FILE: roadmap_plugin.h --- /* roadmap_plugin.h - plugin interfaces * * LICENSE: * * Copyright 2005 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * DESCRIPTION: * * There are two types: PluginLine and PluginStreet. These types are * used instead of the integer number which RoadMap uses. A line (or a * street) can now be represented by other modules (I call them plugins) * and they will be responsible to draw it or do whatever is needed with * it. PluginLine is a structure which among other things identifies the * plugin which is responsible to the object. The roadmap_plugin layer is * used when some operation is needed to be done on a Plugin type. * * Currently, roadmap_plugin checks whether the object is a roadmap * object in which case it calls the regular roadmap functions to * complete the operation. Otherwise, a different plugin is responsible * for it. Every plugin must register some callback functions so the * roadmap_layer can call the required functions to complete the * operation. * */ #ifndef INCLUDED__ROADMAP_PLUGIN__H #define INCLUDED__ROADMAP_PLUGIN__H #include "roadmap_types.h" #include "roadmap_canvas.h" /* Map access functions. --------------------------------------------------- */ typedef struct { int plugin_id; int line_id; int layer; int fips; } PluginLine; typedef struct { int plugin_id; int street_id; } PluginStreet; typedef struct { const char *address; const char *street; const char *city; } PluginStreetProperties; typedef struct { PluginLine line; int distance; RoadMapPosition from; RoadMapPosition to; RoadMapPosition intersection; } RoadMapNeighbour; #define PLUGIN_MAKE_LINE(plugin_id, line_id, layer, fips) \ {plugin_id, line_id, layer, fips} #define PLUGIN_LINE_NULL {-1, -1, -1, -1} #define PLUGIN_STREET_NULL {-1, -1} #define ROADMAP_NEIGHBOUR_NULL {PLUGIN_LINE_NULL, -1, {0,0}, {0,0}, {0,0}} int roadmap_plugin_same_line (const PluginLine *line1, const PluginLine *line2); int roadmap_plugin_same_street (const PluginStreet *street1, const PluginStreet *street2); void roadmap_plugin_get_street (const PluginLine *line, PluginStreet *street); void roadmap_plugin_line_from (const PluginLine *line, RoadMapPosition *pos); void roadmap_plugin_line_to (const PluginLine *line, RoadMapPosition *pos); int roadmap_plugin_get_id (const PluginLine *line); int roadmap_plugin_get_fips (const PluginLine *line); int roadmap_plugin_get_line_id (const PluginLine *line); int roadmap_plugin_get_street_id (const PluginStreet *street); void roadmap_plugin_set_line (PluginLine *line, int plugin_id, int line_id, int layer, int fips); void roadmap_plugin_set_street (PluginStreet *street, int plugin_id, int street_id); int roadmap_plugin_activate_db (const PluginLine *line); int roadmap_plugin_get_distance (RoadMapPosition *point, PluginLine *line, RoadMapNeighbour *result); /* Hook functions definition. ---------------------------------------------- */ typedef int (*plugin_override_line_hook) (int line, int layer, int fips); typedef int (*plugin_override_pen_hook) (int line, int layer, int fips, int pen_type, RoadMapPen *override_pen); typedef void (*plugin_screen_repaint_hook) (int max_pen); typedef int (*plugin_activate_db_func) (const PluginLine *line); typedef void (*plugin_line_pos_func) (const PluginLine *line, RoadMapPosition *pos); typedef int (*plugin_get_distance_func) (const RoadMapPosition *point, PluginLine *line, RoadMapNeighbour *result); typedef void (*plugin_get_street_func) (const PluginLine *line, PluginStreet *street); typedef const char *(*plugin_street_full_name_func) (const PluginLine *line); typedef void (*plugin_street_properties_func) (const PluginLine *line, PluginStreetProperties *props); typedef int (*plugin_find_connected_lines_func) (const RoadMapPosition *crossing, PluginLine *plugin_lines, int max); typedef void (*plugin_adjust_layer_hook) (int layer, int thickness, int pen_count); typedef struct { const char *name; plugin_line_pos_func line_from; plugin_line_pos_func line_to; plugin_activate_db_func activate_db; plugin_get_distance_func get_distance; plugin_override_line_hook override_line; plugin_override_pen_hook override_pen; plugin_screen_repaint_hook screen_repaint; plugin_get_street_func get_street; plugin_street_full_name_func get_street_full_name; plugin_street_properties_func get_street_properties; plugin_find_connected_lines_func find_connected_lines; plugin_adjust_layer_hook adjust_layer; } RoadMapPluginHooks; #define ROADMAP_PLUGIN_ID 0 #define PLUGIN_VALID(plugin) (plugin.plugin_id >= 0) #define INVALIDATE_PLUGIN(plugin) (plugin.plugin_id = -1) /* Plugin control functions. ----------------------------------------------- */ int roadmap_plugin_register (RoadMapPluginHooks *hooks); void roadmap_plugin_unregister (int plugin_id); int roadmap_plugin_override_line (int line, int layer, int fips); int roadmap_plugin_override_pen (int line, int layer, int fips, int pen_type, RoadMapPen *override_pen); void roadmap_plugin_screen_repaint (int max_pen); const char *roadmap_plugin_street_full_name (PluginLine *line); void roadmap_plugin_get_street_properties (PluginLine *line, PluginStreetProperties *props); int roadmap_plugin_find_connected_lines (RoadMapPosition *crossing, PluginLine *plugin_lines, int max); void roadmap_plugin_adjust_layer (int layer, int thickness, int pen_count); #endif /* INCLUDED__ROADMAP_PLUGIN__H */ --- NEW FILE: roadmap_plugin.c --- /* roadmap_plugin.c - plugin layer * * LICENSE: * * Copyright 2005 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See roadmap_plugin.h. */ #include <assert.h> #include <stdlib.h> #include "roadmap.h" #include "roadmap_line.h" #include "roadmap_locator.h" #include "roadmap_street.h" #include "roadmap_plugin.h" #define MAX_PLUGINS 10 static RoadMapPluginHooks *hooks[MAX_PLUGINS] = {0}; static int PluginCount = 0; static RoadMapPluginHooks *get_hooks (int id) { assert (id < MAX_PLUGINS); return hooks[id]; } int roadmap_plugin_register (RoadMapPluginHooks *hook) { int i; for (i=1; i<MAX_PLUGINS; i++) { if (hooks[i] == NULL) { hooks[i] = hook; return i; } } return -1; } void roadmap_plugin_unregister (int plugin_id) { hooks[plugin_id] = NULL; } int roadmap_plugin_same_line (const PluginLine *line1, const PluginLine *line2) { return ( (line1->plugin_id == line2->plugin_id) && (line1->line_id == line2->line_id) && (line1->fips == line2->fips) ); } int roadmap_plugin_same_street (const PluginStreet *street1, const PluginStreet *street2) { return ( (street1->plugin_id == street2->plugin_id) && (street1->street_id == street2->street_id) ); } int roadmap_plugin_get_id (const PluginLine *line) { return line->plugin_id; } int roadmap_plugin_get_fips (const PluginLine *line) { return line->fips; } int roadmap_plugin_get_line_id (const PluginLine *line) { return line->line_id; } int roadmap_plugin_get_street_id (const PluginStreet *street) { return street->street_id; } void roadmap_plugin_set_line (PluginLine *line, int plugin_id, int line_id, int layer, int fips) { line->plugin_id = plugin_id; line->line_id = line_id; line->layer = layer; line->fips = fips; } void roadmap_plugin_set_street (PluginStreet *street, int plugin_id, int street_id) { street->plugin_id = plugin_id; street->street_id = street_id; } int roadmap_plugin_activate_db (const PluginLine *line) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { if (roadmap_locator_activate (line->fips) != ROADMAP_US_OK) { return -1; } return 0; } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); return -1; } if (hooks->activate_db != NULL) { return (*hooks->activate_db) (line); } return 0; } } int roadmap_plugin_get_distance (RoadMapPosition *point, PluginLine *line, RoadMapNeighbour *result) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { return roadmap_street_get_distance (point, line->line_id, line->layer, result); } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); return 0; } if (hooks->activate_db != NULL) { return (*hooks->get_distance) (point, line, result); } return 0; } } void roadmap_plugin_line_from (const PluginLine *line, RoadMapPosition *pos) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { roadmap_line_from (line->line_id, pos); } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); pos->longitude = pos->latitude = 0; return; } if (hooks->line_from != NULL) { (*hooks->line_from) (line, pos); } else { pos->longitude = pos->latitude = 0; } return; } } void roadmap_plugin_line_to (const PluginLine *line, RoadMapPosition *pos) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { roadmap_line_to (line->line_id, pos); } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); pos->longitude = pos->latitude = 0; return; } if (hooks->line_to != NULL) { (*hooks->line_to) (line, pos); } else { pos->longitude = pos->latitude = 0; } return; } } int roadmap_plugin_override_line (int line, int layer, int fips) { int i; for (i=1; i<=PluginCount; i++) { RoadMapPluginHooks *hooks = get_hooks (i); if (hooks == NULL) continue; if (hooks->override_line != NULL) { int res = hooks->override_line (line, layer, fips); if (res) return res; } } return 0; } int roadmap_plugin_override_pen (int line, int layer, int pen_type, int fips, RoadMapPen *override_pen) { int i; for (i=1; i<=PluginCount; i++) { RoadMapPluginHooks *hooks = get_hooks (i); if (hooks == NULL) continue; if (hooks->override_pen != NULL) { int res = hooks->override_pen (line, layer, fips, pen_type, override_pen); if (res) return res; } } return 0; } void roadmap_plugin_screen_repaint (int max_pen) { int i; for (i=1; i<=PluginCount; i++) { RoadMapPluginHooks *hooks = get_hooks (i); if ((hooks == NULL) || (hooks->screen_repaint == NULL)) continue; hooks->screen_repaint (max_pen); } } void roadmap_plugin_get_street (const PluginLine *line, PluginStreet *street) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { RoadMapStreetProperties properties; roadmap_street_get_properties (line->line_id, &properties); street->plugin_id = ROADMAP_PLUGIN_ID; street->street_id = properties.street; } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); street->plugin_id = line->plugin_id; if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); street->street_id = -1; return; } if (hooks->get_street != NULL) { (*hooks->get_street) (line, street); } else { street->street_id = -1; } return; } } const char *roadmap_plugin_street_full_name (PluginLine *line) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { RoadMapStreetProperties properties; roadmap_street_get_properties (line->line_id, &properties); return roadmap_street_get_full_name (&properties); } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); return ""; } if (hooks->get_street != NULL) { return (*hooks->get_street_full_name) (line); } return ""; } } void roadmap_plugin_get_street_properties (PluginLine *line, PluginStreetProperties *props) { if (line->plugin_id == ROADMAP_PLUGIN_ID) { RoadMapStreetProperties rm_properties; roadmap_street_get_properties (line->line_id, &rm_properties); props->address = roadmap_street_get_street_address (&rm_properties); props->street = roadmap_street_get_street_name (&rm_properties); props->city = roadmap_street_get_city_name (&rm_properties); return; } else { RoadMapPluginHooks *hooks = get_hooks (line->plugin_id); props->address = ""; props->street = ""; props->city = ""; if (hooks == NULL) { roadmap_log (ROADMAP_ERROR, "plugin id:%d is missing.", line->plugin_id); return; } if (hooks->get_street != NULL) { (*hooks->get_street_properties) (line, props); } return; } } int roadmap_plugin_find_connected_lines (RoadMapPosition *crossing, PluginLine *plugin_lines, int max) { int i; int count = 0; for (i=1; i<=PluginCount; i++) { RoadMapPluginHooks *hooks = get_hooks (i); if ((hooks == NULL) || (hooks->find_connected_lines == NULL)) continue; count += hooks->find_connected_lines (crossing, plugin_lines + count, max - count); } return count; } void roadmap_plugin_adjust_layer (int layer, int thickness, int pen_count) { int i; for (i=1; i<=PluginCount; i++) { RoadMapPluginHooks *hooks = get_hooks (i); if ((hooks == NULL) || (hooks->adjust_layer == NULL)) continue; hooks->adjust_layer (layer, thickness, pen_count); } } |
From: Pascal F M. <pas...@us...> - 2005-11-20 00:30:51
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15987 Modified Files: README Log Message: Zoom on mouse scroll events Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** README 6 Nov 2005 10:11:05 -0000 1.81 --- README 20 Nov 2005 00:30:43 -0000 1.82 *************** *** 877,881 **** * USING THE {MOUSE} OR PEN ! RoadMap use only one mouse button (the left button on a 3 buttons mouse). This is because RoadMap is designed for a PDA, where pens are used. --- 877,881 ---- * USING THE {MOUSE} OR PEN ! RoadMap use mostly one mouse button (the left button on a 3 buttons mouse). This is because RoadMap is designed for a PDA, where pens are used. *************** *** 895,898 **** --- 895,908 ---- performed while doing it. + A few additional actions are specific to the mouse devices, with no pen + equivalent: the mouse's right button and wheel. + + A popup menu can be attached to the mouse's right button (see preference + item "Events.Right Click"). The menu iteself must be defined in the file + roadmap.popup (see section CONFIGURING THE MENUS AND TOOLBAR). + + Mouse wheel actions will trigger a zoom in and out of the map display, + depending on the direction of the wheel movement. + * {VOICE} INTERFACE *************** *** 1629,1633 **** There is no such title line for toolbars: all menu title lines will be silently ignored. The toolbar is organized as a single, anonymous, menu. ! Each menu or toolbar item is described by its action name. A separator is described by the character '-'. There must be only one item (title, action --- 1639,1643 ---- There is no such title line for toolbars: all menu title lines will be silently ignored. The toolbar is organized as a single, anonymous, menu. ! Each menu or toolbar item is described by its action name. A separator is described by the character '-'. There must be only one item (title, action *************** *** 1635,1643 **** with the '#' character are treated as comments. ! The menus and toolbar configuration files for roadmap are named ! "roadmap.menus" and "roadmap.toolbar", respectively. The same configuration ! files for roadgps are named "roadgps.menus" and "roadgps.toolbar". These ! files must be stored in the same places as other RoadMap configuration ! files. There is a different list of possible actions for RoadMap and RoadGps. --- 1645,1657 ---- with the '#' character are treated as comments. ! There are two sorts of menus: the menus accessed through the menu bar ! and the popup menus. The popup menus will be trigerred by events, as ! specified in the preferences' "Events" section. ! ! The menus, popup and toolbar configuration files for roadmap are named ! "roadmap.menus", "roadmap.popup" and "roadmap.toolbar", respectively. ! The same configuration files for roadgps are named "roadgps.menus", ! "roadgps.popup" and "roadgps.toolbar". These files must be stored in ! the same places as other RoadMap configuration files. There is a different list of possible actions for RoadMap and RoadGps. *************** *** 2213,2216 **** --- 2227,2236 ---- <<Default:>> /var/tmp + [Events.Right Click] The name of the menu to open on a mouse right click. + + <<Format:>> string + + <<Default:>> Map Menu + (*) NOTE: the default position values match 1 Market St, San Francisco, CA. |
From: Pascal F M. <pas...@us...> - 2005-11-20 00:11:23
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10617 Modified Files: roadmap_pointer.c Log Message: Zoom on mouse scroll events Index: roadmap_pointer.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_pointer.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_pointer.c 18 Nov 2005 20:12:32 -0000 1.6 --- roadmap_pointer.c 20 Nov 2005 00:11:15 -0000 1.7 *************** *** 74,77 **** --- 74,82 ---- roadmap_pointer_ignore_event; + static RoadMapPointerHandler RoadMapPointerScrollUp = + roadmap_pointer_ignore_event; + + static RoadMapPointerHandler RoadMapPointerScrollDown = + roadmap_pointer_ignore_event; static void roadmap_pointer_button_timeout(void) { *************** *** 162,165 **** --- 167,180 ---- + static void roadmap_pointer_scroll (int button, RoadMapGuiPoint *point) { + + if (button > 0) { + RoadMapPointerScrollUp(point); + } else if (button < 0) { + RoadMapPointerScrollDown(point); + } + } + + void roadmap_pointer_initialize (void) { *************** *** 173,176 **** --- 188,193 ---- roadmap_canvas_register_mouse_move_handler (&roadmap_pointer_moved); + roadmap_canvas_register_mouse_scroll_handler + (&roadmap_pointer_scroll); } *************** *** 236,237 **** --- 253,270 ---- } + RoadMapPointerHandler + roadmap_pointer_register_scroll_up (RoadMapPointerHandler handler) { + + RoadMapPointerHandler old = RoadMapPointerScrollUp; + RoadMapPointerScrollUp = handler; + return old; + } + + RoadMapPointerHandler + roadmap_pointer_register_scroll_down (RoadMapPointerHandler handler) { + + RoadMapPointerHandler old = RoadMapPointerScrollDown; + RoadMapPointerScrollDown = handler; + return old; + } + |
From: Pascal F M. <pas...@us...> - 2005-11-20 00:10:59
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10390 Modified Files: roadmap_pointer.h Log Message: Zoom on mouse scroll events Index: roadmap_pointer.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_pointer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_pointer.h 18 Nov 2005 20:11:59 -0000 1.3 --- roadmap_pointer.h 20 Nov 2005 00:10:51 -0000 1.4 *************** *** 54,57 **** --- 54,63 ---- roadmap_pointer_register_right_click (RoadMapPointerHandler handler); + RoadMapPointerHandler + roadmap_pointer_register_scroll_up (RoadMapPointerHandler handler); + + RoadMapPointerHandler + roadmap_pointer_register_scroll_down (RoadMapPointerHandler handler); + #endif // INCLUDED__ROADMAP_POINTER__H |
From: Pascal F M. <pas...@us...> - 2005-11-20 00:10:40
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10290 Modified Files: roadmap_canvas.h Log Message: Zoom on mouse scroll events Index: roadmap_canvas.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_canvas.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_canvas.h 18 Nov 2005 20:13:46 -0000 1.5 --- roadmap_canvas.h 20 Nov 2005 00:10:30 -0000 1.6 *************** *** 49,52 **** --- 49,55 ---- (RoadMapCanvasMouseHandler handler); + void roadmap_canvas_register_mouse_scroll_handler + (RoadMapCanvasMouseHandler handler); + void roadmap_canvas_register_configure_handler (RoadMapCanvasConfigureHandler handler); |