2 ** $VER: openurl.h 7.2 (1.12.2005)
4 ** openurl.library - universal URL display and browser
7 ** Written by Troels Walsted Hansen <troels@thule.no>
8 ** Placed in the public domain.
11 ** - Alfonso Ranieri <alforan@tin.it>
12 ** - Stefan Kost <ensonic@sonicpulse.de>
16 #ifndef _PPCINLINE_OPENURL_H
17 #define _PPCINLINE_OPENURL_H
19 #ifndef __PPCINLINE_MACROS_H
20 #include <ppcinline/macros.h>
21 #endif /* !__PPCINLINE_MACROS_H */
23 #ifndef OPENURL_BASE_NAME
24 #define OPENURL_BASE_NAME OpenURLBase
25 #endif /* !OPENURL_BASE_NAME */
27 #define URL_OpenA(url, tags) \
28 LP2(0x1e, BOOL, URL_OpenA, STRPTR, url, a0, struct TagItem *, tags, a1, \
29 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
31 #define URL_OldGetPrefs() \
32 LP0(0x24, struct URL_Prefs *, URL_OldGetPrefs, \
33 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
35 #define URL_OldFreePrefs(up) \
36 LP1NR(0x2a, URL_OldFreePrefs, struct URL_Prefs *, up, a0, \
37 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
39 #define URL_OldSetPrefs(up, permanent) \
40 LP2(0x30, BOOL, URL_OldSetPrefs, struct URL_Prefs *, up, a0, BOOL, permanent, d0, \
41 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
43 #define URL_OldGetDefaultPrefs() \
44 LP0(0x36, struct URL_Prefs *, URL_OldGetDefaultPrefs, \
45 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
47 #define URL_OldLaunchPrefsApp() \
48 LP0(0x3c, BOOL, URL_OldLaunchPrefsApp, \
49 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
51 #define URL_GetPrefsA(tags) \
52 LP1(0x48, struct URL_Prefs *, URL_GetPrefsA, struct TagItem *, tags, a0, \
53 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
55 #define URL_FreePrefsA(prefs, tags) \
56 LP2NR(0x4e, URL_FreePrefsA, struct URL_Prefs *, prefs, a0, struct TagItem *, tags, a1, \
57 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
59 #define URL_SetPrefsA(up, tags) \
60 LP2(0x54, BOOL, URL_SetPrefsA, struct URL_Prefs *, up, a0, struct TagItem *, tags, a1, \
61 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
63 #define URL_LaunchPrefsAppA(tags) \
64 LP1(0x5a, BOOL, URL_LaunchPrefsAppA, struct TagItem *, tags, a0, \
65 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
67 #define URL_GetAttr(attr, storage) \
68 LP2(0x60, ULONG, URL_GetAttr, ULONG, attr, d0, ULONG *, storage, a0, \
69 , OPENURL_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
71 #ifdef USE_INLINE_STDARG
75 #define URL_Open(__p0, ...) \
76 ({ULONG _tags[] = {__VA_ARGS__}; URL_OpenA(__p0, (struct TagItem *) _tags);})
78 #define URL_GetPrefs(...) \
79 ({ULONG _tags[] = {__VA_ARGS__}; URL_GetPrefsA((struct TagItem *) _tags);})
81 #define URL_FreePrefs(__p0, ...) \
82 ({ULONG _tags[] = {__VA_ARGS__}; URL_FreePrefsA(__p0, (struct TagItem *) _tags);})
84 #define URL_SetPrefs(__p0, ...) \
85 ({ULONG _tags[] = {__VA_ARGS__}; URL_SetPrefsA(__p0, (struct TagItem *) _tags);})
87 #define URL_LaunchPrefsApp(...) \
88 ({ULONG _tags[] = {__VA_ARGS__}; URL_LaunchPrefsAppA((struct TagItem *) _tags);})
92 #endif /* _PPCINLINE_OPENURL_H */