src/dosmouse.c
/***************************************************************/
/*                      B u t t o n T i m e r                  */
/* This function is used with the mouse chording machinery.    */
/* This function is the timer interrupt handler. When a button */
/* event happens we will wait to report it until the next      */
/* timeout happens. We will thus obtain the ``rubbery feeling''*/
/* that proponents of chording so desire.                      */
/***************************************************************/
B u t t o n T i m e r
This function is used with the mouse chording machinery.
This function is the timer interrupt handler. When a button
event happens we will wait to report it until the next
timeout happens. We will thus obtain the ``rubbery feeling''
that proponents of chording so desire.
B u t t o n T i m e r This function is used with the mouse chording machinery . This function is the timer interrupt handler . When a button event happens we will wait to report it until the next timeout happens . We will thus obtain the ` ` rubbery feeling ' ' that proponents of chording so desire .
void ButtonTimer() {
  if (currentmouse->Button.RunTimer)
    if (currentmouse->Button.tick-- <= 0) {
      currentmouse->Button.RunTimer = FALSE; 
      currentmouse->Button.Left |= currentmouse->Button.StateLeft;
      currentmouse->Button.Right |= currentmouse->Button.StateRight;
      if (currentmouse->Button.StateLeft && currentmouse->Button.StateRight) {
        currentmouse->Button.Left = FALSE;
        currentmouse->Button.Right = FALSE;
        currentmouse->Button.Middle = TRUE;
      }
      currentmouse->Button.StateLeft = FALSE;
      currentmouse->Button.StateRight = FALSE;
      MouseButtonSignal(currentmouse);
    }
  _chain_intr(currentmouse->Button.NextHandler);
}
void ButtonTimer ( ) { if ( currentmouse -> Button . RunTimer ) if ( currentmouse -> Button . tick -- <= 0 ) { currentmouse -> Button . RunTimer = FALSE ; currentmouse -> Button . Left |= currentmouse -> Button . StateLeft ; currentmouse -> Button . Right |= currentmouse -> Button . StateRight ; if ( currentmouse -> Button . StateLeft && currentmouse -> Button . StateRight ) { currentmouse -> Button . Left = FALSE ; currentmouse -> Button . Right = FALSE ; currentmouse -> Button . Middle = TRUE ; } currentmouse -> Button . StateLeft = FALSE ; currentmouse -> Button . StateRight = FALSE ; MouseButtonSignal ( currentmouse ) ; } _chain_intr ( currentmouse -> Button . NextHandler ) ; }
B u t t o n T i m e r
This function is used with the mouse chording machinery.
B u t t o n T i m e r This function is used with the mouse chording machinery .
/* Turn the timer off. */ /* Mouse chording code. If at the end of the timeout
         the left and right buttons are down we signal middle
         button and bring the others up. */ /* Are L & R down? */ /* Did L & R go up after a simulated M */ /*          if((currentmouse->Button.Middle &&
                            !(currentmouse->Button.StateLeft ||
                          currentmouse->Button.StateRight)))
                    {
                      currentmouse->Button.Left = FALSE;
                      currentmouse->Button.Right = FALSE;
                      currentmouse->Button.Middle = FALSE;
                    }
      */