Page 118
Epson Research and Development
Vancouver Design Center
DWORD seGetSurfaceOffsetAddress(void)
Description:
This function returns the offset, from the first byte of display memory to the first byte of
memory associated with the active display surface.
Parameters:
None.
Return Value:
The return value is the offset, in bytes, from the start of display memory to the start of the
active surface. An address of 0 indicates the surface starts in the first byte of display buffer
memory.
Note
This function also returns 0 if there is no memory allocated to an active surface. You
must ensure that memory is allocated before calling seGetSurfaceOffsetAddress().
DWORD seAllocLcdSurface(DWORD Size)
DWORD seAllocCrtSurface(DWORD Size)
DWORD seAllocTvSurface(DWORD Size)
Description:
These functions allocate display buffer memory for a surface. If the surface previously had
memory allocated then that memory is first released. Newly allocated memory is not
cleared.
Call seAllocLcdSurface(), seAllocCrtSurface(), and seAllocTvSurface() to allocate the
requested amount of display memory for the indicated surface.
These functions allow an application to bypass the automatic surface allocation which
occurs when functions such as seInitReg() or seSetBitsPerPixel() are called.
Parameters:
Size
The size in bytes of the requested memory block.
Return Value:
If the memory allocation succeeds then the return value is the linear address of the allo-
cated memory. If the allocation fails then the return value is 0. A linear address is a 32-bit
offset, in CPU address space.
int seFreeSurface(DWORD LinearAddress)
Description:
This function can be called to free any previously allocated display buffer memory.
This function is intended to complement seAllocLcdSurface(), seAllocCrtSurface(), and
seAllocTvSurface(). seFreeSurface can be used to free memory allocated for the hardware
cursor and ink layer however it is recommended that seFreeCursor() or seFreeInk() be
called for these surfaces.
After calling one of these functions the application must switch the active surface to one
which has memory allocated before calling any drawing functions.
Parameters:
LinearAddress A valid linear address. The linear address is a dword returned to the
application by any surface allocation call.
Return Value:
ERR_OK
Function completed successfully.
ERR_FAILED Function failed.
S1D13506
X25B-G-003-03
Programming Notes and Examples
Issue Date: 01/02/06