AddDTObject()
Synopsis
LONG AddDTObject(
struct Window * win,
struct Requester * req,
Object * obj,
LONG pos );
Function
Add an object to the window 'win' or requester 'req' at the position
in the gadget list specified by the 'pos' argument.
Result
The position where the object was added (may be different from what
you asked for).
Notes
The object will receice a GM_LAYOUT message with the gpl_Initial field
set to 1 when the object is added.
CopyDTMethods()
Synopsis
ULONG * CopyDTMethods(
ULONG * methods,
ULONG * include,
ULONG * exclude );
Function
Copy and modify an array of methods. This is used by subclass implementors
who want to add supported methods to an existing class.
Result
The new array of methods or NULL if something went wrong (like out of
memory).
CopyDTTriggerMethods()
Synopsis
struct DTMethod * CopyDTTriggerMethods(
struct DTMethod * methods,
struct DTMethod * include,
struct DTMethod * exclude );
Function
Copy and modify an array of DTMethod:s. This is used by subclass
implementors who want to add supported methods to an existing class.
Result
The new array of methods or NULL if something went wrong (like out of
memory).
Notes
dtm_Label and dtm_Command must be valid as long as the object exists as
they are not copied.
A subclass that implment DTM_TRIGGER must send unknown trigger
methods to its superclass.
DoAsyncLayout()
Synopsis
ULONG DoAsyncLayout(
Object * object,
struct gpLayout * gpl );
Function
Perform an object's DTM_ASYNCLAYOUT method -- doing it asynchronously
off loads the input.device. The method should exit when a SIGBREAK_CTRL_C
is received; this signal means that the data is obsolete and the
method will be called again.
DoDTDomainA()
Synopsis
ULONG DoDTDomainA(
Object * o,
struct Window * win,
struct Requester * req,
struct RastPort * rport,
ULONG which,
struct IBox * domain,
struct TagItem * attrs );
ULONG DoDTDomain(
Object * o,
struct Window * win,
struct Requester * req,
struct RastPort * rport,
ULONG which,
struct IBox * domain,
TAG tag, ... );
Function
Obtain the maximum/minimum/nominal domains of a data type object.
Result
The return value of GM_DOMAIN or 0 if an error occurred. The 'domain'
IBox will be filled with the requested values as a side effect.
Notes
This function requires an object to perform the GM_DOMAIN method. To
achieve similar results without an object, you must use CoerceMethodA()
manually.
DoDTMethodA()
Synopsis
IPTR DoDTMethodA(
Object * o,
struct Window * win,
struct Requester * req,
Msg msg );
IPTR DoDTMethod(
Object * o,
struct Window * win,
struct Requester * req,
TAG tag, ... );
Function
Perform a specific datatypes methodl.
Result
The value returned by the specified method.
DrawDTObjectA()
Synopsis
LONG DrawDTObjectA(
struct RastPort * rp,
Object * o,
LONG x,
LONG y,
LONG w,
LONG h,
LONG th,
LONG tv,
struct TagItem * attrs );
LONG DrawDTObject(
struct RastPort * rp,
Object * o,
LONG x,
LONG y,
LONG w,
LONG h,
LONG th,
LONG tv,
TAG tag, ... );
Function
Draw a data type object into a RastPort. You must have successfully
called ObtainDTDrawInfoA before calling this function; it invokes the
object's DTM_DRAW method.
Result
TRUE if rendering went OK, FALSE if failure.
Notes
The RastPort in question must support clipping, i.e. have a valid
layer structure attached to it; if not, some datatypes can't draw
and FALSE will be returned.
FindMethod()
Synopsis
ULONG * FindMethod(
ULONG * methods,
ULONG searchmethodid );
Function
Search for a specific method in a array of methods.
Result
Pointer to method table entry or NULL if the method wasn't found.
FindTriggerMethod()
Synopsis
struct DTMethod * FindTriggerMethod(
struct DTMethod * methods,
STRPTR command,
ULONG method );
Function
Search for a specific trigger method in a array of trigger methods (check
if either 'command' or 'method' matches).
Result
Pointer to trigger method table entry (struct DTMethod *) or NULL if the
method wasn't found.
GetDTAttrsA()
Synopsis
ULONG GetDTAttrsA(
Object * o,
struct TagItem * attrs );
ULONG GetDTAttrs(
Object * o,
TAG tag, ... );
Function
Get the attributes of a specific data type object.
Result
The number of attributes obtained.
Notes
(#1) - On AROS, the "DataType" an object returns may be a clone of
the real entry, so that the subclass can override
subformat information.
GetDTTriggerMethodDataFlags()
Synopsis
ULONG GetDTTriggerMethodDataFlags(
ULONG method );
Function
Get the kind of data that may 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 the STMF_METHOD_MASK value) with one of the STMD_
identifiers.
STMD_VOID -- stt_Data must be NULL
STMD_ULONG -- stt_Data contains an unsigned value
STMD_STRPTR -- stt_Data is a pointer to a string
STMD_TAGLIST -- stt_Data points to an array of struct TagItem terminated
with TAG_DONE
The trigger methods below STM_USER are explicitly handled as described in
<datatypes/datatypesclass.h>.
Result
One of the STMD_ identifiers defined in <datatypes/datatypesclass.h>
GetDTTriggerMethods()
Synopsis
struct DTMethod * GetDTTriggerMethods(
Object * object );
Function
Get a list of the trigger methods an object supports.
Result
A pointer to a STM_DONE terminated DTMethod list. This list in only valid
until the object is disposed of.
Example
To call the specific method, do the following:
DoMethod(object, DTM_TRIGGER, myMethod);
Notes
Some trigger methods requires an argument (calling these with a NULL
argument is wrong). Use GetDTTriggerMethodDataFlags() to obtain the
type of the requested argument.
LockDataType()
Synopsis
VOID LockDataType(
struct DataType * dt );
Function
Lock a DataType structure obtained from ObtainDataTypeA() or a data type
object (DTA_DataType).
Notes
Calls to LockDataType() and ObtainDataTypeA() must have a corresponding
ReleaseDataType() call or else problems will arise.
NewDTObjectA()
Synopsis
Object * NewDTObjectA(
APTR name,
struct TagItem * attrs );
Object * NewDTObject(
APTR name,
TAG tag, ... );
Function
Create a data type object from a BOOPSI class.
Result
A BOOPSI object. This may be used in different contexts such as a gadget
or image. NULL indicates failure -- in that case IoErr() gives more
information:
ERROR_REQUIRED_ARG_MISSING -- A required attribute wasn't specified.
ERROR_BAD_NUMBER -- The group ID specified was invalid.
ERROR_OBJECT_WRONG_TYPE -- Object data type doesn't match DTA_GroupID.
Notes
This function invokes the method OM_NEW for the specified class.
The object should (eventually) be freed by DisposeDTObject() when no
longer needed.
ObtainDataTypeA()
Synopsis
struct DataType * ObtainDataTypeA(
ULONG type,
APTR handle,
struct TagItem * attrs );
struct DataType * ObtainDataType(
ULONG type,
APTR handle,
TAG tag, ... );
Function
Examine the data pointed to by 'handle'.
Result
A pointer to a DataType or NULL if failure. IoErr() gives more information
in the latter case:
ERROR_NO_FREE_STORE -- Not enough memory available
ERROR_OBJECT_NOT_FOUND -- Unable to open the data type object
ERROR_NOT_IMPLEMENTED -- Unknown handle type
ObtainDTDrawInfoA()
Synopsis
APTR ObtainDTDrawInfoA(
Object * o,
struct TagItem * attrs );
APTR ObtainDTDrawInfo(
Object * o,
TAG tag, ... );
Function
Prepare a data type object for drawing into a RastPort; this function
will send the DTM_OBTAINDRAWINFO method the object using an opSet
message.
Result
A private handle that must be passed to ReleaseDTDrawInfo when the
application is done drawing the object, or NULL if failure.
PrintDTObjectA()
Synopsis
ULONG PrintDTObjectA(
Object * object,
struct Window * window,
struct Requester * requester,
struct dtPrint * msg );
ULONG PrintDTObject(
Object * object,
struct Window * window,
struct Requester * requester,
TAG tag, ... );
Function
Perform an object's DTM_PRINT method in an asynchronous manner.
Result
TRUE on success, FALSE otherwise.
Notes
When an application has called PrintDTObjectA() it must not touch
the printerIO union until a IDCMP_IDCMPUPDATE is received which
contains the DTA_PrinterStatus tag.
To abort a print, send the DTM_ABORTPRINT method to the object.
This will signal the print process with a SIGBREAK_CTRL_C.
RefreshDTObjectA()
Synopsis
void RefreshDTObjectA(
Object * object,
struct Window * window,
struct Requester * req,
struct TagItem * attrs );
void RefreshDTObject(
Object * object,
struct Window * window,
struct Requester * req,
TAG tag, ... );
Function
Refresh a specified object sending the GM_RENDER message to the object.
ReleaseDTDrawInfo()
Synopsis
VOID ReleaseDTDrawInfo(
Object * o,
APTR handle );
Function
Release the handle obtained from ObtainDTDrawInfoA(); invokes the object's
DTM_RELEASEDRAWINFO method sending the dtReleaseDrawInfo message.
Result
A private handle that must be passed to ReleaseDTDrawInfo when the
application is done drawing the object, or NULL if failure.
RemoveDTObject()
Synopsis
LONG RemoveDTObject(
struct Window * window,
Object * object );
Function
Remove an object from the specified window's object list; this will wait
until the AsyncLayout process is ready. The object will receive a message
of type DTM_REMOVEDTOBJECT as a sign of it having been removed.
Result
The position of the object in the list before it was removed; if the
object wasn't found -1 is returned.
SaveDTObjectA()
Synopsis
ULONG SaveDTObjectA(
Object * o,
struct Window * win,
struct Requester * req,
STRPTR file,
ULONG mode,
BOOL saveicon,
struct TagItem * attrs );
ULONG SaveDTObject(
Object * o,
struct Window * win,
struct Requester * req,
STRPTR file,
ULONG mode,
BOOL saveicon,
TAG tag, ... );
Function
Save the contents of an object to a file using DTM_WRITE.
Result
The return value of DTM_WRITE.
Notes
If DTM_WRITE returns 0, the file will be deleted.
SetDTAttrsA()
Synopsis
ULONG SetDTAttrsA(
Object * o,
struct Window * win,
struct Requester * req,
struct TagItem * attrs );
ULONG SetDTAttrs(
Object * o,
struct Window * win,
struct Requester * req,
TAG tag, ... );
Function
Set the attributes of a data type object.
StartDragSelect()
Synopsis
ULONG StartDragSelect(
Object * o );
Function
Start drag-selection by the user; the drag selection will only start
if the object in question supports DTM_SELECT, is in a window or
requester and no layout-process is working on the object.
Result
TRUE if all went OK, FALSE otherwise. If FALSE, IoErr() gives further
information:
ERROR_ACTION_NOT_KNOWN -- the object doesn't support DTM_SELECT
ERROR_OBJECT_IN_USE -- the object is currently occupied