home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff398.lzh / DClock / PreInclude.c < prev    next >
C/C++ Source or Header  |  1990-11-01  |  5KB  |  166 lines

  1. /* PreInclude.c *************************************************************
  2.  *
  3.  *    PreInclude.c ----------    Source for precompiled header file.
  4.  *
  5.  *    Author ----------------    Olaf 'Olsen' Barthel, MXM
  6.  *                Brabeckstrasse 35
  7.  *                D-3000 Hannover 71
  8.  *
  9.  *                Federal Republic of Germany
  10.  *
  11.  *    This program truly is in the PUBLIC DOMAIN. Written on a cold
  12.  *    and damp September evening, hoping the next morning would  be
  13.  *    better.
  14.  *
  15.  *    Compiled using Aztec C 5.0b, CygnusEd Professional 2 & ARexx.
  16.  *
  17.  ***************************************************************************/
  18.  
  19. #define __NO_PRAGMAS 1
  20.  
  21. #include <intuition/intuitionbase.h>
  22. #include <libraries/rexxhostbase.h>
  23. #include <libraries/dosextens.h>
  24. #include <workbench/workbench.h>
  25. #include <devices/inputevent.h>
  26. #include <graphics/gfxmacros.h>
  27. #include <libraries/arpbase.h>
  28. #include <workbench/startup.h>
  29. #include <graphics/gfxbase.h>
  30. #include <devices/narrator.h>
  31. #include <exec/interrupts.h>
  32. #include <devices/conunit.h>
  33. #include <devices/input.h>
  34. #include <devices/audio.h>
  35. #include <exec/execbase.h>
  36. #include <devices/timer.h>
  37. #include <hardware/cia.h>
  38. #include <exec/memory.h>
  39.  
  40. #include <functions.h>
  41.  
  42. #include <stdlib.h>
  43. #include <string.h>
  44. #include <stdio.h>
  45. #include <ctype.h>
  46.  
  47.     /* Global MessagePort identifier. */
  48.  
  49. #define PORTNAME "DPort"
  50.  
  51.     /* Current DClock revision. */
  52.  
  53. #define REVISION 29
  54.  
  55.     /* Raster size macro. */
  56.  
  57. #define Byte(Width) (((Width + 15) >> 4) << 1)
  58.  
  59.     /* Key combinations (didn't like typing them again and again). */
  60.  
  61. #define RIGHT_AMIGA    (IEQUALIFIER_RELATIVEMOUSE | IEQUALIFIER_RCOMMAND)
  62. #define RIGHT_ALT    (IEQUALIFIER_RELATIVEMOUSE | IEQUALIFIER_RALT)
  63.  
  64.     /* A date information tag. */
  65.  
  66. struct DateTag
  67. {
  68.     SHORT    Year;        /* Year (e.g. 1990). */
  69.     BYTE    Month;        /* Month of year (0-11) */
  70.     BYTE    Day;        /* Day in month (1-31) */
  71.  
  72.     BYTE    Hour;        /* 0-23 */
  73.     BYTE    Minute;        /* 0-59 */
  74.     BYTE    Second;        /* 0-59 */
  75.  
  76.     BYTE    Weekday;    /* Day of week (Sunday = 0) */
  77. };
  78.  
  79.     /* Definitions for AmigaDOS date conversion routine. */
  80.  
  81. #define MINS_PER_HOUR    60
  82. #define TICS_PER_SEC    50
  83. #define DAYS_PER_WEEK    7
  84.  
  85.     /* Days from Jan.1, 0000 to Jan.1, 1978 */
  86.  
  87. #define DDELTA        722449
  88.  
  89.     /* Global MsgPort structure. Note: if you are up to
  90.      * expand this structure, add the new identifiers at the
  91.      * bottom. This will insure upward-compatibility with
  92.      * older DClock and DClock-Handler revisions.
  93.      */
  94.  
  95. struct DSeg
  96. {
  97.     /*******************************************
  98.      * Vital data! Don't change ANYTHING here! *
  99.      *******************************************/
  100.  
  101.     struct MsgPort         Port;        /* Global messageport. */
  102.  
  103.     BPTR             Segment;    /* Pointer to handler segment. */
  104.     LONG             SegSize;    /* Size of DSeg structure. */
  105.  
  106.     struct Task        *Father;    /* Calling process. */
  107.     struct Task        *Child;        /* Waiting process (usually handler). */
  108.  
  109.     ULONG             RingBack;    /* Multi-purpose signal bit. */
  110.  
  111.     ULONG             LastSecs;    /* Timer control. */
  112.     BYTE             Priority;    /* Handler priority. */
  113.     UBYTE             Revision;    /* Could come in handy for future revisions. */
  114.  
  115.     /***********************************************
  116.      * Custom data, open to expansion and changes. *
  117.      ***********************************************/
  118.  
  119.     UBYTE             Beep;        /* Audible beep selected? */
  120.     UBYTE             Click;        /* Keyboard click selected? */
  121.  
  122.     UBYTE             ClickVolume;    /* Volume of keyboard click. */
  123.     UBYTE             Reserved1;
  124.  
  125.     UBYTE             TextColour;    /* Guess what? */
  126.     UBYTE             BackColour;    /* Guess what? */
  127.  
  128.     UBYTE             Alarm;        /* Alarm clock enabled? */
  129.     UBYTE             AlarmHour;    /* Alarm time hour. */
  130.     UBYTE             AlarmMinute;    /* Alarm time minute. */
  131.     UBYTE             AlarmSecond;    /* Alarm time second. */
  132.  
  133.     UBYTE             SetEnv;    /* Set environment variables? */
  134.     UBYTE             Hour;        /* Beep every full hour? */
  135.  
  136.     struct RexxHost        *RexxHost;    /* Rexx host port. */
  137.  
  138.     ULONG             Countdown;    /* Countdown tea timer. */
  139.  
  140.     UBYTE             Seconds;    /* Display seconds? */
  141.  
  142.     UBYTE             Page;        /* Current text display. */
  143.  
  144.     UBYTE             Speech;    /* Speech enabled? */
  145.  
  146.     UBYTE             Online;    /* Are we online? */
  147.  
  148.     struct SignalSemaphore    *SoundSemaphore;/* Hour chime lock. */
  149.     APTR             SoundData;    /* Hour chime data. */
  150.     LONG             SoundLength;    /* Length of hour chime. */
  151.     LONG             SoundRate;    /* Sound replay rate. */
  152.     LONG             SoundVolume;    /* Sound replay volume. */
  153.  
  154.     struct DateTag         CurrentTime;    /* Current time, replaces ExtraTime entry. */
  155.  
  156.     ULONG             Reserved2[10];    /* Expansion data, DO NOT TOUCH! */
  157.  
  158.     /***********************************
  159.      * Append your custom flags below. *
  160.      ***********************************/
  161. };
  162.  
  163.     /* External library symbols. */
  164.  
  165. extern struct ExecBase    *SysBase;
  166.