home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 105 / af105sub.adf / Beyondthedark.LZX / BeyondTheDark / Developer / Source / BTD.h next >
C/C++ Source or Header  |  2003-01-24  |  5KB  |  130 lines

  1. /*
  2. **    $Filename: BTD.h
  3. **    $Release: 1.11
  4. **    $Date: 07.12.95
  5. **
  6. **    (c) Copyright 1993-1995 Matthias Scheler
  7. **        All Rights Reserved
  8. */
  9.  
  10. #ifndef LIBRARIES_BTD_H
  11. #define LIBRARIES_BTD_H
  12.  
  13. #ifndef UTITLITY_TAGITEM_H
  14. #include <utility/tagitem.h>
  15. #endif
  16.  
  17. #define BTDPT_BOOLEAN 1
  18. #define BTDPT_INTEGER 2
  19. #define BTDPT_CYCLE   3 
  20.  
  21. struct BTDNode        /* standard head for parameter structures */
  22.  {
  23.   Tag   BN_Tag;        /* identification tag for this parameter  */
  24.   char *BN_Name;        /* name of this parameter                 */
  25.   ULONG BN_Type;        /* type of this parameter                 */
  26. /* ...  BN_Value; */
  27.  };
  28.  
  29. struct BTDBoolean         /* structure for boolean parameter */
  30.  {
  31.   struct BTDNode BB_Node; /* standard head                   */
  32.   LONG   BB_Value;        /* boolean value                   */
  33.  };
  34.  
  35. struct BTDInteger                /* structure for integer parameter */
  36.  {
  37.   struct BTDNode BI_Node;        /* standard head                   */
  38.   LONG   BI_Value,BI_Min,BI_Max; /* actual/minimum/maximum value    */
  39.   BOOL   BI_Slider;              /* Set to TRUE to get a slider.    */ 
  40.  };
  41.  
  42. struct BTDCycle           /* structure for a cycle gadget          */
  43.  {
  44.   struct BTDNode BC_Node; /* standard head                         */
  45.   LONG   BC_Value;        /* selected item                         */
  46.   char **BC_Labels;       /* NULL terminated array with the labels */
  47.  };
  48.  
  49. struct BTDInfo                 /* structure returned by QueryBlanker()     */
  50.  {
  51.   ULONG  BI_Revision,          /* This field must be set to BTDI_Revision. */
  52.          BI_ID;                /* 4 character ID for the blanker           */
  53.   char  *BI_Name,              /* name of the blanker                      */
  54.         *BI_Description,       /* description of the blanker               */
  55.         *BI_Author;            /* author(s) of the blanker                 */
  56.   struct BTDNode **BI_Params;  /* NULL terminated array with parameters    */
  57.  };
  58.  
  59. #define BTDI_Revision 5L       /* value for BI_Revision, use the symbol!    */
  60.  
  61. struct BTDDrawInfo             /* basic structure with drawing informations */
  62.  {
  63.   struct RastPort *BDI_RPort;  /* RastPort with or without layer            */
  64.   UWORD *BDI_Pens;             /* pens for this instance of the blanker     */
  65.   LONG BDI_Left,               /* left edge of the draw box                 */
  66.        BDI_Top,                /* top edge of the draw box                  */
  67.        BDI_Width,              /* width of the draw box                     */
  68.        BDI_Height;             /* height of the draw box                    */
  69.   UBYTE *BDI_Red,              /* red color table, index with pens          */
  70.         *BDI_Green,            /* green color table, index with pens        */
  71.         *BDI_Blue,             /* blue color table, index with pens         */
  72.         *BDI_Changed;          /* set this to TRUE if you change a color    */
  73.  };
  74.  
  75. #define BTD_BgPen 0            /* use ALWAYS this symbol as background pen  */
  76.  
  77. #define BTDERR_Size   1L       /* code for BTD_Error: draw box to small */
  78. #define BTDERR_Memory 2L       /* code for BTD_Error: out of memory     */
  79.  
  80. #define BTD_TagBase (TAG_USER+'B'*65536L+'T'*256L+'D')
  81. #define BTD_TAG(o)  (BTD_TagBase+(o))
  82.  
  83. #define BTD_DrawInfo BTD_TAG(1)    /* struct BTDDrawInfo *              */
  84. #define BTD_Error    BTD_TAG(2)    /* ULONG *                           */
  85. #define BTD_Instance BTD_TAG(3)    /* ULONG                             */
  86. #define BTD_Client   BTD_TAG(100)  /* start of the client tags          */
  87.  
  88. struct BTDInfo *QueryBlanker(void);
  89. APTR InitBlanker(struct TagItem *);
  90. APTR InitBlankerTags(Tag,...);
  91. void EndBlanker(APTR);
  92. void AnimBlanker(APTR);
  93. ULONG PenCountBlanker(struct TagItem *);
  94. ULONG PenCountBlankerTags(Tag,...);
  95.  
  96. #ifdef __SASC
  97. #pragma libcall BTDBase QueryBlanker 1e 0
  98. #pragma libcall BTDBase InitBlanker 24 801
  99. #pragma tagcall BTDBase InitBlankerTags 24 801
  100. #pragma libcall BTDBase EndBlanker 2a 801
  101. #pragma libcall BTDBase AnimBlanker 30 801
  102. #pragma libcall BTDBase PenCountBlanker 36 801
  103. #pragma tagcall BTDBase PenCountBlankerTags 36 801
  104. #endif
  105.  
  106. #define DPMS_Revision 3L       /* value for DP_Revision, use the symbol!   */
  107.  
  108. struct DPMSInfo
  109.  {
  110.   ULONG  DI_Revision;          /* This field must be set to DPMS_Revision. */
  111.   char  *DI_Name,              /* name of the blanker                      */
  112.         *DI_Description,       /* description of the DPMS module           */
  113.         *DI_Author;            /* author(s) of the DPMS module             */
  114.  };
  115.  
  116. #define BTD_DPMS_ON      0L /* Full operation                             */
  117. #define BTD_DPMS_STANDBY 1L /* Optional state of minimal power reduction  */
  118. #define BTD_DPMS_SUSPEND 2L /* Significant reduction of power consumption */
  119. #define BTD_DPMS_OFF     3L /* Lowest level of power consumption          */
  120.  
  121. struct DPMSInfo *QueryDPMS(void);
  122. void SetDPMSLevel(struct Screen *,ULONG);
  123.  
  124. #ifdef __SASC
  125. #pragma libcall DPMSBase QueryDPMS 1e 0
  126. #pragma libcall DPMSBase SetDPMSLevel 24 0802
  127. #endif
  128.  
  129. #endif /* LIBRARIES_BTD_H */
  130.