1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ 27 28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */ 29 /* All Rights Reserved */ 30 31 #ifndef _SYS_TEM_H 32 #define _SYS_TEM_H 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 #include <sys/types.h> 39 #include <sys/visual_io.h> 40 #include <stdbool.h> 41 42 typedef uint8_t text_color_t; 43 44 typedef struct __tem_modechg_cb_arg *tem_modechg_cb_arg_t; 45 typedef void (*tem_modechg_cb_t) (tem_modechg_cb_arg_t arg); 46 typedef struct __tem_vt_state *tem_vt_state_t; 47 48 /* 49 * tems_* fuctions mean that they just operate on the common soft state 50 * (tem_state_t), and tem_* functions mean that they operate on the 51 * per-tem structure (tem_vt_state). 52 */ 53 int tems_cls(struct vis_consclear *); 54 void tems_display(struct vis_consdisplay *); 55 void tems_copy(struct vis_conscopy *); 56 void tems_cursor(struct vis_conscursor *); 57 58 int tem_initialized(tem_vt_state_t); 59 60 tem_vt_state_t tem_init(void); 61 62 int tem_info_init(struct console *); 63 void tem_write(tem_vt_state_t, uint8_t *, ssize_t); 64 void tem_get_size(uint16_t *, uint16_t *, uint16_t *, uint16_t *); 65 void tem_save_state(void); 66 void tem_register_modechg_cb(tem_modechg_cb_t, tem_modechg_cb_arg_t); 67 void tem_activate(tem_vt_state_t, bool); 68 void tem_switch(tem_vt_state_t, tem_vt_state_t); 69 void tem_get_colors(tem_vt_state_t, text_color_t *, text_color_t *); 70 71 #ifdef __cplusplus 72 } 73 #endif 74 75 #endif /* _SYS_TEM_H */ 76