Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileXCONTROLStructuresCPXINFOA pointer to a CPX's CPXINFO structure must be returned by the cpx_init()function ('Set Only' CPX's return NULL). The CPXINFO structure is filled
in with pointers to user functions as follows:
typedef struct
{
WORD (*cpx_call)( GRECT * );
VOID (*cpx_draw)( GRECT * );
VOID (*cpx_wmove)( GRECT * );
VOID (*cpx_timer)( WORD * );
VOID (*cpx_key)( WORD, WORD, WORD * );
VOID (*cpx_button)( MRETS *, WORD * );
VOID (*cpx_m1)( MRETS *, WORD * );
VOID (*cpx_m2)( MRETS *, WORD * );
WORD (*cpx_hook)( WORD, WORD *, MRETS *, WORD *, WORD * );
VOID (*cpx_close)( WORD );
} CPXINFO;
Form CPX's use only cpx_call() and (optionally) cpx_close(). Event CPX'suse the remaining members. Members not being used should be set to NULL.
XCPBA pointer to the "XControl Parameter Block" is passed to the cpx_call()function. This pointer should be copied to a static variable on entry so
that other functions may utilize its members. XCPB is defined as follows:
typedef struct
{
WORD handle;
WORD booting;
WORD version;
WORD SkipRshFix;
VOID *reserve1;
VOID *reserve2;
VOID (*rsh_fix)( WORD, WORD, WORD, WORD, OBJECT *, TEDINFO *, char *,
ICONBLK *, BITBLK *, LONG *, LONG *, LONG *, VOID * );
VOID (*rsh_obfix)( OBJECT *, WORD );
WORD (*Popup)( char *items[], WORD, WORD, WORD, GRECT *, GRECT * );
VOID (*Sl_size)( OBJECT *, WORD, WORD, WORD, WORD, WORD, WORD );
VOID (*Sl_x)( OBJECT *, WORD, WORD, WORD, WORD, WORD, void (*)();
VOID (*Sl_y)( OBJECT *, WORD, WORD, WORD, WORD, WORD, void (*)() );
VOID (*Sl_arrow)( OBJECT *, WORD, WORD, WORD, WORD, WORD, WORD,
WORD *, WORD, void (*)() );
VOID (*Sl_dragx)( OBJECT *, WORD, WORD, WORD, WORD, WORD *,
void (*)() );
VOID (*Sl_dragy)( OBJECT *, WORD, WORD, WORD, WORD, WORD *,
void (*)() );
WORD (*Xform_do)( OBJECT *, WORD, WORD * );
GRECT * (*GetFirstRect)( GRECT * );
GRECT * (*GetNextRect)( VOID );
VOID (*Set_Evnt_Mask)( WORD, MOBLK *, MOBLK *, LONG );
WORD (*XGen_Alert)( WORD );
WORD (*CPX_Save)( VOID *, LONG );
VOID * (*Get_Buffer)( VOID );
WORD (*getcookie)( LONG, LONG * );
WORD Country_Code;
VOID (*MFsave)( WORD, MFORM * );
} XCPB;
Almost all of XCPB's members are pointers to utility functions covered in
the XCONTROL Function Reference at the end of this chapter. The remaining
utilized members have the following meaning:
XCPB Member Meaning
handle This value contains the physical workstation handle returned
by graf_handle() to the Control Panel for use in calling
v_opnvwk().
booting When XCONTROL is initializing as the result of a power-on,
reset, or resolution change, it loads each CPX and calls its
cpx_init() function with booting set to TRUE. At all other
times, XCONTROL sets booting to FALSE.
SkipRshFix When a CPX is first called after being loaded, its
SkipRshFix flag is set to FALSE. The application should then
use xcpb->rsh_fix() to fix its internal resource tree.
xcpb->rsh_fix() sets the CPX's SkipRshFlag to TRUE so that
the CPX can skip this step on subsequent calls.
Country_Code This value indicates the country which this version of the
Control Panel was compiled for as follows:
Country_Code Country
0 USA
1 Germany
2 France
3 United Kingdom
4 Spain
5 Italy
6 Sweden
7 Swiss (French)
8 Swiss (German)
9 Turkey
10 Finland
11 Norway
12 Denmark
13 Saudi Arabia
14 Holland