home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff298.lzh / DClock / DClock.h < prev    next >
C/C++ Source or Header  |  1989-12-29  |  2KB  |  82 lines

  1. /*
  2.  *    DClock.h ------    Rather senseless include file if you don't have the
  3.  *            DClock 'C' source code.
  4.  */
  5.  
  6. #include <intuition/intuitionbase.h>
  7. #include <libraries/dosextens.h>
  8. #include <devices/inputevent.h>
  9. #include <graphics/gfxbase.h>
  10. #include <exec/interrupts.h>
  11. #include <devices/input.h>
  12. #include <devices/audio.h>
  13. #include <exec/execbase.h>
  14. #include <exec/memory.h>
  15.  
  16.     /* Forward declarations. */
  17.  
  18. extern struct Library    *OpenLibrary();
  19. extern struct Window    *OpenWindow();
  20. extern struct MsgPort    *CreatePort();
  21. extern struct MsgPort    *FindPort();
  22. extern struct Message    *GetMsg();
  23. extern struct Task    *FindTask();
  24. extern void        *AllocMem();
  25. extern struct IOStdReq    *CreateStdIO();
  26. extern ULONG         Wait();
  27. extern ULONG         AvailMem();
  28.  
  29.     /* Global MessagePort identifier. */
  30.  
  31. #define PORTNAME "DPort"
  32.  
  33.     /* Current DClock revision. */
  34.  
  35. #define REVISION 5
  36.  
  37.     /* Global MessagePort structure. Note: if you are up to
  38.      * expand this structure, add the new identifiers at the
  39.      * bottom. This will insure upward-compatibility with
  40.      * older DClock and DClock-Handler revisions.
  41.      */
  42.  
  43. struct DSeg
  44. {
  45.     /*******************************************
  46.      * Vital data! Don't change ANYTHING here! *
  47.      *******************************************/
  48.  
  49.     struct MsgPort     Port;        /* Global messageport. */
  50.  
  51.     BPTR         Segment;    /* Pointer to handler segment. */
  52.     LONG         SegSize;    /* Size of DSeg structure. */
  53.  
  54.     struct Task    *Father;    /* Calling process. */
  55.     struct Task    *Child;        /* Waiting process (usually handler). */
  56.  
  57.     ULONG         LastSecs;    /* Timer control. */
  58.     BYTE         Priority;    /* Handler priority. */
  59.     UBYTE         Revision;    /* Could come in handy for future revisions. */
  60.  
  61.     /***********************************************
  62.      * Custom data, open to expansion and changes. *
  63.      ***********************************************/
  64.  
  65.     UBYTE         Beep;        /* Audible beep selected? */
  66.     UBYTE         Click;        /* Keyboard click selected? */
  67.  
  68.     UWORD         ClickVolume;    /* Volume of keyboard click. */
  69.  
  70.     UBYTE         TextColour;    /* Guess what? */
  71.     UBYTE         BackColour;    /* Guess what? */
  72.  
  73.     UBYTE         Alarm;        /* Alarm clock enabled? */
  74.     UBYTE         AlarmHour;    /* Alarm time hour. */
  75.     UBYTE         AlarmMinute;    /* Alarm time minute. */
  76.     UBYTE         AlarmSecond;    /* Alarm time second. */
  77.  
  78.     /***********************************
  79.      * Append your custom flags below. *
  80.      ***********************************/
  81. };
  82.