Commit Graph

32 Commits

Author SHA1 Message Date
jmmv aec18036fd Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@.  These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@.  No objections in tech-kern@.
2006-04-15 17:48:23 +00:00
jmmv 4652eeb82c Get rid of the memt and memh local variables in the pcdisplay_{get,put}wschar
functions.
2006-04-12 20:08:20 +00:00
jmmv efbda7406a Convert to ANSI prototypes. 2006-04-12 20:06:16 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
jmmv 92f81ea7d3 Implement support to dynamically change wscons console and kernel colors.
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it.  This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
  change the colors dynamically from userland.  This is enabled by default
  in the GENERIC kernel (as well as others) but disabled on all INSTALL*
  kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
  which specify the default colors for the console at boot time.  These have
  the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
2004-07-28 12:34:02 +00:00
christos 7208404c41 PR/19925: David Ferlier: Add scrolling support to wscons. 2004-05-28 21:42:29 +00:00
thorpej f066e17960 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-25 19:11:16 +00:00
tron 7db7acdde8 Fix a typo in last commit which caused build failures if
"PCDISPLAY_SOFTCURSOR" is not defined.
2002-07-07 10:52:18 +00:00
junyoung 472e54071a Rename vc_ccol and vc_crow in struct pcdisplayscreen to cursorcol
and cursorrow, respectively, to be consistent with other members
in the structure.
2002-07-07 06:36:32 +00:00
christos 63a19c881d more cleanups from Julio Merino. 2002-07-01 13:17:48 +00:00
christos 71dcc987cd PR/17402: Add wsmoused support by providing get/set char and events. 2002-06-26 23:05:33 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
drochner 03d3e7a8b4 -update a comment wrt the "active screen" flag
-apply the patch from PR kern/13117 (Onno van der Linden) to make the
 hardware cursor disappear more thoroughly
-deal with PR kern/13573: hardware cursor too big, but differently:
 we have to obey the font size actually used. At this point, fix the
 problem that the cursor got messed up by the initialization of
 unrelated screens.
2001-09-04 17:14:49 +00:00
thorpej 7711ad565b bcopy -> memcpy 2001-07-07 15:53:13 +00:00
thorpej fd1fd6bb0f If using the hardware cursor, make sure the cursor shape is initialized,
otherwise we won't be able to see anything if the system firmware has
either not initialized it, or initialized it to "invlisible".
2001-07-05 16:45:23 +00:00
cgd d8dcb11d4f don't include ISA headers. these have been properly abstracted so that
the ISA headers are unnecessary, and they're used by PCI VGA.  There may
not be any ISA at all.
2000-06-08 07:01:19 +00:00
ad 62c4800e7f Argh - add initialization that got lost during editing of previous addition. 2000-01-26 01:23:32 +00:00
ad ea0751f1aa Finish with fixing the SOFTCURSOR stuff. 2000-01-25 02:44:03 +00:00
ad 192e087585 Make PCDISPLAY_SOFTCURSOR work as it should. 2000-01-12 14:42:21 +00:00
ad e75404417a Add and use pcdisplay_cursor_init(). Still a couple of nits with this, I
will resolve when I can test properly.
2000-01-05 16:14:35 +00:00
ad ea89296a61 Back out previous. A proper fix will follow. 2000-01-05 16:04:00 +00:00
ad 801b079e37 If the vga driver isn't present in the kernel and PCDISPLAY_SOFTCURSOR
is set, then pcdisplay_cursor() should disable the hardware cursor first
time it is called.
1999-12-06 10:04:50 +00:00
ad e2bdb5f380 PCDISPLAY_SOFTCURSOR: invert foreground too. 1999-09-29 17:26:06 +00:00
ad 598dcad691 When moving the software cursor on an inactive screen, save character and
attribute from backing store, not display adapter.
1999-09-19 23:00:04 +00:00
ad f96e055d70 - mc6845's cursor is disabled by punching bit 6 of cursor start register.
- Add new option (PCDISPLAY_SOFTCURSOR) that provides a large, non-blinking
  cursor in software.
1999-09-19 21:48:08 +00:00
drochner 7764b57db5 allow the displayed area to start anywhere in display memory,
add a "dispoffset" variable to control this
1998-07-24 16:12:18 +00:00
drochner 3f10af182d do the charcter mapping in a separate function 1998-06-26 21:05:20 +00:00
drochner bf42a9e321 adapt to wscons changes, treat incoming characters always as ISO
(ie, convert to IBM)
1998-06-20 21:55:05 +00:00
drochner 0fb233923b do the former at one more place 1998-06-17 20:48:02 +00:00
drochner 39452d9720 avoid sign extension if a character >=128 is passed 1998-06-17 20:44:16 +00:00
drochner b84dbbb37c Put definitions and subroutines needed for all PC display adapters
(MGA/GCA and compatibles) into global headers / source files.
Let the VGA driver use them.
1998-05-28 16:48:40 +00:00