AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

TRACK (3T) (AT&T UNIX PC only ) TRACK (3T) appropriate character scale values. Thus, values of 0,0 for the scaling parameters specify that all user-supplied coordinates are in characters. T_lastx and t_lasty are used internally by track to record the last known x,y position of the mouse. In particular, when track � returns to the caller, lastx and tasty will contain the position 1 . which caused the return. T_bicon is an optional icon to be used whenever the mouse is located in the background (not in any rectangle). T_umdata is used internally by track to record the state of the mouse parameters on T_BEGIN and to restore them on T_END. t_tkitems points to an array of track items (rectangles) which are described below. The list is terminated by a rectangle whose x, y, width, and height are all zero. T_curi is a pointer to the current track item. On call, track assumes the mouse is located within the rectangle pointed to by curi. On return, curi points to the new current rectangle. A value of 0 means the background. T_curi is set to 0 on T_BEGIN. Each track item (rectangle) has the following structure: typedef struct { unsigned short unsigned short unsigned short unsigned short struct icon int } tkitem_t; ti_x; ti_y; ti_w; ti_h; *ti_icon; ti_val; /* x position *I /* y position *I /* width *I /* height * I /* icon * I /* user value *I The first four parameters determine the location and size of the rectangle. 0,0 is the upper-left corner. Each of these parameters is scaled by the scaling factors. Ti_icon points to an optional icon to be associated with this rectangle. Whenever the mouse is located within the rectangle, this particular icon is displayed. Ti_val is a user-supplied value which is not used in the tracking process. FILES lusr lincludeltrack.h lusr lincludelsyslwindow .h lusr lincludelkcodes.h SEE ALSO tam(3T), window(7). DIAGNOSTICS Track returns a key code (see kcodes.h) which determines what key was pressed. 'Mouse' is returned when a mouse event - 2-

TRACK (3T) (AT&T UNIX PC only ) TRACK (3T ) occurred-the current item points to the track item in which the mouse is located (0 means the background). The button state and wakeup reason are also recorded. If a keyboard key is the cause of the return, these values are not necessarily updated. Track can also return TERR_IOCTL if a system ioctl fails, or TERR_OK when no error occurred on a T_BEGIN or T_END operation where no input was performed. - 3 -

TRACK (3T) (AT&T UNIX PC only ) TRACK (3T)<br />

appropriate character scale values. Thus, values of 0,0 for the<br />

scaling parameters specify that all user-supplied coordinates are in<br />

characters.<br />

T_lastx and t_lasty are used internally by track to record the last<br />

known x,y position of the mouse. In particular, when track �<br />

returns to the caller, lastx and tasty will contain the position 1 .<br />

which caused the return.<br />

T_bicon is an optional icon to be used whenever the mouse is<br />

located in the background (not in any rectangle).<br />

T_umdata is used internally by track to record the state of the<br />

mouse parameters on T_BEGIN and to restore them on T_END.<br />

t_tkitems points to an array of track items (rectangles) which are<br />

described below. The list is terminated by a rectangle whose x, y,<br />

width, and height are all zero.<br />

T_curi is a pointer to the current track item. On call, track<br />

assumes the mouse is located within the rectangle pointed to by<br />

curi. On return, curi points to the new current rectangle. A<br />

value of 0 means the background. T_curi is set to 0 on<br />

T_BEGIN.<br />

Each track item (rectangle) has the following structure:<br />

typedef struct<br />

{<br />

unsigned short<br />

unsigned short<br />

unsigned short<br />

unsigned short<br />

struct icon<br />

int<br />

} tkitem_t;<br />

ti_x;<br />

ti_y;<br />

ti_w;<br />

ti_h;<br />

*ti_icon;<br />

ti_val;<br />

/* x position *I<br />

/* y position *I<br />

/* width *I<br />

/* height * I<br />

/* icon * I<br />

/* user value *I<br />

The first four parameters determine the location and size of the<br />

rectangle. 0,0 is the upper-left corner. Each of these parameters<br />

is scaled by the scaling factors.<br />

Ti_icon points to an optional icon to be associated with this rectangle.<br />

Whenever the mouse is located within the rectangle, this<br />

particular icon is displayed.<br />

Ti_val is a user-supplied value which is not used in the tracking<br />

process.<br />

FILES<br />

lusr lincludeltrack.h<br />

lusr lincludelsyslwindow .h<br />

lusr lincludelkcodes.h<br />

SEE ALSO<br />

tam(3T), window(7).<br />

DIAGNOSTICS<br />

Track returns a key code (see kcodes.h) which determines what<br />

key was pressed. 'Mouse' is returned when a mouse event<br />

- 2-

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

Saved successfully!

Ooh no, something went wrong!