[comp.sys.mac.programmer] get color info in ThinkC

egon@kub.nl (Egon Verharen) (05/23/91)

I am working on a program that I want to run both on color and b/w
Macintoshes.
For this I use the Think C compiler (v4.0). However, I don't know how to
find out
what type of display a Macintosh has (at least not in Inside Macintosh
I-III).
Can anyone help me out on this.

Please email answers to berrie@kub.nl

-- 

**  Egon M. Verharen  **		       	     UUCP: ..!kubix!egon
Instituut voor Taal- en Kennistechnologie (ITK)      BITNET: egon@kub.nl /
Kath. Univ. Brabant				           verharen@htikub5

hairston@henry.ece.cmu.edu (David Hairston) (05/23/91)

[egon@kub.nl (Egon Verharen) writes:]
[] I am working on a program that I want to run both on color and b/w
[] Macintoshes.
[] For this I use the Think C compiler (v4.0). However, I don't know how to
[] find out
[] what type of display a Macintosh has (at least not in Inside Macintosh
[] I-III).
[] Can anyone help me out on this.

Egon (and netters),

forgive me for following up here ...

Inside Macintosh I-III gives details about the known Macintosh world
at the time of their writing.  Knowing these details is necessary
but not sufficient if you want to do justice to the "modern" interface.
Inside Macintosh IV details the changes brought about with the intro
of the Mac Plus, the 128K ROM's and HFS and system 4.1, i believe.
Inside Macintosh V recognizes the changes that came with the Mac SE
and the Mac II (i.e. color support).  Inside Macintosh VI, of course,
brings us uptodate with system 7.0 and etc.

you will want to at least get briefly familiar with I-V.  Note that
a lot of the old B&W stuff still works (as is!) in the "modern"
toolbox.  thus you could conceivably write an app that only called
NewWindow() (thus always opening a B&W grafport) and have it run
on all Macs.  there are better solutions.

if you can access the Macintosh Technical Notes then you can get
details on the system calls (SysEnvirons in IM-V and Gestalt
afterwards) that allow you to determine the features of the machine
on which you're running and also how you should, perhaps, optimally
support those features.

hopefully this adds a little perspective to the situation but don't
be intimidated.  it only takes time to understand the toolbox, which,
for the most part, is put together well.

you will also want to get sample code (various sources like the
tech notes, the apple ftp archives, magazine articles, shareware
applications, UseNet Macintosh Programming Guide, etc.) so you
can see how others deal with certain aspects of different problems.

sorry, i didn't include specific pointers to certain resources but
i think you have enough to get started with.

  -dave-  
hairston@henry.ece.cmu.edu