12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VCONS (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> VCONS (9)The callback needs to have this form:void init_screen(void ∗cookie , struct vcons_screen ∗scr , int existing , long∗defattr)and should be stored in the init_screen member found in struct vcons_data. The arguments are:cookieis the cookie passed to vcons_init()scr points to the struct vcons_screen being added, its scr_ri member, a structrasops_info, needs to be filled in.existing is non-zero if the screen already exists and is only added to the list.defattrpoints to the screen’s default text attribute. It’s filled in by vcons_init_screen() by callingthe alloc_attr() method found in struct rasops_info.When attaching a wsdisplay(9) the accesscookie member of the structwsemuldisplaydev_attach_args passed to config_found() needs to be a pointer to the driver’sstruct vcons_data.The following members of struct vcons_screen may be of interest to drivers:scr_riscr_cookiescr_vdscr_flagsscr_statusSEE ALSOwscons(4), wsdisplay(4)contains the struct rasops_info describing the screen’s geometry, access methodsand so on.the value passed as cookie to vcons_init(). Usually the driver’s softc.the driver’s struct vcons_data.can be zero or any combination of:VCONS_NO_REDRAW don’t call vcons_redraw_screen() when thisscreen becomes visible.VCONS_SCREEN_IS_STATIC don’t free(9) this screen’s structvcons_screen in free_screen() - useful if thescreen has been statically allocated.currently contains only one flag, VCONS_IS_VISIBLE, which is set when the screen isvisible.<strong>NetBSD</strong> 3.0 February 12, 2006 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!