Hi tech@,
Here is a diff to document the WSDISPLAYIO_GETSCREENTYPE ioctl in
wsdisplay.4.
The wsdisplay_screentype structure definition can be found in
<dev/wscons/wsconsio.h>.
Comments? OK?
Index: wsdisplay.4
===================================================================
RCS file: /cvs/src/share/man/man4/wsdisplay.4,v
retrieving revision 1.54
diff -u -p -r1.54 wsdisplay.4
--- wsdisplay.4 25 May 2019 11:02:19 -0000 1.54
+++ wsdisplay.4 14 Sep 2020 09:56:03 -0000
@@ -174,6 +174,38 @@ indicates the number of color map entrie
and
.Dv WSDISPLAYIO_PUTCMAP .
This call is likely to be unavailable on text-only displays.
+.It Dv WSDISPLAYIO_GETSCREENTYPE Fa "struct wsdisplay_screentype"
+Retrieve basic information about a screen.
+The returned structure is as follows:
+.Bd -literal -offset indent
+struct wsdisplay_screentype {
+ int idx;
+ int nidx;
+ char name[WSSCREEN_NAME_SIZE];
+ int ncols, nrows;
+ int fontwidth, fontheight;
+};
+.Ed
+.Pp
+The
+.Va idx
+field indicates the index of the screen.
+The
+.Va nidx
+field indicates the number of screens.
+The
+.Va name
+field contains a human readable string used to identify the screen.
+The
+.Va ncols
+and
+.Va nrows
+fields indicate the available number of columns and rows.
+The
+.Va fontwidth
+and
+.Va fontheight
+fields indicate the dimensions of a character cell and are counted in pixels.
.It Dv WSDISPLAYIO_GETCMAP Fa "struct wsdisplay_cmap"
Retrieve the current color map from the display.
This call needs the