Epson Research and Development
Page 45
Vancouver Design Center
Programming Notes and Examples
S1D13504
Issue Date: 01/02/01
X19A-G-002-07
int seVirtInit(int device, int xVirt, long *yVirt)
Description: Creates a virtual display with the given horizontal size and determines the maximum
number of available lines.
Parameter:
device - registered device ID
xVirt - horizontal size of virtual display in pixels. Must be greater or equal to
physical size of display.
yVirt - seVirtInit() calculates the maximum number of lines available for virtual
display and returns value in yVirt.
Return Value: ERR_OK - operation completed with no problems
ERR_INVALID_REG_DEVICE - device argument is not valid.
ERR_HAL_BAD_ARG - argument xVirt is too large. Select xVirt such that the
Memory Address Offset register does not exceed 0x3ff. The maximum allowable
xVirt is 0x3ff * (16 / bpp). If bpp is 15, use the above equation with bpp = 16.
Note
seSetInit() must have been called before calling seVirtInit(). This is because the VNDP is used
for timing, and this would not be possible if the registers were not first initialized.
int seVirtMove(int device, BYTE WhichScreen, int x, int y)
Description: Pans or scrolls the virtual display.
Parameter:
device - registered device ID
WhichScreen - Use one of the following definitions: SCREEN1 or SCREEN2.
SCREEN1 is the top screen.
x - new starting X position in pixels
y - new starting Y position in pixels
Return Value: ERR_OK - operation completed with no problems
ERR_INVALID_REG_DEVICE - device argument is not valid.
ERR_HAL_BAD_ARG - argument WhichScreen is not SCREEN1 or SCREEN2.
- argument Y is too large.
- bpp is invalid in HAL structure (this would occur if the application changed the
registers directly instead of calling seSetBitsPerPixel()).
Note
seVirtInit() must have been called once before calling seVirtMove().