Advanced VIO (AVIO) functions are used to display characters. These functions
must be supported for Display DCs. Hardcopy drivers do not support AVIO
functions. When writing to an AVIO presentation space, an application must
ensure that windows containing alphanumeric data are device-cell-aligned,
where appropriate. The presentation driver can determine whether any characters
that are not cell-aligned are visible. Most column, row, length, width,
and height values correspond to cells within the presentation space Logical
Video Buffer (LVB), whose origin is assumed to be at the bottom-left corner
of the buffer (0,0).
The presentation driver is expected to clip alphanumeric data to the DC
region. This is performed in the same way as it is for normal graphics,
by enumerating the rectangles using GreGetClipRects and clipping each line
to a single rectangle. Although the presentation driver is neither expected
to test for correlation hits nor to accumulate GPI_BOUNDS, it should accumulate
USER_BOUNDS for AVIO functions if the COM_ALT_BOUNDS command flag is set.
The VIO presentation space is passed to the display driver as a pointer
to a VioPresentationSpace structure. The display driver uses this structure
to extract the current state data to allow it to update the display. The
VioPresentationSpace structure is defined as:
PresentationSpaceLock
Lock (not used by the presentation
driver).
pLVB
Pointer to
the logical video buffer (LVB). The LVB is a two-dimensional array of character
cells and is assumed to begin at offset 0 within the segment. The presentation
driver must not alter the contents of this field.
pBVSCB
Not used by the presentation driver.
rgfAVio
Not used by the presentation driver.
CellByteSize
Size in bytes of a cell in the LVB. This value is
either 2 or 4. The presentation driver must not alter the contents of this
field.
BufferRowCount
Number
of cell rows in the logical video buffer. The presentation driver must not
alter the contents of this field.
BufferColumnCount
Number of cell columns in the logical video buffer.
The presentation driver must not alter the contents of this field.
WindowOriginRow
Row index for the logical video buffer. This field,
together with the parameter WindowOriginColumn, indicates the logical video
buffer cell that is drawn in the bottom left of the window's client area.
The presentation driver must not alter the contents of this field.
WindowOriginColumn
Column index for logical video buffer (see WindowOriginRow).
The presentation driver must not alter the contents of this field.
TextCursorRow
Row coordinate of flashing text cursor relative
to the logical video buffer. The presentation driver must not alter the
contents of this field.
TextCursorColumn
Column
coordinate of flashing text cursor relative to the logical video buffer.
The presentation driver must not alter the contents of this field.
TextCursorStartLine
First scan line of a character-cell image overlaid
by the text cursor. Lines in the cell image are numbered from top to bottom.
The first line is 0. The presentation driver must not alter the contents
of this field.
TextCursorEndLine
Last
scan line of a character-cell image, overlaid by the text cursor. The presentation
driver must not alter the contents of this field.
TextCursorWidth
Width of text cursor in pels. The presentation driver
must not alter the contents of this field.
TextCursorVisible
Indicates whether the cursor is visible (nonzero)
or invisible (zero). The presentation driver must not alter the contents
of this field.
CellImageHeight
Height
of character cell in pels. When the value passed is 0 or invalid, the presentation
driver should reset it to the device default value.
CellImageWidth
Width of character cell in pels. When the value
passed is 0 or invalid, the presentation driver should reset it to the device
default value.
CodePageID
ID
of current code page for this presentation space. When the value passed
is 0 or invalid, the presentation driver should reset it to the device default
value.
WindowHeight
Not
used by the presentation driver.
WindowWidth
Not
used by the presentation driver.
hConsoleDisplayContext
Device context handle associated with the presentation
space. The presentation driver must not alter the contents of this field.
hVioWindow
Not used by the
display driver.
RowOrgLatch
ColOrgLatch
Window-origin
coordinates (WindowOriginRow and WindowOriginColumn) saved on completion
of the last call to GreUpdateCursor. RowOrgLatch and ColOrgLatch are used
by the display driver to record the state of the currently displayed cursor.
They are interrogated by GreUpdateCursor to determine whether the cursor
has moved.
CursorRow
CursorCol
Cursor coordinates (TextCursorRow and TextCursorColumn)
saved on completion of the last call to GreUpdateCursor. These fields are
used by the display driver to record the state of the currently displayed
cursor so that it can be successfully erased.
CursorStartLine
CursorEndLine
Cursor start and end lines (TextCursorStartLine
and TextCursorEndLine) saved on completion of the last call to GreUpdateCursor.
These fields are used by the display driver to record the state of the currently
displayed cursor so that it can be successfully erased.
CursorWidth
Cursor width (TextCursorWidth) saved on completion
of the last call to GreUpdateCursor. This field is used by the display driver
to record the state of the currently displayed cursor so that it can be
successfully erased.
PartialCellAdjust
This
is a negative value reflecting the partial cell height that must be below
the bottom of the window to ensure that a complete cell is positioned at
the top of the window (actual window height = WindowHeight rounded up to
next complete character cell - PartialCellAdjust). The presentation driver
must not alter the contents of this field.
XLatch
YLatch
Pel
coordinates of the bottom-left corner of the cursor rectangle relative to
the bottom-left corner of the window.
WidthLatch
HeightLatch
The height and width in pels of the cursor saved
on completion of the last call to GreUpdateCursor. These are taken to be
CellImageHeight and the difference between TextCursorStartLine and TextCursorEndLine,
taking account of any wrapping. The width and height latches are used by
GreUpdateCursor to record the screen region corresponding to an exclusive-OR
cursor.
CellHeightLatch
The
height in pels of the character cell for which the cursor was last drawn.
This parameter is used to detect cell height changes. These values were
saved on completion of the last call to GreUpdateCursor.
rgfShieldStates
Flags:
CursorShowing (0x0001)
Cursor is visible on the
screen. This flag is maintained by the display driver.
fHasTheFocus
(0x0002)
This window has the input focus. This flag
is not modified by the display driver.
fCursorIsOn
(0x0004)
Set to indicate that this is the ON phase
of the blink cycle. The cursor should be invisible during the OFF phase
of the blink cycle. This flag is not modified by the display driver.
pFontsLoaded[3]
Array of pointers for AVIO fonts 1, 2, and 3.
pMapFontsLoaded[3]
Array of pointers to code page maps for AVIO Fonts
1, 2, and 3.
FormatID
Presentation-space
format. This identifies the format of the attribute bytes in the LVB, as
follows:
0H
0H
70H
The
presentation driver must not alter the value of this field.
lpNLSExt
Pointer to a National Language Support (NLS) extension
structure where Double-Byte Character Set (DBCS) environment vectors are
set for AVIO Fonts 1, 2, and 3. If the display driver is required to display
DBCS, it must maintain the array of DBCSEvInfox4x, instead of DBCSEvInfox0x.
When the display driver provides NLS, it must set the DBCS vectors for lcid
1-3.
Each character cell is contained in a two-byte or four-byte array in the
LVB. The format of the character-cell array is:
Code Point
Position of the character in the code
table.
CGA Attribute Byte
Character
attributes. The four low-order bits represent the foreground color and the
high-order bits represent the character background color. Each 4-bit color
value corresponds to an explicit 24-bit RGB value. The RGB values are defined
within the graphics engine and match the colors available on a CGA device.
Extended Attribute Byte
Applies
only to four-byte cells. It is defined as:
Bit 7
Bit 6
Bit
4
Background transparency. When set, the background
is transparent. When not set, the background is opaque.
Bits
1-0
Character Set 0, 1, 2, or 3.
Extended
Attribute Byte