1 /***************************************************************************
3 openurl.library - universal URL display and browser launcher library
4 Copyright (C) 1998-2005 by Troels Walsted Hansen, et al.
5 Copyright (C) 2005-2013 by openurl.library Open Source Team
7 This library is free software; it has been placed in the public domain
8 and you can freely redistribute it and/or modify it. Please note, however,
9 that some components may be under the LGPL or GPL license.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 openurl.library project: http://sourceforge.net/projects/openurllib/
19 ***************************************************************************/
24 #include <proto/exec.h>
25 #include <proto/dos.h>
27 #include <proto/intuition.h>
28 #include <proto/graphics.h>
29 #include <proto/utility.h>
30 #include <proto/icon.h>
31 #include <proto/locale.h>
32 #include <proto/openurl.h>
34 #include <workbench/startup.h>
36 #include <libraries/asl.h>
37 #include <libraries/gadtools.h>
38 #include <libraries/iffparse.h>
40 #include <clib/alib_protos.h>
41 #include <clib/debug_protos.h>
46 /**************************************************************************/
51 extern struct LocaleBase
*LocaleBase
;
53 extern struct Catalog
*g_cat
;
55 //extern ULONG g_MUI4;
57 /**************************************************************************/
61 #define THIS_PREFS_VERSION ((UBYTE)4)
63 #define APPBASENAME "OPENURL"
64 #define APPAUTHOR "openurl.library Open Source Team"
65 #define APPHELP "OpenURL.guide"
67 /**************************************************************************/
69 ** Identify a generic URL_#? node
78 /**************************************************************************/
83 #define TAG_MUI_TWH ((int)0x81480000+100)
85 #define TAGBASE_APP (TAG_MUI_TWH+0)
86 #define TAGBASE_ABOUT (TAG_MUI_TWH+20)
87 #define TAGBASE_PENS (TAG_MUI_TWH+40)
88 #define TAGBASE_WIN (TAG_MUI_TWH+60)
89 #define TAGBASE_APPLIST (TAG_MUI_TWH+80)
90 #define TAGBASE_BROWSEREDITWIN (TAG_MUI_TWH+100)
91 #define TAGBASE_MAILEREDITWIN (TAG_MUI_TWH+120)
92 #define TAGBASE_FTPEDITWIN (TAG_MUI_TWH+140)
93 #define TAGBASE_POPPORT (TAG_MUI_TWH+160)
94 #define TAGBASE_LAMP (TAG_MUI_TWH+180)
95 #define TAGBASE_POPPH (TAG_MUI_TWH+200)
97 /**************************************************************************/
102 #define appObject NewObject(g_appClass->mcc_Class,NULL
105 #define MUIM_App_OpenWin (TAGBASE_APP+0)
106 #define MUIM_App_GetPrefs (TAGBASE_APP+1)
107 #define MUIM_App_About (TAGBASE_APP+2)
108 #define MUIM_App_DisposeWin (TAGBASE_APP+4)
109 #define MUIM_App_CloseWin (TAGBASE_APP+3)
110 #define MUIM_App_CheckSave (TAGBASE_APP+4)
114 struct MUIP_App_OpenWin
117 struct IClass
*Class
;
123 struct MUIP_App_GetPrefs
132 MUIV_App_GetPrefs_InUse
,
133 MUIV_App_GetPrefs_LastSaveds
,
134 MUIV_App_GetPrefs_Restore
,
135 MUIV_App_GetPrefs_Defaults
,
138 struct MUIP_App_DisposeWin
144 struct MUIP_App_CloseWin
152 #define MUIA_App_IsSubWin (TAGBASE_APP+0)
153 #define MUIA_App_Pens (TAGBASE_APP+1)
155 /**************************************************************************/
160 #define aboutObject NewObject(g_aboutClass->mcc_Class,NULL
162 /**************************************************************************/
167 #define winObject NewObject(g_winClass->mcc_Class,NULL
170 #define MUIM_Win_GetPrefs (TAGBASE_WIN+0)
171 #define MUIM_Win_StorePrefs (TAGBASE_WIN+1)
172 #define MUIM_Win_Delete (TAGBASE_WIN+2)
176 struct MUIP_Win_GetPrefs
185 MUIV_Win_GetPrefs_InUse
,
186 MUIV_Win_GetPrefs_LastSaveds
,
187 MUIV_Win_GetPrefs_Restore
,
188 MUIV_Win_GetPrefs_Defaults
,
191 struct MUIP_Win_StorePrefs
200 MUIV_Win_StorePrefs_Save
,
201 MUIV_Win_StorePrefs_Use
,
202 MUIV_Win_StorePrefs_Apply
,
205 struct MUIP_Win_Delete
211 /**************************************************************************/
216 #define appListObject NewObject(g_appListClass->mcc_Class,NULL
219 #define MUIM_AppList_Add (TAGBASE_APPLIST+0)
220 #define MUIM_AppList_Edit (TAGBASE_APPLIST+1)
221 #define MUIM_AppList_Clone (TAGBASE_APPLIST+2)
222 #define MUIM_AppList_Delete (TAGBASE_APPLIST+3)
223 #define MUIM_AppList_ActiveChanged (TAGBASE_APPLIST+4)
224 #define MUIM_AppList_Disable (TAGBASE_APPLIST+5)
225 #define MUIM_AppList_Move (TAGBASE_APPLIST+6)
227 struct MUIP_AppList_Edit
233 struct MUIP_AppList_Disable
239 struct MUIP_AppList_Move
246 #define MUIA_AppList_Type (TAGBASE_APPLIST+0)
247 #define MUIA_AppList_ListObj (TAGBASE_APPLIST+1)
248 #define MUIA_AppList_NodeNameOffset (TAGBASE_APPLIST+2)
249 #define MUIA_AppList_NodePathOffset (TAGBASE_APPLIST+3)
250 #define MUIA_AppList_NodeSize (TAGBASE_APPLIST+4)
254 MUIV_AppList_Type_Browser
,
255 MUIV_AppList_Type_Mailer
,
256 MUIV_AppList_Type_FTP
,
259 /**************************************************************************/
261 ** BrowserEditWin class
264 #define browserEditWinObject NewObject(g_browserEditWinClass->mcc_Class,NULL
267 #define MUIM_BrowserEditWin_Use (TAGBASE_BROWSEREDITWIN+0)
270 #define MUIA_BrowserEditWin_Browser (TAGBASE_BROWSEREDITWIN+0)
271 #define MUIA_BrowserEditWin_ListObj (TAGBASE_BROWSEREDITWIN+1)
273 /**************************************************************************/
275 ** MailerEditWin class
278 #define mailerEditWinObject NewObject(g_mailerEditWinClass->mcc_Class,NULL
281 #define MUIM_MailerEditWin_Use (TAGBASE_MAILEREDITWIN+0)
284 #define MUIA_MailerEditWin_Mailer (TAGBASE_MAILEREDITWIN+0)
285 #define MUIA_MailerEditWin_ListObj (TAGBASE_MAILEREDITWIN+1)
287 /**************************************************************************/
292 #define FTPEditWinObject NewObject(g_FTPEditWinClass->mcc_Class,NULL
295 #define MUIM_FTPEditWin_Use (TAGBASE_FTPEDITWIN+0)
298 #define MUIA_FTPEditWin_FTP (TAGBASE_FTPEDITWIN+0)
299 #define MUIA_FTPEditWin_ListObj (TAGBASE_FTPEDITWIN+1)
301 /**************************************************************************/
306 #define popportObject NewObject(g_popportClass->mcc_Class,NULL
309 #define MUIA_Popport_Key (TAGBASE_POPPORT+0)
310 #define MUIA_Popport_Len (TAGBASE_POPPORT+1)
312 /**************************************************************************/
318 #define MUIA_Lamp_Disabled (TAGBASE_LAMP)
320 /**************************************************************************/
325 #define popphObject NewObject(g_popphClass->mcc_Class,NULL
328 #define MUIM_Popph_RequestFile (TAGBASE_POPPH)
331 #define MUIA_Popph_Syms (TAGBASE_POPPH)
332 #define MUIA_Popph_Names (TAGBASE_POPPH+1)
333 #define MUIA_Popph_StrObj (TAGBASE_POPPH+2)
334 #define MUIA_Popph_MaxLen (TAGBASE_POPPH+3)
335 #define MUIA_Popph_Key (TAGBASE_POPPH+4)
336 #define MUIA_Popph_Asl (TAGBASE_POPPH+5)
338 /**************************************************************************/
343 #define pensObject NewObject(g_pensClass->mcc_Class,NULL
346 #define MUIM_Pens_Change (TAGBASE_PENS)
348 /**************************************************************************/
360 #ifndef MUIA_Window_AllowTopMenus
361 #define MUIA_Window_AllowTopMenus 0x8042fe69
364 #define DEF_EnabledPen "m6"
365 #define DEF_DisabledPen "m1"
366 #define DEF_DetailPen "m4"
368 /**************************************************************************/
373 #define MTITLE(t) {NM_TITLE,(STRPTR)(t),0,0,0,(APTR)(t)}
374 #define MTITEM(t) {NM_ITEM,(STRPTR)(t),0,CHECKIT|MENUTOGGLE,0,(APTR)(t)}
375 #define MITEM(t) {NM_ITEM,(STRPTR)(t),0,0,0,(APTR)(t)}
376 #define MBAR {NM_ITEM,(STRPTR)NM_BARLABEL,0,0,0,NULL}
377 #define MEND {NM_END,NULL,0,0,0,NULL}
382 #define get(obj,attr,store) GetAttr((ULONG)(attr),(Object *)obj,(ULONG *)(store))
383 #define set(obj,attr,value) SetAttrs((Object *)(obj),(ULONG)(attr),(ULONG)(value),TAG_DONE)
384 #define nnset(obj,attr,value) SetAttrs((Object *)(obj),MUIA_NoNotify,TRUE,(ULONG)(attr),(ULONG)(value),TAG_DONE)
385 #define superset(cl,obj,attr,value) SetSuperAttrs((APTR)(cl),(Object *)(obj),(ULONG)(attr),(ULONG)(value),TAG_DONE)
386 #define supernnset(cl,obj,attr,value) SetSuperAttrs((APTR)(cl),(Object *)(obj),(ULONG)(attr),(ULONG)(value),MUIA_NoNotify,TRUE,TAG_DONE)
387 #define superget(cl,obj,attr,valPtr) DoSuperMethod((APTR)(cl),(Object *)(obj),OM_GET,(ULONG)(attr),(ULONG)(valPtr))
388 #define nfset(obj,attr,value) SetAttrs((Object *)(obj),(ULONG)(attr),(ULONG)(value),MUIA_Group_Forward,FALSE,TAG_DONE)
390 #define wspace(w) RectangleObject, MUIA_Weight, w, End
392 /***********************************************************************/
397 //#include "OpenURL_protos.h"
399 /**************************************************************************/