home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / datatypes / datatypesclass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-24  |  8.6 KB  |  347 lines

  1. #ifndef    DATATYPES_DATATYPESCLASS_H
  2. #define    DATATYPES_DATATYPESCLASS_H
  3. /*
  4. **  $VER: datatypesclass.h 39.5 (19.06.92)
  5. **  Includes Release 39.108
  6. **
  7. **  Interface definitions for DataType objects.
  8. **
  9. **  (C) Copyright 1992 Commodore-Amiga, Inc.
  10. **    All Rights Reserved
  11. */
  12.  
  13. #ifndef    UTILITY_TAGITEM_H
  14. #include <utility/tagitem.h>
  15. #endif
  16.  
  17. #ifndef    DATATYPES_DATATYPES_H
  18. #include <datatypes/datatypes.h>
  19. #endif
  20.  
  21. #ifndef    INTUITION_INTUITION_H
  22. #include <intuition/intuition.h>
  23. #endif
  24.  
  25. #ifndef    DEVICES_PRINTER_H
  26. #include <devices/printer.h>
  27. #endif
  28.  
  29. #ifndef    DEVICES_PRTBASE_H
  30. #include <devices/prtbase.h>
  31. #endif
  32.  
  33. /*****************************************************************************/
  34.  
  35. #define    DATATYPESCLASS        "datatypesclass"
  36.  
  37. /*****************************************************************************/
  38.  
  39. #define    DTA_Dummy        (TAG_USER + 0x1000)
  40.  
  41. /* Generic attributes */
  42. #define    DTA_TextAttr        (DTA_Dummy + 10)
  43. #define    DTA_TopVert        (DTA_Dummy + 11)
  44. #define    DTA_VisibleVert        (DTA_Dummy + 12)
  45. #define    DTA_TotalVert        (DTA_Dummy + 13)
  46. #define    DTA_VertUnit        (DTA_Dummy + 14)
  47. #define    DTA_TopHoriz        (DTA_Dummy + 15)
  48. #define    DTA_VisibleHoriz    (DTA_Dummy + 16)
  49. #define    DTA_TotalHoriz        (DTA_Dummy + 17)
  50. #define    DTA_HorizUnit        (DTA_Dummy + 18)
  51. #define    DTA_NodeName        (DTA_Dummy + 19)
  52. #define    DTA_Title        (DTA_Dummy + 20)
  53. #define    DTA_TriggerMethods    (DTA_Dummy + 21)
  54. #define    DTA_Data        (DTA_Dummy + 22)
  55. #define    DTA_TextFont        (DTA_Dummy + 23)
  56. #define    DTA_Methods        (DTA_Dummy + 24)
  57. #define    DTA_PrinterStatus    (DTA_Dummy + 25)
  58. #define    DTA_PrinterProc        (DTA_Dummy + 26)
  59. #define    DTA_LayoutProc        (DTA_Dummy + 27)
  60. #define    DTA_Busy        (DTA_Dummy + 28)
  61.     /* Used to turn the applications' busy pointer off and on */
  62.  
  63. #define    DTA_Sync        (DTA_Dummy + 29)
  64.     /* Used to indicate that new information has been loaded into
  65.      * an object.  This is for models that cache the DTA_TopVert-
  66.      * like tags */
  67.  
  68. #define    DTA_BaseName        (DTA_Dummy + 30)
  69.     /* The base name of the class */
  70.  
  71. #define    DTA_GroupID        (DTA_Dummy + 31)
  72.     /* Group that the object must belong in */
  73.  
  74. #define    DTA_ErrorLevel        (DTA_Dummy + 32)
  75.     /* Error level */
  76.  
  77. #define    DTA_ErrorNumber        (DTA_Dummy + 33)
  78.     /* datatypes.library error number */
  79.  
  80. #define    DTA_ErrorString        (DTA_Dummy + 34)
  81.     /* Argument for datatypes.library error */
  82.  
  83. /* DTObject attributes */
  84. #define    DTA_Name        (DTA_Dummy + 100)
  85. #define    DTA_SourceType        (DTA_Dummy + 101)
  86. #define    DTA_Handle        (DTA_Dummy + 102)
  87. #define    DTA_DataType        (DTA_Dummy + 103)
  88. #define    DTA_Domain        (DTA_Dummy + 104)
  89. #define    DTA_Left        (DTA_Dummy + 105)
  90. #define    DTA_Top            (DTA_Dummy + 106)
  91. #define    DTA_Width        (DTA_Dummy + 107)
  92. #define    DTA_Height        (DTA_Dummy + 108)
  93. #define    DTA_ObjName        (DTA_Dummy + 109)
  94. #define    DTA_ObjAuthor        (DTA_Dummy + 110)
  95. #define    DTA_ObjAnnotation    (DTA_Dummy + 111)
  96. #define    DTA_ObjCopyright    (DTA_Dummy + 112)
  97. #define    DTA_ObjVersion        (DTA_Dummy + 113)
  98. #define    DTA_ObjectID        (DTA_Dummy + 114)
  99. #define    DTA_UserData        (DTA_Dummy + 115)
  100. #define    DTA_FrameInfo        (DTA_Dummy + 116)
  101. #define    DTA_RelRight        (DTA_Dummy + 117)
  102. #define    DTA_RelBottom        (DTA_Dummy + 118)
  103. #define    DTA_RelWidth        (DTA_Dummy + 119)
  104. #define    DTA_RelHeight        (DTA_Dummy + 120)
  105. #define    DTA_SelectDomain    (DTA_Dummy + 121)
  106. #define    DTA_TotalPVert        (DTA_Dummy + 122)
  107. #define    DTA_TotalPHoriz        (DTA_Dummy + 123)
  108. #define    DTA_NominalVert        (DTA_Dummy + 124)
  109. #define    DTA_NominalHoriz    (DTA_Dummy + 125)
  110.  
  111. /* Printing attributes */
  112. #define    DTA_DestCols        (DTA_Dummy + 400)
  113. #define    DTA_DestRows        (DTA_Dummy + 401)
  114. #define    DTA_Special        (DTA_Dummy + 402)
  115.  
  116. /*****************************************************************************/
  117.  
  118. #define    DTST_RAM        1
  119. #define    DTST_FILE        2
  120. #define    DTST_CLIPBOARD        3
  121. #define    DTST_HOTLINK        4
  122.  
  123. /*****************************************************************************/
  124.  
  125. /* Attached to the Gadget.SpecialInfo field of the gadget.  Don't access directly,
  126.  * use the Get/Set calls instead.
  127.  */
  128. struct DTSpecialInfo
  129. {
  130.     struct SignalSemaphore     si_Lock;    /* Locked while in DoAsyncLayout() */
  131.     ULONG             si_Flags;
  132.  
  133.     LONG             si_TopVert;    /* Top row (in units) */
  134.     LONG             si_VisVert;    /* Number of visible rows (in units) */
  135.     LONG             si_TotVert;    /* Total number of rows (in units) */
  136.     LONG             si_OTopVert;    /* Previous top (in units) */
  137.     LONG             si_VertUnit;    /* Number of pixels in vertical unit */
  138.  
  139.     LONG             si_TopHoriz;    /* Top column (in units) */
  140.     LONG             si_VisHoriz;    /* Number of visible columns (in units) */
  141.     LONG             si_TotHoriz;    /* Total number of columns (in units) */
  142.     LONG             si_OTopHoriz;    /* Previous top (in units) */
  143.     LONG             si_HorizUnit;    /* Number of pixels in horizontal unit */
  144. };
  145.  
  146.  
  147. /* Object is in layout processing */
  148. #define    DTSIF_LAYOUT        (1L<<0)
  149.  
  150. /* Object needs to be layed out */
  151. #define    DTSIF_NEWSIZE        (1L<<1)
  152.  
  153. #define    DTSIF_DRAGGING        (1L<<2)
  154. #define    DTSIF_DRAGSELECT    (1L<<3)
  155.  
  156. #define    DTSIF_HIGHLIGHT        (1L<<4)
  157.  
  158. /* Object is being printed */
  159. #define    DTSIF_PRINTING        (1L<<5)
  160.  
  161. /* Object is in layout process */
  162. #define    DTSIF_LAYOUTPROC    (1L<<6)
  163.  
  164. /*****************************************************************************/
  165.  
  166. struct DTMethod
  167. {
  168.     STRPTR     dtm_Label;
  169.     STRPTR     dtm_Command;
  170.     ULONG     dtm_Method;
  171. };
  172.  
  173. /*****************************************************************************/
  174.  
  175. #define    DTM_Dummy        (0x600)
  176.  
  177. /* Inquire what environment an object requires */
  178. #define    DTM_FRAMEBOX        (0x601)
  179.  
  180. /* Same as GM_LAYOUT except guaranteed to be on a process already */
  181. #define    DTM_PROCLAYOUT        (0x602)
  182.  
  183. /* Layout that is occurring on a process */
  184. #define    DTM_ASYNCLAYOUT        (0x603)
  185.  
  186. /* When a RemoveDTObject() is called */
  187. #define    DTM_REMOVEDTOBJECT    (0x604)
  188.  
  189. #define    DTM_SELECT        (0x605)
  190. #define    DTM_CLEARSELECTED    (0x606)
  191.  
  192. #define    DTM_COPY        (0x607)
  193. #define    DTM_PRINT        (0x608)
  194. #define    DTM_ABORTPRINT        (0x609)
  195.  
  196. #define    DTM_NEWMEMBER        (0x610)
  197. #define    DTM_DISPOSEMEMBER    (0x611)
  198.  
  199. #define    DTM_GOTO        (0x630)
  200. #define    DTM_TRIGGER        (0x631)
  201.  
  202. #define    DTM_OBTAINDRAWINFO    (0x640)
  203. #define    DTM_DRAW        (0x641)
  204. #define    DTM_RELEASEDRAWINFO    (0x642)
  205.  
  206. #define    DTM_WRITE        (0x650)
  207.  
  208. /* Used to ask the object about itself */
  209. struct FrameInfo
  210. {
  211.     ULONG         fri_PropertyFlags;        /* DisplayInfo (graphics/displayinfo.h) */
  212.     Point         fri_Resolution;        /* DisplayInfo */
  213.  
  214.     UBYTE         fri_RedBits;
  215.     UBYTE         fri_GreenBits;
  216.     UBYTE         fri_BlueBits;
  217.  
  218.     struct
  219.     {
  220.     ULONG Width;
  221.     ULONG Height;
  222.     ULONG Depth;
  223.  
  224.     } fri_Dimensions;
  225.  
  226.     struct Screen    *fri_Screen;
  227.     struct ColorMap    *fri_ColorMap;
  228.  
  229.     ULONG         fri_Flags;
  230. };
  231.  
  232. #define    FIF_SCALABLE    0x1
  233. #define    FIF_SCROLLABLE    0x2
  234. #define    FIF_REMAPPABLE    0x4
  235.  
  236. /* DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT */
  237. struct dtGeneral
  238. {
  239.     ULONG         MethodID;
  240.     struct GadgetInfo    *dtg_GInfo;
  241. };
  242.  
  243. /* DTM_SELECT */
  244. struct dtSelect
  245. {
  246.     ULONG         MethodID;
  247.     struct GadgetInfo    *dts_GInfo;
  248.     struct Rectangle     dts_Select;
  249. };
  250.  
  251. /* DTM_FRAMEBOX */
  252. struct dtFrameBox
  253. {
  254.     ULONG         MethodID;
  255.     struct GadgetInfo    *dtf_GInfo;
  256.     struct FrameInfo    *dtf_ContentsInfo;    /* Input */
  257.     struct FrameInfo    *dtf_FrameInfo;        /* Output */
  258.     ULONG         dtf_SizeFrameInfo;
  259.     ULONG         dtf_FrameFlags;
  260. };
  261.  
  262. #ifndef    FRAMEF_SPECIFY
  263. #define FRAMEF_SPECIFY    (1<<0)    /* Make do with the dimensions of FrameBox provided. */
  264. #endif
  265.  
  266. /* DTM_GOTO */
  267. struct dtGoto
  268. {
  269.     ULONG         MethodID;
  270.     struct GadgetInfo    *dtg_GInfo;
  271.     STRPTR         dtg_NodeName;        /* Node to goto */
  272.     struct TagItem    *dtg_AttrList;        /* Additional attributes */
  273. };
  274.  
  275. /* DTM_TRIGGER */
  276. struct dtTrigger
  277. {
  278.     ULONG         MethodID;
  279.     struct GadgetInfo    *dtt_GInfo;
  280.     ULONG         dtt_Function;
  281.     APTR         dtt_Data;
  282. };
  283.  
  284. #define    STM_PAUSE        1
  285. #define    STM_PLAY        2
  286. #define    STM_CONTENTS        3
  287. #define    STM_INDEX        4
  288. #define    STM_RETRACE        5
  289. #define    STM_BROWSE_PREV        6
  290. #define    STM_BROWSE_NEXT        7
  291.  
  292. #define    STM_NEXT_FIELD        8
  293. #define    STM_PREV_FIELD        9
  294. #define    STM_ACTIVATE_FIELD    10
  295.  
  296. #define    STM_COMMAND        11
  297.  
  298.  
  299. /* Printer IO request */
  300. union printerIO
  301. {
  302.     struct IOStdReq ios;
  303.     struct IODRPReq iodrp;
  304.     struct IOPrtCmdReq iopc;
  305. };
  306.  
  307. /* DTM_PRINT */
  308. struct dtPrint
  309. {
  310.     ULONG         MethodID;
  311.     struct GadgetInfo    *dtp_GInfo;        /* Gadget information */
  312.     union printerIO    *dtp_PIO;        /* Printer IO request */
  313.     struct TagItem    *dtp_AttrList;        /* Additional attributes */
  314. };
  315.  
  316. /* DTM_DRAW */
  317. struct dtDraw
  318. {
  319.     ULONG         MethodID;
  320.     struct RastPort    *dtd_RPort;
  321.     LONG         dtd_Left;
  322.     LONG         dtd_Top;
  323.     LONG         dtd_Width;
  324.     LONG         dtd_Height;
  325.     LONG         dtd_TopHoriz;
  326.     LONG         dtd_TopVert;
  327.     struct TagItem    *dtd_AttrList;        /* Additional attributes */
  328. };
  329.  
  330. /* DTM_WRITE */
  331. struct dtWrite
  332. {
  333.     ULONG         MethodID;
  334.     struct GadgetInfo    *dtw_GInfo;        /* Gadget information */
  335.     BPTR         dtw_FileHandle;    /* File handle to write to */
  336.     ULONG         dtw_Mode;
  337.     struct TagItem    *dtw_AttrList;        /* Additional attributes */
  338. };
  339.  
  340. /* Save data as IFF data */
  341. #define    DTWM_IFF    0
  342.  
  343. /* Save data as local data format */
  344. #define    DTWM_RAW    1
  345.  
  346. #endif /* DATATYPES_DATATYPESCLASS_H */
  347.