home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Developer CD v1.2
/
amidev_cd_12.iso
/
devcon
/
sanfrancisco_1989
/
sf-devcon89.1
/
commodities
/
lattice
/
cxsupp
/
hotkey.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-27
|
732b
|
43 lines
/* hotkey.c -- support function for creating Commodities hotkey triad */
#include "sysall.h"
#include "cx/cxusr.h"
#define D(x) ;
extern struct Library *CxBase;
CxObj *
HotKey(descr, port, ID)
char *descr;
struct MsgPort *port;
LONG ID;
{
CxObj *filter;
LONG error;
/* create filter */
filter = CxFilter( descr );
if (!filter)
{
D( printf("HotKey: Failed filter\n") );
return (NULL);
}
/* create sender */
AttachCxObj(filter, CxSender(port, ID) );
/* create swallow */
AttachCxObj(filter, CxTranslate(NULL) );
/* if any problems, delete all */
if (error = CxObjError(filter))
{
D( printf("accumulated filter error: %ld\n", error) );
DeleteCxObjAll(filter);
return (NULL);
}
return (filter);
}