source: asp3_tinet_ecnl_arm/trunk/ntshell/ntshell/core/vtsend.h@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向けASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 3.2 KB
Line 
1/**
2 * @file vtsend.h
3 * @author CuBeatSystems
4 * @author Shinichiro Nakamura
5 * @copyright
6 * ===============================================================
7 * Natural Tiny Shell (NT-Shell) Version 0.3.1
8 * ===============================================================
9 * Copyright (c) 2010-2016 Shinichiro Nakamura
10 *
11 * Permission is hereby granted, free of charge, to any person
12 * obtaining a copy of this software and associated documentation
13 * files (the "Software"), to deal in the Software without
14 * restriction, including without limitation the rights to use,
15 * copy, modify, merge, publish, distribute, sublicense, and/or
16 * sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following
18 * conditions:
19 *
20 * The above copyright notice and this permission notice shall be
21 * included in all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
25 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
28 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30 * OTHER DEALINGS IN THE SOFTWARE.
31 */
32
33#ifndef VTSEND_H
34#define VTSEND_H
35
36#define VTSEND_COLOR_BLACK (0)
37#define VTSEND_COLOR_RED (1)
38#define VTSEND_COLOR_GREEN (2)
39#define VTSEND_COLOR_YELLOW (3)
40#define VTSEND_COLOR_BLUE (4)
41#define VTSEND_COLOR_MAGENTA (5)
42#define VTSEND_COLOR_CYAN (6)
43#define VTSEND_COLOR_WHITE (7)
44
45#define VTSEND_ATTR_OFF (0)
46#define VTSEND_ATTR_BOLD_ON (1)
47#define VTSEND_ATTR_UNDERSCORE (4)
48#define VTSEND_ATTR_BLINK_ON (5)
49#define VTSEND_ATTR_REVERSE (7)
50#define VTSEND_ATTR_CONCEALED_ON (8)
51
52typedef int (*VTSEND_SERIAL_WRITE)(const char *buf, const int siz, void *extobj);
53
54typedef struct {
55 VTSEND_SERIAL_WRITE uart_write;
56 void *extobj;
57} vtsend_t;
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63int vtsend_init(vtsend_t *p, VTSEND_SERIAL_WRITE uart_write, void *extobj);
64int vtsend_cursor_position(vtsend_t *p, const int column, const int line);
65int vtsend_cursor_up(vtsend_t *p, const int n);
66int vtsend_cursor_down(vtsend_t *p, const int n);
67int vtsend_cursor_forward(vtsend_t *p, const int n);
68int vtsend_cursor_backward(vtsend_t *p, const int n);
69int vtsend_cursor_position_save(vtsend_t *p);
70int vtsend_cursor_position_restore(vtsend_t *p);
71int vtsend_erase_display(vtsend_t *p);
72int vtsend_erase_line(vtsend_t *p);
73int vtsend_set_color_foreground(vtsend_t *p, const int color);
74int vtsend_set_color_background(vtsend_t *p, const int color);
75int vtsend_set_attribute(vtsend_t *p, const int attr);
76int vtsend_set_scroll_region(vtsend_t *p, const int top, const int bottom);
77int vtsend_set_cursor(vtsend_t *p, const int visible);
78int vtsend_reset(vtsend_t *p);
79
80int vtsend_draw_box(
81 vtsend_t *p,
82 const int x1, const int y1, const int x2, const int y2);
83int vtsend_fill_box(
84 vtsend_t *p,
85 const int x1, const int y1, const int x2, const int y2);
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif
92
Note: See TracBrowser for help on using the repository browser.