home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 1.ddi / FUNCS.EXE / CSCAPE / SOURCE / FNSPEC.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-07  |  1.0 KB  |  59 lines

  1. /*
  2.     fnspec.c
  3.  
  4.     % special_key
  5.  
  6.     C-scape 3.1
  7.     Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12.     11/19/88 jmd    Added mouse stuff
  13.  
  14.      6/07/89 jmd    renamed mouse codes
  15. */
  16.  
  17. #include <stdio.h>
  18.  
  19. #include "cscape.h"
  20. #include "scancode.h"
  21.  
  22. #include "helpdecl.h"
  23.  
  24. boolean special_key(sed, scancode)
  25.     sed_type sed;
  26.     int scancode;
  27. /*
  28.     effects:    Handles Special Keys
  29.  
  30.     returns:    TRUE if intercepted a key, FALSE otherwise.
  31.  
  32.     normally handles FN1 as help.
  33.     Intercepts mouse events
  34. */
  35. {
  36.     switch (scancode) {
  37.     case MOU_HERE:
  38.         /* The mouse was clicked in our sed,
  39.            the mouse handler has already Jumped to the clicked field
  40.            so we can just ignore this code
  41.         */
  42.         return(TRUE);
  43.  
  44.     case MOU_THERE:
  45.         /* Another window has requested control via the mouse, quit this sed */
  46.         sed_SetBaton(sed, 0);
  47.         sed_ToggleExit(sed);
  48.         return(TRUE);
  49.  
  50.     case FN1:
  51.         help_Show(sed_GetLabel(sed), sed_GetFieldNo(sed) + 1);
  52.         return(TRUE);
  53.  
  54.     default:
  55.         break;
  56.     }
  57.     return(FALSE);
  58. }
  59.