datatypes.library Reference

Comprehensive function reference for datatypes.library, synthesised from the AmigaOS NDK 3.2 Release 4 (Autodocs/AG/datatypes).

This page documents 30 functions of datatypes.library. Each function entry follows the canonical autodoc format. struct Name, union Name, enum Name are clickable links to the type definition in the types reference.

Function index


AddDTObject()

AddDTObject - Add an object to a window or requester. (V39)

Synopsis

realposition = AddDTObject (window, requester, object, position); d0 a0 a1 a2 d0

LONG AddDTObject (Window*,Requester*, Object *, LONG);

Function

This function adds a single object to the gadget list of the given window or requester at the position in the list specified by the position argument.

When the object is added to the gadget list, the object will
receive a GM_LAYOUT message with the gpl_Initial field set to
one.

Inputs

window - Pointer to the window.

requester - Must be NULL.

object - Pointer to an object as returned by NewDTObjectA().

position - Integer position in the list for the new gadget.
    -1 to add to the end of the list.

See also

RemoveDTObject(), AddGList()


CopyDTMethods()

CopyDTMethods -- Clone and modify DTA_Methods array (V45)

Synopsis

newmethods = CopyDTMethods( methods, include, exclude );

ULONG *CopyDTMethods( ULONG *, ULONG *, ULONG * );

Function

Copy and modify array of supported methods.

    This function is used for subclass implementors, who want to
    add their methods (like DTM_TRIGGER) to the array of supported
    methods.

Inputs

methods - Methods array, as obtained by GetDTMethods or DTA_Methods. NULL causes the function to return NULL.

    include - Methods to include, ~0UL terminated. May be NULL.

    exclude - Methods to exclude, ~0UL terminated. May be NULL.

Results

newmethods - New array of methods or NULL (no memory).

See also

FindMethod(), CopyDTTriggerMethods(), FreeDTMethods()


CopyDTTriggerMethods()

CopyDTTriggerMethods -- Clone and modify DTA_TriggerMethods array (V45)

Synopsis

newmethods = CopyDTTriggerMethods( methods, include, exclude );

DTMethod*CopyDTTriggerMethods(DTMethod*, DTMethod*, DTMethod* );

Function

Copy and modify a DTMethods array. This function is for subclass implementors for an easy way to add their trigger methods to exising ones, or disable some because they're internally used.

Inputs

methods - Methods array, as obtained by GetDTTriggerMethods or DTA_TriggerMethods. NULL causes the function to return NULL.

    include - Trigger methods to include. May be NULL.

    exclude - Trigger methods to exclude. May be NULL.
              The dtm_Command and dtm_Method fields may have
              the options described in FindTriggerMethod to
              filter/match out the given entries.

Results

newmethods - New array of methods or NULL (no memory).

Note

It is assumed that the dtm_Label and dtm_Command strings are valid as long as the object exists. They are NOT copied.

    Subclasses which implements DTM_TRIGGER __MUST__ send unknown
    trigger methods to it's superclass.

See also

FindTriggerMethod(), CopyDTMethods(), FreeDTMethods()


DisposeDTObject()

DisposeDTObject - Delete a data type object. (V39)

Synopsis

DisposeDTObject (o); a0

VOID DisposeDTObject (Object *);

Function

This function is used to dispose of a data type object that was obtained with NewDTObjectA().

Inputs

o - Pointer to an object as returned by NewDTObjectA(). NULL is a valid input.

See also

NewDTObjectA()


DoAsyncLayout()

DoAsyncLayout - Call the DTM_ASYNCLAYOUT method on a separate process. (V39)

Synopsis

retval = DoAsyncLayout (object, gpl); d0 a0 a1

ULONG DoAsyncLayout (Object *, struct gpLayout *);

Function

This function triggers the DTM_ASYNCLAYOUT method of the given object asyncronously. The purpose of asyncronous method dispatch is to offload rendering from the input.device.

The DTM_ASYNCLAYOUT method must exit when SIGBREAKF_CTRL_C signal
is set.  This indicates that the data has become obsolete and
the DTM_ASYNCLAYOUT method may be called again.

Inputs

object - Pointer to the data types object. gpl - Pointer to a gpLayout message.


DoDTDomainA()

DoDTDomainA -- Obtain the min/nom/max domains of a dt object (V45)

Synopsis

retval = DoDTDomainA( o, win, req, rport, which, domain, attrs ); a0 a1 a2 a3 d0 a4 a5

ULONG DoDTDomainA( Object *,Window*,Requester*, RastPort*, ULONG,IBox*,TagItem* );

retval = DoDTDomain( o, win, req, rport, which, domain, tag1, ... );

ULONG DoDTDomain( Object *,Window*,Requester*, RastPort*, ULONG,IBox*, Tag, ... );

Inputs

o - Object like returned from NewDTObjectA

    win    - Window the object is attached to

    req    - Requester the object is attached to

    rport  - RastPort, used for domain calculations

    which  - one of the GDOMAIN_#? identifiers from
        <intuition/gadgetclass.h>

    domain - resulting domain box

    attrs  - Additional attributes

Note

This function cannot handle the GM_DOMAIN method without an object. To do this, you have to use CoreceMethodA manually.


DoDTMethodA()

DoDTMethodA - Do a datatypes method. (V39)

Synopsis

retval = DoDTMethodA (o, win, req, msg); d0 a0 a1 a2 a3

ULONG DoDTMethodA (Object *,Window*, Requester*, Msg);

retval = DoDTMethod (o, win, req, data, ...);

ULONG DoDTMethod (Object *,Window*, Requester*, ULONG, ...);

Function

This function performs a method of an object.

Inputs

o - Pointer to an object as returned by NewDTObjectA().

win - Window that the object is attached to.

req - Requester that the object is attached to.

msg - The message to send to the object.

See also

DoGadgetMethod()


DrawDTObjectA()

DrawDTObjectA - Draw a DataTypes object. (V44)

Synopsis

retval = DrawDTObjectA (rp, o, x, y, w, h, th, tv, attrs); d0 a0 a1 d0 d1 d2 d3 d4 d5 a2

LONG DrawDTObjectA (RastPort*rp, Object *, LONG x, LONG y, LONG w, LONG h, LONG th, LONG tv, TagItem*);

retval = DrawDTObject (rp, o, x, y, w, h, th, tv, tag1, ...);

LONG DrawDTObjectA (RastPort*rp, Object *, LONG x, LONG y, LONG w, LONG h, LONG th, LONG tv, Tag, ...);

Function

This function draws a DataTypes object into a RastPort.

This function can be used for strip printing the object or
embedding it within a document.

You must call ObtainDTDrawInfoA() before using this function.

This function invokes the DTM_DRAW method of the object.

Clipping MUST be turned on within the RastPort.  This means
that there must be a valid layer structure attached to the
RastPort.

Inputs

rp - Pointer to the RastPort to draw into. o - Pointer to an object returned by NewDTObjectA(). x - Left-most point of area to draw into. y - Top-most point of area to draw into. w - Width of area to draw into. h - Height of area to draw into. th - Horizontal top in units. tv - Vertical top in units. attrs - Additional attributes.

See also

ObtainDTDrawInfo(), ReleaseDTDrawInfo()


FindMethod()

FindMethod -- find a specified method in methods array (V45)

Synopsis

method = FindMethod( methods, searchmethodid );

ULONG *FindMethod( ULONG *, ULONG );

Function

This function searches for a given method in a given methods array like got from GetDTMethods.

Inputs

methods - methods array, like got from GetDTMethods or DTA_Methods NULL is a valid arg.

    searchmethodid - method id to find.

Example

* This macro tests if a given method (like DTM_PRINT) is * supported by the given object *\ #define IsDTMethodSupported( o, id ) \ ((BOOL)FindMethod(GetDTMethods( (o) ), (id) ))

See also

GetDTMethods(), CopyDTMethods()


FindToolNodeA()

FindToolNodeA -- Find a tool node (V45)

Synopsis

tn = FindToolNodeA( toollist, attrs ); d0 a0 a1

ToolNode*FindToolNodeA(List*, TagItem* );

tn = FindToolNode( toollist, tag1, ... );

ULONG FindToolNode(List*, ... );

Function

This function searches for a given tool in a list of tool nodes.

Inputs

toollist - struct List * or a struct ToolNode * (which will be skipped) to search in. NULL is a valid arg.

    attrs    - Search tags.
               A NULL arg returns simple the following node.

Note

This function is not limited to the (&(DataType -> dtn_ToolList)); programmers can set up their own lists. The (&(DataType -> dtn_ToolList)) entries are valid as long as the application obtains a lock to the DataType (as obtained from a dt object, ObtainDataTypeA or LockDataType).

See also

LaunchToolA()


FindTriggerMethod()

FindTriggerMethod -- find a specified trigger method in trigger methods array (V45)

Synopsis

method = FindTriggerMethod( dtm, command, method );

DTMethod*FindTriggerMethod(DTMethod*, STRPTR, ULONG );

Function

This function searches for a given trigger method in a given methods array like got from GetDTTriggerMethods.

    If one of the "command" or "method" args matches an array item, this
    function returns a pointer to it.

Inputs

methods - trigger methods array, like got from GetDTTriggerMethods or DTA_TriggerMethods. NULL is a valid arg.

    command - trigger method command name (case-insensitive match),
              may be NULL (don't match).

    method  - trigger method id, may be ~0UL (don't match).

See also

GetDTTriggerMethods(), CopyDTTriggerMethods()


FreeDTMethods()

FreeDTMethods -- Free methods array obtained by CopyDT#?Methods (V45)

Synopsis

FreeDTMethods( methods );

VOID FreeDTMethods( APTR );

Inputs

methods - Methods array, as obtained by CopyDTMethods or CopyDTTriggerMethods. NULL is a valid input.

See also

CopyDTMethods(), CopyDTTriggerMethods()


GetDTAttrsA()

GetDTAttrsA - Obtain attributes for an object. (V39)

Synopsis

retval = GetDTAttrsA (o, attrs); d0 a0 a2

ULONG GetDTAttrsA (Object *,TagItem*);

retval = GetDTAttrs (o, tag1, ...);

ULONG GetDTAttrs (Object *, Tag tag1, ...);

Function

This function retrieves the attributes of a data type object.

Inputs

o - Pointer to an object as returned by NewDTObjectA().

attrs - Attributes to get, terminated with TAG_DONE.  The data
    element of each pair contains the address of the storage
    variable.

See also

SetDTAttrsA(), GetAttr()


GetDTMethods()

GetDTMethods - Obtain methods an object supports. (V39)

Synopsis

methods = GetDTMethods (object); d0 a0

ULONG GetDTMethods (Object *);

Function

This function obtains a list of methods supported by a given object.

Inputs

object - Pointer to an object as returned by NewDTObjectA().

See also

GetDTTriggerMethods()


GetDTString()

GetDTString - Obtain a DataTypes string. (V39)

Synopsis

str = GetDTString (id); d0 d0

STRPTR GetDTString (ULONG id);

Function

This function is used to obtain a pointer to a localized DataTypes string.

Inputs

id - ID of the string to obtain.


GetDTTriggerMethodDataFlags()

GetDTTriggerMethodDataFlags -- Get data type of dtt_Data value (V45)

Synopsis

type = GetDTTriggerMethodDataFlags( method ); d0

ULONG GetDTTriggerMethodDataFlags( ULONG );

Function

This function returns the kind of data which can be attached to the stt_Data field in the dtTrigger method body.

   The data type can be specified by or'ing the method id (within
   STMF_METHOD_MASK value) with one of the STMD_#? identifiers:

   STMD_VOID    - stt_Data MUST be NULL
   STMD_ULONG   - stt_Data contains an unsigned long value
   STMD_STRPTR  - stt_Data is a string pointer
   STMD_TAGLIST - stt_Data points to an array of struct TagItem's,
                  terminated with TAG_DONE

   The trigger methods below STM_USER are explicitly handled, as
   described in <datatypes/datatypesclass.h>, e.g. STM_COMMAND
   return STMD_STRPTR, instead of STMD_VOID.

Inputs

method - dtt_Method ID from struct DTMethod

Results

type - one of the STMD_#? identifies in

Example

struct DTMethod htmldtc_dtm[] = { "Stop Loading", "STOP", (STM_STOP | STMD_VOID), "Load Images", "LOADIMAGES", ((STM_USER + 20) | STMD_VOID), "Goto URL", "GOTOURL", ((STM_USER + 21) | STMD_STRPTR), NULL, NULL, 0L };

   Sets up three methods:
     "STOP" takes no arguments,
     "LOADIMAGES" takes no arguments and
     "GOTOURL" takes a STRPTR as an argument.

See also

CopyDTTriggerMethods(), FindTriggerMethod()


GetDTTriggerMethods()

GetDTTriggerMethods - Obtain trigger methods supported by an object (V39)

Synopsis

methods = GetDTTriggerMethods (object); d0 a0

struct DTMethods*GetDTTriggerMethods (Object *);

Function

This function obtains a list of trigger methods supported by a given object. Applications may use this information to provide appropriate controls for the object. For example, an AmigaGuide object needs controls for "Contents", "Index", "Retrace", "Browse <", and "Browse >",

Inputs

object - Pointer to an object as returned by NewDTObjectA().

Example

To call the method:

    DoMethod (object, DTM_TRIGGER, dtm[button]->dtm_Method);

See also

GetDTMethods()


LaunchToolA()

LaunchToolA -- invoke a given tool with project (V45)

Synopsis

success = LaunchToolA( tool, project, attrs ); d0 a0 a1 a2

ULONG LaunchToolA(Tool*, STRPTR,TagItem* );

success = LaunchTool( tool, project, tag1, ... );

ULONG LaunchTool(Tool*, STRPTR, ... );

Function

This function launches an application with a specified project. The application and its launch mode and other attributes are specified through the "Tool" structure.

Inputs

tool - Pointer to a Tool structure. NULL is a valid arg.

   project - Name of the project to execute or NULL.

   attrs   - Additional attributes.

Note

  • This function requires the "RX" command when lauching ARexx scripts.

    • This function must be launched from a process, not a simple task.

    • This function is not limited to use the struct DataType->dtn_Tools tools. Applications can set up their own struct Tool's as long as these structures contains no rubbish. If you don't know the TW_#? ("which") type of your custom tool, set tn_Which to TW_MISC.

    • The NP_Synchronous tag has been removed from in v51 because dos.library never supported this feature. In v51.8+ of datatypes.library SYS_Asynch can be used instead.

Bugs

  • The path of the launched tools depends on the parents path. If there is no path, shell tools can only launch other tools with their full path.

See also

FindToolNodeA()


LockDataType()

LockDataType -- Lock a DataType structure. (V45)

Synopsis

LockDataType( dtn ); a0

VOID LockDataType(DataType* );

Function

This function is used to lock a DataType structure obtained by ObtainDataTypeA or a datatypes object (DTA_DataType attribute).

  All calls to LockDataType or ObtainDataTypeA must match the same
  number of ReleaseDataType calls, otherwise havoc will break out.

Inputs

dtn - DataType structure returned by ObtainDataTypeA. NULL is a valid input.

Note

This function has been made public to allow to get a DataType structure from an object (DTA_DataType attribute), and remain the reference valid after the object has been disposed off (which unlocks the DataType structure locked in NewDTObjectA).

See also

ObtainDataTypeA(), ReleaseDataType()


NewDTObjectA()

NewDTObjectA - Create an data type object. (V39)

Synopsis

o = NewDTObjectA (name, attrs); d0 d0 a0

Object *NewDTObjectA (APTR,TagItem*);

o = NewDTObject (name, tag1, ...);

Object *NewDTObject (APTR, Tag tag1, ...);

Function

This is the method for creating datatype objects from 'boopsi' classes. Boopsi' stands for "basic object-oriented programming system for Intuition".)

You further specify initial "create-time" attributes for the
object via a TagItem list, and they are applied to the
resulting datatype object that is returned.

Inputs

name - Name of the data source. Usually an existing file name.

attrs - Pointer to a taglist containing additional arguments.

Notes

This function invokes the OM_NEW "method" for the class specified.

The DTST_MEMORY source type introduced in V44 makes in-memory
data available to subclasses as if the data were stored in a
file. Thus, subclasses will see the data as DTST_FILE. Since
the data does not correspond to an on-disk file, subclasses
and examine hook code must not assume that they will be able
to reopen the "file" whose data has been provided to them.

Example

STRPTR fileName = "s:startup-sequence" Object *o;

\* Simplest use is to just open an existing file *\
if (o = NewDTObject ((APTR)fileName, NULL))
{
    \* Free the object when we are done with it *\
    DisposeDTObject (o);
}

Bugs

Documentation used to state that for DTA_SourceType == DTST_FILE the DTA_Handle tag had to refer to a valid file handle. This is not correct. The DTA_Handle tag for DTA_SourceType == DTST_FILE always had to be a valid file lock.

A file lock used with the DTA_Handle tag and
DTA_SourceType == DTST_FILE will become part of the data type
object. UnLock()'ing that file lock will cause the same file
lock to be UnLock()'ed again, causing memory to be freed
twice.

The use of a file lock with DTA_Handle for a file will still
require that you also provide the name of the file in question,
making it hard to justify its use in the first place.

See also

AddDTObject(), DisposeDTObject(), RemoveDTObject(), NewObjectA()


ObtainDataTypeA()

ObtainDataTypeA - Examines a handle and return its DataType. (V39)

Synopsis

dtn = ObtainDataTypeA (type, handle, attrs); d0 d0 a0 a1

DataType*ObtainDataTypeA (ULONG, APTR,TagItem*);

dtn = ObtainDataType (type, handle, tag1, ...);

DataType*ObtainDataType (ULONG, APTR, Tag tag1, ...);

Function

This function examines the data that the handle points to, and returns a DataType record that describes the data.

Inputs

type - Type of handle.

handle - Handle to examine.
    For DTST_FILE, handle must be BPTR lock.
    For DTST_CLIPBOARD, handle must be struct IFFHandle *.
    For DTST_MEMORY, handle will be ignored (you need
    to specify the additional information required by this
    source type through the attrs list).

attrs - Additional attributes (see TAGS).

Notes

The datatypes.library maintains a sorted list of all the DataType descriptors. The descriptor can consist of a function, a data mask for the first 64 bytes of the data, and a name pattern.

The sort order for the list is:

    Descriptors with a function and no mask or name pattern.
    Descriptors with a function and a mask or name pattern.
    Descriptors with no function and a mask or name pattern.

Within each group, they are also sorted in descending priority
and descending mask length.

The DTST_MEMORY source type introduced in V44 makes in-memory
data available to subclasses as if the data were stored in a
file. Thus, subclasses will see the data as DTST_FILE. Since
the data does not correspond to an on-disk file, subclasses
and examine hook code must not assume that they will be able
to reopen the "file" whose data has been provided to them.

See also

ReleaseDataType()


ObtainDTDrawInfoA()

ObtainDTDrawInfoA - Obtain a DataTypes object for drawing. (V44)

Synopsis

handle = ObtainDTDrawInfoA (o, attrs); d0 a0 a1

APTR ObtainDTDrawInfoA (Object *,TagItem*);

handle = ObtainDTDrawInfo (o, tag1, ...);

APTR ObtainDTDrawInfo (Object *, Tag, ...);

Function

This function prepares a DataTypes object to render itself into a RastPort.

This function will send the DTM_OBTAINDRAWINFO method
to the object using the opSet message structure.

Inputs

o - Pointer to an object as returned by NewDTObjectA(). attrs - Additional attributes.

Note

This function implies a layout operation. Thus, you must not add the object in question to a window or requester and use ObtainDTDrawInfo() on it.

See also

DrawDTObjectA(), ReleaseDTDrawInfo()


PrintDTObjectA()

PrintDTObjectA - Call the DTM_PRINT method on a separate process. (V39)

Synopsis

retval = PrintDTObjectA (object, window, requester, msg); d0 a0 a1 a2 a3

ULONG PrintDTObjectA (Object *,Window*,Requester*, struct dtPrint *);

retval = PrintDTObject (object, window, requester, data, ...);

ULONG PrintDTObject (Object *,Window*,Requester*, ULONG, ...);

Function

This function is triggers the DTM_PRINT method of the object asyncronously.

Once the application has performed the PrintDTObjectA() function,
it must not manipulate the printerIO union until it receives a
IDCMP_IDCMPUPDATE message that contains the DTA_PrinterStatus
tag.

To abort a print, the application sends the DTM_ABORTPRINT method
to the object.  This in turn signals the print process with a
SIGBREAKF_CTRL_C.

Inputs

object - Pointer to the DataTypes object. window - Pointer to the window that the object has been added to. requester - Pointer to the requester that the object has been added to.


RefreshDTObjectA()

RefreshDTObjectA - Refresh a datatypes object. (V39)

Synopsis

RefreshDTObjectA (object, window, req, attrs) a0 a1 a2 a3

VOID RefreshDTObjectA (Object *,Window*, Requester*,TagItem*);

RefreshDTObject (object, window, req, tag1, ...);

VOID RefreshDTObject (Object *,Window*, Requester*, Tag tag1, ...);

Function

Refreshes the specified object, by sending the GM_RENDER method to the object.

Inputs

object - Pointer to an object as returned by NewDTObjectA().

window - Pointer to the window.

req - Must be NULL.

attrs - Additional attributes (currently none are defined).

See also

AddDTObject(), RemoveDTObject(), RefreshGList()


ReleaseDataType()

ReleaseDataType - Release a DataType structure. (V39)

Synopsis

ReleaseDataType (dtn); a0

VOID ReleaseDataType (DataType*);

Function

This function is used to release a DataType structure obtained by ObtainDataTypeA().

Inputs

dtn - DataType structure returned by ObtainDataTypeA(). NULL is a valid input.

See also

ObtainDataTypeA()


ReleaseDTDrawInfo()

ReleaseDTDrawInfo - Release a DataTypes object from drawing. (V44)

Synopsis

ReleaseDTDrawInfo (o, handle); a0 a1

VOID ReleaseDTDrawInfo (Object *, APTR);

Function

This function releases the information obtained with ObtainDTDrawInfoA().

This function invokes the DTM_RELEASEDRAWINFO method of the
object using the opMember message structure.

Inputs

handle - Pointer to an object returned by ObtainDTDrawInfoA().

See also

DrawDTObjectA(), ObtainDTDrawInfo()


RemoveDTObject()

RemoveDTObject - Remove an object from a window. (V39)

Synopsis

position = RemoveDTObject (window, object); d0 a0 a1

LONG RemoveDTObject (Window*, Object *);

Function

Removes the object from the object list of the window and waits until the AsyncLayout process is complete. The object will receive a DTM_REMOVEDTOBJECT message to inform the object it has been removed.

Inputs

window - Pointer to the window.

object - Pointer to an object as returned by NewDTObjectA().

See also

AddDTObject(), RemoveGList()


SaveDTObjectA()

SaveDTObjectA -- Save object's contents (V45)

Synopsis

success = SaveDTObjectA( o, win, req, file, mode, saveicon, attrs );

ULONG SaveDTObjectA( Object *,Window*,Requester*, STRPTR, ULONG, BOOL,TagItem* );

success = SaveDTObject( o, win, req, file, mode, saveicon, tag1, ... );

ULONG SaveDTObject( Object *,Window*,Requester*, STRPTR, ULONG, BOOL, Tag, ... );

Function

This function saves the contents of an object into a file.

    The function opens the named file and saves the object's contexts
    into it (DTM_WRITE). Then it closes the file.
    If the DTM_WRITE method returns success and the saveicon option is
    TRUE, matching icon is saved.

    If DTM_WRITE returns 0, the file will be deleted.

Inputs

o - Object like returned from NewDTObjectA

    win      - Window the object is attached to

    req      - Requester the object is attached to

    file     - file name to save to

    mode     - Save mode, (RAW, IFF etc.), one of the DTWM_#? identifiers

    saveicon - Save icon? Does not overwrite an existing icon.

    attrs    - Additional attributs

SetDTAttrsA()

SetDTAttrsA - Set attributes for an object. (V39)

Synopsis

retval = SetDTAttrsA (o, win, req, attrs); d0 a0 a1 a2 a3

ULONG SetDTAttrsA (Object *,Window*,Requester*, TagItem*);

retval = SetDTAttrs (o, win, req, tag1, ...);

ULONG SetDTAttrs (Object *,Window*,Requester*, Tag tag1, ...);

Function

This function is used to set the attributes of a data type object.

Inputs

o - Pointer to an object as returned by NewDTObjectA().

win - Window that the object has been added to.

attrs - Attributes to set, terminated with TAG_DONE.

See also

GetDTAttrsA(), SetGadgetAttrsA()


StartDragSelect()

StartDragSelect -- Start drag-selection (V45)

Synopsis

success = StartDragSelect( o );

ULONG StartDragSelect( Object * );

Function

This function starts drag-selection by the user (marking).

This function replaces the old flag-fiddling method to
start drag-select.

The drag-select will only be started of the object supports
DTM_SELECT, is in a window or requester and no layout-process
is working on the object. If all conditions are good, it sets
the DTSIF_DRAGSELECT flag and returns TRUE for success.

Inputs

o - object like returned from NewDTObjectA