diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-08-12 02:31:02 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-08-12 02:31:02 +0000 |
commit | 129ee842a7e5b4ed5b8f259907cf2c008f74a660 (patch) | |
tree | 48c0ac2c3989dd525ae6b578db738c044e606a54 /sys/dev | |
parent | 5ae8f3912303a67574ac7c5c87970a0da1cc6ca5 (diff) |
Add a callback routine for when the cursor position is updated (this allows
for updating prom cursor locations).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/rasops/rasops.c | 6 | ||||
-rw-r--r-- | sys/dev/rasops/rasops.h | 3 |
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))) |