2 ** openurl.library - universal URL display and browser
5 ** Written by Troels Walsted Hansen <troels@thule.no>
6 ** Placed in the public domain.
9 ** - Alfonso Ranieri <alforan@tin.it>
10 ** - Stefan Kost <ensonic@sonicpulse.de>
12 ** Ported to OS4 by Alexandre Balaban <alexandre@balaban.name>
17 void freeBase ( void );
18 ULONG
initBase ( void );
22 #include <proto/openurl.h>
24 ULONG LIBCALL
URL_OpenA ( REG (a0
,UBYTE
*URL
), REG (a1
,struct TagItem
*attrs
));
25 struct URL_Prefs
*LIBCALL
URL_GetPrefsA ( REG (a0
,struct TagItem
*attrs
));
26 struct URL_Prefs
*LIBCALL
URL_OldGetPrefs ( void );
27 void LIBCALL
URL_FreePrefsA ( REG (a0
,struct URL_Prefs
*p
), REG (a1
,struct TagItem
*attrs
));
28 void LIBCALL
URL_OldFreePrefs ( REG (a0
,struct URL_Prefs
*p
));
29 ULONG LIBCALL
URL_SetPrefsA ( REG (a0
,struct URL_Prefs
*p
), REG (a1
,struct TagItem
*attrs
));
30 ULONG LIBCALL
URL_OldSetPrefs ( REG (a0
,struct URL_Prefs
*p
), REG (d0
,ULONG save
));
31 struct URL_Prefs
*LIBCALL
URL_OldGetDefaultPrefs ( void );
32 ULONG LIBCALL
URL_LaunchPrefsAppA ( REG (a0
,struct TagItem
*attrs
));
33 ULONG LIBCALL
URL_OldLaunchPrefsApp ( void );
34 ULONG LIBCALL
URL_GetAttr ( REG (d0
,ULONG attr
), REG (a0
,ULONG
*storage
));
36 LONG
dispatch ( void );
38 LONG LIBCALL
dispatch ( REG (a0
, struct RexxMsg
*msg
) , REG (a1
, UBYTE
**resPtr
));
44 ULONG
LIB_URL_OpenA ( void );
45 struct URL_Prefs
*LIB_URL_GetPrefsA ( void );
46 struct URL_Prefs
*LIB_URL_OldGetPrefs ( void );
47 void LIB_URL_FreePrefsA ( void );
48 void LIB_URL_OldFreePrefs ( void );
49 ULONG
LIB_URL_SetPrefsA ( void );
50 ULONG
LIB_URL_OldSetPrefs ( void );
51 struct URL_Prefs
*LIB_URL_OldGetDefaultPrefs ( void );
52 ULONG
LIB_URL_LaunchPrefsAppA ( void );
53 ULONG
LIB_URL_OldLaunchPrefsApp ( void );
54 ULONG
LIB_URL_GetAttr ( void );
55 #elif defined(__amigaos4__)
56 #include <interfaces/openurl.h>
57 ULONG VARARGS68K
OS4_URL_OpenA ( struct OpenURLIFace
* Self
, STRPTR url
, struct TagItem
*attrs
);
58 ULONG VARARGS68K
OS4_URL_Open ( struct OpenURLIFace
* Self
, STRPTR url
, ... );
59 struct URL_Prefs
* VARARGS68K
OS4_URL_GetPrefsA ( struct OpenURLIFace
* Self
, struct TagItem
*attrs
);
60 struct URL_Prefs
* VARARGS68K
OS4_URL_GetPrefs ( struct OpenURLIFace
* Self
, ... );
61 struct URL_Prefs
* VARARGS68K
OS4_URL_OldGetPrefs ( struct OpenURLIFace
* Self
);
62 void VARARGS68K
OS4_URL_FreePrefsA ( struct OpenURLIFace
* Self
, struct URL_Prefs
*up
, struct TagItem
*attrs
);
63 void VARARGS68K
OS4_URL_FreePrefs ( struct OpenURLIFace
* Self
, struct URL_Prefs
*up
, ... );
64 void VARARGS68K
OS4_URL_OldFreePrefs ( struct OpenURLIFace
* Self
, struct URL_Prefs
*up
);
65 ULONG VARARGS68K
OS4_URL_SetPrefsA ( struct OpenURLIFace
* Self
, struct URL_Prefs
*p
, struct TagItem
*attrs
);
66 ULONG VARARGS68K
OS4_URL_SetPrefs ( struct OpenURLIFace
* Self
, struct URL_Prefs
*p
, ... );
67 ULONG VARARGS68K
OS4_URL_OldSetPrefs ( struct OpenURLIFace
* Self
, struct URL_Prefs
*p
, ULONG permanent
);
68 struct URL_Prefs
* VARARGS68K
OS4_URL_OldGetDefaultPrefs ( struct OpenURLIFace
* Self
);
69 ULONG VARARGS68K
OS4_URL_LaunchPrefsAppA ( struct OpenURLIFace
* Self
, struct TagItem
*attrs
);
70 ULONG VARARGS68K
OS4_URL_LaunchPrefsApp ( struct OpenURLIFace
* Self
, ... );
71 ULONG VARARGS68K
OS4_URL_OldLaunchPrefsApp ( struct OpenURLIFace
* Self
);
72 ULONG VARARGS68K
OS4_URL_GetAttr ( struct OpenURLIFace
* Self
, ULONG attr
, ULONG
*storage
);
73 LONG VARARGS68K
OS4_dispatch ( struct OpenURLIFace
* Self
, struct RexxMsg
*msg
, UBYTE
**resPtr
);
78 #if defined(__MORPHOS__) || defined(__AROS__)
79 void handler ( void );
81 void SAVEDS
handler ( void );
85 struct URL_Prefs
*copyPrefs ( struct URL_Prefs
*old
);
86 void initPrefs ( struct URL_Prefs
*p
);
87 void setDefaultPrefs ( struct URL_Prefs
*up
);
88 ULONG
savePrefs ( UBYTE
*filename
, struct URL_Prefs
*up
);
89 ULONG
loadPrefs ( struct URL_Prefs
*p
, ULONG mode
);
90 struct URL_Prefs
*loadPrefsNotFail ( void );
93 ULONG
sendToBrowser ( UBYTE
*URL
, struct List
*portlist
, ULONG show
, ULONG toFront
, ULONG newWindow
, ULONG launch
, UBYTE
*pubScreenName
);
94 ULONG
sendToFTP ( UBYTE
*URL
, struct List
*portlist
, ULONG show
, ULONG toFront
, ULONG newWindow
, ULONG launch
, UBYTE
*pubScreenName
);
95 ULONG
sendToMailer ( UBYTE
*URL
, struct List
*portlist
, ULONG show
, ULONG toFront
, ULONG launch
, UBYTE
*pubScreenName
);
96 ULONG
copyList ( struct List
*dst
, struct List
*src
, ULONG size
);
97 void freeList ( struct List
*list
, ULONG size
);
98 ULONG
isdigits ( UBYTE
*str
);
99 APTR
allocPooled ( ULONG size
);
100 void freePooled ( APTR mem
, ULONG size
);
101 APTR
allocVecPooled ( ULONG size
);
102 void freeVecPooled ( APTR mem
);
104 #define msprintf(to, fmt, ...) ({ ULONG _tags[] = { __VA_ARGS__ }; RawDoFmt(fmt, _tags, (void (*)(void)) 0, to); })
105 #elif defined(__amigaos4__)
106 void VARARGS68K
msprintf ( UBYTE
*to
, UBYTE
*fmt
, ...);
107 #elif defined(__AROS__)
108 #define msprintf __sprintf
110 void STDARGS
msprintf ( UBYTE
*to
, UBYTE
*fmt
, ...);