00001 /* $OpenBSD: screen.h,v 1.5 2003/06/03 03:01:41 millert Exp $ */ 00002 /* $NetBSD: screen.h,v 1.2 1995/04/22 07:42:42 cgd Exp $ */ 00003 00004 /*- 00005 * Copyright (c) 1992, 1993 00006 * The Regents of the University of California. All rights reserved. 00007 * 00008 * This code is derived from software contributed to Berkeley by 00009 * Chris Torek and Darren F. Provine. 00010 * 00011 * Redistribution and use in source and binary forms, with or without 00012 * modification, are permitted provided that the following conditions 00013 * are met: 00014 * 1. Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the distribution. 00019 * 3. Neither the name of the University nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00024 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00026 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00029 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00030 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00032 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00033 * SUCH DAMAGE. 00034 * 00035 * @(#)screen.h 8.1 (Berkeley) 5/31/93 00036 */ 00037 00044 /* 00045 * putpad() is for padded strings with count = 1. 00046 */ 00047 #define putpad(s) tputs(s, 1, put) 00048 00049 #include <sys/types.h> 00050 #include <async.h> 00051 #include <bool.h> 00052 00053 typedef struct { 00054 sysarg_t ws_row; 00055 sysarg_t ws_col; 00056 } winsize_t; 00057 00058 extern winsize_t winsize; 00059 00060 extern void moveto(sysarg_t r, sysarg_t c); 00061 extern void clear_screen(void); 00062 00063 /* just calls putchar; for tputs */ 00064 extern int put(int); 00065 extern void scr_clear(void); 00066 extern void scr_end(void); 00067 extern void scr_init(void); 00068 extern void scr_msg(char *, bool); 00069 extern void scr_set(void); 00070 extern void scr_update(void); 00071