diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-08-16 17:51:45 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-08-16 17:51:45 +0000 |
commit | 93393a5615b199510576e4be2b3299ae80c2bdba (patch) | |
tree | 934cae489d17135f784d5b8473ff26aa8d8b1084 /share/man | |
parent | 0368ca0a2465db888f8055a855f32fa6d321ca91 (diff) |
Man page for rasops from NetBSD
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man9/Makefile | 4 | ||||
-rw-r--r-- | share/man/man9/rasops.9 | 211 |
2 files changed, 213 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 4abec5e0bd8..32dba34a086 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.53 2002/07/01 01:45:00 art Exp $ +# $OpenBSD: Makefile,v 1.54 2002/08/16 17:51:44 jason Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -12,7 +12,7 @@ MAN= altq.9 audio.9 boot.9 bus_dma.9 bus_space.9 copy.9 crypto.9 ctxsw.9 \ kthread.9 lock.9 malloc.9 mbuf.9 mbuf_tags.9 md5.9 microtime.9 \ panic.9 pfind.9 physio.9 \ pool.9 powerhook_establish.9 ppsratecheck.9 printf.9 psignal.9 \ - ratecheck.9 resettodr.9 radio.9 random.9 \ + radio.9 random.9 rasops.9 ratecheck.9 resettodr.9 \ shutdownhook_establish.9 sleep.9 spl.9 startuphook_establish.9 \ store.9 style.9 \ time.9 timeout.9 tvtohz.9 uiomove.9 uvm.9 \ diff --git a/share/man/man9/rasops.9 b/share/man/man9/rasops.9 new file mode 100644 index 00000000000..94024843155 --- /dev/null +++ b/share/man/man9/rasops.9 @@ -0,0 +1,211 @@ +.\" $OpenBSD: rasops.9,v 1.1 2002/08/16 17:51:44 jason Exp $ +.\" $NetBSD: rasops.9,v 1.4 2002/02/13 08:18:50 ross Exp $ +.\" +.\" Copyright (c) 2001 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Gregory McGarry. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the NetBSD +.\" Foundation, Inc. and its contributors. +.\" 4. Neither the name of The NetBSD Foundation nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd October 7, 2001 +.Dt RASOPS 9 +.Os +.Sh NAME +.Nm rasops , +.Nm rasops_init , +.Nm rasops_reconfig +.Nd raster display operations +.Sh SYNOPSIS +.Fd #include \*[Lt]dev/wscons/wsdisplayvar.h\*[Gt] +.Fd #include \*[Lt]dev/rasops/rasops.h\*[Gt] +.Ft int +.Fn rasops_init "struct rasops_info *ri" "int wantrows" "int wantcols" +.Ft int +.Fn rasops_reconfig "struct rasops_info *ri" "int wantrows" "int wantcols" +.Sh DESCRIPTION +The +.Nm +subsystem is a set of raster operations for +.Xr wscons 9 . +.Pp +The primary data type for using the raster operations is the +.Em rasops_info +structure in +.Pa dev/rasops/rasops.h : +.Bd -literal +struct rasops_info { + + /* + * These must be filled in by the caller + */ + int ri_depth; /* depth in bits */ + u_char *ri_bits; /* ptr to bits */ + int ri_width; /* width (pels) */ + int ri_height; /* height (pels) */ + int ri_stride; /* stride in bytes */ + + /* + * These can optionally be left zeroed out. If you fill ri_font, + * but aren't using wsfont, set ri_wsfcookie to -1. + */ + struct wsdisplay_font *ri_font; + int ri_wsfcookie; /* wsfont cookie */ + void *ri_hw; /* driver private data */ + int ri_crow; /* cursor row */ + int ri_ccol; /* cursor column */ + int ri_flg; /* various operational flags */ + + /* + * These are optional and will default if zero. Meaningless + * on depths other than 15, 16, 24 and 32 bits per pel. On + * 24 bit displays, ri_{r,g,b}num must be 8. + */ + u_char ri_rnum; /* number of bits for red */ + u_char ri_gnum; /* number of bits for green */ + u_char ri_bnum; /* number of bits for blue */ + u_char ri_rpos; /* which bit red starts at */ + u_char ri_gpos; /* which bit green starts at */ + u_char ri_bpos; /* which bit blue starts at */ + + /* + * These are filled in by rasops_init() + */ + int ri_emuwidth; /* width we actually care about */ + int ri_emuheight; /* height we actually care about */ + int ri_emustride; /* bytes per row we actually care about */ + int ri_rows; /* number of rows (characters) */ + int ri_cols; /* number of columns (characters) */ + int ri_delta; /* row delta in bytes */ + int ri_pelbytes; /* bytes per pel (may be zero) */ + int ri_fontscale; /* fontheight * fontstride */ + int ri_xscale; /* fontwidth * pelbytes */ + int ri_yscale; /* fontheight * stride */ + u_char *ri_origbits; /* where screen bits actually start */ + int ri_xorigin; /* where ri_bits begins (x) */ + int ri_yorigin; /* where ri_bits begins (y) */ + int32_t ri_devcmap[16]; /* color -\*[Gt] framebuffer data */ + + /* + * The emulops you need to use, and the screen caps for wscons + */ + struct wsdisplay_emulops ri_ops; + int ri_caps; + + /* + * Callbacks so we can share some code + */ + void (*ri_do_cursor)(struct rasops_info *); + void (*ri_updatecursor)(struct rasops_info *); +}; +.Ed +.Pp +Valid values for the +.Em ri_flg +member are: +.Pp +.Bl -tag -offset indent -width RI_CURSORCLIP -compact +.It RI_FULLCLEAR +eraserows() hack to clear full screen +.It RI_FORCEMONO +monochrome output even if we can do color +.It RI_BSWAP +framebuffer endianness doesn't match CPU +.It RI_CURSOR +cursor is switched on +.It RI_CLEAR +clear display on startup +.It RI_CENTER +center onscreen output +.It RI_CURSORCLIP +cursor is currently clipped +.It RI_CFGDONE +.Fn rasops_reconfig +completed successfully +.El +.Sh FUNCTIONS +.Bl -tag -width compact +.It Fn rasops_init "ri" "wantrows" "wantcols" +Initialise a +.Em rasops_info +desriptor. The arguments +.Fa wantrows +and +.Fa wantcols +are the number of rows and columns we'd like. In terms of +optimization, fonts that are a multiple of 8 pixels wide work the +best. +.It Fn rasops_reconfig "ri" "wantrows" "wantcols" +Reconfigure a +.Em rasops_info +descriptor because parameters have changed in some way. The arguments +.Fa wantrows +and +.Fa wantcols +are the number of rows and columns we'd like. If calling +.Fn rasops_reconfig +to change the font and ri_wsfcookie \*[Ge] 0, you must call +.Fn wsfont_unlock +on it, and reset it to -1 (or a new, valid cookie). +.El +.Sh CODE REFERENCES +This section describes places within the +.Ox +source tree where actual code implementing or utilising the rasops +subsystem can be found. All pathnames are relative to +.Pa /usr/src . +.Pp +The rasops subsystem is implemented within the directory +.Pa sys/dev/rasops . +The +.Nm +module itself is implement within the file +.Pa sys/dev/rasops/rasops.c . +.Sh SEE ALSO +.Xr intro 9 +.\" XXX These don't exist yet +.\" .Xr wscons 9 , +.\" .Xr wsdisplay 9 , +.\" .Xr wsfont 9 +.Sh HISTORY +The +.Nm +subsystem appeared in +.Nx 1.5 +and +.Ox +first support appeared in +.Ox 2.9 . +.Sh AUTHORS +The +.Nm +subsystem was written by +.An Andrew Doran +.Aq ad@NetBSD.org . |