2 * Routines dealing with processing of Onekey's icon
3 * (be they for tooltypes or AppIcon purposes).
5 * MWS, Tuesday 13-Oct-92
7 #include <exec/types.h>
9 #include <workbench/startup.h>
10 #include <workbench/workbench.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
14 #include <proto/icon.h>
18 static struct DiskObject
*onekeyobj
;
21 GetOurIcon(struct WBStartup
*WBenchMsg
)
24 onekeyobj
= GetDiskObject(WBenchMsg
->sm_ArgList
->wa_Name
);
25 return onekeyobj
? TRUE
: FALSE
;
28 /* safe to call when open failed, and multiple times */
32 if (onekeyobj
) FreeDiskObject(onekeyobj
);
36 /* like ArgString() */
38 TTString(char *name
, char *def
)
42 if ((what
= FindToolType(onekeyobj
->do_ToolTypes
, name
)))
49 TTInt(char *name
, LONG def
)
53 if ((what
= FindToolType(onekeyobj
->do_ToolTypes
, name
)))
54 StrToLong(what
, &def
);
58 /* simple extension to ArgXXX routines */
60 TTBool(char *name
, BOOL def
)
64 s
= TTString(name
, def
? "YES" : "NO");
66 return ((strcmp(s
, "YES") == 0) ||
67 (strcmp(s
, "TRUE") == 0)) ? TRUE
: FALSE
;