1 #ifndef CLIB_ALIB_PROTOS_H
2 #define CLIB_ALIB_PROTOS_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Prototypes for amiga.lib
12 #if defined(RT_ENABLE) && RT_ENABLE
16 # include <exec/types.h>
18 #ifndef INTUITION_INTUITION_H
19 # include <intuition/intuition.h>
21 #ifndef INTUITION_SCREENS_H
22 # include <intuition/screens.h>
25 /* #ifndef INTUITION_CLASSUSR_H
26 # include <intuition/classusr.h>
28 #ifndef INTUITION_CLASSES_H
29 # include <intuition/classes.h>
31 #ifndef LIBRARIES_COMMODITIES_H
32 # include <libraries/commodities.h>
34 #ifndef AROS_ASMCALL_H
35 # include <aros/asmcall.h>
37 #ifndef LIBRARIES_GADTOOLS_H
38 # include <libraries/gadtools.h>
40 #ifndef DEVICES_KEYMAP_H
41 # include <devices/keymap.h>
43 #ifndef DEVICES_INPUTEVENT_H
44 # include <devices/inputevent.h>
46 #include <rexx/storage.h>
59 IPTR
CallHookA (struct Hook
* hook
, APTR obj
, APTR param
);
60 IPTR
CallHook (struct Hook
* hook
, APTR obj
, ...) __stackparm
;
63 VOID
BeginIO (struct IORequest
*ioReq
);
64 struct IORequest
* CreateExtIO (struct MsgPort
* port
, ULONG iosize
);
65 struct IOStdReq
* CreateStdIO (struct MsgPort
* port
);
66 void DeleteExtIO (struct IORequest
* ioreq
);
67 void DeleteStdIO (struct IOStdReq
* ioreq
);
68 struct Task
* CreateTask (STRPTR name
, LONG pri
, APTR initpc
, ULONG stacksize
);
69 void DeleteTask (struct Task
* task
);
70 void NewList (struct List
*);
71 #if !defined(ENABLE_RT) || !ENABLE_RT
72 struct MsgPort
* CreatePort (STRPTR name
, LONG pri
);
73 void DeletePort (struct MsgPort
* mp
);
77 ULONG
RangeRand (ULONG maxValue
);
78 ULONG
FastRand (ULONG seed
);
79 LONG
TimeDelay (LONG unit
, ULONG secs
, ULONG microsecs
);
80 void waitbeam (LONG pos
);
81 void __sprintf(UBYTE
*buffer
, UBYTE
*format
, ...) __stackparm
;
82 STRPTR
StrDup(CONST_STRPTR str
);
83 APTR
ReAllocVec(APTR oldmem
, ULONG size
, ULONG requirements
);
85 void MergeSortList(struct MinList
*l
, int (*compare
)(struct MinNode
*n1
, struct MinNode
*n2
, void *data
), void *data
);
88 CxObj
*HotKey (STRPTR description
, struct MsgPort
*port
, LONG id
);
89 VOID
FreeIEvents (volatile struct InputEvent
*events
);
90 UBYTE
**ArgArrayInit(ULONG argc
, UBYTE
**argv
);
91 VOID
ArgArrayDone(VOID
);
92 LONG
ArgInt(UBYTE
**tt
, STRPTR entry
, LONG defaultVal
);
93 STRPTR
ArgString(UBYTE
**tt
, STRPTR entry
, STRPTR defaultstring
);
94 struct InputEvent
*InvertString(STRPTR str
, struct KeyMap
*km
);
98 LONG
ObtainBestPen( struct ColorMap
* cm
, LONG R
, LONG G
, LONG B
, ULONG tag1
, ...) __stackparm
;
102 void GetRPAttrs( struct RastPort
* rp
, Tag tag1
, ...) __stackparm
;
106 #ifndef SetWindowPointer
107 void SetWindowPointer( struct Window
* window
, ULONG tag1
, ...) __stackparm
;
112 struct Catalog
*OpenCatalog( struct Locale
* locale
,
119 APTR
LibCreatePool (ULONG requirements
, ULONG puddleSize
, ULONG threshSize
);
120 void LibDeletePool (APTR poolHeader
);
121 APTR
LibAllocPooled (APTR poolHeader
, ULONG memSize
);
122 void LibFreePooled (APTR poolHeader
, APTR memory
, ULONG memSize
);
125 AROS_UFP3(IPTR
, HookEntry
,
126 AROS_UFPA(struct Hook
*, hook
, A0
),
127 AROS_UFPA(APTR
, obj
, A2
),
128 AROS_UFPA(APTR
, param
, A1
)
131 #ifndef AROS_METHODRETURNTYPE
132 # define AROS_METHODRETURNTYPE IPTR
134 #ifdef AROS_SLOWSTACKMETHODS
135 Msg
GetMsgFromStack (ULONG MethodID
, va_list args
);
136 void FreeMsgFromStack (Msg msg
);
138 # define AROS_SLOWSTACKMETHODS_PRE(arg) \
139 AROS_METHODRETURNTYPE retval; \
144 va_start (args, arg); \
146 if ((msg = GetMsgFromStack (arg, args))) \
148 # define AROS_SLOWSTACKMETHODS_ARG(arg) msg
149 # define AROS_SLOWSTACKMETHODS_POST \
150 FreeMsgFromStack (msg); \
153 retval = (AROS_METHODRETURNTYPE)0L; \
159 # define AROS_SLOWSTACKMETHODS_PRE(arg) AROS_METHODRETURNTYPE retval;
160 # define AROS_SLOWSTACKMETHODS_ARG(arg) ((Msg)&(arg))
161 # define AROS_SLOWSTACKMETHODS_POST return retval;
162 #endif /* AROS_SLOWSTACKMETHODS */
164 #ifdef AROS_SLOWSTACKTAGS
165 struct TagItem
* GetTagsFromStack (ULONG firstTag
, va_list args
);
166 void FreeTagsFromStack (struct TagItem
* tags
);
167 #endif /* AROS_SLOWSTACKTAGS */
170 BOOL
CheckRexxMsg(struct RexxMsg
*);
171 LONG
SetRexxVar(struct RexxMsg
*, char *, char *, ULONG length
);
172 LONG
GetRexxVar(struct RexxMsg
*, char *, char **value
);
176 #endif /* CLIB_ALIB_PROTOS_H */