Staging: add speakup to the staging directory
[linux/fpc-iii.git] / drivers / staging / speakup / speakup.h
blobe6f3dfe38b92ef10dd37a6490d1e279aaa1e6e45
1 #ifndef _SPEAKUP_H
2 #define _SPEAKUP_H
3 #include <linux/version.h>
5 #include "spk_types.h"
6 #include "i18n.h"
8 #define SPEAKUP_VERSION "3.1.6"
9 #define KEY_MAP_VER 119
10 #define SHIFT_TBL_SIZE 64
11 #define MAX_DESC_LEN 72
13 /* proc permissions */
14 #define USER_R (S_IFREG|S_IRUGO)
15 #define USER_W (S_IFREG|S_IWUGO)
16 #define USER_RW (S_IFREG|S_IRUGO|S_IWUGO)
17 #define ROOT_W (S_IFREG|S_IRUGO|S_IWUSR)
19 #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
20 #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
21 #define MAXVARLEN 15
23 #define SYNTH_OK 0x0001
24 #define B_ALPHA 0x0002
25 #define ALPHA 0x0003
26 #define B_CAP 0x0004
27 #define A_CAP 0x0007
28 #define B_NUM 0x0008
29 #define NUM 0x0009
30 #define ALPHANUM (B_ALPHA|B_NUM)
31 #define SOME 0x0010
32 #define MOST 0x0020
33 #define PUNC 0x0040
34 #define A_PUNC 0x0041
35 #define B_WDLM 0x0080
36 #define WDLM 0x0081
37 #define B_EXNUM 0x0100
38 #define CH_RPT 0x0200
39 #define B_CTL 0x0400
40 #define A_CTL (B_CTL+SYNTH_OK)
41 #define B_SYM 0x0800
42 #define B_CAPSYM (B_CAP|B_SYM)
44 #define IS_WDLM(x) (spk_chartab[((u_char)x)]&B_WDLM)
45 #define IS_CHAR(x, type) (spk_chartab[((u_char)x)]&type)
46 #define IS_TYPE(x, type) ((spk_chartab[((u_char)x)]&type) == type)
48 #define SET_DEFAULT -4
49 #define E_RANGE -3
50 #define E_TOOLONG -2
51 #define E_UNDEF -1
53 extern int speakup_thread(void *data);
54 extern void reset_default_chars(void);
55 extern void reset_default_chartab(void);
56 extern void synth_start(void);
57 extern int set_key_info(const u_char *key_info, u_char *k_buffer);
58 extern char *strlwr(char *s);
59 extern char *speakup_s2i(char *start, int *dest);
60 extern char *s2uchar(char *start, char *dest);
61 extern char *xlate(char *s);
62 extern int speakup_kobj_init(void);
63 extern void speakup_kobj_exit(void);
64 extern int chartab_get_value(char *keyword);
65 extern void speakup_register_var(struct var_t *var);
66 extern void speakup_unregister_var(enum var_id_t var_id);
67 extern struct st_var_header *get_var_header(enum var_id_t var_id);
68 extern struct st_var_header *var_header_by_name(const char *name);
69 extern struct punc_var_t *get_punc_var(enum var_id_t var_id);
70 extern int set_num_var(int val, struct st_var_header *var, int how);
71 extern int set_string_var(const char *page, struct st_var_header *var, int len);
72 extern int set_mask_bits(const char *input, const int which, const int how);
73 extern special_func special_handler;
74 extern int handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key);
75 extern int synth_init(char *name);
76 extern void synth_release(void);
78 extern void do_flush(void);
79 extern void speakup_start_ttys(void);
80 extern void synth_buffer_add(char ch);
81 extern void synth_buffer_clear(void);
82 extern void speakup_clear_selection(void);
83 extern int speakup_set_selection(struct tty_struct *tty);
84 extern int speakup_paste_selection(struct tty_struct *tty);
85 extern void speakup_register_devsynth(void);
86 extern void speakup_unregister_devsynth(void);
87 extern void synth_write(const char *buf, size_t count);
88 extern int synth_supports_indexing(void);
90 extern struct vc_data *spk_sel_cons;
91 extern unsigned short xs, ys, xe, ye; /* our region points */
93 extern wait_queue_head_t speakup_event;
94 extern struct kobject *speakup_kobj;
95 extern struct task_struct *speakup_task;
96 extern const u_char key_defaults[];
98 /* Protect speakup synthesizer list */
99 extern struct mutex spk_mutex;
100 extern struct st_spk_t *speakup_console[];
101 extern struct spk_synth *synth;
102 extern char pitch_buff[];
103 extern u_char *our_keys[];
104 extern short punc_masks[];
105 extern char str_caps_start[], str_caps_stop[];
106 extern const struct st_bits_data punc_info[];
107 extern u_char key_buf[600];
108 extern char *characters[];
109 extern char *default_chars[];
110 extern u_short spk_chartab[];
111 extern int no_intr, say_ctrl, say_word_ctl, punc_level;
112 extern int reading_punc, attrib_bleep, bleeps;
113 extern int bleep_time, bell_pos;
114 extern int spell_delay, key_echo;
115 extern short punc_mask;
116 extern short pitch_shift, synth_flags;
117 extern int quiet_boot;
118 extern char *synth_name;
119 extern struct bleep unprocessed_sound;
121 /* Prototypes from fakekey.c. */
122 int speakup_add_virtual_keyboard(void);
123 void speakup_remove_virtual_keyboard(void);
124 void speakup_fake_down_arrow(void);
125 bool speakup_fake_key_pressed(void);
127 #endif