home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / datatypes / datatypesclass.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  11KB  |  432 lines

  1. #ifndef    DATATYPES_DATATYPESCLASS_H
  2. #define    DATATYPES_DATATYPESCLASS_H
  3. /*
  4. **  $VER: datatypesclass.h 39.8 (17.3.93)
  5. **  Includes Release 40.15
  6. **
  7. **  Interface definitions for DataType objects.
  8. **
  9. **  (C) Copyright 1992-1993 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.     /* (struct TextAttr *) Pointer to the default TextAttr to use for
  44.      * the text within the object. */
  45.  
  46. #define    DTA_TopVert        (DTA_Dummy+11)
  47.     /* (LONG) Current top vertical unit */
  48.  
  49. #define    DTA_VisibleVert        (DTA_Dummy+12)
  50.     /* (LONG) Number of visible vertical units */
  51.  
  52. #define    DTA_TotalVert        (DTA_Dummy+13)
  53.     /* (LONG) Total number of vertical units */
  54.  
  55. #define    DTA_VertUnit        (DTA_Dummy+14)
  56.     /* (LONG) Number of pixels per vertical unit */
  57.  
  58. #define    DTA_TopHoriz        (DTA_Dummy+15)
  59.     /* (LONG) Current top horizontal unit */
  60.  
  61. #define    DTA_VisibleHoriz    (DTA_Dummy+16)
  62.     /* (LONG)  Number of visible horizontal units */
  63.  
  64. #define    DTA_TotalHoriz        (DTA_Dummy+17)
  65.     /* (LONG) Total number of horizontal units */
  66.  
  67. #define    DTA_HorizUnit        (DTA_Dummy+18)
  68.     /* (LONG) Number of pixels per horizontal unit */
  69.  
  70. #define    DTA_NodeName        (DTA_Dummy+19)
  71.     /* (UBYTE *) Name of the current element within the object. */
  72.  
  73. #define    DTA_Title        (DTA_Dummy+20)
  74.     /* (UBYTE *) Title of the object. */
  75.  
  76. #define    DTA_TriggerMethods    (DTA_Dummy+21)
  77.     /* (struct DTMethod *) Pointer to a NULL terminated array of
  78.      * supported trigger methods. */
  79.  
  80. #define    DTA_Data        (DTA_Dummy+22)
  81.     /* (APTR) Object specific data. */
  82.  
  83. #define    DTA_TextFont        (DTA_Dummy+23)
  84.     /* (struct TextFont *) Default font to use for text within the
  85.      * object. */
  86.  
  87. #define    DTA_Methods        (DTA_Dummy+24)
  88.     /* (ULONG *) Pointer to a ~0 terminated array of supported
  89.      * methods. */
  90.  
  91. #define    DTA_PrinterStatus    (DTA_Dummy+25)
  92.     /* (LONG) Printer error message.  Error numbers are defined in
  93.      * <devices/printer.h> */
  94.  
  95. #define    DTA_PrinterProc        (DTA_Dummy+26)
  96.     /* PRIVATE (struct Process *) Pointer to the print process. */
  97.  
  98. #define    DTA_LayoutProc        (DTA_Dummy+27)
  99.     /* PRIVATE (struct Process *) Pointer to the layout process. */
  100.  
  101. #define    DTA_Busy        (DTA_Dummy+28)
  102.     /* Used to turn the applications' busy pointer off and on */
  103.  
  104. #define    DTA_Sync        (DTA_Dummy+29)
  105.     /* Used to indicate that new information has been loaded into
  106.      * an object.  This is for models that cache the DTA_TopVert-
  107.      * like tags */
  108.  
  109. #define    DTA_BaseName        (DTA_Dummy+30)
  110.     /* The base name of the class */
  111.  
  112. #define    DTA_GroupID        (DTA_Dummy+31)
  113.     /* Group that the object must belong in */
  114.  
  115. #define    DTA_ErrorLevel        (DTA_Dummy+32)
  116.     /* Error level */
  117.  
  118. #define    DTA_ErrorNumber        (DTA_Dummy+33)
  119.     /* datatypes.library error number */
  120.  
  121. #define    DTA_ErrorString        (DTA_Dummy+34)
  122.     /* Argument for datatypes.library error */
  123.  
  124. #define    DTA_Conductor        (DTA_Dummy+35)
  125.     /* New for V40. (UBYTE *) specifies the name of the
  126.      * realtime.library conductor.    Defaults to "Main". */
  127.  
  128. #define    DTA_ControlPanel    (DTA_Dummy+36)
  129.     /* New for V40. (BOOL) Indicate whether a control panel should be
  130.      * embedded within the object (in the animation datatype, for
  131.      * example).  Defaults to TRUE. */
  132.  
  133. #define    DTA_Immediate        (DTA_Dummy+37)
  134.     /* New for V40. (BOOL) Indicate whether the object should
  135.      * immediately begin playing.  Defaults to FALSE. */
  136.  
  137. #define    DTA_Repeat        (DTA_Dummy+38)
  138.     /* New for V40. (BOOL) Indicate that the object should repeat
  139.      * playing.  Defaults to FALSE. */
  140.  
  141.  
  142. /* DTObject attributes */
  143. #define    DTA_Name        (DTA_Dummy+100)
  144. #define    DTA_SourceType        (DTA_Dummy+101)
  145. #define    DTA_Handle        (DTA_Dummy+102)
  146. #define    DTA_DataType        (DTA_Dummy+103)
  147. #define    DTA_Domain        (DTA_Dummy+104)
  148.  
  149. /* DON'T USE THE FOLLOWING FOUR TAGS.  USE THE CORRESPONDING TAGS IN
  150.  * <intuition/gadgetclass.h> */
  151. #define    DTA_Left        (DTA_Dummy+105)
  152. #define    DTA_Top            (DTA_Dummy+106)
  153. #define    DTA_Width        (DTA_Dummy+107)
  154. #define    DTA_Height        (DTA_Dummy+108)
  155.  
  156. #define    DTA_ObjName        (DTA_Dummy+109)
  157. #define    DTA_ObjAuthor        (DTA_Dummy+110)
  158. #define    DTA_ObjAnnotation    (DTA_Dummy+111)
  159. #define    DTA_ObjCopyright    (DTA_Dummy+112)
  160. #define    DTA_ObjVersion        (DTA_Dummy+113)
  161. #define    DTA_ObjectID        (DTA_Dummy+114)
  162. #define    DTA_UserData        (DTA_Dummy+115)
  163. #define    DTA_FrameInfo        (DTA_Dummy+116)
  164.  
  165. /* DON'T USE THE FOLLOWING FOUR TAGS.  USE THE CORRESPONDING TAGS IN
  166.  * <intuition/gadgetclass.h> */
  167. #define    DTA_RelRight        (DTA_Dummy+117)
  168. #define    DTA_RelBottom        (DTA_Dummy+118)
  169. #define    DTA_RelWidth        (DTA_Dummy+119)
  170. #define    DTA_RelHeight        (DTA_Dummy+120)
  171.  
  172. #define    DTA_SelectDomain    (DTA_Dummy+121)
  173. #define    DTA_TotalPVert        (DTA_Dummy+122)
  174. #define    DTA_TotalPHoriz        (DTA_Dummy+123)
  175. #define    DTA_NominalVert        (DTA_Dummy+124)
  176. #define    DTA_NominalHoriz    (DTA_Dummy+125)
  177.  
  178. /* Printing attributes */
  179. #define    DTA_DestCols        (DTA_Dummy+400)
  180.     /* (LONG) Destination X width */
  181.  
  182. #define    DTA_DestRows        (DTA_Dummy+401)
  183.     /* (LONG) Destination Y height */
  184.  
  185. #define    DTA_Special        (DTA_Dummy+402)
  186.     /* (UWORD) Option flags */
  187.  
  188. #define    DTA_RastPort        (DTA_Dummy+403)
  189.     /* (struct RastPort *) RastPort to use when printing. (V40) */
  190.  
  191. #define    DTA_ARexxPortName    (DTA_Dummy+404)
  192.     /* (STRPTR) Pointer to base name for ARexx port (V40) */
  193.  
  194.  
  195. /*****************************************************************************/
  196.  
  197. #define    DTST_RAM        1
  198. #define    DTST_FILE        2
  199. #define    DTST_CLIPBOARD        3
  200. #define    DTST_HOTLINK        4
  201.  
  202. /*****************************************************************************/
  203.  
  204. /* Attached to the Gadget.SpecialInfo field of the gadget.  Don't access directly,
  205.  * use the Get/Set calls instead.
  206.  */
  207. struct DTSpecialInfo
  208. {
  209.     struct SignalSemaphore     si_Lock;    /* Locked while in DoAsyncLayout() */
  210.     ULONG             si_Flags;
  211.  
  212.     LONG             si_TopVert;    /* Top row (in units) */
  213.     LONG             si_VisVert;    /* Number of visible rows (in units) */
  214.     LONG             si_TotVert;    /* Total number of rows (in units) */
  215.     LONG             si_OTopVert;    /* Previous top (in units) */
  216.     LONG             si_VertUnit;    /* Number of pixels in vertical unit */
  217.  
  218.     LONG             si_TopHoriz;    /* Top column (in units) */
  219.     LONG             si_VisHoriz;    /* Number of visible columns (in units) */
  220.     LONG             si_TotHoriz;    /* Total number of columns (in units) */
  221.     LONG             si_OTopHoriz;    /* Previous top (in units) */
  222.     LONG             si_HorizUnit;    /* Number of pixels in horizontal unit */
  223. };
  224.  
  225.  
  226. /* Object is in layout processing */
  227. #define    DTSIF_LAYOUT        (1L<<0)
  228.  
  229. /* Object needs to be layed out */
  230. #define    DTSIF_NEWSIZE        (1L<<1)
  231.  
  232. #define    DTSIF_DRAGGING        (1L<<2)
  233. #define    DTSIF_DRAGSELECT    (1L<<3)
  234.  
  235. #define    DTSIF_HIGHLIGHT        (1L<<4)
  236.  
  237. /* Object is being printed */
  238. #define    DTSIF_PRINTING        (1L<<5)
  239.  
  240. /* Object is in layout process */
  241. #define    DTSIF_LAYOUTPROC    (1L<<6)
  242.  
  243. /*****************************************************************************/
  244.  
  245. struct DTMethod
  246. {
  247.     STRPTR     dtm_Label;
  248.     STRPTR     dtm_Command;
  249.     ULONG     dtm_Method;
  250. };
  251.  
  252. /*****************************************************************************/
  253.  
  254. #define    DTM_Dummy        (0x600)
  255.  
  256. /* Inquire what environment an object requires */
  257. #define    DTM_FRAMEBOX        (0x601)
  258.  
  259. /* Same as GM_LAYOUT except guaranteed to be on a process already */
  260. #define    DTM_PROCLAYOUT        (0x602)
  261.  
  262. /* Layout that is occurring on a process */
  263. #define    DTM_ASYNCLAYOUT        (0x603)
  264.  
  265. /* When a RemoveDTObject() is called */
  266. #define    DTM_REMOVEDTOBJECT    (0x604)
  267.  
  268. #define    DTM_SELECT        (0x605)
  269. #define    DTM_CLEARSELECTED    (0x606)
  270.  
  271. #define    DTM_COPY        (0x607)
  272. #define    DTM_PRINT        (0x608)
  273. #define    DTM_ABORTPRINT        (0x609)
  274.  
  275. #define    DTM_NEWMEMBER        (0x610)
  276. #define    DTM_DISPOSEMEMBER    (0x611)
  277.  
  278. #define    DTM_GOTO        (0x630)
  279. #define    DTM_TRIGGER        (0x631)
  280.  
  281. #define    DTM_OBTAINDRAWINFO    (0x640)
  282. #define    DTM_DRAW        (0x641)
  283. #define    DTM_RELEASEDRAWINFO    (0x642)
  284.  
  285. #define    DTM_WRITE        (0x650)
  286.  
  287. /* Used to ask the object about itself */
  288. struct FrameInfo
  289. {
  290.     ULONG         fri_PropertyFlags;        /* DisplayInfo (graphics/displayinfo.h) */
  291.     Point         fri_Resolution;        /* DisplayInfo */
  292.  
  293.     UBYTE         fri_RedBits;
  294.     UBYTE         fri_GreenBits;
  295.     UBYTE         fri_BlueBits;
  296.  
  297.     struct
  298.     {
  299.     ULONG Width;
  300.     ULONG Height;
  301.     ULONG Depth;
  302.  
  303.     } fri_Dimensions;
  304.  
  305.     struct Screen    *fri_Screen;
  306.     struct ColorMap    *fri_ColorMap;
  307.  
  308.     ULONG         fri_Flags;
  309. };
  310.  
  311. #define    FIF_SCALABLE    0x1
  312. #define    FIF_SCROLLABLE    0x2
  313. #define    FIF_REMAPPABLE    0x4
  314.  
  315. /* DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT */
  316. struct dtGeneral
  317. {
  318.     ULONG         MethodID;
  319.     struct GadgetInfo    *dtg_GInfo;
  320. };
  321.  
  322. /* DTM_SELECT */
  323. struct dtSelect
  324. {
  325.     ULONG         MethodID;
  326.     struct GadgetInfo    *dts_GInfo;
  327.     struct Rectangle     dts_Select;
  328. };
  329.  
  330. /* DTM_FRAMEBOX */
  331. struct dtFrameBox
  332. {
  333.     ULONG         MethodID;
  334.     struct GadgetInfo    *dtf_GInfo;
  335.     struct FrameInfo    *dtf_ContentsInfo;    /* Input */
  336.     struct FrameInfo    *dtf_FrameInfo;        /* Output */
  337.     ULONG         dtf_SizeFrameInfo;
  338.     ULONG         dtf_FrameFlags;
  339. };
  340.  
  341. #ifndef    FRAMEF_SPECIFY
  342. #define FRAMEF_SPECIFY    (1<<0)    /* Make do with the dimensions of FrameBox provided. */
  343. #endif
  344.  
  345. /* DTM_GOTO */
  346. struct dtGoto
  347. {
  348.     ULONG         MethodID;
  349.     struct GadgetInfo    *dtg_GInfo;
  350.     STRPTR         dtg_NodeName;        /* Node to goto */
  351.     struct TagItem    *dtg_AttrList;        /* Additional attributes */
  352. };
  353.  
  354. /* DTM_TRIGGER */
  355. struct dtTrigger
  356. {
  357.     ULONG         MethodID;
  358.     struct GadgetInfo    *dtt_GInfo;
  359.     ULONG         dtt_Function;
  360.     APTR         dtt_Data;
  361. };
  362.  
  363. #define    STM_PAUSE        1
  364. #define    STM_PLAY        2
  365. #define    STM_CONTENTS        3
  366. #define    STM_INDEX        4
  367. #define    STM_RETRACE        5
  368. #define    STM_BROWSE_PREV        6
  369. #define    STM_BROWSE_NEXT        7
  370.  
  371. #define    STM_NEXT_FIELD        8
  372. #define    STM_PREV_FIELD        9
  373. #define    STM_ACTIVATE_FIELD    10
  374.  
  375. #define    STM_COMMAND        11
  376.  
  377. /* New for V40 */
  378. #define    STM_REWIND        12
  379. #define    STM_FASTFORWARD        13
  380. #define    STM_STOP        14
  381. #define    STM_RESUME        15
  382. #define    STM_LOCATE        16
  383.  
  384. /* Printer IO request */
  385. union printerIO
  386. {
  387.     struct IOStdReq ios;
  388.     struct IODRPReq iodrp;
  389.     struct IOPrtCmdReq iopc;
  390. };
  391.  
  392. /* DTM_PRINT */
  393. struct dtPrint
  394. {
  395.     ULONG         MethodID;
  396.     struct GadgetInfo    *dtp_GInfo;        /* Gadget information */
  397.     union printerIO    *dtp_PIO;        /* Printer IO request */
  398.     struct TagItem    *dtp_AttrList;        /* Additional attributes */
  399. };
  400.  
  401. /* DTM_DRAW */
  402. struct dtDraw
  403. {
  404.     ULONG         MethodID;
  405.     struct RastPort    *dtd_RPort;
  406.     LONG         dtd_Left;
  407.     LONG         dtd_Top;
  408.     LONG         dtd_Width;
  409.     LONG         dtd_Height;
  410.     LONG         dtd_TopHoriz;
  411.     LONG         dtd_TopVert;
  412.     struct TagItem    *dtd_AttrList;        /* Additional attributes */
  413. };
  414.  
  415. /* DTM_WRITE */
  416. struct dtWrite
  417. {
  418.     ULONG         MethodID;
  419.     struct GadgetInfo    *dtw_GInfo;        /* Gadget information */
  420.     BPTR         dtw_FileHandle;    /* File handle to write to */
  421.     ULONG         dtw_Mode;
  422.     struct TagItem    *dtw_AttrList;        /* Additional attributes */
  423. };
  424.  
  425. /* Save data as IFF data */
  426. #define    DTWM_IFF    0
  427.  
  428. /* Save data as local data format */
  429. #define    DTWM_RAW    1
  430.  
  431. #endif /* DATATYPES_DATATYPESCLASS_H */
  432.