spk_priv.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* spk_priv.h
  3. * review functions for the speakup screen review package.
  4. * originally written by: Kirk Reiser and Andy Berdan.
  5. *
  6. * extensively modified by David Borowski.
  7. *
  8. * Copyright (C) 1998 Kirk Reiser.
  9. * Copyright (C) 2003 David Borowski.
  10. */
  11. #ifndef _SPEAKUP_PRIVATE_H
  12. #define _SPEAKUP_PRIVATE_H
  13. #include <linux/printk.h>
  14. #include "spk_types.h"
  15. #include "spk_priv_keyinfo.h"
  16. #define V_LAST_VAR { MAXVARS }
  17. #define SPACE 0x20
  18. #define SYNTH_CHECK 20030716 /* today's date ought to do for check value */
  19. /* synth flags, for odd synths */
  20. #define SF_DEC 1 /* to fiddle puncs in alpha strings so it doesn't spell */
  21. #ifdef MODULE
  22. #define SYNTH_START 1
  23. #else
  24. #define SYNTH_START 0
  25. #endif
  26. #define KT_SPKUP 15
  27. #define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
  28. #define SYNTH_DEFAULT_DEV "ttyS0"
  29. #define SYNTH_DEFAULT_SER 0
  30. const struct old_serial_port *spk_serial_init(int index);
  31. void spk_stop_serial_interrupt(void);
  32. void spk_serial_release(void);
  33. void spk_ttyio_release(void);
  34. void spk_ttyio_register_ldisc(void);
  35. void spk_ttyio_unregister_ldisc(void);
  36. void synth_buffer_skip_nonlatin1(void);
  37. u16 synth_buffer_getc(void);
  38. u16 synth_buffer_peek(void);
  39. int synth_buffer_empty(void);
  40. struct var_t *spk_get_var(enum var_id_t var_id);
  41. ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
  42. char *buf);
  43. ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
  44. const char *buf, size_t count);
  45. int spk_serial_synth_probe(struct spk_synth *synth);
  46. int spk_ttyio_synth_probe(struct spk_synth *synth);
  47. const char *spk_serial_synth_immediate(struct spk_synth *synth,
  48. const char *buff);
  49. const char *spk_ttyio_synth_immediate(struct spk_synth *synth,
  50. const char *buff);
  51. void spk_do_catch_up(struct spk_synth *synth);
  52. void spk_do_catch_up_unicode(struct spk_synth *synth);
  53. void spk_synth_flush(struct spk_synth *synth);
  54. unsigned char spk_synth_get_index(struct spk_synth *synth);
  55. int spk_synth_is_alive_nop(struct spk_synth *synth);
  56. int spk_synth_is_alive_restart(struct spk_synth *synth);
  57. __printf(1, 2)
  58. void synth_printf(const char *buf, ...);
  59. void synth_putwc(u16 wc);
  60. void synth_putwc_s(u16 wc);
  61. void synth_putws(const u16 *buf);
  62. void synth_putws_s(const u16 *buf);
  63. int synth_request_region(unsigned long start, unsigned long n);
  64. int synth_release_region(unsigned long start, unsigned long n);
  65. int synth_add(struct spk_synth *in_synth);
  66. void synth_remove(struct spk_synth *in_synth);
  67. struct spk_synth *synth_current(void);
  68. extern struct speakup_info_t speakup_info;
  69. extern struct var_t synth_time_vars[];
  70. extern struct spk_io_ops spk_serial_io_ops;
  71. extern struct spk_io_ops spk_ttyio_ops;
  72. #endif