Add:core:Added framework for reacting to disable suspend events
authorakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 3 Jun 2010 13:48:40 +0000 (13:48 +0000)
committerakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 3 Jun 2010 13:48:40 +0000 (13:48 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3337 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/attr_def.h
navit/navit/navit.c
navit/navit/navit.h

index 62db47e..b9b51b9 100644 (file)
@@ -202,6 +202,7 @@ ATTR(bluetooth)
 ATTR(signal_on_map_click)
 ATTR(route_active)
 ATTR(search_active)
+ATTR(unsuspend)
 ATTR2(0x0002ffff,type_int_end)
 ATTR2(0x00030000,type_string_begin)
 ATTR(type)
index 49b86bd..144caff 100644 (file)
@@ -2029,7 +2029,7 @@ navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv)
        callback_list_call_attr_0(this_->attr_cbl, attr_position);
        navit_textfile_debug_log(this_, "type=trackpoint_tracked");
        if (this_->gui && nv->speed > 2)
-               gui_disable_suspend(this_->gui);
+               navit_disable_suspend();
 
        transform(this_->trans, pro, &nv->coord, &cursor_pnt, 1, 0, 0, NULL);
        if (this_->button_pressed != 1 && this_->follow_cursor && nv->follow_curr <= nv->follow && 
@@ -2304,6 +2304,12 @@ navit_set_layout_by_name(struct navit *n,const char *name)
     return 0;
 }
 
+void
+navit_disable_suspend() {
+       gui_disable_suspend(global_navit->gui);
+       callback_list_call_attr_0(global_navit->attr_cbl,attr_unsuspend);
+}
+
 int
 navit_block(struct navit *this_, int block)
 {
index a22d8e9..8517360 100644 (file)
@@ -100,6 +100,7 @@ int navit_block(struct navit *this_, int block);
 void navit_layout_switch(struct navit *n);
 int navit_set_vehicle_by_name(struct navit *n,const char *name);
 int navit_set_layout_by_name(struct navit *n, const char* name);
+void navit_disable_suspend();
 void navit_destroy(struct navit *this_);
 /* end of prototypes */
 #ifdef __cplusplus