]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/speakup/speakup.h
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / staging / speakup / speakup.h
1 #ifndef _SPEAKUP_H
2 #define _SPEAKUP_H
3
4 #include "spk_types.h"
5 #include "i18n.h"
6
7 #define SPEAKUP_VERSION "3.1.6"
8 #define KEY_MAP_VER 119
9 #define SHIFT_TBL_SIZE 64
10 #define MAX_DESC_LEN 72
11
12 #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
13 #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
14 #define MAXVARLEN 15
15
16 #define SYNTH_OK 0x0001
17 #define B_ALPHA 0x0002
18 #define ALPHA 0x0003
19 #define B_CAP 0x0004
20 #define A_CAP 0x0007
21 #define B_NUM 0x0008
22 #define NUM 0x0009
23 #define ALPHANUM (B_ALPHA | B_NUM)
24 #define SOME 0x0010
25 #define MOST 0x0020
26 #define PUNC 0x0040
27 #define A_PUNC 0x0041
28 #define B_WDLM 0x0080
29 #define WDLM 0x0081
30 #define B_EXNUM 0x0100
31 #define CH_RPT 0x0200
32 #define B_CTL 0x0400
33 #define A_CTL (B_CTL + SYNTH_OK)
34 #define B_SYM 0x0800
35 #define B_CAPSYM (B_CAP | B_SYM)
36
37 /* FIXME: u16 */
38 #define IS_WDLM(x) (spk_chartab[((u_char)x)] & B_WDLM)
39 #define IS_CHAR(x, type) (spk_chartab[((u_char)x)] & type)
40 #define IS_TYPE(x, type) ((spk_chartab[((u_char)x)] & type) == type)
41
42 int speakup_thread(void *data);
43 void spk_reset_default_chars(void);
44 void spk_reset_default_chartab(void);
45 void synth_start(void);
46 void synth_insert_next_index(int sent_num);
47 void spk_reset_index_count(int sc);
48 void spk_get_index_count(int *linecount, int *sentcount);
49 int spk_set_key_info(const u_char *key_info, u_char *k_buffer);
50 char *spk_strlwr(char *s);
51 char *spk_s2uchar(char *start, char *dest);
52 int speakup_kobj_init(void);
53 void speakup_kobj_exit(void);
54 int spk_chartab_get_value(char *keyword);
55 void speakup_register_var(struct var_t *var);
56 void speakup_unregister_var(enum var_id_t var_id);
57 struct st_var_header *spk_get_var_header(enum var_id_t var_id);
58 struct st_var_header *spk_var_header_by_name(const char *name);
59 struct punc_var_t *spk_get_punc_var(enum var_id_t var_id);
60 int spk_set_num_var(int val, struct st_var_header *var, int how);
61 int spk_set_string_var(const char *page, struct st_var_header *var, int len);
62 int spk_set_mask_bits(const char *input, const int which, const int how);
63 extern special_func spk_special_handler;
64 int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key);
65 int synth_init(char *name);
66 void synth_release(void);
67
68 void spk_do_flush(void);
69 void speakup_start_ttys(void);
70 void synth_buffer_add(u16 ch);
71 void synth_buffer_clear(void);
72 void speakup_clear_selection(void);
73 int speakup_set_selection(struct tty_struct *tty);
74 int speakup_paste_selection(struct tty_struct *tty);
75 void speakup_cancel_paste(void);
76 void speakup_register_devsynth(void);
77 void speakup_unregister_devsynth(void);
78 void synth_write(const char *buf, size_t count);
79 int synth_supports_indexing(void);
80
81 extern struct vc_data *spk_sel_cons;
82 extern unsigned short spk_xs, spk_ys, spk_xe, spk_ye; /* our region points */
83
84 extern wait_queue_head_t speakup_event;
85 extern struct kobject *speakup_kobj;
86 extern struct task_struct *speakup_task;
87 extern const u_char spk_key_defaults[];
88
89 /* Protect speakup synthesizer list */
90 extern struct mutex spk_mutex;
91 extern struct st_spk_t *speakup_console[];
92 extern struct spk_synth *synth;
93 extern char spk_pitch_buff[];
94 extern u_char *spk_our_keys[];
95 extern short spk_punc_masks[];
96 extern char spk_str_caps_start[], spk_str_caps_stop[];
97 extern const struct st_bits_data spk_punc_info[];
98 extern u_char spk_key_buf[600];
99 extern char *spk_characters[];
100 extern char *spk_default_chars[];
101 extern u_short spk_chartab[];
102 extern int spk_no_intr, spk_say_ctrl, spk_say_word_ctl, spk_punc_level;
103 extern int spk_reading_punc, spk_attrib_bleep, spk_bleeps;
104 extern int spk_bleep_time, spk_bell_pos;
105 extern int spk_spell_delay, spk_key_echo;
106 extern short spk_punc_mask;
107 extern short spk_pitch_shift, synth_flags;
108 extern bool spk_quiet_boot;
109 extern char *synth_name;
110 extern struct bleep spk_unprocessed_sound;
111
112 /* Prototypes from fakekey.c. */
113 int speakup_add_virtual_keyboard(void);
114 void speakup_remove_virtual_keyboard(void);
115 void speakup_fake_down_arrow(void);
116 bool speakup_fake_key_pressed(void);
117
118 #endif