Navit SVN

/work/compile/navit/src/navit/bookmarks.h

00001 
00020  #ifndef NAVIT_BOOKMARKS_H
00021  #define NAVIT_BOOKMARKS_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 /* prototypes */
00028 struct bookmarks;
00029 struct bookmarks *bookmarks_new(struct attr *parent, struct attr **attrs, struct transformation *trans);
00030 void bookmarks_destroy(struct bookmarks *this_);
00031 void bookmarks_add_callback(struct bookmarks *this_, struct callback *cb);
00032 
00033 int bookmarks_add_bookmark(struct bookmarks *this_, struct pcoord *c, const char *description);
00034 int bookmarks_cut_bookmark(struct bookmarks *this_, const char *label);
00035 int bookmarks_copy_bookmark(struct bookmarks *this_, const char *label);
00036 int bookmarks_paste_bookmark(struct bookmarks *this_);
00037 int bookmarks_rename_bookmark(struct bookmarks *this_, const char *oldName, const char* newName);
00038 int bookmarks_delete_bookmark(struct bookmarks *this_, const char *label);
00039 
00040 struct map* bookmarks_get_map(struct bookmarks *this_);
00041 enum projection bookmarks_get_projection(struct bookmarks *this_);
00042 
00043 void bookmarks_move_root(struct bookmarks *this_);
00044 void bookmarks_move_up(struct bookmarks *this_);
00045 int bookmarks_move_down(struct bookmarks *this_,const char* name);
00046 
00047 struct item* bookmarks_get_item(struct bookmarks* this_);
00048 int bookmarks_get_bookmark_count(struct bookmarks* this_);
00049 void bookmarks_item_rewind(struct bookmarks* this_);
00050 const char* bookmarks_item_cwd(struct bookmarks* this_);
00051 
00052 char* bookmarks_get_user_data_directory(gboolean create);
00053 char* bookmarks_get_destination_file(gboolean create);
00054 void bookmarks_set_center_from_file(struct bookmarks *this_, char *file);
00055 char* bookmarks_get_center_file(gboolean create);
00056 void bookmarks_write_center_to_file(struct bookmarks *this_, char *file);
00057 void bookmarks_append_coord(struct map *former_destination_map, char *file, struct pcoord *c, enum item_type type, const char *description, int limit);
00058 /* end of prototypes */
00059 
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063 
00064  #endif /* NAVIT_BOOKMARKS_H */