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
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)
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 }
22 #define SYNTH_OK 0x0001
23 #define B_ALPHA 0x0002
29 #define ALPHANUM (B_ALPHA|B_NUM)
36 #define B_EXNUM 0x0100
39 #define A_CTL (B_CTL+SYNTH_OK)
41 #define B_CAPSYM (B_CAP|B_SYM)
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)
47 extern int speakup_thread(void *data
);
48 extern void spk_reset_default_chars(void);
49 extern void spk_reset_default_chartab(void);
50 extern void synth_start(void);
51 void synth_insert_next_index(int sent_num
);
52 void spk_reset_index_count(int sc
);
53 void spk_get_index_count(int *linecount
, int *sentcount
);
54 extern int spk_set_key_info(const u_char
*key_info
, u_char
*k_buffer
);
55 extern char *spk_strlwr(char *s
);
56 extern char *spk_s2uchar(char *start
, char *dest
);
57 extern int speakup_kobj_init(void);
58 extern void speakup_kobj_exit(void);
59 extern int spk_chartab_get_value(char *keyword
);
60 extern void speakup_register_var(struct var_t
*var
);
61 extern void speakup_unregister_var(enum var_id_t var_id
);
62 extern struct st_var_header
*spk_get_var_header(enum var_id_t var_id
);
63 extern struct st_var_header
*spk_var_header_by_name(const char *name
);
64 extern struct punc_var_t
*spk_get_punc_var(enum var_id_t var_id
);
65 extern int spk_set_num_var(int val
, struct st_var_header
*var
, int how
);
66 extern int spk_set_string_var(const char *page
, struct st_var_header
*var
, int len
);
67 extern int spk_set_mask_bits(const char *input
, const int which
, const int how
);
68 extern special_func spk_special_handler
;
69 extern int spk_handle_help(struct vc_data
*vc
, u_char type
, u_char ch
, u_short key
);
70 extern int synth_init(char *name
);
71 extern void synth_release(void);
73 extern void spk_do_flush(void);
74 extern void speakup_start_ttys(void);
75 extern void synth_buffer_add(char ch
);
76 extern void synth_buffer_clear(void);
77 extern void speakup_clear_selection(void);
78 extern int speakup_set_selection(struct tty_struct
*tty
);
79 extern int speakup_paste_selection(struct tty_struct
*tty
);
80 extern void speakup_register_devsynth(void);
81 extern void speakup_unregister_devsynth(void);
82 extern void synth_write(const char *buf
, size_t count
);
83 extern int synth_supports_indexing(void);
85 extern struct vc_data
*spk_sel_cons
;
86 extern unsigned short spk_xs
, spk_ys
, spk_xe
, spk_ye
; /* our region points */
88 extern wait_queue_head_t speakup_event
;
89 extern struct kobject
*speakup_kobj
;
90 extern struct task_struct
*speakup_task
;
91 extern const u_char spk_key_defaults
[];
93 /* Protect speakup synthesizer list */
94 extern struct mutex spk_mutex
;
95 extern struct st_spk_t
*speakup_console
[];
96 extern struct spk_synth
*synth
;
97 extern char spk_pitch_buff
[];
98 extern u_char
*spk_our_keys
[];
99 extern short spk_punc_masks
[];
100 extern char spk_str_caps_start
[], spk_str_caps_stop
[];
101 extern const struct st_bits_data spk_punc_info
[];
102 extern u_char spk_key_buf
[600];
103 extern char *spk_characters
[];
104 extern char *spk_default_chars
[];
105 extern u_short spk_chartab
[];
106 extern int spk_no_intr
, spk_say_ctrl
, spk_say_word_ctl
, spk_punc_level
;
107 extern int spk_reading_punc
, spk_attrib_bleep
, spk_bleeps
;
108 extern int spk_bleep_time
, spk_bell_pos
;
109 extern int spk_spell_delay
, spk_key_echo
;
110 extern short spk_punc_mask
;
111 extern short spk_pitch_shift
, synth_flags
;
112 extern bool spk_quiet_boot
;
113 extern char *synth_name
;
114 extern struct bleep spk_unprocessed_sound
;
116 /* Prototypes from fakekey.c. */
117 int speakup_add_virtual_keyboard(void);
118 void speakup_remove_virtual_keyboard(void);
119 void speakup_fake_down_arrow(void);
120 bool speakup_fake_key_pressed(void);