home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gui / relative.lha / Relative / includes / models / value.h
Encoding:
C/C++ Source or Header  |  1997-02-10  |  5.6 KB  |  176 lines

  1. /**************************************************************************************************
  2. **
  3. ** value.model
  4. ** © 1996-1997 Jeroen Massar
  5. **
  6. ** Main Header File
  7. **
  8. ***************************************************************************************************
  9. ** value.model Class Tree
  10. ***************************************************************************************************
  11. **
  12. **   modelclass                (AmigaOS modelclass)
  13. **   +--value.model            (value.model)
  14. **
  15. ***************************************************************************************************
  16. ** Supported SuperClass Methods/Attributes
  17. ***************************************************************************************************
  18. ** Unless stated all methods are passed to the superclass.
  19. ** AttrMan    OM_ATTRSTART
  20. ** rootclass    OM_NEW
  21. **        OM_DISPOSE
  22. **        OM_SET
  23. **        OM_GET
  24. ** modelclass
  25. **
  26. ***************************************************************************************************
  27. ** General Header File Information
  28. ***************************************************************************************************
  29. **
  30. ** All class, method, value, macro and structure definitions follow these rules:
  31. **
  32. ** Name                Meaning
  33. **
  34. ** ValMM_<method>        Method.
  35. ** ValMP_<method>        Methods parameter structure.
  36. ** ValMV_<method>_<x>        Special method value.
  37. ** ValMA_<attrib>        Attribute.
  38. ** ValMV_<attrib>_<x>        Special attribute value.
  39. **
  40. ** All definitions are followed by a comment containing the version
  41. ** which introduced that definition.
  42. ** Attribute definitions are followed by a comment
  43. ** consisting of the three possible letters I, S and G.
  44. ** I: it's possible to specify this attribute at object creation (init) time.
  45. ** S: it's possible to change this attribute with SetAttrs().
  46. ** G: it's possible to get this attribute with GetAttr().
  47. **
  48. ** The BOOPSI value.model library uses the following structure as its base for the
  49. ** library data.  This allows developers to obtain the class pointer for
  50. ** performing object-less inquiries (As specified in the v42 classes.h/i).
  51. **    struct ClassLibrary
  52. **    {
  53. **        struct Library     cl_Lib;    /* Embedded library */
  54. **        UWORD         cl_Pad;    /* Align the structure */
  55. **        Class        *cl_Class;    /* Class pointer */
  56. **        /* Private data, has changed, is changing and will continue to change. */
  57. **    };
  58. **
  59. **************************************************************************************************/
  60. #ifndef MODELS_VALUE_H
  61. #define MODELS_VALUE_H
  62.  
  63. /* Compiler specific stuff */
  64.  
  65. #ifdef _DCC
  66.  
  67. #define REG(x) __ ## x
  68. #define ASM
  69. #define SAVEDS __geta4
  70.  
  71. #else
  72.  
  73. #define REG(x) register __ ## x
  74.  
  75. #if defined __MAXON__ || defined __GNUC__
  76. #define ASM
  77. #define SAVEDS
  78. #else
  79. #define ASM    __asm
  80. #define SAVEDS __saveds
  81. #endif /* if defined ... */
  82.  
  83.  
  84. #ifdef __SASC
  85. #include <pragmas/exec_sysbase_pragmas.h>
  86. #else
  87. #ifndef __GNUC__
  88. #include <pragmas/exec_pragmas.h>
  89. #endif /* ifndef __GNUC__ */
  90. #endif /* ifdef SASC      */
  91.  
  92. #ifndef __GNUC__
  93.  
  94. #include <pragmas/dos_pragmas.h>
  95. #include <pragmas/icon_pragmas.h>
  96. #include <pragmas/graphics_pragmas.h>
  97. #include <pragmas/intuition_pragmas.h>
  98. #include <pragmas/gadtools_pragmas.h>
  99. #include <pragmas/utility_pragmas.h>
  100. #include <pragmas/asl_pragmas.h>
  101. #include <pragmas/reqtools.h>
  102. #include <pragmas/timer_pragmas.h>
  103. #include <pragmas/commodities_pragmas.h>
  104.  
  105. #endif /* ifndef __GNUC__ */
  106.  
  107. #endif /* ifdef _DCC */
  108.  
  109. /* System */
  110. #include <exec/types.h>
  111. #include <exec/memory.h>
  112. #include <exec/exec.h>
  113. #include <exec/devices.h>
  114. #include <exec/io.h>
  115. #include <dos/dos.h>
  116. #include <dos/dostags.h>
  117. #include <graphics/gfxmacros.h>
  118. #include <workbench/workbench.h>
  119. #include <intuition/intuition.h>
  120. #include <intuition/gadgetclass.h>
  121. #include <intuition/icclass.h>
  122. #include <intuition/imageclass.h>
  123. #include <libraries/gadtools.h>
  124. #include <libraries/reqtools.h>
  125. #include <devices/timer.h>
  126. #include <libraries/commodities.h>
  127.  
  128. /* Prototypes */
  129. #include <clib/alib_protos.h>
  130. #include <clib/exec_protos.h>
  131. #include <clib/dos_protos.h>
  132. #include <clib/icon_protos.h>
  133. #include <clib/graphics_protos.h>
  134. #include <clib/intuition_protos.h>
  135. #include <clib/gadtools_protos.h>
  136. #include <clib/utility_protos.h>
  137. #include <clib/timer_protos.h>
  138. #include <clib/asl_protos.h>
  139. #include <clib/reqtools_protos.h>
  140. #include <clib/commodities_protos.h>
  141.  
  142. /* ANSI C */
  143. #include <stdlib.h>
  144. #include <stdio.h>
  145.  
  146. /* AttrMan */
  147. #include <AttrMan.h>
  148.  
  149. /**************************************************************************************************
  150. ** Library specification
  151. **************************************************************************************************/
  152. #define VALUEMODEL_NAME        "value.model"
  153. #define VALUEMODEL_LIBPATH    "models/"
  154. #define VALUEMODEL_VLATEST    40
  155. #define VALUEMODEL_VMIN        VALUEMODEL_VLATEST
  156.  
  157. /**************************************************************************************************
  158. ** value.model
  159. **************************************************************************************************/
  160. /* Methods - No special methods except OM_AttrStart for AttrMan support (see AttrMan.h).*/
  161.  
  162. /* Attributes
  163. ** You should add AttrStart gotten from the OM_AttrStart method.
  164. ** When setting ValMA_Value out of the range of ValMA_Min/Max it will become ValMA_Min/Max.
  165. */
  166. enum {    ValMA_Value=0,            /* V40 isg ULONG Current Value. Default=0 */
  167.     ValMA_Min,            /* V40 isg ULONG Minimum Value. Default=0 */
  168.     ValMA_Max,            /* V40 isg ULONG Maximum Value. Default=100 */
  169.     ValMA_Step,            /* V40 isg ULONG Increment/Decrement Step-size. Default=1 */
  170.     ValMA_Incr,            /* V40 .s. Increase by ValMA_Steps. */
  171.     ValMA_Decr,            /* V40 .s. Decrease by ValMA_Steps. */
  172.     ValMA_LastAttr,            /* LastAttribute (this value is used for allocating AttrMan attributes). */
  173.     };
  174.  
  175. #endif /* MODELS_VALUE_H */
  176.