Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
speakup.h
Go to the documentation of this file.
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 /* proc permissions */
13 #define USER_R (S_IFREG|S_IRUGO)
14 #define USER_W (S_IFREG|S_IWUGO)
15 #define USER_RW (S_IFREG|S_IRUGO|S_IWUGO)
16 #define ROOT_W (S_IFREG|S_IRUGO|S_IWUSR)
17 
18 #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
19 #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
20 #define MAXVARLEN 15
21 
22 #define SYNTH_OK 0x0001
23 #define B_ALPHA 0x0002
24 #define ALPHA 0x0003
25 #define B_CAP 0x0004
26 #define A_CAP 0x0007
27 #define B_NUM 0x0008
28 #define NUM 0x0009
29 #define ALPHANUM (B_ALPHA|B_NUM)
30 #define SOME 0x0010
31 #define MOST 0x0020
32 #define PUNC 0x0040
33 #define A_PUNC 0x0041
34 #define B_WDLM 0x0080
35 #define WDLM 0x0081
36 #define B_EXNUM 0x0100
37 #define CH_RPT 0x0200
38 #define B_CTL 0x0400
39 #define A_CTL (B_CTL+SYNTH_OK)
40 #define B_SYM 0x0800
41 #define B_CAPSYM (B_CAP|B_SYM)
42 
43 #define IS_WDLM(x) (spk_chartab[((u_char)x)]&B_WDLM)
44 #define IS_CHAR(x, type) (spk_chartab[((u_char)x)]&type)
45 #define IS_TYPE(x, type) ((spk_chartab[((u_char)x)]&type) == type)
46 
47 #define SET_DEFAULT -4
48 #define E_RANGE -3
49 #define E_TOOLONG -2
50 #define E_UNDEF -1
51 
52 extern int speakup_thread(void *data);
53 extern void reset_default_chars(void);
54 extern void reset_default_chartab(void);
55 extern void synth_start(void);
56 void synth_insert_next_index(int sent_num);
57 void reset_index_count(int sc);
58 void get_index_count(int *linecount, int *sentcount);
59 extern int set_key_info(const u_char *key_info, u_char *k_buffer);
60 extern char *strlwr(char *s);
61 extern char *speakup_s2i(char *start, int *dest);
62 extern char *s2uchar(char *start, char *dest);
63 extern char *xlate(char *s);
64 extern int speakup_kobj_init(void);
65 extern void speakup_kobj_exit(void);
66 extern int chartab_get_value(char *keyword);
67 extern void speakup_register_var(struct var_t *var);
68 extern void speakup_unregister_var(enum var_id_t var_id);
69 extern struct st_var_header *get_var_header(enum var_id_t var_id);
70 extern struct st_var_header *var_header_by_name(const char *name);
71 extern struct punc_var_t *get_punc_var(enum var_id_t var_id);
72 extern int set_num_var(int val, struct st_var_header *var, int how);
73 extern int set_string_var(const char *page, struct st_var_header *var, int len);
74 extern int set_mask_bits(const char *input, const int which, const int how);
76 extern int handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key);
77 extern int synth_init(char *name);
78 extern void synth_release(void);
79 
80 extern void do_flush(void);
81 extern void speakup_start_ttys(void);
82 extern void synth_buffer_add(char ch);
83 extern void synth_buffer_clear(void);
84 extern void speakup_clear_selection(void);
85 extern int speakup_set_selection(struct tty_struct *tty);
86 extern int speakup_paste_selection(struct tty_struct *tty);
87 extern void speakup_register_devsynth(void);
88 extern void speakup_unregister_devsynth(void);
89 extern void synth_write(const char *buf, size_t count);
90 extern int synth_supports_indexing(void);
91 
92 extern struct vc_data *spk_sel_cons;
93 extern unsigned short xs, ys, xe, ye; /* our region points */
94 
96 extern struct kobject *speakup_kobj;
97 extern struct task_struct *speakup_task;
98 extern const u_char key_defaults[];
99 
100 /* Protect speakup synthesizer list */
101 extern struct mutex spk_mutex;
102 extern struct st_spk_t *speakup_console[];
103 extern struct spk_synth *synth;
104 extern char pitch_buff[];
105 extern u_char *our_keys[];
106 extern short punc_masks[];
107 extern char str_caps_start[], str_caps_stop[];
108 extern const struct st_bits_data punc_info[];
109 extern u_char key_buf[600];
110 extern char *characters[];
111 extern char *default_chars[];
112 extern u_short spk_chartab[];
114 extern int reading_punc, attrib_bleep, bleeps;
115 extern int bleep_time, bell_pos;
116 extern int spell_delay, key_echo;
117 extern short punc_mask;
118 extern short pitch_shift, synth_flags;
119 extern bool quiet_boot;
120 extern char *synth_name;
121 extern struct bleep unprocessed_sound;
122 
123 /* Prototypes from fakekey.c. */
126 void speakup_fake_down_arrow(void);
127 bool speakup_fake_key_pressed(void);
128 
129 #endif