home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / eel / lenoil.arc / VISBELL.E < prev   
Encoding:
Internet Message Format  |  1988-12-09  |  2.3 KB

  1. From:    IN%"lenoil@APPLE.COM"  "Robert Lenoil"  9-DEC-1988 16:15
  2. To:    p150bk19@VB.CC.CMU.EDU
  3. Subj:    VISBELL.E
  4.  
  5. Received: from apple.com by VB.CC.CMU.EDU; Fri, 9 Dec 88 16:13 EST
  6. Received: by apple.com (5.59/25-eef) id AA17256; Fri, 9 Dec 88 13:10:56 PST
  7. Date: Fri, 9 Dec 88 13:10:56 PST
  8. From: Robert Lenoil <lenoil@APPLE.COM>
  9. Subject: VISBELL.E
  10. To: p150bk19@VB.CC.CMU.EDU
  11. Message-Id: <8812092110.AA17256@apple.com>
  12.  
  13. /* The following copyright and trademark notice applies to some of the code
  14.  * herein; all other material is Copyright (c) 1986, 1987 by Robert Lenoil,
  15.  * with free copying allowed for any purpose, provided that this copyright
  16.  * notice is included.
  17.  */
  18.  
  19. /************************************************************************
  20. * "Epsilon", "EEL" and "Lugaru" are trademarks of Lugaru Software, Ltd. *
  21. *                                                                       *
  22. *     Copyright (C) 1985 Lugaru Software Ltd.  All rights reserved.     *
  23. *                                                                       *
  24. * Limited permission is hereby granted to reproduce and modify this     *
  25. * copyrighted material provided that the resulting code is used only in *
  26. * conjunction with Lugaru products and that this notice is retained in  *
  27. * any such reproduction or modification.                                *
  28. ************************************************************************/
  29.  
  30. /*
  31.  * A visible bell for Epsilon
  32.  */
  33.  
  34. #include <eel.h>
  35.  
  36. /* This file modifies the following Epsilon commands/procedures:
  37. COMMAND              SOURCE FROM VERSION
  38. maybe_ding              3.1
  39.  
  40.    And adds the following commands/procedures:
  41. COMMAND           WRITTEN FOR VERSION
  42. flash                   3.1
  43. visible_bell            3.1
  44.  
  45.    And defines the following globals:
  46. GLOBAL            WRITTEN FOR VERSION
  47. bell_type               3.1
  48. */
  49.  
  50. /* Implement visible bell feature */
  51. #define VISIBLE 1
  52. int bell_type = !VISIBLE;
  53.  
  54. command visible_bell()
  55. {  bell_type = (has_arg? (iter != 0) : !bell_type);
  56.    say("Bell type is %s", bell_type? "visible" : "audible");
  57.    iter = 1;
  58. }
  59.  
  60. maybe_ding()
  61. {
  62.    if (want_bell)
  63.       if (bell_type == VISIBLE)
  64.          flash();
  65.       else
  66.          ding();
  67. }
  68.  
  69. flash()
  70. {  int tmp;
  71.  
  72.    tmp = normcolor;
  73.    normcolor = revcolor;
  74.    refresh();
  75.    normcolor = tmp;
  76.    refresh();
  77. }
  78.