Subject: Re: how to probe the screen size with grf?
To: Ken Nakata <kxn3796@hertz.njit.edu>
From: grantham <grantham@amalthea.tenon.com>
List: macbsd-development
Date: 07/28/1994 16:10:53
> Hi,
> 
> I just started working on a "Kanji" version of desktop (which will be
> called `kdt') to display Japanese on MacBSD console.  I know it will
> be obsolete when X runs, but I think it would be nice if we can
> display Japanese without X (i386 people have similar lkm).  Due to the
> lack of my knowledge to other languages and code sets, it will not
> support anything other than English (ASCII character set) and Japanese
> (JIS Kanji character set).
> 
> I can use BDF files distributed with X, and that's about it for the
> fonts.  The problem is, I don't want to hard-code the screen size into
> kdt.  How does a user application properly probe the screen size and
> other screen properties?  Unfortunately, current version of dt does
> not do that.

I believe that grf currently does call ioctl(GRFIOCGINFO) to get the graphics
display parameters, and that includes the screen dimensions.  I can't
get at the source code at the moment, but you should be able to
find a grf_getsize() function that returns a series of variables.  If
you use those variables, then someone can add variable screen sizes to
dt if it's not actually in there.

If you still can't find where grf.c reads the GRF screen size, send me
personal mail and I will try and find out where it is or how to add it.

		-Brad
-- 
Brad Grantham, grantham@netcom.com >+------+< Happily slaved to NetBSD/Mac68k!
MacBSD : II, IIx, IIcx, IIci, SE/30, IIsi, IIvx -- The list is growing...

------------------------------------------------------------------------------