1 |
/* |
/* |
2 |
* PUPA -- Preliminary Universal Programming Architecture for GRUB |
* PUPA -- Preliminary Universal Programming Architecture for GRUB |
3 |
* Copyright (C) 2002 Free Software Foundation, Inc. |
* Copyright (C) 2002 Free Software Foundation, Inc. |
4 |
* Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org> |
* Copyright (C) 2002,2003 Yoshinori K. Okuji <okuji@enbug.org> |
5 |
* |
* |
6 |
* PUPA is free software; you can redistribute it and/or modify |
* PUPA is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
21 |
#ifndef PUPA_TERM_HEADER |
#ifndef PUPA_TERM_HEADER |
22 |
#define PUPA_TERM_HEADER 1 |
#define PUPA_TERM_HEADER 1 |
23 |
|
|
24 |
|
#include <pupa/err.h> |
25 |
#include <pupa/symbol.h> |
#include <pupa/symbol.h> |
26 |
#include <pupa/types.h> |
#include <pupa/types.h> |
27 |
|
|
60 |
{ |
{ |
61 |
/* The terminal name. */ |
/* The terminal name. */ |
62 |
const char *name; |
const char *name; |
63 |
|
|
64 |
|
/* Initialize the terminal. */ |
65 |
|
pupa_err_t (*init) (void); |
66 |
|
|
67 |
|
/* Clean up the terminal. */ |
68 |
|
pupa_err_t (*fini) (void); |
69 |
|
|
70 |
/* Put a character. */ |
/* Put a character. C is encoded in Unicode. */ |
71 |
void (*putchar) (int c); |
void (*putchar) (pupa_uint32_t c); |
72 |
|
|
73 |
/* Check if any input character is available. */ |
/* Check if any input character is available. */ |
74 |
int (*checkkey) (void); |
int (*checkkey) (void); |
107 |
void EXPORT_FUNC(pupa_term_unregister) (pupa_term_t term); |
void EXPORT_FUNC(pupa_term_unregister) (pupa_term_t term); |
108 |
void EXPORT_FUNC(pupa_term_iterate) (int (*hook) (pupa_term_t term)); |
void EXPORT_FUNC(pupa_term_iterate) (int (*hook) (pupa_term_t term)); |
109 |
|
|
110 |
void EXPORT_FUNC(pupa_term_set_current) (pupa_term_t term); |
pupa_err_t EXPORT_FUNC(pupa_term_set_current) (pupa_term_t term); |
111 |
pupa_term_t EXPORT_FUNC(pupa_term_get_current) (void); |
pupa_term_t EXPORT_FUNC(pupa_term_get_current) (void); |
112 |
|
|
113 |
void EXPORT_FUNC(pupa_putchar) (int c); |
void EXPORT_FUNC(pupa_putchar) (int c); |
114 |
|
void EXPORT_FUNC(pupa_putcode) (pupa_uint32_t code); |
115 |
int EXPORT_FUNC(pupa_getkey) (void); |
int EXPORT_FUNC(pupa_getkey) (void); |
116 |
int EXPORT_FUNC(pupa_checkkey) (void); |
int EXPORT_FUNC(pupa_checkkey) (void); |
117 |
pupa_uint16_t EXPORT_FUNC(pupa_getxy) (void); |
pupa_uint16_t EXPORT_FUNC(pupa_getxy) (void); |