|
| | | | M E M _ A C T _ D A T A
| | | | | SOURCE: qdev_structures.txt 1.10 (15/08/2014) English
struct mem_act_data
{
LONG ad_id;
LONG ad_cols;
LONG ad_rows;
LONG ad_xpos;
LONG ad_ypos;
LONG ad_size;
LONG ad_bytes;
LONG ad_tval;
LONG ad_tlen;
LONG ad_toon;
LONG ad_tooc;
LONG ad_mode;
UQUAD ad_fill;
UQUAD ad_tsgr;
UQUAD ad_tact;
UQUAD *ad_treg;
UBYTE *ad_ereg;
UBYTE *ad_eend;
void *(*ad_mmfp)(void *, const void *, size_t);
void (*ad_clrfp)(void *, LONG, LONG);
void (*ad_scrfp)(void *, LONG);
void (*ad_oplfp)(void *, LONG);
void (*ad_opcfp)(void *, LONG);
void (*ad_ucbfp)(void *, UQUAD *);
void (*ad_uokfp)(void *, LONG);
void *ad_udata;
LONG ad_tab[QDEV_MEM_PRV_TERMTAB];
UBYTE ad_exp[QDEV_MEM_PRV_TERMEXP];
UBYTE ad_buf[QDEV_MEM_PRV_TERMMIN];
};
ad_id - Terminal identification val. as defined in QDEV_MEM_PRV_TERMID.
ad_cols - Total terminal columns.
ad_rows - Total terminal rows.
ad_xpos - Current cursor column. Please note that this value may be found
out of range for a brief moment when examined directly during
'Write()' that just takes place!
ad_ypos - Current cursor row. Please note that this value may be found
out of range for a brief moment when examined directly during
'Write()' that just takes place!
as_size - Real size of the 'ad_buf' area. This value is always multiple
of 'sizeof(UQUAD)'.
ad_bytes - Logical size of terminal on per byte basis(ad_cols * ad_rows).
ad_tval - Temporary ANSI sequence parameter collection. This is used when
parsing the sequence.
ad_tlen - Size of the 'ad_tab' array at this very moment. No. of params
collected.
ad_toon - Out-of-node parameter bitfield. This is used to track params
that were left without value, like: ESC[;6H where -line- param.
was ommited, so it is possible to use 'ad_tab[0]' as -column-.
ad_tooc - Out-of-node bit counter. Counter gets shifted 1 bit left each
time parameter switch(';') is detected.
ad_mode - Basic terminal modes as flags such as LNM, AWM, AWS and G1.
ad_fill - Terminal fill pattern. This is a bitfield and character store
at the same time.
ad_tsgr - Terminal SGR tracker. Used when dealing with non-terminated
sequences where cursor is usually rewinded to particular place.
ad_tact - Terminal SGR active tracker. This only tracks activators that
are then cleared after each write cycle.
ad_treg - Terminal tracking register is reponsible for keeping an eye on
last byte, so position change can be easily noticed just by
comparing the addresses.
ad_ereg - Sequence expansion start ptr that is mostly tied to 'ad_exp'.
ad_eend - Sequence expansion end pointer that tells how big is the stream
of sequences for this very terminal byte.
ad_mmfp - Memory move function pointer. By default points at 'memmove()',
and the argument template is UNIX-like. This FP cannot be NULL!
ad_clrfp - Terminal clear function pointer. The routine assigned to this
FP is responsible for clearing parts of the terminal. Argument
template is: 'ad_clrfp(ad, start, end)' where 'ad' is the term.
area pointer, 'start' is the absolute byte to start clearing at
and 'end' is the absolute byte to stop clearing at. Function is
protected from overflows. This FP cannot be NULL!
ad_scrfp - Terminal scroll function pointer. This routine allows to scroll
on line-by-line-from-top-or-bottom basis only. The template is
as follows: 'ad_clrfp(ad, lines)' where 'ad' is terminal stuff
and 'lines' amount of lines to scroll. Note that 'lines' can be
negative, so that scroll takes place the other way around. This
FP cannot be NULL!
ad_oplfp - Insert/delete lines function pointer. This routine allows to
insert or delete lines and thus possibly scroll the terminal at
any point according to curr. coords(ad_xpos, ad_ypos). Template
and restrictions same as in 'ad_scrfp'.
ad_opcfp - Insert/delete characters function pointer. This routine allows
to insert or delete characters in a given line according to
curr. coords(ad_xpos, ad_ypos). Template: 'ad_opcfp(ad, chars)'
where 'chars' can be negative which means delete. This FP must
not be NULL!
ad_ucbfp - Usercode function pointer of template: 'ad_ucbfp(ad, termbyte)'
This callback will be called whenever ASCII character was put
to the terminal. Remember though that code pointed to by will
be executed as pseudo-interrupt which should be treated like
a software interrupt if terminal is being used through
'mem_openifh()'! By default the FP is NULL.
ad_uokfp - Usercode function pointer of template: 'ad_uokfp(ad, size)'.
This callback gets called after the write did finish. This may
also be executed from under the pseudo-interrupt! By default
the FP is NULL.
ad_udata - General purpose user pointer as passed to the 'ad_ucbfp()' and
'ad_uokfp()'. Set to NULL by default.
ad_tab - ANSI sequence parameter table.
ad_exp - ANSI sequence expasion buffer that is used when reading off the
terminal.
ad_buf - Terminal char space where each "byte" is an UQUAD that combines
bitfield and real character.
| |
| | | | |
|