home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
cdity
/
yak
/
src
/
mmb_shift.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-12
|
889b
|
45 lines
/*
* MMB_Shift.c
*
* Translates an LMB-MMB event into an Shift LMB-MMB one to allow easy multi selection under
* Workbench or BrowserII.
*
*/
#include <clib/alib_protos.h>
#include <libraries/commodities.h>
#include <devices/inputevent.h>
#include <proto/commodities.h>
#include "yak.h"
static CxObj *LMB_MMB_Filter;
SAVEDS void
MMBShiftFunction(register CxMsg *cxm, CxObj *co)
{
((struct InputEvent *)CxMsgData(cxm))->ie_Qualifier |= IEQUALIFIER_LSHIFT;
}
__regargs void
ToggleMMBShift( BOOL toggle)
{
if (toggle)
{
/* Activate MMB Shift */
if (LMB_MMB_Filter = CxFilter("RawMouse LeftButton MidButton Mouse_LeftPress"))
{
AttachCxObj(broker, LMB_MMB_Filter);
AttachCxObj(LMB_MMB_Filter, CxCustom(MMBShiftFunction, 0L));
}
}
else
{
/* Unactivate MMB Shift */
DeleteCxObjAll(LMB_MMB_Filter); /* LMB_MMB_Filter may be NULL, it doesn't matter */
}
}