grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / gadgets.h
blobe7908eba58f96d287ef30f79b9d701032b7c95c1
1 #ifndef _GADGETS_H_
2 #define _GADGETS_H_
4 /*
5 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
6 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 $Id$
8 */
10 #ifndef EXEC_TYPES_H
11 # include <exec/types.h>
12 #endif
13 #ifndef INTUITION_INTUITION_H
14 # include <intuition/intuition.h>
15 #endif
16 #ifndef INTUITION_CLASSES_H
17 # include <intuition/classes.h>
18 #endif
19 #ifndef INTUITION_CLASSUSR_H
20 # include <intuition/classusr.h>
21 #endif
22 #ifndef INTUITION_GADGETCLASS_H
23 # include <intuition/gadgetclass.h>
24 #endif
26 #define ADDREL(gad,flag,w,field) ((gad->Flags & (flag)) ? w->field : 0)
28 struct BBox
30 WORD Left, Top, Width, Height;
33 void printgadgetlabel(Class *cl, Object *o, struct gpRender *msg,
34 struct IntuitionBase *IntuitionBase);
36 /* Calculate the size of the Bounding Box of the gadget */
37 void CalcBBox (struct Window *, struct Requester *, struct Gadget *, struct BBox *);
38 void GetGadgetIBox(struct Gadget *g, struct GadgetInfo *gi, struct IBox *ibox);
40 /* Render a label */
41 ULONG LabelWidth (struct RastPort *, STRPTR label, ULONG len,
42 struct IntuitionBase *);
43 void RenderLabel (struct RastPort *, STRPTR label, ULONG len,
44 struct IntuitionBase *);
46 VOID drawrect(struct RastPort *rp
47 , WORD x1, WORD y1
48 , WORD x2, WORD y2
49 , struct IntuitionBase *IntuitionBase);
51 void GetGadgetDomain(struct Gadget *gad, struct Screen *scr, struct Window *win,
52 struct Requester *req, struct IBox *box);
54 /* gadget coords relative to their domain! */
56 WORD GetGadgetLeft(struct Gadget *gad, struct Screen *scr, struct Window *win, struct Requester *req);
57 WORD GetGadgetTop(struct Gadget *gad, struct Screen *scr, struct Window *win, struct Requester *req);
58 WORD GetGadgetWidth(struct Gadget *gad, struct Screen *scr, struct Window *win, struct Requester *req);
59 WORD GetGadgetHeight(struct Gadget *gad, struct Screen *scr, struct Window *win, struct Requester *req);
61 /* gadget box in screen coords */
62 void GetScrGadgetIBox(struct Gadget *gad, struct Screen *scr, struct Window *win,
63 struct Requester *req, struct IBox *box);
65 /* gadget box relative to upper left window edge */
66 void GetWinGadgetIBox(struct Gadget *gad, struct Screen *scr, struct Window *win,
67 struct Requester *req, struct IBox *box);
69 /* gadget box in domain coords */
70 void GetDomGadgetIBox(struct Gadget *gad, struct Screen *scr, struct Window *win,
71 struct Requester *req, struct IBox *box);
73 /* gadget bounds (or box if not GMORE_BOUNDS) in screen coords */
74 void GetScrGadgetBounds(struct Gadget *gad, struct Screen *scr, struct Window *win,
75 struct Requester *req, struct IBox *box);
77 /* gadget bounds (or box if not GMORE_BOUNDS) relative to upper left window edge */
78 void GetWinGadgetBounds(struct Gadget *gad, struct Screen *scr, struct Window *win,
79 struct Requester *req, struct IBox *box);
81 /* gadget bounds (or box if not GMORE_BOUNDS)in domain coords */
82 void GetDomGadgetBounds(struct Gadget *gad, struct Screen *scr, struct Window *win,
83 struct Requester *req, struct IBox *box);
85 void EraseRelGadgetArea(struct Window *win, struct Rectangle *clipto,
86 BOOL onlydamagelist, struct IntuitionBase *IntuitionBase);
88 void RenderDisabledPattern(struct RastPort *rp, struct DrawInfo *dri, WORD x1, WORD y1,
89 WORD x2, WORD y2, struct IntuitionBase *IntuitionBase);
91 /* GetGadgetState returns IDS_? */
92 ULONG GetGadgetState(struct Window *window, struct Gadget *gadget);
94 #endif /* _GADGETS_H_ */