19890ff83SToomas Soome /* 29890ff83SToomas Soome * CDDL HEADER START 39890ff83SToomas Soome * 49890ff83SToomas Soome * The contents of this file are subject to the terms of the 59890ff83SToomas Soome * Common Development and Distribution License (the "License"). 69890ff83SToomas Soome * You may not use this file except in compliance with the License. 79890ff83SToomas Soome * 89890ff83SToomas Soome * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 99890ff83SToomas Soome * or http://www.opensolaris.org/os/licensing. 109890ff83SToomas Soome * See the License for the specific language governing permissions 119890ff83SToomas Soome * and limitations under the License. 129890ff83SToomas Soome * 139890ff83SToomas Soome * When distributing Covered Code, include this CDDL HEADER in each 149890ff83SToomas Soome * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 159890ff83SToomas Soome * If applicable, add the following below this CDDL HEADER, with the 169890ff83SToomas Soome * fields enclosed by brackets "[]" replaced with your own identifying 179890ff83SToomas Soome * information: Portions Copyright [yyyy] [name of copyright owner] 189890ff83SToomas Soome * 199890ff83SToomas Soome * CDDL HEADER END 209890ff83SToomas Soome */ 219890ff83SToomas Soome 229890ff83SToomas Soome /* 239890ff83SToomas Soome * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 249890ff83SToomas Soome * Use is subject to license terms. 259890ff83SToomas Soome */ 269890ff83SToomas Soome /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ 279890ff83SToomas Soome 289890ff83SToomas Soome /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */ 299890ff83SToomas Soome /* All Rights Reserved */ 309890ff83SToomas Soome 319890ff83SToomas Soome #ifndef _SYS_TEM_H 329890ff83SToomas Soome #define _SYS_TEM_H 339890ff83SToomas Soome 349890ff83SToomas Soome #ifdef __cplusplus 359890ff83SToomas Soome extern "C" { 369890ff83SToomas Soome #endif 379890ff83SToomas Soome 389890ff83SToomas Soome #include <sys/types.h> 399890ff83SToomas Soome #include <sys/visual_io.h> 40*ffd79eb6SToomas Soome #include <stdbool.h> 419890ff83SToomas Soome 429890ff83SToomas Soome typedef uint8_t text_color_t; 439890ff83SToomas Soome 449890ff83SToomas Soome typedef struct __tem_modechg_cb_arg *tem_modechg_cb_arg_t; 459890ff83SToomas Soome typedef void (*tem_modechg_cb_t) (tem_modechg_cb_arg_t arg); 469890ff83SToomas Soome typedef struct __tem_vt_state *tem_vt_state_t; 479890ff83SToomas Soome 489890ff83SToomas Soome /* 499890ff83SToomas Soome * tems_* fuctions mean that they just operate on the common soft state 509890ff83SToomas Soome * (tem_state_t), and tem_* functions mean that they operate on the 519890ff83SToomas Soome * per-tem structure (tem_vt_state). 529890ff83SToomas Soome */ 539890ff83SToomas Soome int tems_cls(struct vis_consclear *); 549890ff83SToomas Soome void tems_display(struct vis_consdisplay *); 559890ff83SToomas Soome void tems_copy(struct vis_conscopy *); 569890ff83SToomas Soome void tems_cursor(struct vis_conscursor *); 579890ff83SToomas Soome 589890ff83SToomas Soome int tem_initialized(tem_vt_state_t); 599890ff83SToomas Soome 609890ff83SToomas Soome tem_vt_state_t tem_init(void); 619890ff83SToomas Soome 629890ff83SToomas Soome int tem_info_init(struct console *); 639890ff83SToomas Soome void tem_write(tem_vt_state_t, uint8_t *, ssize_t); 649890ff83SToomas Soome void tem_get_size(uint16_t *, uint16_t *, uint16_t *, uint16_t *); 659890ff83SToomas Soome void tem_save_state(void); 669890ff83SToomas Soome void tem_register_modechg_cb(tem_modechg_cb_t, tem_modechg_cb_arg_t); 67*ffd79eb6SToomas Soome void tem_activate(tem_vt_state_t, bool); 689890ff83SToomas Soome void tem_switch(tem_vt_state_t, tem_vt_state_t); 699890ff83SToomas Soome void tem_get_colors(tem_vt_state_t, text_color_t *, text_color_t *); 709890ff83SToomas Soome 719890ff83SToomas Soome #ifdef __cplusplus 729890ff83SToomas Soome } 739890ff83SToomas Soome #endif 749890ff83SToomas Soome 759890ff83SToomas Soome #endif /* _SYS_TEM_H */ 76