#ifndef DEFINES_MUIMASTER_PROTOS_H
#define DEFINES_MUIMASTER_PROTOS_H

/*
    Copyright © 1995-2003, The AROS Development Team. All rights reserved.
    *** Automatically generated by gendefines.awk. Do not edit ***

    Desc: Prototypes for MUIMaster
    Lang: english
*/

#ifndef AROS_LIBCALL_H
#   include <aros/libcall.h>
#endif
#ifndef EXEC_TYPES_H
#   include <exec/types.h>
#endif
#ifndef AROS_PREPROCESSOR_VARIADIC_CAST2IPTR_HPP
#   include <aros/preprocessor/variadic/cast2iptr.hpp>
#endif

#define __MUI_AddClipping_WB(__MUIMasterBase, __mri, __left, __top, __width, __height)\
    AROS_LC5(APTR, MUI_AddClipping, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(WORD, (__left), D0), \
    AROS_LCA(WORD, (__top), D1), \
    AROS_LCA(WORD, (__width), D2), \
    AROS_LCA(WORD, (__height), D3), \
    struct Library *, (__MUIMasterBase), 24, MUIMaster)

#define MUI_AddClipping(mri, left, top, width, height)\
    __MUI_AddClipping_WB(MUIMasterBase, (mri), (left), (top), (width), (height))

#define __MUI_AddClipRegion_WB(__MUIMasterBase, __mri, __r)\
    AROS_LC2(APTR, MUI_AddClipRegion, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(struct Region *, (__r), A1), \
    struct Library *, (__MUIMasterBase), 26, MUIMaster)

#define MUI_AddClipRegion(mri, r)\
    __MUI_AddClipRegion_WB(MUIMasterBase, (mri), (r))

#define __MUI_AllocAslRequest_WB(__MUIMasterBase, __reqType, __tagList)\
    AROS_LC2(APTR, MUI_AllocAslRequest, \
    AROS_LCA(unsigned long, (__reqType), D0), \
    AROS_LCA(struct TagItem *, (__tagList), A0), \
    struct Library *, (__MUIMasterBase), 8, MUIMaster)

#define MUI_AllocAslRequest(reqType, tagList)\
    __MUI_AllocAslRequest_WB(MUIMasterBase, (reqType), (tagList))

#if !defined(NO_INLINE_STDARG) && !defined(MUIMASTER_NO_INLINE_STDARG)
#define MUI_AllocAslRequestTags(reqType, ...) \
({ \
     IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
     MUI_AllocAslRequest((reqType), (struct TagItem *)__args); \
})
#endif /* !NO_INLINE_STDARG */

#define __MUI_AslRequest_WB(__MUIMasterBase, __requester, __tagList)\
    AROS_LC2(BOOL, MUI_AslRequest, \
    AROS_LCA(APTR, (__requester), A0), \
    AROS_LCA(struct TagItem *, (__tagList), A1), \
    struct Library *, (__MUIMasterBase), 9, MUIMaster)

#define MUI_AslRequest(requester, tagList)\
    __MUI_AslRequest_WB(MUIMasterBase, (requester), (tagList))

#if !defined(NO_INLINE_STDARG) && !defined(MUIMASTER_NO_INLINE_STDARG)
#define MUI_AslRequestTags(requester, ...) \
({ \
     IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
     MUI_AslRequest((requester), (struct TagItem *)__args); \
})
#endif /* !NO_INLINE_STDARG */

#define __MUI_BeginRefresh_WB(__MUIMasterBase, __mri, __flags)\
    AROS_LC2(BOOL, MUI_BeginRefresh, \
    AROS_LCA( struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 28, MUIMaster)

#define MUI_BeginRefresh(mri, flags)\
    __MUI_BeginRefresh_WB(MUIMasterBase, (mri), (flags))

#define __MUI_CreateCustomClass_WB(__MUIMasterBase, __base, __supername, __supermcc, __datasize, __dispatcher)\
    AROS_LC5(struct MUI_CustomClass *, MUI_CreateCustomClass, \
    AROS_LCA(struct Library *, (__base), A0), \
    AROS_LCA(ClassID, (__supername), A1), \
    AROS_LCA(struct MUI_CustomClass *, (__supermcc), A2), \
    AROS_LCA(ULONG, (__datasize), D0), \
    AROS_LCA(APTR, (__dispatcher), A3), \
    struct Library *, (__MUIMasterBase), 18, MUIMaster)

#define MUI_CreateCustomClass(base, supername, supermcc, datasize, dispatcher)\
    __MUI_CreateCustomClass_WB(MUIMasterBase, (base), (supername), (supermcc), (datasize), (dispatcher))

#define __MUI_DeleteCustomClass_WB(__MUIMasterBase, __mcc)\
    AROS_LC1(BOOL, MUI_DeleteCustomClass, \
    AROS_LCA(struct MUI_CustomClass *, (__mcc), A0), \
    struct Library *, (__MUIMasterBase), 19, MUIMaster)

#define MUI_DeleteCustomClass(mcc)\
    __MUI_DeleteCustomClass_WB(MUIMasterBase, (mcc))

#define __MUI_DisposeObject_WB(__MUIMasterBase, __obj)\
    AROS_LC1(VOID, MUI_DisposeObject, \
    AROS_LCA(Object *, (__obj), A0), \
    struct Library *, (__MUIMasterBase), 6, MUIMaster)

#define MUI_DisposeObject(obj)\
    __MUI_DisposeObject_WB(MUIMasterBase, (obj))

#define __MUI_EndRefresh_WB(__MUIMasterBase, __mri, __flags)\
    AROS_LC2(VOID, MUI_EndRefresh, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 29, MUIMaster)

#define MUI_EndRefresh(mri, flags)\
    __MUI_EndRefresh_WB(MUIMasterBase, (mri), (flags))

#define __MUI_Error_WB(__MUIMasterBase)\
    AROS_LC0(LONG, MUI_Error, \
    struct Library *, (__MUIMasterBase), 11, MUIMaster)

#define MUI_Error()\
    __MUI_Error_WB(MUIMasterBase)

#define __MUI_FreeAslRequest_WB(__MUIMasterBase, __requester)\
    AROS_LC1(VOID, MUI_FreeAslRequest, \
    AROS_LCA(APTR, (__requester), A0), \
    struct Library *, (__MUIMasterBase), 10, MUIMaster)

#define MUI_FreeAslRequest(requester)\
    __MUI_FreeAslRequest_WB(MUIMasterBase, (requester))

#define __MUI_FreeClass_WB(__MUIMasterBase, __cl)\
    AROS_LC1(VOID, MUI_FreeClass, \
    AROS_LCA(Class *, (__cl), A0), \
    struct Library *, (__MUIMasterBase), 14, MUIMaster)

#define MUI_FreeClass(cl)\
    __MUI_FreeClass_WB(MUIMasterBase, (cl))

#define __MUI_GetClass_WB(__MUIMasterBase, __classid)\
    AROS_LC1(struct IClass *, MUI_GetClass, \
    AROS_LCA(ClassID, (__classid), A0), \
    struct Library *, (__MUIMasterBase), 13, MUIMaster)

#define MUI_GetClass(classid)\
    __MUI_GetClass_WB(MUIMasterBase, (classid))

#define __MUI_Layout_WB(__MUIMasterBase, __obj, __left, __top, __width, __height, __flags)\
    AROS_LC6(BOOL, MUI_Layout, \
    AROS_LCA(Object *, (__obj), A0), \
    AROS_LCA(LONG, (__left), D0), \
    AROS_LCA(LONG, (__top), D1), \
    AROS_LCA(LONG, (__width), D2), \
    AROS_LCA(LONG, (__height), D3), \
    AROS_LCA(ULONG, (__flags), D4), \
    struct Library *, (__MUIMasterBase), 21, MUIMaster)

#define MUI_Layout(obj, left, top, width, height, flags)\
    __MUI_Layout_WB(MUIMasterBase, (obj), (left), (top), (width), (height), (flags))

#define __MUI_MakeObjectA_WB(__MUIMasterBase, __type, __params)\
    AROS_LC2(Object *, MUI_MakeObjectA, \
    AROS_LCA(LONG, (__type), D0), \
    AROS_LCA(IPTR *, (__params), A0), \
    struct Library *, (__MUIMasterBase), 20, MUIMaster)

#define MUI_MakeObjectA(type, params)\
    __MUI_MakeObjectA_WB(MUIMasterBase, (type), (params))

#if !defined(NO_INLINE_STDARG) && !defined(MUIMASTER_NO_INLINE_STDARG)
#define MUI_MakeObject(type, ...) \
({ \
     IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
     MUI_MakeObjectA((type), (IPTR *)__args); \
})
#endif /* !NO_INLINE_STDARG */

#define __MUI_NewObjectA_WB(__MUIMasterBase, __classid, __tags)\
    AROS_LC2(Object *, MUI_NewObjectA, \
    AROS_LCA(ClassID, (__classid), A0), \
    AROS_LCA(struct TagItem *, (__tags), A1), \
    struct Library *, (__MUIMasterBase), 5, MUIMaster)

#define MUI_NewObjectA(classid, tags)\
    __MUI_NewObjectA_WB(MUIMasterBase, (classid), (tags))


#if !defined(NO_INLINE_STDARG) && !defined(MUIMASTER_NO_INLINE_STDARG)
#define MUI_NewObject(classid, ...) \
({ \
     IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
     MUI_NewObjectA((classid), (struct TagItem *)__args); \
})
#endif /* !NO_INLINE_STDARG */

#define __MUI_ObtainPen_WB(__MUIMasterBase, __mri, __spec, __flags)\
    AROS_LC3(LONG, MUI_ObtainPen, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(struct MUI_PenSpec *, (__spec), A1), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 22, MUIMaster)

#define MUI_ObtainPen(mri, spec, flags)\
    __MUI_ObtainPen_WB(MUIMasterBase, (mri), (spec), (flags))

#define __MUI_Redraw_WB(__MUIMasterBase, __obj, __flags)\
    AROS_LC2(VOID, MUI_Redraw, \
    AROS_LCA(Object *, (__obj), A0), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 17, MUIMaster)

#define MUI_Redraw(obj, flags)\
    __MUI_Redraw_WB(MUIMasterBase, (obj), (flags))

#define __MUI_RejectIDCMP_WB(__MUIMasterBase, __obj, __flags)\
    AROS_LC2(VOID, MUI_RejectIDCMP, \
    AROS_LCA(Object *, (__obj), A0), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 16, MUIMaster)

#define MUI_RejectIDCMP(obj, flags)\
    __MUI_RejectIDCMP_WB(MUIMasterBase, (obj), (flags))

#define __MUI_ReleasePen_WB(__MUIMasterBase, __mri, __pen)\
    AROS_LC2(VOID, MUI_ReleasePen, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(LONG, (__pen), D0), \
    struct Library *, (__MUIMasterBase), 23, MUIMaster)

#define MUI_ReleasePen(mri, pen)\
    __MUI_ReleasePen_WB(MUIMasterBase, (mri), (pen))

#define __MUI_RemoveClipping_WB(__MUIMasterBase, __mri, __handle)\
    AROS_LC2(VOID, MUI_RemoveClipping, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(APTR, (__handle), A1), \
    struct Library *, (__MUIMasterBase), 25, MUIMaster)

#define MUI_RemoveClipping(mri, handle)\
    __MUI_RemoveClipping_WB(MUIMasterBase, (mri), (handle))

#define __MUI_RemoveClipRegion_WB(__MUIMasterBase, __mri, __handle)\
    AROS_LC2(VOID, MUI_RemoveClipRegion, \
    AROS_LCA(struct MUI_RenderInfo *, (__mri), A0), \
    AROS_LCA(APTR, (__handle), A1), \
    struct Library *, (__MUIMasterBase), 27, MUIMaster)

#define MUI_RemoveClipRegion(mri, handle)\
    __MUI_RemoveClipRegion_WB(MUIMasterBase, (mri), (handle))

#define __MUI_RequestA_WB(__MUIMasterBase, __app, __win, __flags, __title, __gadgets, __format, __params)\
    AROS_LC7(LONG, MUI_RequestA, \
    AROS_LCA(APTR, (__app), D0), \
    AROS_LCA(APTR, (__win), D1), \
    AROS_LCA(LONGBITS, (__flags), D2), \
    AROS_LCA(CONST_STRPTR, (__title), A0), \
    AROS_LCA(CONST_STRPTR, (__gadgets), A1), \
    AROS_LCA(CONST_STRPTR, (__format), A2), \
    AROS_LCA(APTR, (__params), A3), \
    struct Library *, (__MUIMasterBase), 7, MUIMaster)

#define MUI_RequestA(app, win, flags, title, gadgets, format, params)\
    __MUI_RequestA_WB(MUIMasterBase, (app), (win), (flags), (title), (gadgets), (format), (params))

#if !defined(NO_INLINE_STDARG) && !defined(MUIMASTER_NO_INLINE_STDARG)
#define MUI_Request(app, win, flags, title, gadgets, format, ...) \
({ \
     IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
     MUI_RequestA((app), (win), (flags), (title), (gadgets), (format), (APTR)__args); \
})
#endif /* !NO_INLINE_STDARG */

#define __MUI_RequestIDCMP_WB(__MUIMasterBase, __obj, __flags)\
    AROS_LC2(VOID, MUI_RequestIDCMP, \
    AROS_LCA(Object *, (__obj), A0), \
    AROS_LCA(ULONG, (__flags), D0), \
    struct Library *, (__MUIMasterBase), 15, MUIMaster)

#define MUI_RequestIDCMP(obj, flags)\
    __MUI_RequestIDCMP_WB(MUIMasterBase, (obj), (flags))

#define __MUI_SetError_WB(__MUIMasterBase, __num)\
    AROS_LC1(LONG, MUI_SetError, \
    AROS_LCA(LONG, (__num), D0), \
    struct Library *, (__MUIMasterBase), 12, MUIMaster)

#define MUI_SetError(num)\
    __MUI_SetError_WB(MUIMasterBase, (num))

#endif /* DEFINES_MUIMASTER_PROTOS_H */
