[comp.sys.apollo] Display Configurations

FERGUSON@BKNLVMS.BITNET (11/02/88)

Is there a simpler way of determining display configurations
without initializing GPR or using PAD_$INQ_DISPLAY_TYPE?

When you use PAD_$INQ_DISP_TYPE, you get a number corresponding
to the kind of display. Invariably, many people use these, and
then a new display type comes out like 1280color. Now that you've
shipped your software out to the public, they buy the new displays
and don't understand why your software doesn't work.

And they shouldn't have to, but there's no single call that will
return integers of the screen size in pixels, the number of color
planes, etc.

You could do the following, but then you end up refreshing the whole
screen, which again is annoying and should be unnecessary:

       gpr_$init(gpr_$borrow_nc,...       { borrow the screen but don't
                                            clear it }
       gpr_$inq_bitmap_dimensions         { find the size & # of planes }
       gpr_$terminate

There should be a call that returns these numbers which isn't effected
by the introduction of new models. If there is one, then my frustration
is my own fault (in this case, could someone tell me what it is...thanks)

If no such call exists, I suggest that it's time to add one.

Scott Ferguson
ferguson@bknlvms.bitnet

Thanks for your help.

lnz@LUCID.COM (Leonard N. Zubkoff) (11/02/88)

Try GPR_$Inq_Disp_Characteristics, as in:

	GPR_$Inq_Disp_Characteristics(GPR_$Borrow,IOS_$StdOut,
				      sizeof(DisplayCharacteristics),
				      DisplayCharacteristics,
				      DisplayCharacteristicsLength,Status);
	LastStatus := Status;
	if Status.All <> Status_$OK then return;
	DisplayInfo[0] := DisplayCharacteristics.X_Window_Size;
	DisplayInfo[1] := DisplayCharacteristics.Y_Window_Size;
	DisplayInfo[2] := DisplayCharacteristics.N_Planes;
	{ Planes may not be the same in borrow mode as in direct. }
	GPR_$Inq_Disp_Characteristics(GPR_$Direct,IOS_$StdOut,
				      sizeof(DisplayCharacteristics),
				      DisplayCharacteristics,
				      DisplayCharacteristicsLength,Status);
	if Status.All = Status_$OK then
	    DisplayInfo[2] := DisplayCharacteristics.N_Planes;