summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2002-08-12 02:31:01 +0000
committerjason <jason@openbsd.org>2002-08-12 02:31:01 +0000
commita67978447e56f665cb25f9f180e22553fe28c54d (patch)
tree421eb9909941d41ef5982eb0786a5ddd376c6f67
parentAdd support for REL type relocations, all currently supported arch (diff)
downloadwireguard-openbsd-a67978447e56f665cb25f9f180e22553fe28c54d.tar.xz
wireguard-openbsd-a67978447e56f665cb25f9f180e22553fe28c54d.zip
Add a callback routine for when the cursor position is updated (this allows
for updating prom cursor locations).
-rw-r--r--sys/dev/rasops/rasops.c6
-rw-r--r--sys/dev/rasops/rasops.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index 489c2aff9f2..f0f02c6f81b 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops.c,v 1.7 2002/07/27 22:17:49 miod Exp $ */
+/* $OpenBSD: rasops.c,v 1.8 2002/08/12 02:31:01 jason Exp $ */
/* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */
/*-
@@ -258,6 +258,7 @@ rasops_reconfig(ri, wantrows, wantcols)
ri->ri_ops.eraserows = rasops_eraserows;
ri->ri_ops.cursor = rasops_cursor;
ri->ri_do_cursor = rasops_do_cursor;
+ ri->ri_updatecursor = NULL;
if (ri->ri_depth < 8 || (ri->ri_flg & RI_FORCEMONO) != 0) {
ri->ri_ops.alloc_attr = rasops_alloc_mattr;
@@ -597,6 +598,9 @@ rasops_cursor(cookie, on, row, col)
ri->ri_crow = row;
ri->ri_ccol = col;
+ if (ri->ri_updatecursor != NULL)
+ ri->ri_updatecursor(ri);
+
if (on) {
ri->ri_flg |= RI_CURSOR;
#ifdef RASOPS_CLIPPING
diff --git a/sys/dev/rasops/rasops.h b/sys/dev/rasops/rasops.h
index 847f3d5f854..825d65bd4e0 100644
--- a/sys/dev/rasops/rasops.h
+++ b/sys/dev/rasops/rasops.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops.h,v 1.4 2002/07/28 01:30:08 miod Exp $ */
+/* $OpenBSD: rasops.h,v 1.5 2002/08/12 02:31:01 jason Exp $ */
/* $NetBSD: rasops.h,v 1.13 2000/06/13 13:36:54 ad Exp $ */
/*-
@@ -109,6 +109,7 @@ struct rasops_info {
/* Callbacks so we can share some code */
void (*ri_do_cursor)(struct rasops_info *);
+ void (*ri_updatecursor)(struct rasops_info *);
};
#define DELTA(p, d, cast) ((p) = (cast)((caddr_t)(p) + (d)))