Index Index for
Section 9
Index Alphabetical
listing for I
Bottom of page Bottom of
page

init_screen(9r)

NAME

init_screen - Graphics: Initializes the screen

SYNOPSIS

int (*ws_screen_functions->init_screen)( caddr_t screen_handle, ws_screen_descriptor *screen );

ARGUMENTS

screen_handle Specifies the virtual address (handle) of device-specific information. Typically this is a pointer to a private data structure that may contain information such as the address of the hardware, state information, and other information that may be shared between drivers. The Workstation Subsystem allows separate handles for the cursor, colormap, and the screen functions. screen Specifies a pointer to the ws_screen_descriptor structure, which describes the attributes of the screen.

DATA STRUCTURES

The init_screen function accesses the ws_screen_descriptor structure defined in /usr/sys/include/sys/workstation.h.

DESCRIPTION

The Workstation Subsystem calls the init_screen function when the graphics screen is first initialized.

RETURN VALUES

If successful, the init_screen function returns 0 (zero). If unsuccessful, it returns -1.

EXAMPLES

The following code is from the Compaq implementation of init_screen in the myvga example driver: myvga_init_screen(caddr_t screen_handle, ws_screen_descriptor *screen) { register struct myvga_type *scp = (struct myvga_type *)screen_handle; register ws_screen_descriptor *sp = &scp->screen; if (myvga_developer_debug) printf("myvga_init_screen: entry\n"); /* * Save and restore the standard VGA registers * to ensure they get set up, particularly for * the case when in serial console mode and the * server is started. */ /* * Save the MYVGA register contents left behind by * the console. */ VGA_save_registers(scp->orig_state); /* * Reset the registers to text mode 3 values. */ VGA_restore_registers(scp->new_state); return 0; }

FILES

/usr/sys/include/sys/workstation.h /usr/sys/include/sys/wsdevice.h

SEE ALSO

Data Structures: ws_screen_functions(9s)

Index Index for
Section 9
Index Alphabetical
listing for I
Top of page Top of
page