11.07.2015 Views

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

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.

Return ValuesThe scrolling driver generally returns 0 if the function is supported and it succeeds, -1if the function is not supported, and non-zero value if the function fails. Exceptions arenoted in the action code descriptions.Scroll Driver Action CodesThe interface to the scrolling driver is through the mechanism of various action codes.Each action code represents one particular functionality. Many actions are required toupdate members of the altsc_t structure that is passed to the driver. Although thescrolling driver has one entry point, almost all drivers are implement ed as a giantswitch statement that calls other routines.For an example, refer to page A-9, “Scrolling Driver Example.”The following sections describe the calling protocols and functionality expected forthe routines associated with the action codes.AS_CLEAR_FUNCNot currently used. Function should return -1.AS_DLT_FUNC, AS_INSRT_FUNCAS_DLT_FUNC and AS_INSRT_FUNC expect routines to delete and insert arrayoccurrences, respectively. The routines typically manipulate indexes or liststo implement the deletion/insertion.New entries that are inserted into thearray, or trailing occurrences that are left blank when occurrences are deleted,should have their attr, valids, and text parameters set from the values that arepassed in the structure. A NULL pointer for text indicates an empty string.The return value is the number of lines actually inserted/deleted; should equalnumber.Input parameters (and their descriptions) are:scrolldataitemnumberlenPointer to the driver's internal buffer.Occurrence number to start at–the first deletedoccurrence or first newly inserted occurrence.Number of occurrences to delete or insert.Length of the occurrence.<strong>Upgrade</strong> <strong>Guide</strong> A-5

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

Saved successfully!

Ooh no, something went wrong!