/* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2002,2003,2005,2007 Free Software Foundation, Inc. * * VAS_EBOOT is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VAS_EBOOT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_TERMINFO_HEADER #define VAS_EBOOT_TERMINFO_HEADER 1 #include #include #include char *EXPORT_FUNC(VasEBoot_terminfo_get_current) (struct VasEBoot_term_output *term); VasEBoot_err_t EXPORT_FUNC(VasEBoot_terminfo_set_current) (struct VasEBoot_term_output *term, const char *); #define VAS_EBOOT_TERMINFO_READKEY_MAX_LEN 6 struct VasEBoot_terminfo_input_state { int input_buf[VAS_EBOOT_TERMINFO_READKEY_MAX_LEN]; int npending; #if defined(__powerpc__) && defined(VAS_EBOOT_MACHINE_IEEE1275) int last_key; VasEBoot_uint64_t last_key_time; #endif int (*readkey) (struct VasEBoot_term_input *term); }; struct VasEBoot_terminfo_output_state { struct VasEBoot_term_output *next; char *name; char *gotoxy; char *cls; char *reverse_video_on; char *reverse_video_off; char *cursor_on; char *cursor_off; char *setcolor; struct VasEBoot_term_coordinate size; struct VasEBoot_term_coordinate pos; void (*put) (struct VasEBoot_term_output *term, const int c); }; VasEBoot_err_t EXPORT_FUNC(VasEBoot_terminfo_output_init) (struct VasEBoot_term_output *term); void EXPORT_FUNC(VasEBoot_terminfo_gotoxy) (VasEBoot_term_output_t term, struct VasEBoot_term_coordinate pos); void EXPORT_FUNC(VasEBoot_terminfo_cls) (VasEBoot_term_output_t term); struct VasEBoot_term_coordinate EXPORT_FUNC (VasEBoot_terminfo_getxy) (struct VasEBoot_term_output *term); void EXPORT_FUNC (VasEBoot_terminfo_setcursor) (struct VasEBoot_term_output *term, const int on); void EXPORT_FUNC (VasEBoot_terminfo_setcolorstate) (struct VasEBoot_term_output *term, const VasEBoot_term_color_state state); VasEBoot_err_t EXPORT_FUNC (VasEBoot_terminfo_input_init) (struct VasEBoot_term_input *term); int EXPORT_FUNC (VasEBoot_terminfo_getkey) (struct VasEBoot_term_input *term); void EXPORT_FUNC (VasEBoot_terminfo_putchar) (struct VasEBoot_term_output *term, const struct VasEBoot_unicode_glyph *c); struct VasEBoot_term_coordinate EXPORT_FUNC (VasEBoot_terminfo_getwh) (struct VasEBoot_term_output *term); VasEBoot_err_t EXPORT_FUNC (VasEBoot_terminfo_output_register) (struct VasEBoot_term_output *term, const char *type); VasEBoot_err_t EXPORT_FUNC (VasEBoot_terminfo_output_unregister) (struct VasEBoot_term_output *term); void VasEBoot_terminfo_init (void); void VasEBoot_terminfo_fini (void); #endif /* ! VAS_EBOOT_TERMINFO_HEADER */