Subject: Re: wscons ioctl's
To: None <juli@merino.net>
From: TAKEMURA Shin <takemura@netbsd.org>
List: tech-kern
Date: 02/04/2002 11:27:30
From: Julio Merino <juli@merino.net>
Subject: wscons ioctl's
Date: Sun, 3 Feb 2002 00:04:46 +0100
> Hi all
>
> I need to add two new ioctl's to wsdisplay, to get the mouse working.
> I've added the following to wsconsio.h:
>
> /* Character/attributes of a position */
> struct wsdisplay_poscontent {
> struct wsdisplay_curpos pos; /* position */
> u_int16_t character; /* character */
> u_int16_t attr; /* attributes */
> };
> #define WSDISPLAYIO_GETCHAR _IOWR('W', 84, struct wsdisplay_poscontent)
> #define WSDISPLAYIO_PUTCHAR _IOW('W', 85, struct wsdisplay_poscontent)
>
> I've been looking at wscons sources a bit more, and it seems that
> the putchar function is already implemented (not ioctl). So I only need
> to program getchar.
I thought that it wasn't easy to get char from wscons because wscons
(wsdisplay) was bitmaped display, wan't it?
If wsdisplay (it might be called 'wsscreen'?) had text buffers which
have all characters and attributes of all virtual screens, you can
easliy and smartly retrieve char and attr from wscons. (you can also
backscroll!)
BTW, we should consider a security issue about get char seriously. It's
quite bad if some one else could chapture my screen.
Takemura