Indentation fix, cleanup.
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / terminfo.h
blob8a109ecfdf67c26176813d5ad6b36b63f6b3baef
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2003,2005,2007 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_TERMINFO_HEADER
20 #define GRUB_TERMINFO_HEADER 1
22 #include <grub/err.h>
23 #include <grub/types.h>
24 #include <grub/term.h>
26 char *EXPORT_FUNC(grub_terminfo_get_current) (struct grub_term_output *term);
27 grub_err_t EXPORT_FUNC(grub_terminfo_set_current) (struct grub_term_output *term,
28 const char *);
30 #define GRUB_TERMINFO_READKEY_MAX_LEN 6
31 struct grub_terminfo_input_state
33 int input_buf[GRUB_TERMINFO_READKEY_MAX_LEN];
34 int npending;
35 #if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
36 int last_key;
37 grub_uint64_t last_key_time;
38 #endif
39 int (*readkey) (struct grub_term_input *term);
42 struct grub_terminfo_output_state
44 struct grub_term_output *next;
46 char *name;
48 char *gotoxy;
49 char *cls;
50 char *reverse_video_on;
51 char *reverse_video_off;
52 char *cursor_on;
53 char *cursor_off;
54 char *setcolor;
56 struct grub_term_coordinate size;
57 struct grub_term_coordinate pos;
59 void (*put) (struct grub_term_output *term, const int c);
62 grub_err_t EXPORT_FUNC(grub_terminfo_output_init) (struct grub_term_output *term);
63 void EXPORT_FUNC(grub_terminfo_gotoxy) (grub_term_output_t term,
64 struct grub_term_coordinate pos);
65 void EXPORT_FUNC(grub_terminfo_cls) (grub_term_output_t term);
66 struct grub_term_coordinate EXPORT_FUNC (grub_terminfo_getxy) (struct grub_term_output *term);
67 void EXPORT_FUNC (grub_terminfo_setcursor) (struct grub_term_output *term,
68 const int on);
69 void EXPORT_FUNC (grub_terminfo_setcolorstate) (struct grub_term_output *term,
70 const grub_term_color_state state);
73 grub_err_t EXPORT_FUNC (grub_terminfo_input_init) (struct grub_term_input *term);
74 int EXPORT_FUNC (grub_terminfo_getkey) (struct grub_term_input *term);
75 void EXPORT_FUNC (grub_terminfo_putchar) (struct grub_term_output *term,
76 const struct grub_unicode_glyph *c);
77 struct grub_term_coordinate EXPORT_FUNC (grub_terminfo_getwh) (struct grub_term_output *term);
80 grub_err_t EXPORT_FUNC (grub_terminfo_output_register) (struct grub_term_output *term,
81 const char *type);
82 grub_err_t EXPORT_FUNC (grub_terminfo_output_unregister) (struct grub_term_output *term);
84 void grub_terminfo_init (void);
85 void grub_terminfo_fini (void);
87 #endif /* ! GRUB_TERMINFO_HEADER */