grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / datatypes / drawdtobjecta.c
blobcc35258aa1096289cb063045bacb1df414e523d8
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #define USE_BOOPSI_STUBS
10 #include <proto/intuition.h>
11 #include <proto/alib.h>
12 #include <clib/boopsistubs.h>
13 #include "datatypes_intern.h"
16 /*****************************************************************************
18 NAME */
19 #include <proto/datatypes.h>
21 AROS_LH9(LONG, DrawDTObjectA,
23 /* SYNOPSIS */
24 AROS_LHA(struct RastPort *, rp , A0),
25 AROS_LHA(Object *, o , A1),
26 AROS_LHA(LONG , x , D0),
27 AROS_LHA(LONG , y , D1),
28 AROS_LHA(LONG , w , D2),
29 AROS_LHA(LONG , h , D3),
30 AROS_LHA(LONG , th , D4),
31 AROS_LHA(LONG , tv , D5),
32 AROS_LHA(struct TagItem *, attrs, A2),
34 /* LOCATION */
35 struct Library *, DataTypesBase, 21, DataTypes)
37 /* FUNCTION
39 Draw a data type object into a RastPort. You must have successfully
40 called ObtainDTDrawInfoA before calling this function; it invokes the
41 object's DTM_DRAW method.
43 INPUTS
45 rp -- pointer to the RastPort to draw the object into
46 o -- pointer to the data type object to draw
47 x -- left edge of drawing area
48 y -- top edge of drawing area
49 w -- width of drawing area
50 h -- height of drawing area
51 th -- horizontal top in units
52 tv -- vertical top in units
53 attrs -- additional attributes
55 TAGS
57 ADTA_Frame for animationclass objects (selects the frame that should be
58 drawn.
60 RESULT
62 TRUE if rendering went OK, FALSE if failure.
64 NOTES
66 The RastPort in question must support clipping, i.e. have a valid
67 layer structure attached to it; if not, some datatypes can't draw
68 and FALSE will be returned.
70 EXAMPLE
72 BUGS
74 SEE ALSO
76 ObtainDataTypeA()
78 INTERNALS
80 The type is stated to be LONG in the original docs even if the return
81 value is really BOOL.
83 HISTORY
85 29.7.99 SDuvan implemented
87 *****************************************************************************/
89 AROS_LIBFUNC_INIT
91 struct dtDraw draw;
93 if(rp == NULL)
94 return 0;
96 draw.MethodID = DTM_DRAW;
97 draw.dtd_RPort = rp;
98 draw.dtd_Left = x;
99 draw.dtd_Top = y;
100 draw.dtd_Width = w;
101 draw.dtd_Height = h;
102 draw.dtd_TopHoriz = th;
103 draw.dtd_TopVert = tv;
104 draw.dtd_AttrList = attrs;
106 return (LONG)DoMethodA(o, (Msg)&draw);
108 AROS_LIBFUNC_EXIT
109 } /* DrawDTObjectA */