grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / muimaster / support.h
blob007a3b1ad4e10c58b30710045d68f72949ad3bad
1 /*
2 Copyright © 2002-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef _MUIMASTER_SUPPORT_H
7 #define _MUIMASTER_SUPPORT_H
9 #ifndef EXEC_TYPES_H
10 # include <exec/types.h>
11 #endif
12 #ifndef INTUITION_CLASSUSR_H
13 # include <intuition/classusr.h>
14 #endif
15 #ifndef INTUITION_CLASSES_H
16 # include <intuition/classes.h>
17 #endif
18 #ifndef CLIB_MACROS_H
19 # include <clib/macros.h>
20 #endif
22 #ifdef __AROS__
23 # ifndef AROS_ASMCALL_H
24 # include <aros/asmcall.h>
25 # endif
26 # include <aros/macros.h>
27 # define IMSPEC_EXTERNAL_PREFIX "IMAGES:Zune/"
28 # include "support_aros.h"
29 #else
30 # include "support_amigaos.h"
31 #endif
33 struct MUI_RenderInfo;
34 struct IntuiMessage;
35 struct Region;
36 struct Rectangle;
37 struct Object;
38 struct Library;
40 #define mui_alloc(x) AllocVec(x,MEMF_CLEAR)
41 #define mui_alloc_struct(x) ((x *)AllocVec(sizeof(x),MEMF_CLEAR))
42 #define mui_free(x) FreeVec(x)
45 int isRegionWithinBounds(struct Region *r, int left, int top, int width,
46 int height);
47 ULONG ConvertKey(struct IntuiMessage *imsg);
49 #define _between(a,x,b) ((x)>=(a) && (x)<=(b))
50 #define _isinobject(obj, x, y) (_between(_mleft(obj), (x), _mright(obj)) \
51 && _between(_mtop(obj), (y), _mbottom(obj)))
53 /* add mask in flags if tag is true, else sub mask */
54 #define _handle_bool_tag(flags, tag, mask) \
55 ((tag != 0) ? ((flags) |= (mask)) : ((flags) &= ~(mask)))
57 #define CLAMP(x, low, high) \
58 (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
60 #ifndef __GNUC__
61 IPTR XGET(Object * obj, Tag attr);
62 #endif
64 IPTR DoSetupMethod(Object * obj, struct MUI_RenderInfo *info);
65 IPTR DoShowMethod(Object * obj);
66 IPTR DoHideMethod(Object * obj);
68 /* returns next node of this node */
69 void *Node_Next(APTR node);
70 /* returns first node of this list */
71 void *List_First(APTR list);
73 WORD SubtractRectFromRect(struct Rectangle *a, struct Rectangle *b,
74 struct Rectangle *destrectarray);
75 ULONG IsObjectVisible(Object * child, struct Library *MUIMasterBase);
77 #endif /* _MUIMASTER_SUPPORT_H */