teken.h (256281) | teken.h (262861) |
---|---|
1/*- 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: stable/10/sys/teken/teken.h 221698 2011-05-09 16:27:39Z ed $ | 26 * $FreeBSD: stable/10/sys/teken/teken.h 262861 2014-03-06 18:30:56Z jhb $ |
27 */ 28 29#ifndef _TEKEN_H_ 30#define _TEKEN_H_ 31 32#include <sys/types.h> 33 34/* 35 * libteken: terminal emulation library. 36 * 37 * This library converts an UTF-8 stream of bytes to terminal drawing 38 * commands. 39 */ 40 41typedef uint32_t teken_char_t; 42typedef unsigned short teken_unit_t; 43typedef unsigned char teken_format_t; | 27 */ 28 29#ifndef _TEKEN_H_ 30#define _TEKEN_H_ 31 32#include <sys/types.h> 33 34/* 35 * libteken: terminal emulation library. 36 * 37 * This library converts an UTF-8 stream of bytes to terminal drawing 38 * commands. 39 */ 40 41typedef uint32_t teken_char_t; 42typedef unsigned short teken_unit_t; 43typedef unsigned char teken_format_t; |
44#define TF_BOLD 0x01 45#define TF_UNDERLINE 0x02 46#define TF_BLINK 0x04 47#define TF_REVERSE 0x08 | 44#define TF_BOLD 0x01 /* Bold character. */ 45#define TF_UNDERLINE 0x02 /* Underline character. */ 46#define TF_BLINK 0x04 /* Blinking character. */ 47#define TF_REVERSE 0x08 /* Reverse rendered character. */ 48#define TF_CJK_RIGHT 0x10 /* Right-hand side of CJK character. */ |
48typedef unsigned char teken_color_t; 49#define TC_BLACK 0 50#define TC_RED 1 51#define TC_GREEN 2 52#define TC_BROWN 3 53#define TC_BLUE 4 54#define TC_MAGENTA 5 55#define TC_CYAN 6 --- 107 unchanged lines hidden (view full) --- 163const teken_attr_t *teken_get_curattr(teken_t *); 164const teken_attr_t *teken_get_defattr(teken_t *); 165void teken_get_defattr_cons25(teken_t *, int *, int *); 166const teken_pos_t *teken_get_winsize(teken_t *); 167void teken_set_cursor(teken_t *, const teken_pos_t *); 168void teken_set_curattr(teken_t *, const teken_attr_t *); 169void teken_set_defattr(teken_t *, const teken_attr_t *); 170void teken_set_winsize(teken_t *, const teken_pos_t *); | 49typedef unsigned char teken_color_t; 50#define TC_BLACK 0 51#define TC_RED 1 52#define TC_GREEN 2 53#define TC_BROWN 3 54#define TC_BLUE 4 55#define TC_MAGENTA 5 56#define TC_CYAN 6 --- 107 unchanged lines hidden (view full) --- 164const teken_attr_t *teken_get_curattr(teken_t *); 165const teken_attr_t *teken_get_defattr(teken_t *); 166void teken_get_defattr_cons25(teken_t *, int *, int *); 167const teken_pos_t *teken_get_winsize(teken_t *); 168void teken_set_cursor(teken_t *, const teken_pos_t *); 169void teken_set_curattr(teken_t *, const teken_attr_t *); 170void teken_set_defattr(teken_t *, const teken_attr_t *); 171void teken_set_winsize(teken_t *, const teken_pos_t *); |
172void teken_set_winsize_noreset(teken_t *, const teken_pos_t *); |
|
171 172/* Key input escape sequences. */ 173#define TKEY_UP 0x00 174#define TKEY_DOWN 0x01 175#define TKEY_LEFT 0x02 176#define TKEY_RIGHT 0x03 177 178#define TKEY_HOME 0x04 --- 28 unchanged lines hidden --- | 173 174/* Key input escape sequences. */ 175#define TKEY_UP 0x00 176#define TKEY_DOWN 0x01 177#define TKEY_LEFT 0x02 178#define TKEY_RIGHT 0x03 179 180#define TKEY_HOME 0x04 --- 28 unchanged lines hidden --- |