•  Back 
  •  VDI Input 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
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-Filevex_curv()
vex_motv()
vex_butv()                                                              VDI

Syntax

VOID vex_butv( handle, butv, old_butv )
WORD handle;
WORD (*butv)( (WORD) bstate );
WORD (**old_butv)( (WORD) bstate );

Function      vex_butv() installs a routine which is called by the VDI
              every time a mouse button is pressed.

Opcode        125

Availability  Supported by all screen drivers.

Parameters    handle specifies a valid physical workstation handle.
              butv points to a user-defined button-click handler routine.
              The address pointed to by old_butv will be filled in with
              the address of the old button-click handler.

Binding       contrl[0] = 125;
              contrl[1] = contrl[3] = 0;
              contrl[6] = handle;
              contrl[7] = (WORD)((LONG)butv >> 16);
              contrl[8] = (WORD)((LONG)butv);

              vdi();

              *(LONG *)old_butv = (LONG)(((LONG)contrl[9] << 16) | (LONG)contrl[10]);

Comments      Upon entry to butv, the mouse status is contained in 68x00
              register D0 (in the same format as the button return value
              in vq_mouse() ). A 'C' handler should, therefore, be sure
              to specify register calling parameters for this function.
              Any registers which will be modifed should be saved and
              restored upon function exit. The routine may call the BIOS
              and/or XBIOS sparingly but should not call the AES, VDI, or
              GEMDOS.

See Also      vex_curv(), vex_motv()

Group         VDI Input