navit  0.5.3-trunk
vehicle.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_VEHICLE_H
21 #define NAVIT_VEHICLE_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct point;
28 struct vehicle_priv;
29 
31  void (*destroy)(struct vehicle_priv *priv);
32  int (*position_attr_get)(struct vehicle_priv *priv, enum attr_type type, struct attr *attr);
33  int (*set_attr)(struct vehicle_priv *priv, struct attr *attr);
34 };
35 
36 /* prototypes */
37 enum attr_type;
38 struct attr;
39 struct attr_iter;
40 struct cursor;
41 struct graphics;
42 struct point;
43 struct vehicle;
44 struct vehicle *vehicle_new(struct attr *parent, struct attr **attrs);
45 void vehicle_destroy(struct vehicle *this_);
46 struct attr_iter *vehicle_attr_iter_new(void * unused);
48 int vehicle_get_attr(struct vehicle *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
49 int vehicle_set_attr(struct vehicle *this_, struct attr *attr);
50 int vehicle_add_attr(struct vehicle *this_, struct attr *attr);
51 int vehicle_remove_attr(struct vehicle *this_, struct attr *attr);
52 void vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite);
53 void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int angle, int speed);
54 int vehicle_get_cursor_data(struct vehicle *this_, struct point *pnt, int *angle, int *speed);
55 void vehicle_log_gpx_add_tag(char *tag, char **logstr);
56 struct vehicle * vehicle_ref(struct vehicle *this_);
57 void vehicle_unref(struct vehicle *this_);
58 /* end of prototypes */
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif
65 
attr_type
Definition: attr.h:34
char type[3]
Definition: garmin_img.c:2
Definition: config_.c:47
void * iter
Definition: config_.c:48
Definition: attr.h:157
Definition: layout.h:106
graphics object A graphics object serves as the target for drawing operations. It encapsulates variou...
Definition: graphics.c:75
Definition: gpx2navit_txt.h:51
Definition: point.h:23
Definition: vehicle.h:30
int(* set_attr)(struct vehicle_priv *priv, struct attr *attr)
Definition: vehicle.h:33
int(* position_attr_get)(struct vehicle_priv *priv, enum attr_type type, struct attr *attr)
Definition: vehicle.h:32
void(* destroy)(struct vehicle_priv *priv)
Definition: vehicle.h:31
Definition: vehicle_android.c:43
Definition: vehicle.c:59
struct vehicle * vehicle_ref(struct vehicle *this_)
int vehicle_set_attr(struct vehicle *this_, struct attr *attr)
Definition: vehicle.c:233
void vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite)
Definition: vehicle.c:315
int vehicle_remove_attr(struct vehicle *this_, struct attr *attr)
Generic remove function.
Definition: vehicle.c:286
void vehicle_attr_iter_destroy(struct attr_iter *iter)
Definition: vehicle.c:197
void vehicle_log_gpx_add_tag(char *tag, char **logstr)
Definition: vehicle.c:507
int vehicle_get_cursor_data(struct vehicle *this_, struct point *pnt, int *angle, int *speed)
Definition: vehicle.c:414
struct vehicle * vehicle_new(struct attr *parent, struct attr **attrs)
Creates a new vehicle.
Definition: vehicle.c:107
struct attr_iter * vehicle_attr_iter_new(void *unused)
Definition: vehicle.c:188
void vehicle_destroy(struct vehicle *this_)
Destroys a vehicle.
Definition: vehicle.c:167
void vehicle_unref(struct vehicle *this_)
int vehicle_get_attr(struct vehicle *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: vehicle.c:212
void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int angle, int speed)
Definition: vehicle.c:355
int vehicle_add_attr(struct vehicle *this_, struct attr *attr)
Definition: vehicle.c:257