home *** CD-ROM | disk | FTP | other *** search
- /* Iff2Src conversion: DF0:precog.brush */
-
- #include "makeicon.h"
- #include <workbench/startup.h>
- #include <libraries/dos.h>
- #include <workbench/workbench.h>
- #include <dos/dosextens.h>
- #ifndef __GNUC__
- #include <clib/exec_protos.h>
- #include <clib/intuition_protos.h>
- #include <clib/graphics_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/wb_protos.h>
- #include <clib/icon_protos.h>
- #endif
- #ifdef __GNUC__
- #include <proto/exec.h>
- #include <proto/intuition.h>
- #include <proto/graphics.h>
- #include <proto/dos.h>
- #include <proto/wb.h>
- #include <proto/icon.h>
- #endif
- #ifdef __SASC
- #include <proto/exec.h>
- #include <proto/intuition.h>
- #include <proto/graphics.h>
- #include <proto/dos.h>
- #include <proto/wb.h>
- #include <proto/icon.h> /* added for icon.library prototypes -- EDB */
- #endif
-
- #include "FileRequester/dirscanner.h"
- #include "AmigaMem.h"
-
- char toolpath[80];
-
- char *PathToTool( void )
- {
- #if 0
- return "Precog:builder";
- #endif
- return "Precog:Precognition";
-
- #ifdef DOESNT_WORK
-
- char *dirpath;
- struct Process *process;
-
- toolpath[0] = '\0';
-
- if( process = (struct Process *)FindTask( NULL ) )
- {
- if( dirpath = DS_PathFromLock( process->pr_CurrentDir ) )
- {
- strcat( toolpath, dirpath );
- Afree( dirpath );
-
- /* incorrect: strcat( toolpath, process->pr_Task.tc_Node.ln_Name ); */
-
- strcat( toolpath, "builder" );
- return &toolpath[0];
- }
- }
-
- return NULL;
- #endif
- }
-
- #ifndef __GNUC__ /* no CHIP keyword */
- UWORD __chip PrecogIconImageData[108] =
- {
- /* Plane 0 */
- 0x0000,0x0000,0x0000,
- 0x2F7F,0xFFDE,0xF400,
- 0x2900,0x001E,0xF400,
- 0x2F7F,0xFFDE,0xF400,
- 0x2000,0x0000,0x0400,
- 0x2000,0x0000,0x0400,
- 0x2000,0x007F,0xD000,
- 0x2000,0x00FF,0xF800,
- 0x2000,0x00FF,0xF800,
- 0x2000,0x00FF,0xF800,
- 0x2000,0x00C3,0x0000,
- 0x2000,0x00FF,0x3800,
- 0x2000,0x007F,0x1000,
- 0x2000,0x003F,0xC000,
- 0x3FFF,0xFFDC,0x0000,
- 0x0000,0x000F,0xE000,
- 0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,
- /* Plane 1 */
- 0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,
- 0x0000,0x003F,0xF800,
- 0x0000,0x0000,0x2E00,
- 0x0000,0x0000,0x0700,
- 0x0000,0x0000,0x0780,
- 0x0000,0x0000,0x0780,
- 0x0000,0x003C,0xFF80,
- 0x0000,0x0000,0xC780,
- 0x0000,0x0000,0xEF00,
- 0x0000,0x0000,0x3E00,
- 0x0000,0x0003,0xFE00,
- 0x0000,0x0000,0x1C00,
- 0x0000,0x0007,0xF800,
- 0x0000,0x0000,0x0000
- };
-
-
- struct Image PrecogIconImage =
- {
- 0,0,
- 42,18,
- 2,
- &PrecogIconImageData[0],
- 0xff,0x0,
- NULL
- };
-
- #endif /* Not GNU C */
-
- char* ProjectToolTypes[] = { NULL };
-
- struct DiskObject ProjectIcon =
- {
- WB_DISKMAGIC,
- WB_DISKVERSION,
- {
- NULL,
- 0, 0, 42, 18,
- GADGIMAGE | GADGHBOX,
- GADGIMMEDIATE | RELVERIFY,
- BOOLGADGET,
- (APTR)&PrecogIconImage,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- NULL
- },
-
- WBPROJECT,
- "Builder",
- ProjectToolTypes,
- NO_ICON_POSITION,
- NO_ICON_POSITION,
- NULL,
- NULL,
- 10000
- };
-
-
- BOOL makeIcon( char *name )
- {
- struct DiskObject *dobj;
-
- if( dobj = GetDiskObject( name ) )
- {
- /* Icon already exists.
- **
- ** TBD: Fill in path to tool.
- */
-
- FreeDiskObject( dobj );
- }
- else
- {
- /* TBD: Fill in path to tool. */
-
- ProjectIcon.do_DefaultTool = PathToTool();
- return (BOOL)PutDiskObject( name, &ProjectIcon );
- }
- }