~ubuntu-branches/ubuntu/hoary/eflite/hoary

« back to all changes in this revision

Viewing changes to language.h

  • Committer: Bazaar Package Importer
  • Author(s): Mario Lang
  • Date: 2004-02-25 13:55:10 UTC
  • Revision ID: james.westby@ubuntu.com-20040225135510-hei3t1pv7rywewhn
Tags: upstream-0.3.8
ImportĀ upstreamĀ versionĀ 0.3.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * brass - Braille and speech server
 
3
 *
 
4
 * Copyright (C) 2001 by Roger Butenuth, All rights reserved.
 
5
 *
 
6
 * This is free software, placed under the terms of the
 
7
 * GNU General Public License, as published by the Free Software
 
8
 * Foundation.  Please see the file COPYING for details.
 
9
 *
 
10
 * $Id: language.h,v 1.1.1.1 2002/03/03 19:49:48 mgorse Exp $
 
11
 */
 
12
#ifndef _LANGUAGE_H
 
13
#define _LANGUAGE_H
 
14
 
 
15
#include "synthesizer.h"
 
16
#include "lookup.h"
 
17
 
 
18
typedef enum {
 
19
    L_SPEAK_PUNCTUATION,
 
20
    L_MAX
 
21
} lang_par_t;
 
22
 
 
23
typedef struct lang_state *lang_state_p;
 
24
 
 
25
typedef struct lang_struct {
 
26
    lang_state_p state;
 
27
    lang_descr_t *lang;
 
28
    synth_t      *synth;
 
29
    char         *s_buf;        /* string to be sent to synthesizer */
 
30
    int          s_buf_used;    /* characters, (0-byte NOT included in size) */
 
31
    int          s_buf_size;    /* current size of buffer */
 
32
    int (*close)(struct lang_struct *l);
 
33
    int (*change_synth)(struct lang_struct *l, synth_t *synth);
 
34
    int (*speak_string)(struct lang_struct *l, unsigned char *buffer);
 
35
    int (*get_param)(struct lang_struct *l, lang_par_t par, int *value);
 
36
    int (*set_param)(struct lang_struct *l, lang_par_t par, int value);
 
37
} lang_t;
 
38
 
 
39
lang_t *language_open(void *context, lookup_string_t lookup);
 
40
lang_t *german_open(void *context, lookup_string_t lookup);
 
41
lang_t *english_open(void *context, lookup_string_t lookup);
 
42
 
 
43
void   init_synth_buffer(lang_t *lang);
 
44
void   deinit_synth_buffer(lang_t *lang);
 
45
int    add_to_synth_buffer(lang_t *lang, const char *str);
 
46
int    flush_synth_buffer(lang_t *lang);
 
47
 
 
48
#endif /*  _LANGUAGE_H */