navit
0.5.1-trunk
|
#include <glib.h>
#include <string.h>
#include "debug.h"
#include "item.h"
#include "speech.h"
#include "plugin.h"
#include "xmlconfig.h"
Data Structures | |
struct | speech |
Functions | |
struct speech * | speech_new (struct attr *parent, struct attr **attrs) |
void | speech_destroy (struct speech *this_) |
int | speech_say (struct speech *this_, const char *text) |
int | speech_get_attr (struct speech *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) |
Gets an attribute from a speech plugin. More... | |
int | speech_estimate_duration (struct speech *this_, char *str) |
Tries to estimate how long it will take to speak a certain string. More... | |
int | speech_set_attr (struct speech *this_, struct attr *attr) |
Sets an attribute from an speech plugin. More... | |
Variables | |
struct attr | active =ATTR_INT(active, 1) |
struct attr * | speech_default_attrs [] |
struct object_func | speech_func |
void speech_destroy | ( | struct speech * | this_ | ) |
References speech_methods::destroy, speech::meth, navit_object_destroy(), and speech::priv.
Referenced by speech_new().
Tries to estimate how long it will take to speak a certain string.
This function tries to estimate how long it will take to speak a certain string passed in str. It relies on the "characters per second"-value passed from the configuration.
this_ | The speech whose speed should be used |
str | The string that should be estimated |
References attr::num, speech_get_attr(), and attr::u.
int speech_get_attr | ( | struct speech * | this_, |
enum attr_type | type, | ||
struct attr * | attr, | ||
struct attr_iter * | iter | ||
) |
Gets an attribute from a speech plugin.
this_ | The speech plugin the attribute should be read from |
type | The type of the attribute to be read |
attr | Pointer to an attrib-structure where the attribute should be written to |
iter | (NOT IMPLEMENTED) Used to iterate through all attributes of a type. Set this to NULL to get the first attribute, set this to an attr_iter to get the next attribute |
References attr_generic_get_attr().
Referenced by get_distance_str(), navigation_item_destination(), navit_cmd_announcer_toggle(), navit_say(), navit_speak(), osd_nav_toggle_announcer_draw(), and speech_estimate_duration().
References attr_search(), attr::attrs, dbg, lvl_debug, lvl_error, speech::meth, navit_object_new(), speech::priv, speech_methods::say, speech_destroy(), speech_func, speech_new(), attr::str, and attr::u.
Referenced by speech_new().
References dbg, lvl_debug, speech::meth, speech::priv, and speech_methods::say.
Referenced by navit_say(), navit_speak(), and phrase_route_calc().
Sets an attribute from an speech plugin.
This sets an attribute of a speech plugin, overwriting an attribute of the same type if it already exists. This function also calls all the callbacks that are registred to be called when attributes change.
this_ | The speech plugin to set the attribute of |
attr | The attribute to set |
References attr_generic_set_attr().
Referenced by navit_cmd_announcer_toggle().
Referenced by gui_internal_add_vehicle_profile(), navit_former_destinations_active(), osd_gps_status_draw(), osd_gps_status_new(), osd_nav_next_turn_draw(), osd_nav_next_turn_new(), osd_nav_toggle_announcer_draw(), osd_speed_warner_click(), osd_speed_warner_draw(), osd_speed_warner_new(), osd_text_new(), osd_volume_draw(), osd_volume_new(), plugin_new(), plugin_set_active(), vehicle_gpsd_position_attr_get(), vehicle_gypsy_position_attr_get(), vehicle_maemo_position_attr_get(), and vehicle_qt5_position_attr_get().
struct attr* speech_default_attrs[] |
struct object_func speech_func |
Referenced by object_func_lookup(), and speech_new().