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.

should only be called by Panther when it has released all active arrays withAS_RLS_FUNC.AS_RLS_FUNCAS_RLS_FUNC expects a routine that is called when Panther destroys an array.The routine should then free any resources allocated for the array. The returnvalue from this call is ignored. Thus, the scrolling driver must inform the userabout any failure and take the appropriate action–for example, exit theprogram.The input parameter is scrolldata, the pointer to the driver's internal buffer.Return value of 0 indicates success; -1 indicates failure.AS_SCMAX_FUNCNot currently used. Function should return -1.Scrolling Driver ExampleThe following code is an example of a scrolling driver:/* Scroll buffers hold field data of scrolling. New buffersare allocated as formerly empty offscreen elements are filled.Each buffer can hold several items, determined byi_per_buff = (SC_BUF_SIZE - SC_OVERHEAD) / (item_size + SC_BYTES)where item_size is the maximum (shifting) length of a field.The extra SC_BYTES hold VALIDED, MDT, and attribute informationfor a field scrolled offscreen. The constants are defined below *//* A buffer is allocated contiguously with its sc_buf_s.*/#define SC_BUF_SIZE 1024#define SC_LEN 0 /* length of an item if var.*/#define SC_ATTR 0 /* offset of saved attribute*/#define SC_BITS 2 /* offset of saved bits*/#define SC_BYTES SC_BITS+AS_VAL /* extra bytes per item*/#define SC_DATA SC_BYTES /* offset of field data*//* bits stored are:SELECTED (0x10)VALIDED (0x20)MDT (0x40)OPROTECT (0x80)PROTECT (0x0f) */<strong>Upgrade</strong> <strong>Guide</strong> A-9

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

Saved successfully!

Ooh no, something went wrong!