UbixOS V2
2.0
tty.h
Go to the documentation of this file.
1
/*-
2
* Copyright (c) 2002-2018 The UbixOS Project.
3
* All rights reserved.
4
*
5
* This was developed by Christopher W. Olsen for the UbixOS Project.
6
*
7
* Redistribution and use in source and binary forms, with or without modification, are permitted
8
* provided that the following conditions are met:
9
*
10
* 1) Redistributions of source code must retain the above copyright notice, this list of
11
* conditions, the following disclaimer and the list of authors.
12
* 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13
* conditions, the following disclaimer and the list of authors in the documentation and/or
14
* other materials provided with the distribution.
15
* 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16
* endorse or promote products derived from this software without specific prior written
17
* permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef _UBIXOS_TTY_H
30
#define _UBIXOS_TTY_H
31
32
#include <
sys/types.h
>
33
34
#define TTY_MAX_TERMS 5
35
36
typedef
struct
tty_termNode
{
37
char
*
tty_buffer
;
38
char
*
tty_pointer
;
39
uint8_t
tty_colour
;
40
uint16_t
tty_x
;
41
uint16_t
tty_y
;
42
pidType
owner
;
43
char
stdin
[512];
44
int
stdinSize
;
45
}
tty_term
;
46
47
int
tty_init
();
48
int
tty_change
(
uInt16
);
49
tty_term
*
tty_find
(
uInt16
);
50
int
tty_print
(
char
*,
tty_term
*);
51
52
extern
tty_term
*
tty_foreground
;
53
54
#endif
uInt16
unsigned short int uInt16
Definition:
objgfx30.h:48
tty_termNode::tty_buffer
char * tty_buffer
Definition:
tty.h:37
tty_termNode::tty_x
uint16_t tty_x
Definition:
tty.h:40
tty_print
int tty_print(char *, tty_term *)
Definition:
tty.c:115
tty_termNode::tty_y
uint16_t tty_y
Definition:
tty.h:41
tty_termNode::tty_pointer
char * tty_pointer
Definition:
tty.h:38
types.h
tty_change
int tty_change(uInt16)
Definition:
tty.c:84
tty_termNode
Definition:
tty.h:36
uint16_t
__uint16_t uint16_t
Definition:
types.h:45
tty_find
tty_term * tty_find(uInt16)
Definition:
tty.c:167
tty_termNode::stdinSize
int stdinSize
Definition:
tty.h:44
tty_termNode::tty_colour
uint8_t tty_colour
Definition:
tty.h:39
pidType
int pidType
Definition:
types.h:75
tty_term
struct tty_termNode tty_term
tty_foreground
tty_term * tty_foreground
Definition:
tty.c:38
tty_termNode::stdin
char stdin[512]
Definition:
tty.h:43
uint8_t
__uint8_t uint8_t
Definition:
types.h:44
tty_termNode::owner
pidType owner
Definition:
tty.h:42
tty_init
int tty_init()
Definition:
tty.c:41
C:
Dev
git
UbixOS
sys
include
ubixos
tty.h
Generated by
1.8.16