Re: Icons

Info-Mac discussion from 1984 - 2002.
Locked
User avatar
Info-Mac
Administrator
Posts:13716
Joined:December 21st, 1988, 11:00 am
Re: Icons

Post by Info-Mac » December 19th, 1984, 11:42 pm

Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac
From: info-mac@uw-beaver (info-mac)
Newsgroups: fa.info-mac
Subject: Re: Icons
Message-ID:
Date: Fri, 16-Nov-84 04:11:16 EST
Article-I.D.: uw-beave.2243
Posted: Fri Nov 16 04:11:16 1984
Date-Received: Sat, 17-Nov-84 04:14:16 EST
Sender: yenbut@uw-beave
Organization: U of Washington Computer Science
Lines: 60

From: [email protected]

Hmmm. I don't know (yet) how to do that with a Mac only. However here is
how the Finder knows what icons to use for an application and/or file.

There are 3 resource types used in this, all are originally specified in
the application, then copied into the Desktop file when the application
is installed (More about this later).

1) BNDL (Bundle)
This contains the application's signature (4 characters) and maps the
local IDs of the FREFs and ICN#s with their actual resource IDs.

2) FREF (File REFerence)
Contains the file type (4 characters) that this refers to, the local ID
for the ICN#, and an optional filename for a file that needs to
accompany the application wherever it goes. You use an FREF for each
icon you want tied to the application and/or documents created by the
application (1 FREF for each).

3) ICN# (Icon list)
This consists of TWO icons. The first is the pattern used to draw the
icon. The second is the same thing but filled with black. This one is
probably for clearing what's under the icon destination on the desktop
before drawing the icon itself (since what used to be there would show
through the white parts of the icon).

Now, somewhere with the application, there's a Bundle bit that tells the
Finder to look at the Bundle in the application's resource section when
the application is first moved to your disk. The Finder then pulls out
the BNDL, ICN#s, and FREFs, and copies them into the Desktop file. NOTE:
if you move a document with an icon that's known on one disk to another
disk that has never had the document's creator on it, the document will
have the standard Mac document icon. To illustrate this, try the
following:

Use SetFILE to change the creator of the fonts file. Leave the file
type the same. When you go back to the Finder, the icon for fonts has
changed to the default Mac document.

This is what I suspect happens when the Finder draws the desktop:

1) The Finder looks to see if it has a BNDL entry for the file's creator
in the Desktop file (All of these steps are done with the Desktop file).
2) Looks to see if there is a map for type FREF.
3) For each FREF map, looks up the FREF and sees if the file type in the
FREF matches the file type being looked.
4) If so, gets the local ID of the ICN# from the FREF
5) Looks up the actual resoure ID in the BNDL map using the local ID.
6) Gets the icon patterns and uses them.

What this means to people creating their own icons:

It seems that the only way to do it is to replace the ICN# for the file
type in the BNDL for that particular application. How? I don't know yet.
I suspect that there may be a way to do it with RMover. I will try this
tonight.


[email protected]
Locked