teken.h (187367) | teken.h (187469) |
---|---|
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: head/sys/dev/syscons/teken/teken.h 187367 2009-01-17 16:37:13Z ed $ | 26 * $FreeBSD: head/sys/dev/syscons/teken/teken.h 187469 2009-01-20 11:34:28Z ed $ |
27 */ 28 29#ifndef _TEKEN_H_ 30#define _TEKEN_H_ 31 32/* 33 * libteken: terminal emulation library. 34 * --- 77 unchanged lines hidden (view full) --- 112 tf_cursor_t *tf_cursor; 113 tf_putchar_t *tf_putchar; 114 tf_fill_t *tf_fill; 115 tf_copy_t *tf_copy; 116 tf_param_t *tf_param; 117 tf_respond_t *tf_respond; 118} teken_funcs_t; 119 | 27 */ 28 29#ifndef _TEKEN_H_ 30#define _TEKEN_H_ 31 32/* 33 * libteken: terminal emulation library. 34 * --- 77 unchanged lines hidden (view full) --- 112 tf_cursor_t *tf_cursor; 113 tf_putchar_t *tf_putchar; 114 tf_fill_t *tf_fill; 115 tf_copy_t *tf_copy; 116 tf_param_t *tf_param; 117 tf_respond_t *tf_respond; 118} teken_funcs_t; 119 |
120#if defined(TEKEN_XTERM) && defined(TEKEN_UTF8) 121typedef teken_char_t teken_scs_t(teken_char_t); 122#endif /* TEKEN_XTERM && TEKEN_UTF8 */ 123 |
|
120/* 121 * Terminal state. 122 */ 123 124struct __teken { 125 const teken_funcs_t *t_funcs; 126 void *t_softc; 127 --- 13 unchanged lines hidden (view full) --- 141 teken_pos_t t_winsize; 142 143 /* For DECSTBM. */ 144 teken_span_t t_scrollreg; 145 /* For DECOM. */ 146 teken_span_t t_originreg; 147 148#define T_NUMCOL 160 | 124/* 125 * Terminal state. 126 */ 127 128struct __teken { 129 const teken_funcs_t *t_funcs; 130 void *t_softc; 131 --- 13 unchanged lines hidden (view full) --- 145 teken_pos_t t_winsize; 146 147 /* For DECSTBM. */ 148 teken_span_t t_scrollreg; 149 /* For DECOM. */ 150 teken_span_t t_originreg; 151 152#define T_NUMCOL 160 |
149 unsigned int t_tabstops[T_NUMCOL / (sizeof(unsigned int) * 8)]; | 153 unsigned int t_tabstops[T_NUMCOL / (sizeof(unsigned int) * 8)]; |
150 151#ifdef TEKEN_UTF8 | 154 155#ifdef TEKEN_UTF8 |
152 unsigned int t_utf8_left; 153 teken_char_t t_utf8_partial; | 156 unsigned int t_utf8_left; 157 teken_char_t t_utf8_partial; |
154#endif /* TEKEN_UTF8 */ | 158#endif /* TEKEN_UTF8 */ |
159 160#if defined(TEKEN_XTERM) && defined(TEKEN_UTF8) 161 unsigned int t_curscs; 162 teken_scs_t *t_saved_curscs; 163 teken_scs_t *t_scs[2]; 164#endif /* TEKEN_XTERM && TEKEN_UTF8 */ |
|
155}; 156 157/* Initialize teken structure. */ 158void teken_init(teken_t *, const teken_funcs_t *, void *); 159 160/* Deliver character input. */ 161void teken_input(teken_t *, const void *, size_t); 162 163/* Set teken attributes. */ 164void teken_set_cursor(teken_t *, const teken_pos_t *); 165void teken_set_defattr(teken_t *, const teken_attr_t *); 166void teken_set_winsize(teken_t *, const teken_pos_t *); 167 168#endif /* !_TEKEN_H_ */ | 165}; 166 167/* Initialize teken structure. */ 168void teken_init(teken_t *, const teken_funcs_t *, void *); 169 170/* Deliver character input. */ 171void teken_input(teken_t *, const void *, size_t); 172 173/* Set teken attributes. */ 174void teken_set_cursor(teken_t *, const teken_pos_t *); 175void teken_set_defattr(teken_t *, const teken_attr_t *); 176void teken_set_winsize(teken_t *, const teken_pos_t *); 177 178#endif /* !_TEKEN_H_ */ |