svn commit: r270293 - in head/sys/dev/vt: . font
Jean-Sebastien Pedron
dumbbell at FreeBSD.org
Thu Aug 21 19:42:25 UTC 2014
Author: dumbbell
Date: Thu Aug 21 19:42:24 2014
New Revision: 270293
URL: http://svnweb.freebsd.org/changeset/base/270293
Log:
vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor"
At the same time, "w" and "h" members are now called "width" and
"height". The goal is to have a more "public" structure, because it will
soon be passed as argument to a new callback, replacing vd_bitbltchr_t.
MFC after: 1 week
Modified:
head/sys/dev/vt/font/vt_mouse_cursor.c
head/sys/dev/vt/vt.h
head/sys/dev/vt/vt_core.c
Modified: head/sys/dev/vt/font/vt_mouse_cursor.c
==============================================================================
--- head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:03 2014 (r270292)
+++ head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:24 2014 (r270293)
@@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
#include <dev/vt/vt.h>
#ifndef SC_NO_CUTPASTE
-struct mouse_cursor vt_default_mouse_pointer = {
+struct vt_mouse_cursor vt_default_mouse_pointer = {
.map = {
0x00, /* "__ " */
0x40, /* "_*_ " */
@@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_poi
0x0f, /* " ____" */
0x0f, /* " ____" */
},
- .w = 8,
- .h = 13,
+ .width = 8,
+ .height = 13,
};
#endif
Modified: head/sys/dev/vt/vt.h
==============================================================================
--- head/sys/dev/vt/vt.h Thu Aug 21 19:42:03 2014 (r270292)
+++ head/sys/dev/vt/vt.h Thu Aug 21 19:42:24 2014 (r270293)
@@ -284,6 +284,15 @@ struct vt_window {
* (VDF_TEXTMODE).
*/
+#ifndef SC_NO_CUTPASTE
+struct vt_mouse_cursor {
+ uint8_t map[64 * 64 / 8];
+ uint8_t mask[64 * 64 / 8];
+ uint8_t width;
+ uint8_t height;
+};
+#endif
+
typedef int vd_init_t(struct vt_device *vd);
typedef int vd_probe_t(struct vt_device *vd);
typedef void vd_postswitch_t(struct vt_device *vd);
@@ -377,15 +386,6 @@ struct vt_font {
unsigned int vf_refcount;
};
-#ifndef SC_NO_CUTPASTE
-struct mouse_cursor {
- uint8_t map[64 * 64 / 8];
- uint8_t mask[64 * 64 / 8];
- uint8_t w;
- uint8_t h;
-};
-#endif
-
const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c);
struct vt_font *vtfont_ref(struct vt_font *vf);
void vtfont_unref(struct vt_font *vf);
Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:03 2014 (r270292)
+++ head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:24 2014 (r270293)
@@ -134,7 +134,7 @@ extern unsigned char vt_logo_image[];
/* Font. */
extern struct vt_font vt_font_default;
#ifndef SC_NO_CUTPASTE
-extern struct mouse_cursor vt_default_mouse_pointer;
+extern struct vt_mouse_cursor vt_default_mouse_pointer;
#endif
static int signal_vt_rel(struct vt_window *);
@@ -853,7 +853,7 @@ vt_flush(struct vt_device *vd)
term_pos_t size;
term_char_t *r;
#ifndef SC_NO_CUTPASTE
- struct mouse_cursor *cursor;
+ struct vt_mouse_cursor *cursor;
int bpl, h, w;
#endif
@@ -940,13 +940,15 @@ vt_flush(struct vt_device *vd)
#ifndef SC_NO_CUTPASTE
if (cursor != NULL) {
- bpl = (cursor->w + 7) >> 3; /* Bytes per source line. */
- w = cursor->w;
- h = cursor->h;
+ bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */
+ w = cursor->width;
+ h = cursor->height;
- if ((vd->vd_mx + cursor->w) > (size.tp_col * vf->vf_width))
+ if ((vd->vd_mx + cursor->width) >
+ (size.tp_col * vf->vf_width))
w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1;
- if ((vd->vd_my + cursor->h) > (size.tp_row * vf->vf_height))
+ if ((vd->vd_my + cursor->height) >
+ (size.tp_row * vf->vf_height))
h = (size.tp_row * vf->vf_height) - vd->vd_my - 1;
vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl,
More information about the svn-src-all
mailing list