Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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