2 ** OpenURL - MUI preferences for openurl.library
4 ** Written by Troels Walsted Hansen <troels@thule.no>
5 ** Placed in the public domain.
8 ** - Alfonso Ranieri <alforan@tin.it>
9 ** - Stefan Kost <ensonic@sonicpulse.de>
12 ** Main includes and definitions
16 #define MUIMASTER_YES_INLINE_STDARG
24 #include <proto/exec.h>
25 #include <proto/dos.h>
27 #include <proto/muimaster.h>
28 #include <proto/intuition.h>
29 #include <proto/graphics.h>
30 #include <proto/utility.h>
31 #include <proto/icon.h>
32 #include <proto/locale.h>
33 #include <proto/openurl.h>
35 #include <workbench/startup.h>
37 #include <libraries/asl.h>
38 #include <libraries/gadtools.h>
39 #include <libraries/iffparse.h>
40 #include <libraries/mui.h>
42 #include <clib/alib_protos.h>
45 #include <clib/debug_protos.h>
47 #include <mui/Textinput_mcc.h>
48 #include <mui/Urltext_mcc.h>
49 #include <mui/MUIundoc.h>
50 #endif /* !__AROS__ */
57 /**************************************************************************/
62 extern struct ExecBase
*SysBase
;
63 extern struct DosLibrary
*DOSBase
;
64 extern struct IntuitionBase
*IntuitionBase
;
65 extern struct GfxBase
*GfxBase
;
66 extern struct Library
*MUIMasterBase
;
68 extern struct UtilityBase
*UtilityBase
;
70 extern struct Library
*UtilityBase
;
72 extern struct Library
*IconBase
;
73 extern struct LocaleBase
*LocaleBase
;
74 extern struct Library
*OpenURLBase
;
76 extern struct MUI_CustomClass
*g_appClass
;
77 extern struct MUI_CustomClass
*g_pensClass
;
78 extern struct MUI_CustomClass
*g_aboutClass
;
79 extern struct MUI_CustomClass
*g_winClass
;
80 extern struct MUI_CustomClass
*g_appListClass
;
81 extern struct MUI_CustomClass
*g_browserEditWinClass
;
82 extern struct MUI_CustomClass
*g_mailerEditWinClass
;
83 extern struct MUI_CustomClass
*g_FTPEditWinClass
;
84 extern struct MUI_CustomClass
*g_popportClass
;
85 extern struct MUI_CustomClass
*g_popphClass
;
87 extern struct Catalog
*g_cat
;
89 //extern ULONG g_MUI4;
91 /**************************************************************************/
95 #define THIS_PREFS_VERSION ((UBYTE)4)
97 #define APPBASENAME "OPENURL"
98 #define APPAUTHOR "Troels Walsted Hansen, Alfonso Ranieri, Stefan Kost"
99 #define APPHELP PRG".guide"
101 /**************************************************************************/
103 ** Identify a generic URL_#? node
112 /**************************************************************************/
117 #define TAG_MUI_TWH ((int)0x81480000+100)
119 #define TAGBASE_APP (TAG_MUI_TWH+0)
120 #define TAGBASE_ABOUT (TAG_MUI_TWH+20)
121 #define TAGBASE_PENS (TAG_MUI_TWH+40)
122 #define TAGBASE_WIN (TAG_MUI_TWH+60)
123 #define TAGBASE_APPLIST (TAG_MUI_TWH+80)
124 #define TAGBASE_BROWSEREDITWIN (TAG_MUI_TWH+100)
125 #define TAGBASE_MAILEREDITWIN (TAG_MUI_TWH+120)
126 #define TAGBASE_FTPEDITWIN (TAG_MUI_TWH+140)
127 #define TAGBASE_POPPORT (TAG_MUI_TWH+160)
128 #define TAGBASE_LAMP (TAG_MUI_TWH+180)
129 #define TAGBASE_POPPH (TAG_MUI_TWH+200)
131 /**************************************************************************/
137 #define appObject BOOPSIOBJMACRO_START(g_appClass->mcc_Class)
139 #define appObject NewObject(g_appClass->mcc_Class,NULL
143 #define MUIM_App_OpenWin (TAGBASE_APP+0)
144 #define MUIM_App_GetPrefs (TAGBASE_APP+1)
145 #define MUIM_App_About (TAGBASE_APP+2)
146 #define MUIM_App_DisposeWin (TAGBASE_APP+4)
147 #define MUIM_App_CloseWin (TAGBASE_APP+3)
148 #define MUIM_App_CheckSave (TAGBASE_APP+4)
152 struct MUIP_App_OpenWin
155 struct IClass
*Class
;
161 struct MUIP_App_GetPrefs
170 MUIV_App_GetPrefs_InUse
,
171 MUIV_App_GetPrefs_LastSaveds
,
172 MUIV_App_GetPrefs_Restore
,
173 MUIV_App_GetPrefs_Defaults
,
176 struct MUIP_App_DisposeWin
182 struct MUIP_App_CloseWin
190 #define MUIA_App_IsSubWin (TAGBASE_APP+0)
191 #define MUIA_App_Pens (TAGBASE_APP+1)
193 /**************************************************************************/
199 #define aboutObject BOOPSIOBJMACRO_START(g_aboutClass->mcc_Class)
201 #define aboutObject NewObject(g_aboutClass->mcc_Class,NULL
204 /**************************************************************************/
210 #define winObject BOOPSIOBJMACRO_START(g_winClass->mcc_Class)
212 #define winObject NewObject(g_winClass->mcc_Class,NULL
216 #define MUIM_Win_GetPrefs (TAGBASE_WIN+0)
217 #define MUIM_Win_StorePrefs (TAGBASE_WIN+1)
218 #define MUIM_Win_Delete (TAGBASE_WIN+2)
222 struct MUIP_Win_GetPrefs
231 MUIV_Win_GetPrefs_InUse
,
232 MUIV_Win_GetPrefs_LastSaveds
,
233 MUIV_Win_GetPrefs_Restore
,
234 MUIV_Win_GetPrefs_Defaults
,
237 struct MUIP_Win_StorePrefs
246 MUIV_Win_StorePrefs_Save
,
247 MUIV_Win_StorePrefs_Use
,
248 MUIV_Win_StorePrefs_Apply
,
251 struct MUIP_Win_Delete
257 /**************************************************************************/
263 #define appListObject BOOPSIOBJMACRO_START(g_appListClass->mcc_Class)
265 #define appListObject NewObject(g_appListClass->mcc_Class,NULL
269 #define MUIM_AppList_Add (TAGBASE_APPLIST+0)
270 #define MUIM_AppList_Edit (TAGBASE_APPLIST+1)
271 #define MUIM_AppList_Clone (TAGBASE_APPLIST+2)
272 #define MUIM_AppList_Delete (TAGBASE_APPLIST+3)
273 #define MUIM_AppList_ActiveChanged (TAGBASE_APPLIST+4)
274 #define MUIM_AppList_Disable (TAGBASE_APPLIST+5)
275 #define MUIM_AppList_Move (TAGBASE_APPLIST+6)
277 struct MUIP_AppList_Edit
283 struct MUIP_AppList_Disable
289 struct MUIP_AppList_Move
296 #define MUIA_AppList_Type (TAGBASE_APPLIST+0)
297 #define MUIA_AppList_ListObj (TAGBASE_APPLIST+1)
298 #define MUIA_AppList_NodeNameOffset (TAGBASE_APPLIST+2)
299 #define MUIA_AppList_NodePathOffset (TAGBASE_APPLIST+3)
300 #define MUIA_AppList_NodeSize (TAGBASE_APPLIST+4)
304 MUIV_AppList_Type_Browser
,
305 MUIV_AppList_Type_Mailer
,
306 MUIV_AppList_Type_FTP
,
309 /**************************************************************************/
311 ** BrowserEditWin class
315 #define browserEditWinObject BOOPSIOBJMACRO_START(g_browserEditWinClass->mcc_Class)
317 #define browserEditWinObject NewObject(g_browserEditWinClass->mcc_Class,NULL
321 #define MUIM_BrowserEditWin_Use (TAGBASE_BROWSEREDITWIN+0)
324 #define MUIA_BrowserEditWin_Browser (TAGBASE_BROWSEREDITWIN+0)
325 #define MUIA_BrowserEditWin_ListObj (TAGBASE_BROWSEREDITWIN+1)
327 /**************************************************************************/
329 ** MailerEditWin class
333 #define mailerEditWinObject BOOPSIOBJMACRO_START(g_mailerEditWinClass->mcc_Class)
335 #define mailerEditWinObject NewObject(g_mailerEditWinClass->mcc_Class,NULL
339 #define MUIM_MailerEditWin_Use (TAGBASE_MAILEREDITWIN+0)
342 #define MUIA_MailerEditWin_Mailer (TAGBASE_MAILEREDITWIN+0)
343 #define MUIA_MailerEditWin_ListObj (TAGBASE_MAILEREDITWIN+1)
345 /**************************************************************************/
351 #define FTPEditWinObject BOOPSIOBJMACRO_START(g_FTPEditWinClass->mcc_Class)
353 #define FTPEditWinObject NewObject(g_FTPEditWinClass->mcc_Class,NULL
357 #define MUIM_FTPEditWin_Use (TAGBASE_FTPEDITWIN+0)
360 #define MUIA_FTPEditWin_FTP (TAGBASE_FTPEDITWIN+0)
361 #define MUIA_FTPEditWin_ListObj (TAGBASE_FTPEDITWIN+1)
363 /**************************************************************************/
369 #define popportObject BOOPSIOBJMACRO_START(g_popportClass->mcc_Class)
371 #define popportObject NewObject(g_popportClass->mcc_Class,NULL
375 #define MUIA_Popport_Key (TAGBASE_POPPORT+0)
376 #define MUIA_Popport_Len (TAGBASE_POPPORT+1)
378 /**************************************************************************/
384 #define MUIA_Lamp_Disabled (TAGBASE_LAMP)
386 /**************************************************************************/
392 #define popphObject BOOPSIOBJMACRO_START(g_popphClass->mcc_Class)
394 #define popphObject NewObject(g_popphClass->mcc_Class,NULL
398 #define MUIM_Popph_RequestFile (TAGBASE_POPPH)
401 #define MUIA_Popph_Syms (TAGBASE_POPPH)
402 #define MUIA_Popph_Names (TAGBASE_POPPH+1)
403 #define MUIA_Popph_StrObj (TAGBASE_POPPH+2)
404 #define MUIA_Popph_MaxLen (TAGBASE_POPPH+3)
405 #define MUIA_Popph_Key (TAGBASE_POPPH+4)
406 #define MUIA_Popph_Asl (TAGBASE_POPPH+5)
408 /**************************************************************************/
414 #define pensObject BOOPSIOBJMACRO_START(g_pensClass->mcc_Class)
416 #define pensObject NewObject(g_pensClass->mcc_Class,NULL
420 #define MUIM_Pens_Change (TAGBASE_PENS)
422 /**************************************************************************/
434 #ifndef MUIA_Window_AllowTopMenus
435 #define MUIA_Window_AllowTopMenus 0x8042fe69
438 #define DEF_EnabledPen "m6"
439 #define DEF_DisabledPen "m1"
440 #define DEF_DetailPen "m4"
442 /**************************************************************************/
447 #define MTITLE(t) {NM_TITLE,(STRPTR)(t),0,0,0,(APTR)(t)}
448 #define MTITEM(t) {NM_ITEM,(STRPTR)(t),0,CHECKIT|MENUTOGGLE,0,(APTR)(t)}
449 #define MITEM(t) {NM_ITEM,(STRPTR)(t),0,0,0,(APTR)(t)}
450 #define MBAR {NM_ITEM,(STRPTR)NM_BARLABEL,0,0,0,NULL}
451 #define MEND {NM_END,NULL,0,0,0,NULL}
457 #define get(obj,attr,store) GetAttr((ULONG)(attr),(Object *)obj,(ULONG *)(store))
458 #define set(obj,attr,value) SetAttrs((Object *)(obj),(ULONG)(attr),(ULONG)(value),TAG_DONE)
459 #define nnset(obj,attr,value) SetAttrs((Object *)(obj),MUIA_NoNotify,TRUE,(ULONG)(attr),(ULONG)(value),TAG_DONE)
460 #define superset(cl,obj,attr,value) SetSuperAttrs((APTR)(cl),(Object *)(obj),(ULONG)(attr),(ULONG)(value),TAG_DONE)
461 #define supernnset(cl,obj,attr,value) SetSuperAttrs((APTR)(cl),(Object *)(obj),(ULONG)(attr),(ULONG)(value),MUIA_NoNotify,TRUE,TAG_DONE)
462 #define superget(cl,obj,attr,valPtr) DoSuperMethod((APTR)(cl),(Object *)(obj),OM_GET,(ULONG)(attr),(ULONG)(valPtr))
463 #define nfset(obj,attr,value) SetAttrs((Object *)(obj),(ULONG)(attr),(ULONG)(value),MUIA_Group_Forward,FALSE,TAG_DONE)
465 #define wspace(w) RectangleObject, MUIA_Weight, w, End
467 /***********************************************************************/
472 #include "OpenURL_protos.h"
474 /**************************************************************************/