1*75658c96SKyle Evans.\" 2*75658c96SKyle Evans.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3*75658c96SKyle Evans.\" 4*75658c96SKyle Evans.\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 5*75658c96SKyle Evans.\" 6*75658c96SKyle Evans.\" Redistribution and use in source and binary forms, with or without 7*75658c96SKyle Evans.\" modification, are permitted provided that the following conditions 8*75658c96SKyle Evans.\" are met: 9*75658c96SKyle Evans.\" 1. Redistributions of source code must retain the above copyright 10*75658c96SKyle Evans.\" notice, this list of conditions and the following disclaimer. 11*75658c96SKyle Evans.\" 2. Redistributions in binary form must reproduce the above copyright 12*75658c96SKyle Evans.\" notice, this list of conditions and the following disclaimer in the 13*75658c96SKyle Evans.\" documentation and/or other materials provided with the distribution. 14*75658c96SKyle Evans.\" 15*75658c96SKyle Evans.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*75658c96SKyle Evans.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*75658c96SKyle Evans.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*75658c96SKyle Evans.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*75658c96SKyle Evans.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*75658c96SKyle Evans.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*75658c96SKyle Evans.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*75658c96SKyle Evans.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*75658c96SKyle Evans.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*75658c96SKyle Evans.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*75658c96SKyle Evans.\" SUCH DAMAGE. 26*75658c96SKyle Evans.\" 27*75658c96SKyle Evans.\" $FreeBSD$ 28*75658c96SKyle Evans.\" 29*75658c96SKyle Evans.Dd August 19, 2018 30*75658c96SKyle Evans.Dt SCREEN.LUA 8 31*75658c96SKyle Evans.Os 32*75658c96SKyle Evans.Sh NAME 33*75658c96SKyle Evans.Nm screen.lua 34*75658c96SKyle Evans.Nd FreeBSD screen manipulation module 35*75658c96SKyle Evans.Sh DESCRIPTION 36*75658c96SKyle Evans.Nm 37*75658c96SKyle Evanscontains functionality for manipulating the screen. 38*75658c96SKyle EvansThis includes functionality such as clearing the screen, moving the cursor, and 39*75658c96SKyle Evanssetting foreground/background colors using sequences provided by 40*75658c96SKyle Evans.Xr color.lua 8 . 41*75658c96SKyle Evans.Pp 42*75658c96SKyle EvansBefore using the functionality provided by 43*75658c96SKyle Evans.Nm , 44*75658c96SKyle Evansit must be included with a statement such as the following: 45*75658c96SKyle Evans.Pp 46*75658c96SKyle Evans.Dl local screen = require("screen") 47*75658c96SKyle Evans.Pp 48*75658c96SKyle EvansThe following variables are exported from 49*75658c96SKyle Evans.Nm : 50*75658c96SKyle Evans.Bl -tag -width "Ic screen.default_x" -offset indent 51*75658c96SKyle Evans.It Ic screen.default_x 52*75658c96SKyle EvansThe x component of the default cursor position. 53*75658c96SKyle Evans.It Ic screen.default_y 54*75658c96SKyle EvansThe y component of the default cursor position. 55*75658c96SKyle Evans.El 56*75658c96SKyle Evans.Pp 57*75658c96SKyle EvansThe following functions are exported from 58*75658c96SKyle Evans.Nm : 59*75658c96SKyle Evans.Bl -tag -width "Fn screen.clear" -offset indent 60*75658c96SKyle Evans.It Fn screen.clear 61*75658c96SKyle EvansClears the screen. 62*75658c96SKyle Evans.Fn screen.clear 63*75658c96SKyle Evanswill do nothing if a serial boot is detected. 64*75658c96SKyle Evans.It Fn screen.setcursor x y 65*75658c96SKyle EvansSets the cursor position to 66*75658c96SKyle Evans.Fa x , 67*75658c96SKyle Evans.Fa y . 68*75658c96SKyle Evans.Fn screen.setcursor 69*75658c96SKyle Evanswill do nothing if a serial boot is detected. 70*75658c96SKyle Evans.It Fn screen.setforeground color_value 71*75658c96SKyle EvansSets the foreground color to 72*75658c96SKyle Evans.Fa color_value , 73*75658c96SKyle Evanswhich should be a constant defined in 74*75658c96SKyle Evans.Xr color.lua 8 . 75*75658c96SKyle Evans.Fn screen.setforeground 76*75658c96SKyle Evanswill do nothing if color is disabled. 77*75658c96SKyle Evans.It Fn screen.setbackground color_value 78*75658c96SKyle EvansSets the background color to 79*75658c96SKyle Evans.Fa color_value , 80*75658c96SKyle Evanswhich should be a constant defined in 81*75658c96SKyle Evans.Xr color.lua 8 . 82*75658c96SKyle Evans.Fn screen.setbackground 83*75658c96SKyle Evanswill do nothing if color is disabled. 84*75658c96SKyle Evans.It Fn screen.defcolor 85*75658c96SKyle EvansSets the default color scheme, as defined by 86*75658c96SKyle Evans.Fn color.default . 87*75658c96SKyle Evans.Fn screen.defcolor 88*75658c96SKyle Evanswill do nothing if color is disabled. 89*75658c96SKyle Evans.It Fn screen.defcursor 90*75658c96SKyle EvansSets the default cursor position to that defined by 91*75658c96SKyle Evans.Ic screen.default_x , 92*75658c96SKyle Evans.Ic screen.default_y . 93*75658c96SKyle Evans.El 94*75658c96SKyle Evans.Sh SEE ALSO 95*75658c96SKyle Evans.Xr color.lua 8 96*75658c96SKyle Evans.Sh AUTHORS 97*75658c96SKyle EvansThe 98*75658c96SKyle Evans.Nm 99*75658c96SKyle Evansfile was originally written by 100*75658c96SKyle Evans.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . 101*75658c96SKyle EvansLater work and this manual page was done by 102*75658c96SKyle Evans.An Kyle Evans Aq Mt kevans@FreeBSD.org . 103