home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD5.iso / workbench / docs / datatypes.library.doc < prev    next >
Encoding:
Text File  |  1997-03-29  |  91.6 KB  |  2,778 lines

  1. TABLE OF CONTENTS
  2.  
  3. datatypes.library/--background--
  4. datatypes.library/--V45_release--
  5. datatypes.library/AddDTObject
  6. datatypes.library/CopyDTMethods
  7. datatypes.library/CopyDTTriggerMethods
  8. datatypes.library/DisposeDTObject
  9. datatypes.library/DoAsyncLayout
  10. datatypes.library/DoDTDomainA
  11. datatypes.library/DoDTMethodA
  12. datatypes.library/DrawDTObjectA
  13. datatypes.library/FindMethod
  14. datatypes.library/FindToolNodeA
  15. datatypes.library/FindTriggerMethod
  16. datatypes.library/FreeDTMethods
  17. datatypes.library/GetDTAttrsA
  18. datatypes.library/GetDTMethods
  19. datatypes.library/GetDTString
  20. datatypes.library/GetDTTriggerMethodDataFlags
  21. datatypes.library/GetDTTriggerMethods
  22. datatypes.library/LaunchToolA
  23. datatypes.library/LockDataType
  24. datatypes.library/NewDTObjectA
  25. datatypes.library/ObtainDataTypeA
  26. datatypes.library/ObtainDTDrawInfoA
  27. datatypes.library/PrintDTObjectA
  28. datatypes.library/RefreshDTObjectA
  29. datatypes.library/ReleaseDataType
  30. datatypes.library/ReleaseDTDrawInfo
  31. datatypes.library/RemoveDTObject
  32. datatypes.library/rexx/--rexxhost--
  33. datatypes.library/rexx/EXAMINEDT
  34. datatypes.library/SaveDTObjectA
  35. datatypes.library/SetDTAttrsA
  36. datatypes.library/StartDragSelect
  37. datatypesclass/--datasheed--
  38. datatypesclass/DTM_ABORTPRINT
  39. datatypesclass/DTM_ASYNCLAYOUT
  40. datatypesclass/DTM_FRAMEBOX
  41. datatypesclass/DTM_PRINT
  42. datatypesclass/DTM_PROCLAYOUT
  43. datatypesclass/DTM_REMOVEDTOBJECT
  44. datatypesclass/DTM_WRITE
  45. datatypesclass/GM_DOMAIN
  46. datatypesclass/GM_GOACTIVE
  47. datatypesclass/GM_GOINACTIVE
  48. datatypesclass/GM_HANDLEINPUT
  49. datatypesclass/GM_HITTEST
  50. datatypesclass/GM_LAYOUT
  51. datatypesclass/OM_DISPOSE
  52. datatypesclass/OM_GET
  53. datatypesclass/OM_NEW
  54. datatypesclass/OM_SET
  55. datatypesclass/OM_UPDATE
  56. datatypes.library/--background--             datatypes.library/--background--
  57.  
  58.     PURPOSE
  59.         The datatypes.library provides transparent data handling
  60.         abilities to applications.  Application developers can register
  61.         their data format with datatypes.library and provide a class
  62.         library for handling their data within other applications.
  63.  
  64.     OVERVIEW
  65.  
  66.         * Object Oriented
  67.  
  68.           datatypes.library implementation is object oriented, using the
  69.           boopsi functions of Intuition.  Each data class is implemented
  70.           as a shared system library.
  71.  
  72.         * Embedded Objects
  73.  
  74.           datatypes.library provides the ability to embed different object
  75.           types within an application.  For example, an application can
  76.           embed an picture object or even an AmigaGuide document browser
  77.           within their application's window.  Objects can also be embedded
  78.           within other objects.
  79.  
  80.           See Examples/embed_datatype/
  81.  
  82.         * Gadget-like
  83.  
  84.           Embedded objects are actually boopsi gadgets.  That means that
  85.           input handling is done on Intuition's task.  Time intensive
  86.           operations, such as layout when the window size changes, are
  87.           off-loaded to a sub-process.  Printing, clipboard operations,
  88.           file read/write are also off-loaded to a separate process on an
  89.           as-needed basis.
  90.  
  91.           See Examples/DTRequester/DTRequester.c
  92.  
  93.         * Image-like
  94.  
  95.           Embedded objects can also be treated as boopsi images.
  96.           For example, an application can draw an image into the background
  97.           of it's GUI, without fiddling with any internals of the object.
  98.  
  99.           See Examples/DTImage/DTImage.c
  100.  
  101.         * Trigger Methods
  102.  
  103.           Sometimes it is necessary for an application to provide
  104.           additional controls for navigating through an object.  For
  105.           example, with an AmigaGuide object it is necessary to have
  106.           controls for "Contents", "Index", "Browse >", "Browse <".  Each
  107.           class implements a method that returns the trigger methods, and
  108.           the appropriate labels, that a class supports. Options can
  109.           also provided to those trigger methods.
  110.  
  111.           See Examples/DTRequester/DTRequester.c
  112.  
  113.         * Format Conversion
  114.  
  115.           As long as the objects are sub-classes of the same class, data
  116.           from one format can be written out as another format.  For
  117.           example, it is possible to read in an ILBM file and write out a
  118.           JPEG file, since both data types are sub-classes of PICTURE.
  119.  
  120.           See Examples/DTConvert/DTConvert.c
  121.  
  122.         * Future Compatible
  123.  
  124.           Each class implements a method that returns the supported
  125.           methods within a class.  This way an application can ask an
  126.           object if it is capable of any particular method, such as
  127.           DTM_WRITE for example.
  128.  
  129.         * Data Type Detection
  130.  
  131.           datatypes.library provides the ability to examine a file or
  132.           the clipboard to determine what type of data it contains.
  133.  
  134.           See Examples/DoDT/DoDT.c and
  135.               Examples/DTDescrlist/DTDescrlist.c
  136.  
  137.         * "Supported Tools"
  138.  
  139.           datatypes.library maintains lists (for each data type) of
  140.           applications which supports this special datatype for their
  141.           actions (browse, edit, info, print, mail etc.).
  142.           These tools can be launched from within datatypes.library.
  143.  
  144.           This lists can be edited using AddDataTypes (AddDataTypes edit).
  145.  
  146.           See Examples/DoDT/DoDT.c and
  147.               Examples/DTDescrlist/DTDescrlist.c
  148.  
  149.  
  150. datatypes.library/--V45_release--           datatypes.library/--V45_release--
  151.  
  152.     MISC
  153.         The datatypes.library V45 has been written to replace the old
  154.         datatypes.library V40.6
  155.  
  156.         It introduces some interesting new features, fixes some
  157.         inconsistensies and sets more strictly rules when using
  158.         objects.
  159.  
  160.     FEATURES
  161.         - The new datatypes.library V45 supports "tools", which are attached
  162.           to each datatype. Those user-defined tools are defined to handle
  163.           the datatype, an application which uses datatypes is now able to
  164.           select such a tool, search for it and launch it.
  165.  
  166.         - DataTypes objects can reside inside a intuition requester.
  167.  
  168.         - Supports GM_DOMAIN, which allows to include a datatypes object
  169.           in environments which uses dynamic layout (like MUI, for example).
  170.  
  171.         - Implements and describes DTM_OBTAINDRAWINFO/DTM_DRAW/
  172.           DTM_RELEASEDRAWINFO, which allows usage of a datatypes object as
  173.           an image.
  174.  
  175.         - V45 defines an interface for progressive loading (like GIF
  176.           pictures or SGML/HTML texts).
  177.  
  178.         - Added some usefull interfaces, such as SaveDTObjectA (DTM_WRITE)
  179.           or StartDragSelect (marking).
  180.  
  181.     RULES
  182.         The following list has not been completet yet...
  183.  
  184.         The new datatypes.library is fully backwards compatible to V40.6,
  185.         but adds new features, and will rely on them if a datatype class
  186.         has a version equal or higher than V45.
  187.  
  188.         - All subclasses must use a ClassLibrary structure.
  189.  
  190.           from <intuition/classes.h>, V40.0
  191.  
  192.           -- snip --
  193.  
  194.             struct ClassLibrary
  195.             {
  196.               struct Library  cl_Lib;   /* Embedded library     */
  197.               UWORD           cl_Pad;   /* Align the structure  */
  198.               Class          *cl_Class; /* Class pointer        */
  199.             };
  200.  
  201.           -- snip --
  202.  
  203.           This was intruduced to support GM_DOMAIN and other methods
  204.           which does not require an object, and to be consistent
  205.           with other boopsi classes which should have also this interface.
  206.  
  207.         - All subclasses have to support requesters. I've included
  208.           a small example which explains the usage, see
  209.           "Examples/dtrequester/dtrequester.c".
  210.           Currently, only picture.datatype V42.1, sound.datatype
  211.           and animation.datatype V41 supports this correctly.
  212.  
  213.         - A DTM_WRITE method with a NULL file handle must be a NOP, but
  214.           returning correct return codes in Resul2 (IoErr).
  215.           This was introduced to check if a particular subclass supports
  216.           DTM_WRITE with DTWM_RAW (local format).
  217.  
  218.         - V45 introduces an "Application" and a "Subclass" interface.
  219.           This means that the applicability of attributes for applications
  220.           and subclasses are different.
  221.           For example, the DTA_ObjName is (ISGU) for subclasses, and
  222.           (G) for applications.
  223.           (The only exception of this is if an application creates an object
  224.           with DTST_RAM. This application will be allowed to act like a
  225.           subclass).
  226.  
  227.         - Objects must be able to be added to a window as a gadget
  228.           (AddDTObject), beeing removed from it (RemoveDTObject), added again
  229.           an another window in another screen. This must be repeatable
  230.           in any number (see Examples/Examples/DTRequester.c, '+' and '-'
  231.           keyboard shortcuts).
  232.  
  233.         - If a datatypes class is not designed to support sub-classes, the
  234.           OM_NEW method MUST reject such an attempt (ERROR_NOT_IMPLEMENTED).
  235.  
  236.           The following statement handels such a case:
  237.  
  238.           /* This must not be a subclass of embed.datatype
  239.            * (not implemented nor supported)
  240.            */
  241.           if( o == (Object *)cl )
  242.           {
  243.             /* Ok ! */
  244.           }
  245.           else
  246.           {
  247.             /* Subclasses of embed.datatype are not supported */
  248.             SetIoErr( ERROR_NOT_IMPLEMENTED );
  249.           }
  250.  
  251.         - Check your inputs. Maybe, an application tries to feed a datatype
  252.           object with rubbish.
  253.  
  254.           A common mistake the datatype classes have today is the missing
  255.           check if the datatype supports the given input handle type.
  256.  
  257.           The following code shows the correct check for this (checked
  258.           inside OM_NEW):
  259.  
  260.           -- snip --
  261.  
  262.           /* We only support DTST_FILE as source type */
  263.           if( ti = FindTagItem( DTA_SourceType,
  264.                                 (((struct opSet *)msg) -> ops_AttrList) ) )
  265.           {
  266.             if( (ti -> ti_Data) != DTST_FILE )
  267.             {
  268.               SetIoErr( ERROR_NOT_IMPLEMENTED );
  269.  
  270.               break;
  271.             }
  272.           }
  273.  
  274.           -- snip --
  275.  
  276.           Note: The DTA_SourceType attribute is examined from the OM_NEW
  277.           msg (ops_AttrList). You __MUST__ not examine DTA_Handle in such a
  278.           way.
  279.           The DTA_Handle is set up by datatypesclass ONLY, and noone else.
  280.           See OM_GET/DTA_Handle for further explanations.
  281.  
  282.         - Each datatype should be shipped with an autodoc, which contains
  283.           (at least) the following entries:
  284.  
  285.           --datatsheed--    Short summary of the datatype
  286.           --input_format--  Description how the input format looks like
  287.           OM_NEW            What attributes does the datatype recognize ?
  288.           OM_SET/OM_UPDATE  Attributes to set/update etc.
  289.  
  290.           and so on.
  291.  
  292.     TODO
  293.         - Add a general, flexible preferences scheme.
  294.  
  295. datatypes.library/AddDTObject                   datatypes.library/AddDTObject
  296.  
  297.      NAME
  298.         AddDTObject -- Add an object to a window or requester.   (V39)
  299.  
  300.      SYNOPSIS
  301.         realposition = AddDTObject( window, requester, object, position );
  302.         d0                          a0      a1         a2      d0
  303.  
  304.         LONG AddDTObject( struct Window *, struct Requester *,
  305.                           Object *, LONG );
  306.  
  307.      FUNCTION
  308.         This function adds a single object to the gadget list of the given
  309.         window or requester at the position in the list specified by the
  310.         position argument.
  311.  
  312.         When the object is added to the gadget list, the object will
  313.         receive a GM_LAYOUT message with the gpl_Initial field set to
  314.         one.
  315.  
  316.         If a requester is specified, this function will set the 
  317.         GTYP_REQGADGET flag.
  318.  
  319.      INPUTS
  320.         window    - Pointer to the window.
  321.                     A NULL arg is NOP (V45).
  322.  
  323.         requester - Pointer to the requester (V45)
  324.  
  325.         object    - Pointer to an object as returned by NewDTObjectA.
  326.                     A NULL arg is NOP (V45).
  327.  
  328.         position  - Integer position in the list for the new gadget.
  329.                     -1 to add to the end of the list.
  330.  
  331.      RETURNS
  332.         Returns the position of where the object was actually added.
  333.  
  334.      NOTE
  335.         Since V45, DataTypes objects can be added to requesters, too.
  336.         But you can only rely on this feature if the datatype itself
  337.         has the version V45. A requester in which a datatype resides
  338.         must not be closed before the datatype got a DTM_REMOVEDTOBJECT msg,
  339.         must not be a DM Requester nor have a GACT_ENGADGET gadget.
  340.  
  341.         Note that this function __MUST__ not be uses when a datatype
  342.         object is embedded within another BOOPSI gadget. The
  343.         parent object is responsible to pass all required methods
  344.         including initial GM_LAYOUT and DTM_REMOVEDTOBJECT to
  345.         the embedded object.
  346.  
  347.      BUGS
  348.         If a requester was specified, GM_LAYOUT is send manually
  349.         by this function (intuition.library din't send a GM_LAYOUT,
  350.         OS bug ??).
  351.  
  352.      SEE ALSO
  353.         RemoveDTObject,
  354.         intuition.library/AddGList
  355.  
  356. datatypes.library/CopyDTMethods               datatypes.library/CopyDTMethods
  357.  
  358.    NAME
  359.         CopyDTMethods -- Clone and modify DTA_Methods array (V45)
  360.  
  361.    SYNOPSIS
  362.         newmethods = CopyDTMethods( methods, include, exclude );
  363.                                     a0       a1       a2
  364.  
  365.         ULONG *CopyDTMethods( ULONG *, ULONG *, ULONG * );
  366.  
  367.    FUNCTION
  368.         Copy and modify array of supported methods.
  369.  
  370.         This function is used for subclass implementors, who want to
  371.         add their methods (like DTM_TRIGGER) to the array of supported
  372.         methods.
  373.  
  374.    INPUTS
  375.         methods - Methods array, as obtained by GetDTMethods or DTA_Methods.
  376.             NULL causes the function to return NULL.
  377.  
  378.         include - Methods to include, ~0UL terminated. May be NULL.
  379.  
  380.         exclude - Methods to exclude, ~0UL terminated. May be NULL.
  381.  
  382.    RESULT
  383.         newmethods - New array of methods or NULL (no memory).
  384.  
  385.    BUGS
  386.         Methods to exclude will simply be overwritten by OM_NEW.
  387.         This is not really a bug, since OM_NEW should appear in any
  388.         DTA_Methods array.
  389.  
  390.    SEE ALSO
  391.         FindMethod,
  392.         CopyDTTriggerMethods,
  393.         FreeDTMethods
  394.  
  395. datatypes.library/CopyDTTriggerMethods datatypes.library/CopyDTTriggerMethods
  396.  
  397.    NAME
  398.         CopyDTTriggerMethods -- Clone and modify DTA_TriggerMethods array
  399.                                                                       (V45)
  400.  
  401.    SYNOPSIS
  402.         newmethods = CopyDTTriggerMethods( methods, include, exclude );
  403.                                            a0       a1       a2
  404.  
  405.         struct DTMethod *CopyDTTriggerMethods( struct DTMethod *,
  406.                                                struct DTMethod *,
  407.                                                struct DTMethod * );
  408.  
  409.    FUNCTION
  410.         Copy and modify a DTMethods array.
  411.         This function is for subclass implementors for an easy way to
  412.         add their trigger methods to exising ones, or disable some because
  413.         they're internally used.
  414.  
  415.    INPUTS
  416.         methods - Methods array, as obtained by GetDTTriggerMethods or
  417.             DTA_TriggerMethods.
  418.             NULL causes the function to return NULL.
  419.  
  420.         include - Trigger methods to include. May be NULL.
  421.  
  422.         exclude - Trigger methods to exclude. May be NULL.
  423.                   The dtm_Command and dtm_Method fields may have
  424.                   the options described in FindTriggerMethod to
  425.                   filter/match out the given entries.
  426.  
  427.    NOTE
  428.         It is assumed that the dtm_Label and dtm_Command strings are
  429.         valid as long as the object exists. They are NOT copied.
  430.  
  431.         Subclasses which implements DTM_TRIGGER __MUST__ send unknown
  432.         trigger methods to it's superclass.
  433.  
  434.    RESULT
  435.         newmethods - New array of methods or NULL (no memory).
  436.  
  437.    SEE ALSO
  438.         FindTriggerMethod,
  439.         CopyDTMethods,
  440.         FreeDTMethods
  441.  
  442. datatypes.library/DisposeDTObject           datatypes.library/DisposeDTObject
  443.  
  444.      NAME
  445.         DisposeDTObject -- Delete a data type object.            (V39)
  446.  
  447.      SYNOPSIS
  448.         DisposeDTObject( o );
  449.                          a0
  450.  
  451.         VOID DisposeDTObject( Object * );
  452.  
  453.      FUNCTION
  454.         This function is used to dispose of a data type object that was
  455.         obtained with NewDTObjectA. The shared class library which
  456.         was opened at NewDTObjectA time will also be closed.
  457.  
  458.         This function will wait for an outstanding print or layout process.
  459.  
  460.      INPUTS
  461.         o - Pointer to an object as returned by NewDTObjectA.
  462.             NULL is a valid input.
  463.  
  464.      NOTE
  465.         Be sure that the boopsi class struct IClass member cl_UserData points
  466.         to the shared library class base.
  467.  
  468.      SEE ALSO
  469.         NewDTObjectA,
  470.         intuition.library/DisposeObject,
  471.         datatypesclass/OM_DISPOSE
  472.  
  473. datatypes.library/DoAsyncLayout               datatypes.library/DoAsyncLayout
  474.  
  475.      NAME
  476.         DoAsyncLayout -- Call the DTM_ASYNCLAYOUT method on a separate
  477.                          process.                                     (V39)
  478.  
  479.      SYNOPSIS
  480.         retval = DoAsyncLayout( object, gpl );
  481.         d0                      a0      a1
  482.  
  483.         ULONG DoAsyncLayout( Object *, struct gpLayout * );
  484.  
  485.      FUNCTION
  486.         This function is used to asyncronously perform the object's
  487.         DTM_ASYNCLAYOUT method.  This is used to offload the layout method
  488.         from input.device.
  489.  
  490.         The DTM_ASYNCLAYOUT method must exit when SIGBREAKF_CTRL_C signal
  491.         is set.   This indicates that the data has become obsolete and
  492.         the DTM_ASYNCLAYOUT method will be called again.
  493.  
  494.         Starting with V45, the stack size increases from 4096 up to 8192
  495.         bytes.
  496.  
  497.      INPUTS
  498.         object - Pointer to the data types object.
  499.  
  500.         gpl    - Pointer to a gpLayout message.
  501.  
  502.      RETURNS
  503.         TRUE for success, FALSE for failure
  504.  
  505.      NOTE
  506.         - Note that the AsyncDTLayoutDaemon process obtains the
  507.           DTSpecialInfo semaphore exclusively before triggering the
  508.           DTM_ASYNCLAYOUT method. It will be released immediately when the
  509.           method is done.
  510.  
  511.         - When a layout deamon process is started, this function send a
  512.           notify msg with { DTA_Data, NULL }. This msg indicates
  513.           that there are currently no data available in this object.
  514.  
  515.           When DTM_ASYNCLAYOUT is done, the layout deamon sends a notify msg
  516.           with the following tags:
  517.  
  518.           { GA_ID,               Gadget ID             },
  519.           { DTA_Data,            object                },
  520.           { DTA_TopVert,         (dtsi -> si_TopVert)  },
  521.           { DTA_VisibleVert,     (dtsi -> si_VisVert)  },
  522.           { DTA_TotalVert,       (dtsi -> si_TotVert)  },
  523.           { DTA_TopHoriz,        (dtsi -> si_TopHoriz) },
  524.           { DTA_VisibleHoriz,    (dtsi -> si_VisHoriz) },
  525.           { DTA_TotalHoriz,      (dtsi -> si_TotHoriz) },
  526.           { DTA_Sync,            TRUE                  },
  527.           { DTA_Busy,            FALSE                 }
  528.  
  529.      SEE ALSO
  530.         datatypesclass/DTM_ASYNCLAYOUT
  531.  
  532. datatypes.library/DoDTDomainA                   datatypes.library/DoDTDomainA
  533.  
  534.    NAME
  535.         DoDTDomainA -- Obtain the min/nom/max domains of a dt object (V45)
  536.  
  537.    SYNOPSIS
  538.         retval = DoDTDomainA( o, win, req, rport, which, domain, attrs );
  539.                               a0 a1   a2   a3     d0     a4      a5
  540.  
  541.         ULONG DoDTDomainA( Object *, struct Window *, struct Requester *,
  542.               struct RastPort *, ULONG, struct IBox *, struct TagItem * );
  543.  
  544.         retval = DoDTDomain( o, win, req, rport, which, domain, tag1,
  545.                              ... );
  546.  
  547.         ULONG DoDTDomain( Object *, struct Window *, struct Requester *,
  548.               struct RastPort *, ULONG, struct IBox *, Tag, ... );
  549.  
  550.    FUNCTION
  551.  
  552.    INPUTS
  553.         o      - Object like returned from NewDTObjectA
  554.  
  555.         win    - Window the object is attached to
  556.  
  557.         req    - Requester the object is attached to
  558.  
  559.         rport  - RastPort, used for domain calculations
  560.  
  561.         which  - one of the GDOMAIN_#? identifiers from
  562.             <intuition/gadgetclass.h>
  563.  
  564.         domain - resulting domain box
  565.  
  566.         attrs  - Additional attributes
  567.  
  568.    TAGS
  569.         Subclass specific.
  570.  
  571.         Example:
  572.             DTA_TextAttr (struct TextAttr *) - Default object font
  573.                 used for text calculations.
  574.  
  575.    RETURNS
  576.         retval - The return value returned by GM_DOMAIN or 0UL for an error.
  577.  
  578.         domain - On success, the domain box will be filled with the
  579.                  gadget's domain dimensions for this particular GDOMAIN_#?
  580.                  id.
  581.  
  582.    EXAMPLE
  583.         See "Examples/dtrequester/dtrequester.c" or
  584.         "Examples/dtimage/dtimage.c".
  585.  
  586.    NOTE
  587.         This function cannot handle the GM_DOMAIN method without
  588.         an object. To do this, you have to use CoreceMethodA
  589.         manually.
  590.  
  591.    SEE ALSO
  592.         datatypesclass/GM_DOMAIN,
  593.         <intuition/gadgetclass.h>
  594.  
  595. datatypes.library/DoDTMethodA                   datatypes.library/DoDTMethodA
  596.  
  597.      NAME
  598.         DoDTMethodA -- Do a datatypes method.                    (V39)
  599.  
  600.      SYNOPSIS
  601.         retval = DoDTMethodA( o, win, req, msg );
  602.         d0                    a0 a1   a2   a3
  603.  
  604.         ULONG DoDTMethodA( Object *, struct Window *, struct Requester *,
  605.                            Msg );
  606.  
  607.         retval = DoDTMethod( o, win, req, data, ... );
  608.  
  609.         ULONG DoDTMethod( Object *, struct Window *, struct Requester *,
  610.                           ULONG, ... );
  611.  
  612.      FUNCTION
  613.         This function is used to perform a method on a datatypes object.
  614.  
  615.      INPUTS
  616.         o   - Pointer to an object as returned by NewDTObjectA.
  617.  
  618.         win - Pointer to a window that the object is attached to.
  619.  
  620.         req - Pointer to a requester that the object is attached to. (V45)
  621.  
  622.         msg - The message to send to the object.
  623.  
  624.      RETURNS
  625.         retval - Returns the value returned by the method.
  626.  
  627.      SEE ALSO
  628.         intuition.library/DoGadgetMethodA
  629.  
  630. datatypes.library/DrawDTObjectA               datatypes.library/DrawDTObjectA
  631.  
  632.    NAME
  633.        DrawDTObjectA -- Draw a DataTypes object.                (V39)
  634.  
  635.    SYNOPSIS
  636.        retval = DrawDTObjectA( rp, o, x, y, w, h, th, tv, attrs );
  637.        d0                      a0  a1 d0 d1 d2 d3 d4  d5  a2
  638.  
  639.        LONG DrawDTObjectA( struct RastPort *, Object *, LONG, LONG,
  640.                            LONG, LONG, LONG, LONG,
  641.                            struct TagItem * );
  642.  
  643.        retval = DrawDTObject( rp, o, x, y, w, h, th, tv, tag1, ... );
  644.  
  645.        LONG DrawDTObject( struct RastPort *, Object *, LONG, LONG,
  646.                           LONG, LONG, LONG, LONG, Tag, ... );
  647.  
  648.    FUNCTION
  649.        This function is used to draw a DataTypes object into a RastPort.
  650.  
  651.        This function can be used for strip printing the object or
  652.        embedding it within a document.
  653.  
  654.        You must successfully call ObtainDTDrawInfoA before using
  655.        this function.
  656.  
  657.        This function invokes the object's DTM_DRAW method.
  658.  
  659.        Clipping MUST be turned on within the RastPort.  This means
  660.        that there must be a valid layer structure attached to the
  661.        RastPort, otherwise some datatypes can't draw (FALSE returned).
  662.  
  663.    INPUTS
  664.        rp    - Pointer to the RastPort to draw into.
  665.                Starting with V45, a NULL arg will result in a NOP.
  666.  
  667.        o     - Pointer to an object returned by NewDTObjectA.
  668.                Starting with V45, a NULL arg will result in a NOP.
  669.  
  670.        x     - Left edge of area to draw into.
  671.  
  672.        y     - Top edge of area to draw into.
  673.  
  674.        w     - Width of area to draw into.
  675.  
  676.        h     - Height of area to draw into.
  677.  
  678.        th    - Horizontal top in units.
  679.  
  680.        tv    - Vertical top in units.
  681.  
  682.        attrs - Additional attributes.
  683.  
  684.    TAGS
  685.        Good args args are ADTA_Frame for animationclass objects (requires
  686.        animationclass V41), which selects the frame beeing drawn.
  687.  
  688.    RETURNS
  689.        TRUE to indicate that it was able to render, FALSE on failure;
  690.  
  691.    EXAMPLES
  692.        See "Examples/dtimage/dtimage.c".
  693.  
  694.    SEE ALSO
  695.        ObtainDTDrawInfo, ReleaseDTDrawInfo,
  696.        intuition.library/DrawImageState,
  697.        "Examples/dtimage/dtimage.c".
  698.  
  699. datatypes.library/FindMethod                     datatypes.library/FindMethod
  700.  
  701.    NAME
  702.         FindMethod -- find a specified method in methods array (V45)
  703.  
  704.    SYNOPSIS
  705.         method = FindMethod( methods, searchmethodid );
  706.         d0                   a0       a1
  707.  
  708.         ULONG *FindMethod( ULONG *, ULONG );
  709.  
  710.    FUNCTION
  711.         This function searches for a given method in a given methods
  712.         array like got from GetDTMethods.
  713.  
  714.    INPUTS
  715.         methods - methods array, like got from GetDTMethods or DTA_Methods
  716.                   NULL is a valid arg.
  717.  
  718.         searchmethodid - method id to find.
  719.  
  720.    RETURNS
  721.         Pointer to the method table entry or NULL if not found.
  722.  
  723.    EXAMPLE
  724.         /* This macro tests if a given method (like DTM_PRINT) is
  725.          * supported by the given object
  726.          */
  727.         #define IsDTMethodSupported( o, id ) \
  728.                 ((BOOL)FindMethod(GetDTMethods( (o) ), (id) ))
  729.  
  730.    SEE ALSO
  731.        GetDTMethods,
  732.        CopyDTMethods
  733.  
  734. datatypes.library/FindToolNodeA               datatypes.library/FindToolNodeA
  735.  
  736.    NAME
  737.         FindToolNodeA -- Find a tool node (V45)
  738.  
  739.    SYNOPSIS
  740.         tn = FindToolNodeA( toollist, attrs );
  741.         d0                  a0        a1
  742.  
  743.         struct ToolNode *FindToolNodeA( struct List *,
  744.                                         struct TagItem * );
  745.  
  746.         tn = FindToolNode( toollist, tag1, ... );
  747.  
  748.         ULONG FindToolNode( struct List *, ... );
  749.  
  750.    FUNCTION
  751.         This function searches for a given tool in a list of tool nodes.
  752.  
  753.    INPUTS
  754.         toollist - struct List * or a struct ToolNode * (which will be
  755.                    skipped) to search in.
  756.                    NULL is a valid arg.
  757.  
  758.         attrs    - Search tags.
  759.                    A NULL arg returns simple the following node.
  760.  
  761.    TAGS
  762.         TOOLA_Program    - name of the program to search for
  763.  
  764.         TOOLA_Which      - one of the TW_#? types.
  765.  
  766.         TOOLA_LaunchType - Launch mode; TF_SHELL, TF_WORKBENCH or TF_RX
  767.  
  768.    RETURNS
  769.         struct ToolNode * or NULL
  770.  
  771.    EXAMPLE
  772.         See "Examples/DoDT/DoDT.c".
  773.  
  774.    NOTE
  775.         This function is not limitted to the (&(DataType -> dtn_ToolList));
  776.         programmers can set up their own lists.
  777.         The (&(DataType -> dtn_ToolList)) entries are valid as long as 
  778.         the application obtains a lock to the DataType (as obtained from
  779.         a dt object, ObtainDataTypeA or LockDataType).
  780.  
  781.    SEE ALSO
  782.        LaunchToolA
  783.  
  784. datatypes.library/FindTriggerMethod       datatypes.library/FindTriggerMethod
  785.  
  786.    NAME
  787.         FindTriggerMethod -- find a specified trigger method in trigger
  788.                              methods array                         (V45)
  789.  
  790.    SYNOPSIS
  791.         method = FindTriggerMethod( dtm, command, method );
  792.         d0                          a0   a1       d0
  793.  
  794.         struct DTMethod *FindTriggerMethod( struct DTMethod *, STRPTR, 
  795.                                             ULONG );
  796.  
  797.    FUNCTION
  798.         This function searches for a given trigger method in a given methods
  799.         array like got from GetDTTriggerMethods.
  800.  
  801.         If one of the "command" or "method" args matches a array item, this
  802.         function returns a pointer to it.
  803.  
  804.    INPUTS
  805.         methods - trigger methods array, like got from GetDTTriggerMethods
  806.                   or DTA_TriggerMethods.
  807.                   NULL is a valid arg.
  808.  
  809.         command - trigger method command name (case-insensitive match),
  810.                   may be NULL (don't match).
  811.  
  812.         method  - trigger method id,
  813.                   may be ~0UL (don't match).
  814.  
  815.    RETURNS
  816.         Pointer to the trigger method table entry (struct DTMethod *) or
  817.         NULL if not found.
  818.  
  819.    EXAMPLE
  820.  
  821.    SEE ALSO
  822.        GetDTTriggerMethods,
  823.        CopyDTTriggerMethods
  824.  
  825. datatypes.library/FreeDTMethods               datatypes.library/FreeDTMethods
  826.  
  827.    NAME
  828.         FreeDTMethods -- Free methods array obtained by CopyDT#?Methods (V45)
  829.  
  830.    SYNOPSIS
  831.         FreeDTMethods( methods );
  832.                        a0
  833.  
  834.         VOID FreeDTMethods( APTR );
  835.  
  836.    FUNCTION
  837.  
  838.    INPUTS
  839.         methods - Methods array, as obtained by CopyDTMethods or
  840.             CopyDTTriggerMethods. NULL is a valid input.
  841.  
  842.    SEE ALSO
  843.         CopyDTMethods,
  844.         CopyDTTriggerMethods
  845.  
  846. datatypes.library/GetDTAttrsA                   datatypes.library/GetDTAttrsA
  847.  
  848.      NAME
  849.         GetDTAttrsA -- Obtain attributes for an object.          (V39)
  850.  
  851.      SYNOPSIS
  852.         retval = GetDTAttrsA( o, attrs );
  853.         d0                    a0 a2
  854.  
  855.         ULONG GetDTAttrsA( Object *, struct TagItem * );
  856.  
  857.         retval = GetDTAttrs( o, tag1, ... );
  858.  
  859.         ULONG GetDTAttrs( Object *, Tag, ... );
  860.  
  861.      FUNCTION
  862.         This function is used to get the attributes of a data type
  863.         object.
  864.  
  865.      INPUTS
  866.         o     - Pointer to an object as returned by NewDTObjectA.
  867.                 A NULL arg is valid (V45).
  868.  
  869.         attrs - Attributes to get, terminated with TAG_DONE.  The data
  870.                 element of each pair contains the address of the storage
  871.                 variable.
  872.                 A NULL arg is valid (V45).
  873.  
  874.      TAGS
  875.         See datatypesclass/OM_GET and <datatypes/datatypesclass.h> for
  876.         attributes.
  877.  
  878.      RETURNS
  879.         retval - Contains the number of attributes the system was able
  880.                  to obtain.
  881.  
  882.      SEE ALSO
  883.         datatypesclass/OM_GET,
  884.         SetDTAttrsA,
  885.         intuition.library/GetAttr
  886.  
  887. datatypes.library/GetDTMethods                 datatypes.library/GetDTMethods
  888.  
  889.      NAME
  890.         GetDTMethods -- Obtain methods an object supports.       (V39)
  891.  
  892.      SYNOPSIS
  893.         methods = GetDTMethods( object );
  894.         d0                      a0
  895.  
  896.         ULONG *GetDTMethods( Object * );
  897.  
  898.      FUNCTION
  899.         This function is used to obtain a list of methods that an
  900.         object supports.
  901.  
  902.      INPUTS
  903.         object - Pointer to an object as returned by NewDTObjectA.
  904.                  NULL is a valid arg (V45).
  905.  
  906.      RETURNS
  907.         Returns a pointer to a ~0 terminated ULONG array.  This array
  908.         is only valid until the object is disposed off.
  909.  
  910.      NOTE
  911.         Some (interactive) objects may change the list of supported
  912.         methods during execution. This change is notified by
  913.         an OM_NOTIFY msg which contains the DTA_Sync tag.
  914.  
  915.      SEE ALSO
  916.         GetDTTriggerMethods,
  917.         FindMethod,
  918.         datatypesclass/OM_GET
  919.  
  920. datatypes.library/GetDTString                   datatypes.library/GetDTString
  921.  
  922.      NAME
  923.         GetDTString -- Obtain a DataTypes string.                (V39)
  924.  
  925.      SYNOPSIS
  926.         str = GetDTString( id );
  927.         d0                 d0
  928.  
  929.         STRPTR GetDTString( ULONG );
  930.  
  931.      FUNCTION
  932.         This function is used to obtain a pointer to a localized
  933.         DataTypes string.
  934.  
  935.      INPUTS
  936.         id - ID of the string to obtain.
  937.  
  938.      RETURNS
  939.         A pointer to a NULL terminated string.
  940.  
  941.      SEE ALSO
  942.  
  943. datatypes.library/GetDTTriggerMethodDataFlagsrary/GetDTTriggerMethodDataFlags
  944.  
  945.    NAME
  946.         GetDTTriggerMethodDataFlags -- Get data type of dtt_Data value (V45)
  947.  
  948.    SYNOPSIS
  949.         type = GetDTTriggerMethodDataFlags( method );
  950.                                             d0
  951.  
  952.         ULONG GetDTTriggerMethodDataFlags( ULONG );
  953.  
  954.    FUNCTION
  955.         This function returns the kind of data which can be attached
  956.         to the stt_Data field in the dtTrigger method body.
  957.  
  958.         The data type can be specified by or'ing the method id (within
  959.         STMF_METHOD_MASK value) with one of the STMD_#? identifiers:
  960.  
  961.         STMD_VOID    - stt_Data MUST be NULL
  962.         STMD_ULONG   - stt_Data contains an unsigned long value
  963.         STMD_STRPTR  - stt_Data is a string pointer
  964.         STMD_TAGLIST - stt_Data points to an array of struct TagItem's,
  965.                        terminated with TAG_DONE
  966.  
  967.         The trigger methods below STM_USER are explicitly handeled, as
  968.         described in <datatypes/datatypesclass.h>, e.g. STM_COMMAND
  969.         return STMD_STRPTR, instead of STMD_VOID.
  970.  
  971.    INPUTS
  972.         method - dtt_Method ID from struct DTMethod
  973.  
  974.    RESULT
  975.         type - one of the STMD_#? identifies in <datatypes/datatypesclass.h>
  976.  
  977.    EXAMPLE
  978.         struct DTMethod htmldtc_dtm[] =
  979.         {
  980.           /* ... */
  981.           "Stop Loading", "STOP",       (STM_STOP | STMD_VOID),
  982.           "Load Images",  "LOADIMAGES", ((STM_USER + 20) | STMD_VOID),
  983.           "Goto URL",     "GOTOURL",    ((STM_USER + 21) | STMD_STRPTR),
  984.           /* ... */
  985.           NULL,           NULL,         0L
  986.         };
  987.  
  988.         Sets up three methods:
  989.           "STOP" takes no arguments,
  990.           "LOADIMAGES" takes no arguments and
  991.           "GOTOURL" takes a STRPTR as an argument.
  992.  
  993.    SEE ALSO
  994.         CopyDTTriggerMethods,
  995.         FindTriggerMethod,
  996.         datatypesclass/DTM_TRIGGER,
  997.         "Examples/dtrequester/dtrequester.c",
  998.         "Examples/CloneMethods/CloneMethods.c"
  999.  
  1000. datatypes.library/GetDTTriggerMethods   datatypes.library/GetDTTriggerMethods
  1001.  
  1002.      NAME
  1003.         GetDTTriggerMethods -- Obtain trigger methods supported by an object
  1004.                                                                 (V39)
  1005.  
  1006.      SYNOPSIS
  1007.         methods = GetDTTriggerMethods( object );
  1008.         d0                             a0
  1009.  
  1010.         struct DTMethod *GetDTTriggerMethods( Object * );
  1011.  
  1012.      FUNCTION
  1013.         This function is used to obtain a list of trigger methods that an
  1014.         object supports.  This is so that an application can provide
  1015.         the appropriate controls (buttons etc.) for an object.  For example,
  1016.         an AmigaGuide object needs controls for "Contents", "Index",
  1017.         "Retrace", "Browse <", and "Browse >",
  1018.  
  1019.      INPUTS
  1020.         object - Pointer to an object as returned by NewDTObjectA.
  1021.                  NULL is a valid arg (V45).
  1022.  
  1023.      RETURNS
  1024.         Returns a pointer to a STM_DONE terminated DTMethod list.  This list
  1025.         is only valid until the object is disposed off.
  1026.  
  1027.      EXAMPLE
  1028.         To call the method:
  1029.  
  1030.         DoDTMethod( object, window, requester,
  1031.                     DTM_TRIGGER, NULL, (dtm[ button ] -> dtm_Method), NULL );
  1032.  
  1033.      WARNING
  1034.         Some trigger methods requires an argument. Calling them with
  1035.         a NULL argument is WRONG. Use GetDTTriggerMethodDataFlags to
  1036.         obtain the type of the requested argument (STMD_VOID means:
  1037.         no arguments).
  1038.  
  1039.      NOTE
  1040.         Some (interactive) objects may change the list of supported
  1041.         trigger methods during execution. This change is notified by
  1042.         an OM_NOTIFY msg which contains the DTA_Sync tag.
  1043.  
  1044.      SEE ALSO
  1045.         GetDTMethods,
  1046.         FindTriggerMethod,
  1047.         datatypesclass/OM_GET
  1048.  
  1049. datatypes.library/LaunchToolA                   datatypes.library/LaunchToolA
  1050.  
  1051.    NAME
  1052.         LaunchToolA -- invoke a given tool with project (V45)
  1053.  
  1054.    SYNOPSIS
  1055.         success = LaunchToolA( tool, project, attrs );
  1056.         d0                     a0    a1       a2
  1057.  
  1058.         ULONG LaunchToolA( struct Tool *, STRPTR, struct TagItem * );
  1059.  
  1060.         success = LaunchTool( tool, project, tag1, ... );
  1061.  
  1062.         ULONG LaunchTool( struct Tool *, STRPTR, ... );
  1063.  
  1064.    FUNCTION
  1065.         This function launches an application with a specified project.
  1066.         The application and it's launch mode and other attributes are
  1067.         specified through the "Tool" structure.
  1068.  
  1069.    INPUTS
  1070.         tool    - Pointer to a Tool structure
  1071.                   NULL is a valid arg.
  1072.  
  1073.         project - Name of the project to execute or NULL.
  1074.  
  1075.         attrs   - Additional attributes
  1076.  
  1077.    TAGS
  1078.         NP_Priority (BYTE) - sets the priority of the launched tool
  1079.             Defaults to the current process's priority for
  1080.             Shell and ARexx programs; Workbench applications
  1081.             defaults to 0 except overridden by the TOOLPRI tooltype.
  1082.  
  1083.         NP_Synchronous (BOOL) - don't return until lauched application proces
  1084. s
  1085.             finishes.
  1086.             Defaults to FALSE.
  1087.  
  1088.         Other tags are __currently__ ignored.
  1089.  
  1090.    RETURNS
  1091.         FALSE for failure, non-zero for success.
  1092.  
  1093.    EXAMPLE
  1094.         See "Examples/DoDT/DoDT.c".
  1095.  
  1096.    NOTE
  1097.         This function requrires the "RX" command when lauching ARexx
  1098.         scripts.
  1099.  
  1100.         This function must be launched from a process, not a simple task.
  1101.  
  1102.         This function is not limitted to use the struct DataType -> dtn_Tools
  1103.         tools. Applications can set up their own struct Tool's as long
  1104.         as these structures contains no rubbish.
  1105.  
  1106.    TODO
  1107.         - Should support multiple projects for WB programs.
  1108.  
  1109.         - Shell tools should have a setable stack size...
  1110.  
  1111.    BUGS
  1112.         - The WB launcher does not search the WB path for "Default Tools".
  1113.  
  1114.         - The "%a" (Arguments) option for shell launched tools does
  1115.           currently not work.
  1116.           Will be fixed.
  1117.  
  1118.         - The path of the launched tools depends on the parents path.
  1119.           If there is no path, shell tools can only launch other tools
  1120.           with their full path.
  1121.  
  1122.    SEE ALSO
  1123.         FindToolNodeA
  1124.  
  1125. datatypes.library/LockDataType                 datatypes.library/LockDataType
  1126.  
  1127.      NAME
  1128.         LockDataType -- Lock a DataType structure.         (V45)
  1129.  
  1130.      SYNOPSIS
  1131.         LockDataType( dtn );
  1132.                       a0
  1133.  
  1134.         VOID LockDataType( struct DataType * );
  1135.  
  1136.      FUNCTION
  1137.         This function is used to lock a DataType structure obtained
  1138.         by ObtainDataTypeA or a datatypes object (DTA_DataType attribute).
  1139.  
  1140.         All calls to LockDataType or ObtainDataTypeA must match the same
  1141.         number of ReleaseDataType calls, otherwise havoc will break out.
  1142.  
  1143.      INPUTS
  1144.         dtn - DataType structure returned by ObtainDataTypeA. NULL
  1145.               is a valid input.
  1146.  
  1147.      NOTE
  1148.         This function has been made public to allow to get a DataType
  1149.         structure from an object (DTA_DataType attribute), and remain the
  1150.         reference valid after the object has been disposed off (which
  1151.         unlocks the DataType structure locked in NewDTObjectA).
  1152.  
  1153.      SEE ALSO
  1154.         ObtainDataTypeA, ReleaseDataType
  1155.  
  1156. datatypes.library/NewDTObjectA                 datatypes.library/NewDTObjectA
  1157.  
  1158.      NAME
  1159.         NewDTObjectA -- Create an data type object.              (V39)
  1160.  
  1161.      SYNOPSIS
  1162.         o = NewDTObjectA( name, attrs );
  1163.         d0                d0   a0
  1164.  
  1165.         Object *NewDTObjectA( APTR, struct TagItem * );
  1166.  
  1167.         o = NewDTObject( name, tag1, ... );
  1168.  
  1169.         Object *NewDTObject( APTR, Tag, ... );
  1170.  
  1171.      FUNCTION
  1172.         This is the method for creating datatype objects from
  1173.         'boopsi' classes. (Boopsi' stands for "basic object-oriented
  1174.         programming system for Intuition".)
  1175.  
  1176.         You further specify initial "create-time" attributes for the
  1177.         object via a TagItem list, and they are applied to the
  1178.         resulting datatype object that is returned.
  1179.  
  1180.      INPUTS
  1181.         name  - Name of the data source.  Usually an existing file name.
  1182.  
  1183.         attrs - Pointer to a taglist containing additional arguments.
  1184.  
  1185.      TAGS
  1186.         DTA_SourceType (ULONG) - Specify the type of source data;
  1187.             such as coming from a file or clipboard.  If source type is
  1188.             clipboard, then the name field contains the numeric clipboard
  1189.             unit.
  1190.             Defaults to DTST_FILE.
  1191.  
  1192.         DTA_Handle - Can optionally be used instead of the name field.
  1193.             Must be a valid Lock (BPTR) if DTA_SourceType is DTST_FILE.
  1194.             Must be a valid IFFHandle (struct IFFHandle *) if DTA_SourceType
  1195.             is DTST_CLIPBOARD.
  1196.             Must be NULL if DTA_SourceType is DTST_RAM.
  1197.  
  1198.         DTA_DataType (struct DataType *) - Specify the class of data.
  1199.             Data is a pointer to a valid DataType.  This is only used when
  1200.             attempting to create a new object that doesn't have any source
  1201.             data or to force the library to use this class to handle the data
  1202. .
  1203.             The datatype given will not be unlocked.
  1204.             Defaults to NULL (use ObtainDataTypeA to determinate the file/
  1205.             clipboard contents type).
  1206.  
  1207.         DTA_BaseName (STRPTR) (V45) - Specify base name of datatype to use.
  1208.             This tag should be used rarely (e.g. if a matching descriptor
  1209.             does not exists). It must only be used with DTST_RAM.
  1210.             Passing both DTA_BaseName and DTA_DataType causes havoc and must
  1211.             be avoided.
  1212.  
  1213.         DTA_GroupID (ULONG) - Specify that the object must be of this type, o
  1214. r
  1215.             NewDTObjectA will fail with IoErr of
  1216.             ERROR_OBJECT_WRONG_TYPE.
  1217.             Defaults to 0 (no specific group).
  1218.  
  1219.  
  1220.         The following list is a collection of attributes recognized by some
  1221.         subclasses. The "Defaults to" are only suggestions, and may or may
  1222.         not have this value for a specific class:
  1223.  
  1224.         DTA_TextAttr (struct TextAttr *) - Specify the default object font
  1225.             which should be used.
  1226.             Defaults to NULL.
  1227.  
  1228.         DTA_NodeName (STRPTR) - Specify the node to load (for those
  1229.             datatypes which splits their data into nodes, such as AmigaGuide
  1230.             or SGML).
  1231.             Defaults to "Main", which means the "Main" entry of the document.
  1232.  
  1233.         DTA_Conductor (STRPTR) - specifies the name of the
  1234.             realtime.library conductor (for syncronisation of events).
  1235.             Defaults to (~0UL) (private conductor).
  1236.  
  1237.         DTA_ControlPanel (BOOL) - Indicate whether a control panel should be
  1238.             embedded within the object (like animation.datatype, for
  1239.             example).
  1240.             Defaults to TRUE.
  1241.  
  1242.         DTA_Immediate (BOOL) - Indicate whether the object should immediate
  1243.             begin playing.
  1244.             Defaults to FALSE.
  1245.  
  1246.         DTA_Repeat (BOOL) - Indicate whether the object should repeat playing
  1247.             (the sound, sample, music or animation).
  1248.             Defaults to FALSE.
  1249.  
  1250.         DTA_ARexxPortName (STRPTR) - Base name for ARexx port
  1251.             Defaults to
  1252.             "<(struct DataTypesHeader -> dth_BaseName)>.<unique count>".
  1253.  
  1254.         DTA_Progressive (BOOL) - Use progressive loading, if possible.
  1255.             Defaults to FALSE.
  1256.  
  1257.         GA_Left, GA_RelRight, GA_Top, GA_RelBottom, GA_Width, GA_RelWidth,
  1258.         GA_Height, GA_RelHeight (WORD) - Specify the placement of the object
  1259.             within the destination window.
  1260.  
  1261.         GA_ID (UWORD) - Specify the object ID.
  1262.  
  1263.         GA_UserData (ULONG) - Specify the application specific data for the
  1264.             object.
  1265.  
  1266.         DTA_UserData (ULONG) - Specify the application specific data for the
  1267.             object.
  1268.  
  1269.      RETURNS
  1270.         A boopsi object, which may be used in different contexts such
  1271.         as a gadget or image, and may be manipulated by generic functions.
  1272.         You eventually free the object using DisposeDTObject.
  1273.  
  1274.         A NULL return indicates failure.  Use IoErr to get error value.
  1275.         Following is a summary of the error number used and there meaning
  1276.         as it relates to DataTypes.
  1277.  
  1278.         ERROR_REQUIRED_ARG_MISSING - Indicates that a required attribute
  1279.             wasn't passed in.
  1280.  
  1281.         ERROR_BAD_NUMBER - An invalid group ID was passed in.
  1282.  
  1283.         ERROR_OBJECT_WRONG_TYPE - Object data type doesn't match
  1284.             DTA_GroupID.
  1285.  
  1286.         ERROR_NO_FREE_STORE - Not enough memory.
  1287.  
  1288.         DTERROR_UNKNOWN_DATATYPE - Unable to open the class library
  1289.             associated with the data type.
  1290.  
  1291.         DTERROR_COULDNT_OPEN - Unable to open the data object.
  1292.  
  1293.         ERROR_NOT_IMPLEMENTED - Unknown handle type.
  1294.  
  1295.      NOTES
  1296.         This function invokes the OM_NEW "method" for the class specified.
  1297.  
  1298.      EXAMPLE
  1299.         STRPTR  FileName = "S:User-Startup"
  1300.         Object *o;
  1301.  
  1302.         /* Simplest way is just to open an existing file */
  1303.         if( o = NewDTObjectA( (APTR)FileName, NULL ) )
  1304.         {
  1305.           /* ... */
  1306.  
  1307.           /* Get rid of the object when we are done with it */
  1308.           DisposeDTObject( o );
  1309.         }
  1310.  
  1311.      BUGS
  1312.         Before V45, creating a blank text object using
  1313.         { DTA_SourceType, DTSR_RAM },
  1314.         { DTA_GroupID,    GID_TEXT }
  1315.         tags, an "ascii.datatype" object was returned. Starting with
  1316.         V45, NewDTObjectA returns now correctly a "text.datatype" object.
  1317.  
  1318.      SEE ALSO
  1319.         AddDTObject, DisposeDTObject, RemoveDTObject,
  1320.         intuition.library/NewObjectA,
  1321.         datatypesclass/OM_NEW
  1322.  
  1323. datatypes.library/ObtainDataTypeA           datatypes.library/ObtainDataTypeA
  1324.  
  1325.      NAME
  1326.         ObtainDataTypeA -- Examines a handle and return its DataType. (V39)
  1327.  
  1328.      SYNOPSIS
  1329.         dtn = ObtainDataTypeA( type, handle, attrs );
  1330.         d0                     d0    a0      a1
  1331.  
  1332.         struct DataType *ObtainDataTypeA( ULONG, APTR, struct TagItem * );
  1333.  
  1334.         dtn = ObtainDataType( type, handle, tag1, ... );
  1335.  
  1336.         struct DataType *ObtainDataType( ULONG, APTR, Tag, ... );
  1337.  
  1338.      FUNCTION
  1339.         This function examines the data that the handle points to,
  1340.         and returns a DataType record that describes the data.
  1341.  
  1342.      INPUTS
  1343.         type   - Type of handle (one of the DTST_#? handle types).
  1344.  
  1345.         handle - Handle to examine.
  1346.             For DTST_FILE,      handle must be BPTR lock.
  1347.             For DTST_CLIPBOARD, handle must be struct IFFHandle *.
  1348.             For DTST_RAM (V45), handle must be a STRPTR (DataType
  1349.                                 name, equals to the dtn_Name field).
  1350.  
  1351.             The handle given will not be unlocked.
  1352.  
  1353.         attrs  - Additional attributes.
  1354.             DTA_GroupID  (ULONG) (V45) - GID_#? group to match
  1355.                                  0 is a valid input.
  1356.  
  1357.             DTA_DataType (struct DataType *) (V45) - Search in descriptor
  1358.                                  list starts at this point (maybe result
  1359.                                  of a previous datatype).
  1360.                                  The given datatype will NOT be unlocked.
  1361.                                  NULL is a valid input (start at the begin
  1362.                                  of list).
  1363.  
  1364.      NOTES
  1365.         The datatypes.library maintains a sorted list of all the DataType 
  1366.         descriptors.  The descriptor can consist of a function, a data mask 
  1367.         for the first 64 bytes of the data, and a name pattern.
  1368.  
  1369.         The sort order for the list is:
  1370.  
  1371.             Descriptors with a function and no mask or name pattern.
  1372.             Descriptors with a function and a mask or name pattern.
  1373.             Descriptors with no function and a mask or name pattern.
  1374.  
  1375.         Within each group, they are also sorted in descending priority
  1376.         and descending mask length.
  1377.  
  1378.      RETURNS
  1379.         Success returns a pointer to a DataType. You must call 
  1380.         ReleaseDataType when you are done with the handle.
  1381.  
  1382.         A NULL return indicates failure.  Use IoErr to get error value.
  1383.         Following is a summary of the error number used and there meaning
  1384.         as it relates to DataTypes.
  1385.  
  1386.         ERROR_NO_FREE_STORE    - Not enough memory.
  1387.  
  1388.         DTERROR_COULDNT_OPEN   - Unable to open the data object.
  1389.  
  1390.         ERROR_NOT_IMPLEMENTED  - Unknown handle type.
  1391.  
  1392.         ERROR_INVALID_LOCK     - DTA_DataType attribute passed in
  1393.                                  wasn't valid (V45).
  1394.  
  1395.      BUGS
  1396.         Before V45, passing a user-defined struct DataType (e.g. the
  1397.         dtn_Length is 0UL) to datatypes.library functions may causes
  1398.         crashes.
  1399.  
  1400.      EXAMPLE
  1401.         See "Examples/dtdescrlist/dtdescrlist.c"
  1402.  
  1403.      SEE ALSO
  1404.         ReleaseDataType, LockDataType,
  1405.         "Examples/dtdescrlist/dtdescrlist.c"
  1406.  
  1407. datatypes.library/ObtainDTDrawInfoA       datatypes.library/ObtainDTDrawInfoA
  1408.  
  1409.    NAME
  1410.        ObtainDTDrawInfoA -- Obtain a DataTypes object for drawing. (V39)
  1411.  
  1412.    SYNOPSIS
  1413.        handle = ObtainDTDrawInfoA( o, attrs );
  1414.        d0                          a0  a1
  1415.  
  1416.        APTR ObtainDTDrawInfoA( Object *, struct TagItem * );
  1417.  
  1418.        handle = ObtainDTDrawInfo( o, tag1, ... );
  1419.  
  1420.        APTR ObtainDTDrawInfo( Object *, Tag, ... );
  1421.  
  1422.    FUNCTION
  1423.        This function is used to prepare a DataTypes object for
  1424.        drawing into a RastPort.
  1425.  
  1426.        This function will send the DTM_OBTAINDRAWINFO method
  1427.        to the object using the opSet message structure.
  1428.  
  1429.    INPUTS
  1430.        o     - Pointer to an object as returned by NewDTObjectA.
  1431.                Starting with V45, a NULL arg results in a NOP.
  1432.  
  1433.        attrs - Additional attributes.
  1434.  
  1435.    RETURNS
  1436.        Returns a PRIVATE handle that must be passed to ReleaseDTDrawInfo
  1437.        when the application is done drawing the object.
  1438.        A NULL return value indicates failure.
  1439.  
  1440.    TAGS
  1441.        Good args are
  1442.        PDTA_Screen for pictureclass objects and
  1443.        ADTA_Screen for animationclass objects
  1444.  
  1445.    EXAMPLE
  1446.        See "Examples/dtimage/dtimage.c".
  1447.  
  1448.    NOTE
  1449.        You cannot handle the same datatypesclass object as a gadget in
  1450.        a window/requester and as a image using ObtainDTDrawInfoA/
  1451.        DrawDTObjectA/ReleaseDTDrawInfo at the same time.
  1452.        But using it as a gadget, then remove it from window, then use it as 
  1453.        an image is valid and __must__ be supported.
  1454.  
  1455.    SEE ALSO
  1456.        DrawDTObjectA, ReleaseDTDrawInfo,
  1457.        "Examples/dtimage/dtimage.c"
  1458.  
  1459. datatypes.library/PrintDTObjectA             datatypes.library/PrintDTObjectA
  1460.  
  1461.      NAME
  1462.         PrintDTObjectA -- Call the DTM_PRINT method on a separate process.
  1463.                                                                 (V39)
  1464.  
  1465.      SYNOPSIS
  1466.         retval = PrintDTObjectA( object, window, requester, msg );
  1467.         d0                       a0      a1      a2         a3
  1468.  
  1469.         ULONG PrintDTObjectA( Object *, struct Window *, struct Requester *,
  1470.                               struct dtPrint * );
  1471.  
  1472.         retval = PrintDTObject( object, window, requester, data, ... );
  1473.  
  1474.         ULONG PrintDTObject( Object *, struct Window *, struct Requester *,
  1475.                              ULONG, ... );
  1476.  
  1477.      FUNCTION
  1478.         This function is used to asyncronously perform the object's DTM_PRINT
  1479.         method.
  1480.  
  1481.         Once the application has performed the PrintDTObjectA function,
  1482.         it must not manipulate the printerIO union until it receives a
  1483.         OM_UPDATE message that contains the DTA_PrinterStatus tag.
  1484.  
  1485.         To abort a print, the application sends the DTM_ABORTPRINT method
  1486.         to the object.  This in turn signals the print process with a
  1487.         SIGBREAKF_CTRL_C.
  1488.  
  1489.         Starting with V45, the stack size of the print daemon process
  1490.         increases from 4096 up to 8192 bytes.
  1491.  
  1492.      INPUTS
  1493.         object    - Pointer to the DataTypes object.
  1494.  
  1495.         window    - Pointer to the window that the object has been added to.
  1496.  
  1497.         requester - Pointer to the requester that the object has been
  1498.                     added to (V45).
  1499.  
  1500.         msg       - Pointer to struct dtPrint message
  1501.  
  1502.      RETURNS
  1503.         Returns TRUE if successful, FALSE on error (anoter print in process).
  1504.  
  1505.      NOTE
  1506.         When the DTM_PRINT method is done, the print daemon triggers a notify
  1507.         msg with following contents:
  1508.  
  1509.         { GA_ID,             GadgetID         },
  1510.         { DTA_PrinterStatus, dtm_print_retval }
  1511.  
  1512.      SEE ALSO
  1513.         datatypesclass/DTM_PRINT,
  1514.         datatypesclass/DTM_ABORTPRINT
  1515.  
  1516. datatypes.library/RefreshDTObjectA         datatypes.library/RefreshDTObjectA
  1517.  
  1518.      NAME
  1519.         RefreshDTObjectA -- Refresh a datatypes object.          (V39)
  1520.  
  1521.      SYNOPSIS
  1522.         RefreshDTObjectA( object, window, req, attrs )
  1523.                           a0      a1      a2   a3
  1524.  
  1525.         VOID RefreshDTObjectA( Object *, struct Window *,
  1526.                                 struct Requester *, struct TagItem * );
  1527.  
  1528.         RefreshDTObject( object, window, req, tag1, ... );
  1529.  
  1530.         VOID RefreshDTObject( Object *, struct Window *,
  1531.                                struct Requester *, Tag, ... );
  1532.  
  1533.      FUNCTION
  1534.         Refreshes the specified object, by sending the GM_RENDER method to
  1535.         the object.
  1536.  
  1537.      INPUTS
  1538.         object - Pointer to an object as returned by NewDTObjectA.
  1539.                  NULL is a valid arg (V45).
  1540.  
  1541.         window - Pointer to the window.
  1542.                  NULL is a valid arg (V45).
  1543.  
  1544.         req    - Pointer to the requester (V45).
  1545.  
  1546.         attrs  - Additional attributes (currently none are defined).
  1547.  
  1548.      SEE ALSO
  1549.         AddDTObject, RemoveDTObject,
  1550.         intuition.library/RefreshGList
  1551.  
  1552. datatypes.library/ReleaseDataType           datatypes.library/ReleaseDataType
  1553.  
  1554.      NAME
  1555.         ReleaseDataType -- Release a DataType structure.         (V39)
  1556.  
  1557.      SYNOPSIS
  1558.         ReleaseDataType( dtn );
  1559.                          a0
  1560.  
  1561.         VOID ReleaseDataType( struct DataType * );
  1562.  
  1563.      FUNCTION
  1564.         This function is used to release a DataType structure obtained
  1565.         by ObtainDataTypeA.
  1566.  
  1567.      INPUTS
  1568.         dtn - DataType structure returned by ObtainDataTypeA.  NULL
  1569.               is a valid input.
  1570.  
  1571.      BUGS
  1572.         Before V45, passing a user-defined struct DataType (e.g. the
  1573.         dtn_Length is 0UL) may causes crashes.
  1574.  
  1575.      SEE ALSO
  1576.         ObtainDataTypeA, LockDataType
  1577.  
  1578. datatypes.library/ReleaseDTDrawInfo       datatypes.library/ReleaseDTDrawInfo
  1579.  
  1580.    NAME
  1581.        ReleaseDTDrawInfo -- Release a DataTypes object from drawing. (V39)
  1582.  
  1583.    SYNOPSIS
  1584.        ReleaseDTDrawInfo( o, handle );
  1585.                           a0 a1
  1586.  
  1587.        VOID ReleaseDTDrawInfo( Object *, APTR );
  1588.  
  1589.    FUNCTION
  1590.        This function is used to release the information obtained
  1591.        with ObtainDTDrawInfoA.
  1592.  
  1593.        This function invokes the object's DTM_RELEASEDRAWINFO method
  1594.        using the dtReleaseDrawInfo message structure.
  1595.  
  1596.    INPUTS
  1597.        o      - Object returned by NewDTObjectA.
  1598.                 Starting with V45, a NULL arg results in a NOP.
  1599.  
  1600.        handle - Pointer to an private handle obtained by ObtainDTDrawInfoA.
  1601.  
  1602.    EXAMPLE
  1603.        See "Examples/dtimage/dtimage.c".
  1604.  
  1605.    SEE ALSO
  1606.        DrawDTObjectA, ObtainDTDrawInfoA,
  1607.        "Examples/dtimage/dtimage.c".
  1608.  
  1609. datatypes.library/RemoveDTObject             datatypes.library/RemoveDTObject
  1610.  
  1611.      NAME
  1612.         RemoveDTObject -- Remove an object from a window.        (V39)
  1613.  
  1614.      SYNOPSIS
  1615.         position = RemoveDTObject( window, object );
  1616.         d0                         a0      a1
  1617.  
  1618.         LONG RemoveDTObject( struct Window *, Object * );
  1619.  
  1620.      FUNCTION
  1621.         Removes the object from the window's object list.  This will wait
  1622.         until the AsyncLayout process is complete.  The object will
  1623.         receive a DTM_REMOVEDTOBJECT message to inform the object will
  1624.         be removed.
  1625.         If the gadget was in a requester, the GTYP_REQGADGET flag will
  1626.         be cleared.
  1627.  
  1628.      INPUTS
  1629.         window - Pointer to the window.
  1630.  
  1631.         object - Pointer to an object as returned by NewDTObjectA.
  1632.                  NULL is a valid arg (V45).
  1633.  
  1634.      RETURNS
  1635.         Returns the ordinal position of the removed object.  If the
  1636.         object wasn't found in the appropriate list then a -1 is
  1637.         returned.
  1638.  
  1639.      NOTE
  1640.         Note that this function __MUST__ not be uses when a datatype
  1641.         object is embedded within another BOOPSI gadget. The
  1642.         parent object is responsible to pass all required methods
  1643.         including initial GM_LAYOUT and DTM_REMOVEDTOBJECT to
  1644.         the embedded object.
  1645.  
  1646.      SEE ALSO
  1647.         AddDTObject, 
  1648.         intuition.library/RemoveGList,
  1649.         datatypesclass/DTM_REMOVEDTOBJECT
  1650.  
  1651. datatypes.library/rexx/--rexxhost--       datatypes.library/rexx/--rexxhost--
  1652.  
  1653.  
  1654.     HOST INTERFACE
  1655.         datatypes.library provides an ARexx function host interface that
  1656.         enables ARexx programs to take advantage of the features of data
  1657.         types.  The functions provided by the interface are directly
  1658.         related to the functions described herein, with the differences
  1659.         mostly being in the way they are called.
  1660.  
  1661.         The function host library vector is located at offset -30 from
  1662.         the library. This is the value you provide to ARexx in the
  1663.         ARexx AddLib function call.
  1664.  
  1665.     FUNCTIONS
  1666.         EXAMINEDT  - Examine file
  1667.  
  1668.         OBTAINDATATYPE  - Obtain datatype from a given file
  1669.  
  1670.         FINDTTOOL  - Find a tool by name, type etc.
  1671.  
  1672.         LAUNCHTOOL - Launch a tool
  1673.  
  1674.  
  1675. datatypes.library/rexx/EXAMINEDT             datatypes.library/rexx/EXAMINEDT
  1676.  
  1677.     NAME
  1678.         EXAMINEDT -- Examine given file
  1679.  
  1680.     SYNOPSIS
  1681.         EXAMINEDT( FILENAME/A, VARIABLENAME, STEM/S,VAR/S )
  1682.  
  1683.     FUNCTION
  1684.         EXAMINEDT obtains data type and other attributes of the given
  1685.         filesystem object.
  1686.  
  1687.     EXAMPLE
  1688.         /* examinedt.rexx */
  1689.         PARSE ARG fname
  1690.         OPTIONS RESULTS
  1691.  
  1692.         /* Load the datatypes.library as a function host */
  1693.         IF ~SHOW( 'L', 'datatypes.library' ) THEN
  1694.            CALL ADDLIB( 'datatypes.library', 0, -30 )
  1695.  
  1696.            IF fname="" THEN DO
  1697.               SAY "Usage:"
  1698.               SAY "  rx examinedt <filename>"
  1699.               EXIT
  1700.            END
  1701.  
  1702.            SAY 'var test'
  1703.            type = ExamineDT( fname,,VAR )
  1704.            SAY type
  1705.  
  1706.            SAY 'stem test'
  1707.            CALL ExamineDT( fname, dtstem., STEM )
  1708.  
  1709.            SAY '         Disk Key:' dtstem.DiskKey
  1710.            SAY '   Dir Entry Type:' dtstem.DirEntryType
  1711.            SAY '        File Name:' dtstem.FileName
  1712.            SAY '       Protection:' dtstem.Protection
  1713.            SAY '       Entry Type:' dtstem.EntryType
  1714.            SAY '             Size:' dtstem.Size
  1715.            SAY '           Blocks:' dtstem.NumBlocks
  1716.            SAY '             Date:' dtstem.Date
  1717.            SAY '          Comment:' dtstem.Comment
  1718.            SAY '    Owner User ID:' dtstem.OwnerUID
  1719.            SAY '   Owner Group ID:' dtstem.OwnerGID
  1720.            SAY '  Owner User Name:' dtstem.OwnerUIDName
  1721.            SAY ' Owner Group Name:' dtstem.OwnerGIDName
  1722.            SAY '             Type:' dtstem.BaseType
  1723.            SAY '        File Type:' dtstem.DataType
  1724.            SAY '        Base Name:' dtstem.BaseName
  1725.            SAY '       DT GroupID:' dtstem.GroupID
  1726.         EXIT
  1727.  
  1728.     SEE ALSO
  1729.         rexx/OBTAINDATATYPE
  1730.  
  1731. datatypes.library/SaveDTObjectA               datatypes.library/SaveDTObjectA
  1732.  
  1733.    NAME
  1734.         SaveDTObjectA -- Save object's contents                     (V45)
  1735.  
  1736.    SYNOPSIS
  1737.         success = SaveDTObjectA( o, win, req, file, mode, saveicon, attrs );
  1738.         d0                       a0 a1   a2   a3    d0    d1        a4
  1739.  
  1740.         SaveDTObjectA( Object *, struct Window *, struct Requester *,
  1741.                        STRPTR, ULONG, BOOL, struct TagItem * );
  1742.  
  1743.         success = SaveDTObject( o, win, req, file, mode, saveicon, tag1,
  1744.                                 ... );
  1745.  
  1746.         SaveDTObject( Object *, struct Window *, struct Requester *,
  1747.                       STRPTR, ULONG, BOOL, Tag, ... );
  1748.  
  1749.    FUNCTION
  1750.         This function saves the contents of an object into a file.
  1751.  
  1752.         The function opens the named file and saves the object's contexts
  1753.         into it (DTM_WRITE). Then it closes the file.
  1754.         If the DTM_WRITE method returns success and the saveicon option is
  1755.         TRUE, matching icon is saved.
  1756.  
  1757.         If DTM_WRITE returns 0, the file will be deleted.
  1758.  
  1759.    INPUTS
  1760.         o        - Object like returned from NewDTObjectA
  1761.  
  1762.         win      - Window the object is attached to
  1763.  
  1764.         req      - Requester the object is attached to
  1765.  
  1766.         file     - file name to save to
  1767.  
  1768.         mode     - Save mode, (RAW, IFF etc.), one of the DTWM_#? identifiers
  1769.  
  1770.         saveicon - Save icon ?
  1771.  
  1772.         attrs    - Additional attributs
  1773.  
  1774.    TAGS
  1775.         Subclass specific.
  1776.  
  1777.         For example, animation.datatype V41 recognizes ADTA_Frame (start
  1778.         frame to save) and ADTA_Frames (number of frames to save).
  1779.  
  1780.    RETURNS
  1781.         success - The return value returned by DTM_WRITE or NULL for an
  1782.                   error.
  1783.  
  1784.    BUGS
  1785.         Does currently not delete the file on failure.
  1786.  
  1787.    SEE ALSO
  1788.         datatypesclass/DTM_WRITE
  1789.  
  1790. datatypes.library/SetDTAttrsA                   datatypes.library/SetDTAttrsA
  1791.  
  1792.      NAME
  1793.         SetDTAttrsA -- Set attributes for an object.             (V39)
  1794.  
  1795.      SYNOPSIS
  1796.         retval = SetDTAttrsA( o, win, req, attrs );
  1797.         d0                    a0  a1   a2  a3
  1798.  
  1799.         ULONG SetDTAttrsA( Object *, struct Window *, struct Requester *,
  1800.                            struct TagItem * );
  1801.  
  1802.         retval = SetDTAttrs( o, win, req, tag1, ... );
  1803.  
  1804.         ULONG SetDTAttrs( Object *, struct Window *, struct Requester *,
  1805.                           Tag, ... );
  1806.  
  1807.      FUNCTION
  1808.         This function is used to set the attributes of a data type
  1809.         object.
  1810.  
  1811.      INPUTS
  1812.         o     - Pointer to an object as returned by NewDTObjectA.
  1813.  
  1814.         win   - Window that the object has been added to.
  1815.  
  1816.         req   - Requester that the object has been added to (V45).
  1817.  
  1818.         attrs - Attributes to set.
  1819.  
  1820.      TAGS
  1821.         See datatypesclass/OM_SET and <datatypes/datatypesclass.h> for tags.
  1822.  
  1823.      SEE ALSO
  1824.         datatypesclass/OM_SET,
  1825.         GetDTAttrsA,
  1826.         intuition.library/SetGadgetAttrsA
  1827.  
  1828. datatypes.library/StartDragSelect           datatypes.library/StartDragSelect
  1829.  
  1830.    NAME
  1831.         StartDragSelect -- Start drag-selection                     (V45)
  1832.  
  1833.    SYNOPSIS
  1834.         success = StartDragSelect( o );
  1835.         d0                         a0
  1836.  
  1837.         ULONG StartDragSelect( Object * );
  1838.  
  1839.    FUNCTION
  1840.         This function starts drag-selection by the user (marking).
  1841.  
  1842.         This function replaces the old flag-fiddling method to
  1843.         start drag-select.
  1844.  
  1845.         The drag-select will only be started of the object supports
  1846.         DTM_SELECT, is in a window or requester and no layout-process
  1847.         is working on the object. If all conditions are good, it sets
  1848.         the DTSIF_DRAGSELECT flag and returns TRUE for success.
  1849.  
  1850.    INPUTS
  1851.         o - object like returned from NewDTObjectA
  1852.  
  1853.    RETURNS
  1854.         TRUE for success, FALSE for failure
  1855.  
  1856.    SEE ALSO
  1857.  
  1858. datatypesclass/--datasheed--                     datatypesclass/--datasheed--
  1859.  
  1860.    NAME
  1861.         datatypesclass -- base class for DataTypes
  1862.  
  1863.    SUPERCLASS
  1864.         gadgetclass
  1865.  
  1866.    FUNCTION
  1867.         This class is the "base" class for all datatypes. It provides basic
  1868.         services and attributes.
  1869.  
  1870.    METHODS
  1871.         DTM_ABORTPRINT -- Abort an asyncronous print process
  1872.  
  1873.         DTM_ASYNCLAYOUT -- Layout occuring on a seperate process
  1874.  
  1875.         DTM_FRAMEBOX -- Query or set the environment an object will enter
  1876.  
  1877.         DTM_PRINT - Print objects contents
  1878.  
  1879.         DTM_PROCLAYOUT -- Layout object on application process
  1880.  
  1881.         DTM_REMOVEDTOBJECT -- Remove object from window
  1882.  
  1883.         DTM_WRITE -- Write objects contents to file
  1884.  
  1885.         GM_DOMAIN -- Obtain the min./nom./max. dimensions of an object
  1886.  
  1887.         GM_GOACTIVE -- Activate object
  1888.  
  1889.         GM_GOINACTIVE -- Deactivate object
  1890.  
  1891.         GM_HANDLEINPUT -- Handlde user input
  1892.  
  1893.         GM_HITTEST -- Check if object was hit
  1894.  
  1895.         GM_LAYOUT -- Layout object
  1896.  
  1897.         OM_DISPOSE -- Dispose object
  1898.  
  1899.         OM_GET -- Obtain the value of an attribute
  1900.  
  1901.         OM_NEW -- Create an dt object
  1902.  
  1903.         OM_SET -- Set the values of various attributes
  1904.  
  1905.         OM_UPDATE -- Update the values of various attributes
  1906.  
  1907.    ATTRIBUTES
  1908.         The following attributes are used by datatypes. Note that
  1909.         there is a difference between "Application"- and "Subclass"-
  1910.         applicability. The following list are assumptions "How the
  1911.         interface should work".
  1912.  
  1913.         /* Generic attributes */
  1914.         DTA_TextAttr (struct TextAttr *) - Pointer to the default TextAttr
  1915.             to use for the text within the object.
  1916.  
  1917.             Applicability for applications is (IG),
  1918.             Applicability for subclasses   is (SG).
  1919.  
  1920.         DTA_TopVert (LONG) - Current top vertical unit
  1921.  
  1922.             Applicability for applications is (ISG),
  1923.             Applicability for subclasses   is (SGNU).
  1924.  
  1925.         DTA_VisibleVert (LONG) - Number of visible vertical units
  1926.  
  1927.             Applicability for applications is (ISG),
  1928.             Applicability for subclasses   is (SGNU).
  1929.  
  1930.         DTA_TotalVert (LONG) - Total number of vertical units
  1931.  
  1932.             Applicability for applications is (ISG),
  1933.             Applicability for subclasses   is (SGNU).
  1934.  
  1935.         DTA_VertUnit (LONG) - Number of pixels per vertical unit
  1936.  
  1937.             Applicability for applications is (ISG),
  1938.             Applicability for subclasses   is (SGNU).
  1939.  
  1940.         DTA_TopHoriz (LONG) - Current top horizontal unit
  1941.  
  1942.             Applicability for applications is (ISG),
  1943.             Applicability for subclasses   is (SGNU).
  1944.  
  1945.         DTA_VisibleHoriz (LONG) - Number of visible horizontal units
  1946.  
  1947.             Applicability for applications is (ISG),
  1948.             Applicability for subclasses   is (SGNU).
  1949.  
  1950.         DTA_TotalHoriz (LONG) - Total number of horizontal units
  1951.  
  1952.             Applicability for applications is (ISG),
  1953.             Applicability for subclasses   is (SGNU).
  1954.  
  1955.         DTA_HorizUnit (LONG) - Number of pixels per horizontal unit
  1956.  
  1957.             Applicability for applications is (ISG),
  1958.             Applicability for subclasses   is (SGNU).
  1959.  
  1960.         DTA_NodeName (STRPTR) - Name of the current element within the 
  1961.             object.
  1962.  
  1963.             Applicability for applications is (ISG),
  1964.             Applicability for subclasses   is (SG).
  1965.  
  1966.          DTA_Title (STRPTR) - Title of the object.
  1967.  
  1968.             Applicability for applications is (),
  1969.             Applicability for subclasses   is (N).
  1970.  
  1971.          DTA_TriggerMethods (struct DTMethod *) - Pointer to a STM_END-
  1972.             terminated array of supported trigger methods.
  1973.             (Subclasses may superset to extend this array using
  1974.             CopyDTTriggerMethods).
  1975.  
  1976.             Applicability for applications is (G),
  1977.             Applicability for subclasses   is (G).
  1978.  
  1979.          DTA_Data (Object *) - Object itself.
  1980.             Starting with V45, a DTA_Data == NULL indicates that
  1981.             an object hasn't loaded all data yet (progressive loading,
  1982.             see DTA_Progressive).
  1983.             (Subclasses which implements progressive loading are forced
  1984.             to superset OM_GET to indicate with a DTA_Data == NULL
  1985.             that loading is currently in process).
  1986.  
  1987.             Applicability for applications is (G),
  1988.             Applicability for subclasses   is (G).
  1989.  
  1990.         DTA_TextFont (struct TextFont *) - Default font to use for text 
  1991.             within the object.
  1992.             (This attribute is for subclasses only. Their superclass
  1993.             (like text.datatype) will open this font and release it on 
  1994.             disposal).          
  1995.  
  1996.             Applicability for applications is (),
  1997.             Applicability for subclasses   is (G).
  1998.  
  1999.         DTA_Methods (ULONG *) - Pointer to a ~0UL terminated array of
  2000.             supported methods. (Subclasses may superset OM_GET to replace
  2001.             the array with it's extendet array (created using CopyDTMethods))
  2002.  
  2003.             Applicability for applications is (G),
  2004.             Applicability for subclasses   is (G).
  2005.  
  2006.        DTA_PrinterStatus (LONG) - Printer error message.  Error numbers are
  2007.             defined in <devices/printer.h>, PDERR_#? identifiers.
  2008.             This tag is notified from the AsyncPrintDaemon, based on the
  2009.             return value of DTM_PRINT.
  2010.  
  2011.             Applicability for applications is (),
  2012.             Applicability for subclasses   is ().
  2013.  
  2014.        DTA_PrinterProc (struct Process *) - PRIVATE !!
  2015.            Pointer to the print process.
  2016.  
  2017.        DTA_LayoutProc (struct Process *) - PRIVATE !!
  2018.            Pointer to the layout process.
  2019.  
  2020.        DTA_Busy (BOOL) - Used to turn the applications' busy pointer off
  2021.            and on.
  2022.  
  2023.             Applicability for applications is (),
  2024.             Applicability for subclasses   is (N).
  2025.  
  2026.        DTA_Sync (BOOL) - Used to indicate that new information has been
  2027.             loaded into an object. A value of 0 indicates that the object is
  2028.             still loading (DTA_Progressive == TRUE).
  2029.  
  2030.             Applicability for applications is (),
  2031.             Applicability for subclasses   is (N).
  2032.  
  2033.        DTA_BaseName (STRPTR) - The base name of the class (library).
  2034.             This tag is currently only used by datatypes.library functions,
  2035.             not by the class itself.
  2036.  
  2037.        DTA_GroupID (ULONG) - The group a datatype must belong in (one of the
  2038.             GID_#? identifiers in <datatypes/datatypes.h>).
  2039.             This tag is currently only used by datatypes.library functions,
  2040.             not by the class itself.
  2041.  
  2042.        DTA_ErrorLevel (LONG) -  Error level (one of the RETURN_#? levels
  2043.             defined in <dos/dos.h>.
  2044.  
  2045.             Applicability for applications is (),
  2046.             Applicability for subclasses   is (N).
  2047.  
  2048.        DTA_ErrorNumber (LONG) - dos.library/datatypes.library error number,
  2049.             one of the ERROR_#? identifiers defined in <dos/dos.h> or
  2050.             one of the DTERROR_#? identifiers defined in 
  2051.             <datatypes/datatypes.h>
  2052.  
  2053.             Applicability for applications is (),
  2054.             Applicability for subclasses   is (N).
  2055.  
  2056.        DTA_ErrorString (STRPTR) - Argument for datatypes.library error
  2057.             (e.g. if the error string has a %s included...).
  2058.  
  2059.             Applicability for applications is (),
  2060.             Applicability for subclasses   is (N).
  2061.  
  2062.        DTA_Conductor (STRPTR) - Specifies the name of the realtime.library
  2063.             conductor. Will be passed to realtime.library/CreatePlayerA,
  2064.             a value of ~0UL sets up a private conductor (recommned).
  2065.  
  2066.             Applicability for applications is (I),
  2067.             Applicability for subclasses   is ().
  2068.  
  2069.        DTA_ControlPanel (BOOL) - Indicate whether a control panel should be
  2070.             embedded within the object (in the animation datatype, for
  2071.             example).
  2072.  
  2073.             Applicability for applications is (IS),
  2074.             Applicability for subclasses   is ().
  2075.  
  2076.        DTA_Immediate (BOOL) - Indicate whether the object should immediately
  2077.            begin playing.
  2078.  
  2079.             Applicability for applications is (IS),
  2080.             Applicability for subclasses   is ().
  2081.  
  2082.        DTA_Repeat (BOOL) - Indicate that the object should repeat playing.
  2083.  
  2084.             Applicability for applications is (IS),
  2085.             Applicability for subclasses   is ().
  2086.  
  2087.        DTA_Progressive (BOOL) - Indicate that the object should use
  2088.             progressive loading. The datatype will send { DTA_Sync, 0UL }
  2089.             notify msgs while loading is in progress; a final
  2090.             { DTA_Sync, 1UL } indicates that loading has been finished.
  2091.             Applications have to OM_GET DTA_Data to check if loading
  2092.             has __REALLY__ been finished. If "Object" is returned
  2093.             loading is done, a NULL return value indicates that the object
  2094.             is still loading.
  2095.  
  2096.             Applicability for applications is (IS),
  2097.             Applicability for subclasses   is ().
  2098.  
  2099.         DTA_CurrentLevel (ULONG) - Notifies the filling level of the object
  2100.             when doing (progressive) loading. 0UL means 0%,
  2101.             0xFFFFFFFFUL means 100%.
  2102.  
  2103.             Applicability for applications is (),
  2104.             Applicability for subclasses   is (N).
  2105.  
  2106.         DTA_ARexxPortName (STRPTR) - Pointer to base name for ARexx port
  2107.  
  2108.             Applicability for applications is (I),
  2109.             Applicability for subclasses   is ().
  2110.  
  2111.         /* DTObject attributes */
  2112.  
  2113.         DTA_Name (STRPTR) - (File-)Name of object
  2114.  
  2115.             Applicability for applications is (IG),
  2116.             Applicability for subclasses   is (G).
  2117.  
  2118.         DTA_SourceType (ULONG) - One of the DTST_#? identifiers
  2119.  
  2120.             Applicability for applications is (IG),
  2121.             Applicability for subclasses   is (G).
  2122.  
  2123.         DTA_Handle (APTR) - Source handle. See OM_GET for the specific
  2124.             handle type (BPTR fh, struct IFFHandle *, BPTR lock).
  2125.             Note that the handle passed at OM_NEW will NOT be the same handle
  2126.             you'll get with OM_GET.
  2127.  
  2128.             Applicability for applications is (IG),
  2129.             Applicability for subclasses   is (G).
  2130.  
  2131.         DTA_DataType (struct DataType *) -- datatype for this class.
  2132.  
  2133.             Applicability for applications is (G),
  2134.             Applicability for subclasses   is (G).
  2135.  
  2136.         DTA_Domain (struct IBox *) -- Domain box of gadget in absolute
  2137.             dimensions.
  2138.  
  2139.             Applicability for applications is (G),
  2140.             Applicability for subclasses   is (G).
  2141.  
  2142.         DTA_ObjName,
  2143.         DTA_ObjAuthor,
  2144.         DTA_ObjAnnotation,
  2145.         DTA_ObjCopyright and
  2146.         DTA_ObjVersion all (STRPTR) -- The name, author etc. of the source
  2147.             data.
  2148.  
  2149.             Applicability for applications is (G),
  2150.             Applicability for subclasses   is (SG).                      
  2151.  
  2152.         DTA_ObjectID (ULONG) -- RESERVED
  2153.  
  2154.         DTA_UserData (ULONG) -- User data like GA_UserData
  2155.  
  2156.         DTA_FrameInfo (struct FrameInfo *) -- RESERVED
  2157.  
  2158.         DTA_SelectDomain (struct IBox *) -- Select area's box, in absolute
  2159.             window/requester/screen coordinates.
  2160.  
  2161.             Applicability for applications is (G),
  2162.             Applicability for subclasses   is (SG).
  2163.  
  2164.         DTA_TotalPVert (LONG) - Object's page size, in pixels
  2165.  
  2166.             Applicability for applications is (G),
  2167.             Applicability for subclasses   is (G).
  2168.  
  2169.         DTA_TotalPHoriz (LONG) - Object's page size, in pixels
  2170.  
  2171.             Applicability for applications is (G),
  2172.             Applicability for subclasses   is (G).
  2173.  
  2174.         DTA_NominalVert (LONG) - nominal height of object
  2175.  
  2176.             Applicability for applications is (G),
  2177.             Applicability for subclasses   is (SG).
  2178.  
  2179.         DTA_NominalHoriz (LONG) - nominal height of object
  2180.  
  2181.             Applicability for applications is (G),
  2182.             Applicability for subclasses   is (SG).
  2183.  
  2184.  
  2185.         /* Printing attributes */
  2186.         The printing attributes are only used in conjunction with DTM_PRINT.
  2187.  
  2188.         DTA_DestCols (LONG) - Destination X width
  2189.         DTA_DestRows (LONG) - Destination Y height
  2190.         DTA_Special (UWORD) - Option flags, see <devices/printer.h>
  2191.         DTA_RastPort (struct RastPort *) - RastPort to use when printing.
  2192.  
  2193.    NOTES
  2194.  
  2195.    SEE ALSO
  2196.  
  2197.    BUGS
  2198.  
  2199. datatypesclass/DTM_ABORTPRINT                   datatypesclass/DTM_ABORTPRINT
  2200.  
  2201.     NAME
  2202.         DTM_ABORTPRINT -- Aborts a pending print job
  2203.  
  2204.     FUNCTION
  2205.         This methods aborts a pendig print job.
  2206.  
  2207.         Note that you must wait for the print process before
  2208.         you can dispose the object. DisposeDTObject will wait until
  2209.         the job exists.
  2210.  
  2211.     RESULT
  2212.         Returns 0 for now.
  2213.  
  2214. datatypesclass/DTM_ASYNCLAYOUT                 datatypesclass/DTM_ASYNCLAYOUT
  2215.  
  2216.     NAME
  2217.         DTM_ASYNCLAYOUT -- Asyncronous layout
  2218.  
  2219.     FUNCTION
  2220.         This method offloads time intensive things like text layout or
  2221.         remapping from input.device on a sepeate process. This
  2222.         method will only be used when the "AsyncLayoutDeamon" process
  2223.         was invoked by DoAsyncLayout in the GM_LAYLOUT method.
  2224.  
  2225.     RESULT
  2226.         Non-zero for success, 0 for failure.
  2227.  
  2228.     SEE ALSO
  2229.         GM_LAYOUT,
  2230.         datatypes.library/DoAsyncLayout
  2231.  
  2232. datatypesclass/DTM_FRAMEBOX                       datatypesclass/DTM_FRAMEBOX
  2233.  
  2234.     NAME
  2235.         DTM_FRAMEBOX -- Inquire what environment an object requires
  2236.  
  2237.     FUNCTION
  2238.         This method is to inquire what environment an object requires,
  2239.         which depends on the source data; an object like a picture
  2240.         or an animation maybe requires special things like a HAM screen for 
  2241.         HAM pictures or HAM animations.
  2242.  
  2243.         If the FRAMEF_SPECIFY flag is set in the msg, the method tells
  2244.         the object to prepare itself to enter the described environment.
  2245.  
  2246.         datatypesclass does __currently__ do nothing on the FrameInfo
  2247.         structure given, but must be called when an object receives a
  2248.         DTM_FRAMEBOX method.
  2249.  
  2250.         If the DTA_SourceType attribute equals to DTST_CLIPBOARD,
  2251.         the clipboard handle will be closed here.
  2252.  
  2253.     RESULT
  2254.         Nothing returned.
  2255.  
  2256. datatypesclass/DTM_PRINT                             datatypesclass/DTM_PRINT
  2257.  
  2258.     NAME
  2259.         DTM_PRINT -- print object
  2260.  
  2261.     FUNCTION
  2262.         This method should print the contents of the object.
  2263.  
  2264.         This method should be superset by the given subclass.
  2265.         datatypesclass returns PDERR_CANCEL and sets IoErr to 
  2266.         ERROR_NOT_IMPLEMENTED.
  2267.  
  2268.     ATTRIBUTES
  2269.         A subclass may recognise one of the following attribues:
  2270.  
  2271.         DTA_DestCols (LONG) - Destination X width, see <devices/printer.h>
  2272.  
  2273.         DTA_DestRows (LONG) - Destination Y height, see <devices/printer.h>
  2274.  
  2275.         DTA_Special (UWORD) - Option flags,
  2276.             see <devices/printer.h>, SPECIAL_#? defines.
  2277.  
  2278.         DTA_RastPort (struct RastPort *) RastPort to use when printing. (V40)
  2279.             Must only be used of the datatypes object is used like
  2280.             an image (e.g. in a DTM_OBTAINDRAWINFO/DTM_DRAW/
  2281.             DTM_RELEASEDRAWINFO cycle). The rastport given should be the same
  2282.             passed to DTM_DRAW.
  2283.             This tag MUST not be used if the object is used as a gadget.
  2284.  
  2285.         Other tags are subclass-specific:
  2286.         For example, a animation.datatype (V42) subclass may recognise
  2287.  
  2288.         ADTA_Frame (ULONG) - start frame to print
  2289.  
  2290.         ADTA_Frames (ULONG) - number of frames to print.
  2291.  
  2292.         and so on.
  2293.  
  2294.     NOTE
  2295.         This method is normally asyncrony launched using PrintDTObjectA.
  2296.         The async print process will notify the return value of this
  2297.         method as DTA_PrinterStatus.
  2298.  
  2299.     RESULT
  2300.         Returns PDERR_CANCEL and (result2 == ERROR_NOT_IMPLEMENTED).
  2301.  
  2302.     SEE ALSO
  2303.         datatypes.library/PrintDTObjectA,
  2304.         <devices/printer.h>
  2305.  
  2306. datatypesclass/DTM_PROCLAYOUT                   datatypesclass/DTM_PROCLAYOUT
  2307.  
  2308.     NAME
  2309.         DTM_PROCLAYOUT -- Layout datatypesclass object
  2310.  
  2311.     FUNCTION
  2312.         This method should be treated like DTM_ASYNCLAYOUT. The only
  2313.         difference is that DTM_ASYNCLAYOUT is triggered by the
  2314.         GM_LAYOUT method, which calls the DoAsyncLayout function
  2315.         ("AsyncLayoutDeamon" process launched by it), DTM_PROCLAYOUT is
  2316.         triggered by the application manually.
  2317.  
  2318.         The DTM_PROCLAYOUT method replaces both GM_LAYOUT and DTM_ASYNCLAYOUT
  2319. .
  2320.  
  2321.         DTM_PROCLAYOUT should not be triggered when the object will be added
  2322.         into an window/requester using AddDTObject.
  2323.  
  2324.         This method is exacly the same as datatypesclass/GM_LAYOUT.
  2325.  
  2326.     RESULT
  2327.         See GM_LAYOUT
  2328.  
  2329. datatypesclass/DTM_REMOVEDTOBJECT           datatypesclass/DTM_REMOVEDTOBJECT
  2330.  
  2331.     NAME
  2332.         DTM_REMOVEDTOBJECT -- Remove a dt object from a window/requester
  2333.  
  2334.     FUNCTION
  2335.         Releases resources obtained during GM_LAYOUT/DTM_PROCLAYOUT.
  2336.  
  2337.         This method MUST be passed to datatypesclass if an object receives
  2338.         a DTM_REMOVEDTOBJECT msg.
  2339.  
  2340.     RESULT
  2341.         GM_LAYOUT, DTM_PROCLAYOUT
  2342.  
  2343. datatypesclass/DTM_WRITE                             datatypesclass/DTM_WRITE
  2344.  
  2345.     NAME
  2346.         DTM_WRITE -- Write object to file
  2347.  
  2348.     FUNCTION
  2349.         This method should write the contens of an object to a file.
  2350.  
  2351.         This method should be superset by the given subclass.
  2352.         datatypesclass returns 0 and sets IoErr to ERROR_NOT_IMPLEMENTED.
  2353.  
  2354.     ATTRIBUTES
  2355.         Class specific.
  2356.         For example, a animation.datatype subclass may recognise
  2357.  
  2358.         ADTA_Frame (ULONG) - start frame to save
  2359.  
  2360.         ADTA_Frames (ULONG) - number of frames to save.
  2361.  
  2362.         and so on.
  2363.  
  2364.     NOTE
  2365.         If a datatypesclass has the version 45 or higher, a NULL
  2366.         file handle must be a NOP. This was introduced to check if
  2367.         a particular subclass supports DTM_WRITE with DTWM_RAW (local
  2368.         format).
  2369.  
  2370.     RESULT
  2371.         Returns 0 and (result2 == ERROR_NOT_IMPLEMENTED).
  2372.  
  2373.     SEE ALSO
  2374.  
  2375. datatypesclass/GM_DOMAIN                             datatypesclass/GM_DOMAIN
  2376.  
  2377.     NAME
  2378.         GM_DOMAIN -- obtain the domain of an datatypes object (V45)
  2379.  
  2380.     FUNCTION
  2381.        The GM_DOMAIN method is used to obtain the domain of a
  2382.        datatypesclass object. datatypesclass requires an object
  2383.        to process this method.
  2384.  
  2385.        Subclasses may require a RastPort pointer in gpd_RPort with the
  2386.        correct font attributes.
  2387.  
  2388.        datatypesclass supports the gpd_Which == GDOMAIN_MINIMUM,
  2389.        GDOMAIN_NOMINAL and GDOMAIN_MAXIMUM.
  2390.  
  2391.        If the gpd_GInfo (GadgetInfo) is valid (non-NULL), the
  2392.        (gpd_Domain . Left) and (gpd_Domain . Top) fields will be filled based
  2393.        on the values set with GA_Left/GA_Top/GA_RelRight/GA_RelBottom.
  2394.        otherwise these two fields are 0 as noted below.
  2395.  
  2396.        If all attributes got are 0, GDOMAIN_NOMINAL and GDOMAIN_MAXIMUM
  2397.        fall back to width=600, height=200. This fallback dimensions may vary
  2398.        from case to case.
  2399.  
  2400.        GDOMAIN_MINIMUM returns 0,0,0,0
  2401.  
  2402.        GDOMAIN_NOMINAL returns 0,0,DTA_NominalHoriz,DTA_NominalVert
  2403.            If the DTA_NominalHoriz is 0,
  2404.            (DTA_TotalHoriz * MAX( DTA_HorizUnit, 1 )) is used instead.
  2405.            If the DTA_NominalVert is 0,
  2406.            (DTA_TotalVert * MAX( DTA_VertUnit, 1 )) is used instead.
  2407.  
  2408.        GDOMAIN_MAXIMUM returns 0,0,
  2409.            (DTA_TotalHoriz * MAX( DTA_HorizUnit, 1 )),
  2410.            (DTA_TotalVert * MAX( DTA_VertUnit, 1 )).
  2411.  
  2412.     ATTRIBUTES
  2413.        datatypesclass does ignore any args, but subclasses may depend on
  2414.        some of these tags:
  2415.  
  2416.        DTA_TextAttr (struct TextAttr *) - Default text font used in object
  2417.  
  2418.     NOTE
  2419.        Subclasses may superset some of the GDOMAIN_#? cases above,
  2420.        but MUST pass unknown or unsupported cases to datatypesclass.
  2421.  
  2422.     TODO
  2423.        Replace the hard-coded fallback domain (w=600, h=200) with
  2424.        an more smarter way...
  2425.  
  2426.     RESULT
  2427.        Returns TRUE and fills in the gpd_Domain field if successfull,
  2428.        FALSE otherwise.
  2429.  
  2430.     SEE ALSO
  2431.        datatypes.library/DoDTDomain
  2432.  
  2433.  
  2434. datatypesclass/GM_GOACTIVE                         datatypesclass/GM_GOACTIVE
  2435.  
  2436.     NAME
  2437.         GM_GOACTIVE -- prepare the object to be activated
  2438.  
  2439.     FUNCTION
  2440.         Prepare the object to be activated.
  2441.         This method falls through to GM_HANDLEINPUT
  2442.  
  2443.     RESULT
  2444.         See GM_HANDLEINPUT
  2445.  
  2446. datatypesclass/GM_GOINACTIVE                     datatypesclass/GM_GOINACTIVE
  2447.  
  2448.     NAME
  2449.         GM_GOINACTIVE -- Deactivate object
  2450.  
  2451.     FUNCTION
  2452.  
  2453.     RESULT
  2454.  
  2455. datatypesclass/GM_HANDLEINPUT                   datatypesclass/GM_HANDLEINPUT
  2456.  
  2457.     NAME
  2458.         GM_HANDLEINPUT -- handle input
  2459.  
  2460.     FUNCTION
  2461.  
  2462.     RESULT
  2463.  
  2464. datatypesclass/GM_HITTEST                           datatypesclass/GM_HITTEST
  2465.  
  2466.     NAME
  2467.         GM_HITTEST -- Test if the object has been hit
  2468.  
  2469.     FUNCTION
  2470.         The GM_HITTEST queries the object if the given coordinates hits
  2471.         the datatypesclass object.
  2472.  
  2473.     RESULT
  2474.         Returns evertimes GMR_GADGETHIT.
  2475.  
  2476. datatypesclass/GM_LAYOUT                             datatypesclass/GM_LAYOUT
  2477.  
  2478.     NAME
  2479.         GM_LAYOUT -- Layout datatypesclass object
  2480.  
  2481.     FUNCTION
  2482.         Layout datatypesclass object.
  2483.  
  2484.         This method updates the DTA_Domain box to reflect the absolute
  2485.         dimensions of the gadget's domain box and updates the DTA_TotalPVert
  2486.         and DTA_TotalPHoriz attributes.
  2487.  
  2488.         Gadget relativity is fully supported.
  2489.  
  2490.         After all this method falls througth to the DTM_FRAMEBOX method.
  2491.  
  2492.     RESULT
  2493.  
  2494. datatypesclass/OM_DISPOSE                           datatypesclass/OM_DISPOSE
  2495.  
  2496.     NAME
  2497.         OM_DISPOSE -- Dispose datatypesclass instance
  2498.  
  2499.     FUNCTION
  2500.         This method destroys a datatypesclass object, freeing all resources
  2501.         obtained by it.
  2502.  
  2503.         This method preserves the IoErr error value.
  2504.  
  2505.     RESULT
  2506.         Returns the return code from superclass.
  2507.  
  2508. datatypesclass/OM_GET                                   datatypesclass/OM_GET
  2509.  
  2510.     NAME
  2511.         OM_GET -- Get a datatypesclass attribute
  2512.  
  2513.     FUNCTION
  2514.         The OM_GET method is used to obtain the value of a datatypesclass
  2515.         attribute.
  2516.         If the attribute to get not recognizes by datatypesclass, the msg
  2517.         is passes to superclass (gadgetclass).
  2518.  
  2519.     ATTRIBUTES
  2520.         DTA_TopVert (LONG) - Returns (dtsi -> si_TopVert)
  2521.  
  2522.         DTA_VisibleVert (LONG) - Returns (dtsi -> si_VisVert)
  2523.  
  2524.         DTA_TotalVert (LONG) - Returns (dtsi -> si_TotVert)
  2525.  
  2526.         DTA_VertUnit (LONG) - Returns (dtsi -> si_VertUnit)
  2527.  
  2528.         DTA_TopHoriz (LONG) - Returns (dtsi -> si_TopHoriz)
  2529.  
  2530.         DTA_VisibleHoriz (LONG) - Returns (dtsi -> si_VisHoriz)
  2531.  
  2532.         DTA_TotalHoriz (LONG) - Returns (dtsi -> si_TotHoriz)
  2533.  
  2534.         DTA_HorizUnit (LONG) - Returns (dtsi -> si_HorizUnit)
  2535.  
  2536.         DTA_PrinterProc (struct Process *) - PRIVATE !
  2537.  
  2538.         DTA_LayoutProc (struct Process *) - PRIVATE !
  2539.  
  2540.         DTA_Name (STRPTR) - File name set in OM_NEW
  2541.  
  2542.         DTA_SourceType (ULONG) - Source handle type of DTA_Handle,
  2543.             one of the DTST_#? identifies.
  2544.  
  2545.         DTA_Handle (APTR) - Handle, as opened by datatypesclass/OM_NEW
  2546.             The following table shows the type of handle returned
  2547.             (the "DTF_ type"-column below means which type (DTF_BINARY,
  2548.             DTF_ASCII, DTF_IFF or DTF_MISC your datatype belongs to; e.g. an
  2549.             IFF datatype will only get IFF Handles etc.):
  2550.  
  2551.             DTA_SourceType|DTF_ type |Handle type
  2552.             ================================================================
  2553.             DTST_RAM      |DTF_#?    |--      Must be NULL.
  2554.             --------------+----------+--------------------------------------
  2555.             DTST_FILE     |DTF_BINARY|(BPTR), like returned from Open
  2556.                           |DTF_ASCII |(BPTR), like returned from Open
  2557.                           |DTF_IFF   |(struct IFFHandle *), iffparse.library
  2558.                           |          |        handle
  2559.                           |DTF_MISC  |(BPTR), like returned from Lock
  2560.             --------------+----------+--------------------------------------
  2561.             DTST_CLIPBOARD|DTF_IFF   |(struct IFFHandle *), iffparse.library
  2562.                           |          |        handle
  2563.             --------------+----------+--------------------------------------
  2564.             DTST_HOTLINK  |DTF_#?    |NOT IMPLEMENTED YET
  2565.             --------------+----------+--------------------------------------
  2566.  
  2567.         DTA_DataType (struct DataType *) - Returns DataType structure.
  2568.             May be NULL !
  2569.  
  2570.         DTA_Domain (struct IBox *) - Returns ptr to struct IBox.
  2571.             This is equal to the GA_Left/GA_Top/GA_Width/GA_Height box,
  2572.             translated into window/requester coordinates, even if the
  2573.             GA_#? identifers are relative (GA_Rel#?).
  2574.  
  2575.         DTA_ObjName (STRPTR) - Source data name
  2576.  
  2577.         DTA_ObjAuthor (STRPTR) - Source data author
  2578.  
  2579.         DTA_ObjAnnotatiom (STRPTR) - Source data annotation
  2580.  
  2581.         DTA_ObjCopyright (STRPTR) - Source data copyright
  2582.  
  2583.         DTA_ObjVersion (STRPTR) - Source data version
  2584.  
  2585.         DTA_ObjectID (ULONG) - Object ID
  2586.  
  2587.         DTA_UserData (ULONG) - User data, not touched by datatypesclass
  2588.             or a subclass (like GA_UserData).
  2589.  
  2590.         DTA_FrameInfo - (struct FrameInfo *)
  2591.  
  2592.         DTA_SelectDomain (struct IBox *) - Box of selected area in
  2593.             window/requester coordinates. Returns NULL is there is
  2594.             no selected area.
  2595.  
  2596.         DTA_TotalPVert (LONG) - Page height, e.g.
  2597.             ((dtsi -> si_VertUnit) * (dtsi -> si_TotVert)) or
  2598.             (DTA_Domain . Height) if VertUnit is 0.
  2599.  
  2600.         DTA_TotalPHoriz (LONG) - Page width, e.g.
  2601.             ((dtsi -> si_HorizUnit) * (dtsi -> si_TotHoriz)) or
  2602.             (DTA_Domain . Width) if HorizUnit is 0.
  2603.  
  2604.         DTA_NominalVert (LONG) - Nominal object height.
  2605.  
  2606.         DTA_NominalHoriz (LONG) - Nominal object width.
  2607.  
  2608.         DTA_Data (Object *) - The object itself (V45).
  2609.             A NULL return indicates that the object hasn't loaded
  2610.             all data yet (progressive loading, see DTA_Progressive).
  2611.             (a subclass has to superset OM_GET to set this tag
  2612.             to NULL, datatypesclass will everytimes return the "Object"
  2613.             itself).
  2614.  
  2615.     BUGS
  2616.         None known.
  2617.  
  2618.     RESULT
  2619.         Returns TRUE if the datatypesclass supports this attribute,
  2620.         returns the superclass (gadgetclass) return value otherwise.
  2621.  
  2622. datatypesclass/OM_NEW                                   datatypesclass/OM_NEW
  2623.  
  2624.     NAME
  2625.         OM_NEW -- Create a datatypesclass object.
  2626.  
  2627.     FUNCTION
  2628.         The OM_NEW method is used to create an instance of the datatypesclass
  2629.         class.  This method is passed to the superclass first.
  2630.  
  2631.         After this, datatypesclass opens a handle. The type of handle
  2632.         will be selected based on type of input data the class can process
  2633.         (e.g. an IFF DataType will get only IFFHandles, to make things
  2634.         easier).
  2635.  
  2636.         This class cannot be create objects without having a subclass
  2637.         ("abstract" class). Starting with V45, any attempt to create a
  2638.         object of datatypesclass will be rejected by this method; only
  2639.         object's of one of it's subclasses are allowed.
  2640.  
  2641.         The following table shows the type of handle returned (the
  2642.         "DTF_ type"-column below means which type (DTF_BINARY, DTF_ASCII,
  2643.         DTF_IFF or DTF_MISC your datatype belongs to)
  2644.         (the handle must be obtained using GetDTAttrsA):
  2645.  
  2646.         DTA_SourceType|DTF_ type |Handle type
  2647.         ================================================================
  2648.         DTST_RAM      |DTF_#?    |--      Must be NULL.
  2649.         --------------+----------+--------------------------------------
  2650.         DTST_FILE     |DTF_BINARY|(BPTR), like returned from Open
  2651.                       |DTF_ASCII |(BPTR), like returned from Open
  2652.                       |DTF_IFF   |(struct IFFHandle *), iffparse.library
  2653.                       |          |        handle
  2654.                       |DTF_MISC  |(BPTR), like returned from Lock
  2655.         --------------+----------+--------------------------------------
  2656.         DTST_CLIPBOARD|DTF_IFF   |(struct IFFHandle *), iffparse.library
  2657.                       |          |        handle
  2658.         --------------+----------+--------------------------------------
  2659.         DTST_HOTLINK  |DTF_#?    |NOT IMPLEMENTED YET
  2660.         --------------+----------+--------------------------------------
  2661.  
  2662.  
  2663.     ATTRIBUTES
  2664.         The following attributes can be specified at creation time:
  2665.  
  2666.     BUGS
  2667.  
  2668.     RESULT
  2669.         If the object was created a pointer to the object is returned,
  2670.         otherwise NULL is returned.
  2671.  
  2672. datatypesclass/OM_SET                                   datatypesclass/OM_SET
  2673.  
  2674.     NAME
  2675.         OM_SET -- Set datatypesclass attributes
  2676.  
  2677.     FUNCTION
  2678.         The OM_SET method is used to set datatypesclass attributes.
  2679.  
  2680.         Does bounds checking on the DTSpecialInfo's fields si_TopVert,
  2681.         si_VisVert, si_TotVert, si_TopHoriz, si_VisHoriz and si_TotHoriz
  2682.         and notifies changes.
  2683.  
  2684.     ATTRIBUTES
  2685.         DTA_TopVert (LONG) - current vertical position.
  2686.             Copied into (dtsi -> si_TopVert); this method returns TRUE for
  2687.             a value change.
  2688.  
  2689.         DTA_VisibleVert (LONG) - visible area
  2690.             Copied into (dtsi -> si_VisVert); this method returns TRUE for
  2691.             a value change.
  2692.  
  2693.         DTA_TotalVert (LONG) - total vertical size
  2694.             Copied into (dtsi -> si_TotVert); this method returns TRUE for
  2695.             a value change.
  2696.  
  2697.         DTA_VertUnit (LONG) - vertical unit
  2698.             Size of one unit in which the DTA_(Top|Visible|Total)Vert
  2699.             attributes counts.
  2700.  
  2701.         DTA_TopHoriz (LONG) - current horizontal position.
  2702.             Copied into (dtsi -> si_TopHoriz); this method returns TRUE for
  2703.             a value change.
  2704.  
  2705.         DTA_VisibleHoriz (LONG) - visible area
  2706.             Copied into (dtsi -> si_VisHoriz); this method returns TRUE for
  2707.             a value change.
  2708.  
  2709.         DTA_TotalHoriz (LONG) - total horizontal size
  2710.             Copied into (dtsi -> si_TotHoriz); this method returns TRUE for
  2711.             a value change.
  2712.  
  2713.         DTA_HorizUnit (LONG) - horizontal unit
  2714.             Size of one unit in which the DTA_(Top|Visible|Total)Horiz
  2715.             attributes counts.
  2716.  
  2717.         DTA_PrinterProc (struct Process *) -- PRIVATE !
  2718.  
  2719.         DTA_LayoutProc (struct Process *) -- PRIVATE !
  2720.  
  2721.         DTA_ObjName (STRPTR) - name of object source data
  2722.             The string given will be copied into an internal buffer.
  2723.  
  2724.         DTA_ObjAuthor (STRPTR) - source data author
  2725.             The string given will be copied into an internal buffer.
  2726.  
  2727.         DTA_ObjAnnotation (STRPTR) - source data annotation
  2728.             The string given will be copied into an internal buffer.
  2729.  
  2730.         DTA_ObjCopyright (STRPTR) - source data copyright
  2731.             The string given will be copied into an internal buffer.
  2732.  
  2733.         DTA_ObjVersion (STRPTR) - source data copyright
  2734.             The string given will be copied into an internal buffer.
  2735.  
  2736.         DTA_ObjectID (ULONG) - object id
  2737.  
  2738.         DTA_UserData (ULONG) - User data, not touched by datatypesclass
  2739.             or a subclass (like GA_UserData).
  2740.  
  2741.         DTA_SelectDomain (struct IBox *) - selected area box,
  2742.             in window/requester coordinates.
  2743.             NULL is a valid input (V45).
  2744.  
  2745.         DTA_NominalVert (LONG) - nominal vertical size (height)
  2746.  
  2747.         DTA_NominalHoriz (LONG) - nominal vertical size (width)
  2748.  
  2749.     BUGS
  2750.         None kown.
  2751.  
  2752.     TODO
  2753.         Changes of the GA_Left/GA_Top/GA_Width/GA_Height
  2754.  
  2755.     RESULT
  2756.         If any of the DTA_(Top|Visbible|Total)(Vert|Horiz)-attributes
  2757.         has been changes, this method returns non-zero (change),
  2758.         the return value from superclass (gadgetclass) otherwise.
  2759.  
  2760. datatypesclass/OM_UPDATE                             datatypesclass/OM_UPDATE
  2761.  
  2762.     NAME
  2763.         OM_UPDATE -- Update datatypesclass attributes
  2764.  
  2765.     FUNCTION
  2766.         The OM_UPDATE method is used to update datatypesclass attributes;
  2767.         it falls througth to OM_SET.
  2768.  
  2769.         Starting with V45, OM_UPDATE will explicitly call ICM_CHECKLOOP
  2770.         to avoid notify loops.
  2771.  
  2772.     ATTRIBUTES
  2773.         See OM_SET
  2774.  
  2775.     RESULT
  2776.         See OM_SET
  2777.  
  2778.