home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Developer Kits / Quark XTLite / CopyDesk XTLite / EventShell Folder / EventShell.c < prev   
Encoding:
C/C++ Source or Header  |  1994-03-16  |  1.7 KB  |  61 lines  |  [TEXT/KAHL]

  1. /**************************************************************************\
  2. **
  3. **  EventShell.c
  4. **
  5. **  Sample XTLite bulb to use as a starting point to handle idle events.
  6. **
  7. **
  8. **  Copyright © 1993,1994 Quark Incorporated
  9. **  All Rights Reserved
  10. **
  11. \**************************************************************************/
  12.  
  13. #include "XTLite.h"
  14.  
  15. /**************************************************************************\
  16. **
  17. **  setupidle
  18. **
  19. **  Setup for handling Idle calls.
  20. **
  21. **  Entry: None.
  22. **
  23. **  Exit:  TRUE if you want to handle Idle calls; FALSE if not.
  24. **
  25. \**************************************************************************/
  26. bool8 setupidle(void)
  27. {
  28.     return (TRUE);
  29. }
  30.  
  31. void idlecall(EventRecord *myevent)
  32. {
  33.     /* Insert your code here */
  34.     if(myevent->what == mouseDown)
  35.         SysBeep(0);
  36. }
  37.  
  38. /**************************************************************************\
  39. **
  40. **  Remaining code tells XPress we don't want to handle filters or menus.
  41. **
  42. \**************************************************************************/
  43. void setupfilter(OSType *fcreator,OSType *ftype,bool8 *importok,bool8 *exportok,
  44.     Str255 getstr,Str255 savestr,Str255 suffixstr)
  45. {
  46.     *importok = *exportok = FALSE;
  47. }
  48. uchar readchar(int16 fnum) {}
  49. void startread(int16 fnum) {}
  50. void readtext(int16 fnum,Str255 textbuffer,int32 *count,filtertxtattrib *textattribs,
  51.     filterparaattrib *paraattribs,RGBColor *textcolor) {}
  52. void endread(int16 fnum) {}
  53. void startwrite(int16 fnum) {}
  54. void writetext(int16 fnum,Str255 textbuffer,int32 count,filtertxtattrib *textattribs,
  55.     filterparaattrib *paraattribs,RGBColor *textcolor) {}
  56. void endwrite(int16 fnum) {}
  57. bool8 setupmenu(Str255 menustr)
  58. {
  59.     return (FALSE);
  60. }
  61. void menucall(void) {}