Site Tools


documentation:development:opera:pf25:ppgfldr:ggsfldr:gprfldr:01gpr049

QueryGraphics

Gets graphics environment information.

Synopsis

Err QueryGraphics (int32 tag,void *ret)

Description

QueryGraphics() looks up a value in the environment based on the passed-in tag and deposits that value in the address pointed to by ret.

Tag Arguments

The currently available tag arguments and their return values follow:

  • QUERYGRAF_TAG_END - No return value.
  • QUERYGRAF_TAG_FIELDFREQ - int32 - Returns the display field frequency (in Hz) of the current environment. The return value is 60 for NTSC and 50 for PAL.
  • QUERYGRAF_TAG_FIELDTIME - int32 - Returns the length of time for a single video display in usec.
  • QUERYGRAF_TAG_FIELDCOUNT - uint32 - Returns a number that is incremented every vblank period.
  • QUERYGRAF_TAG_DEFAULTWIDTH - int32 - Returns the default display width for the current hardware. The return value is 320 on every machine that is capable of generating a 320-pixel-wide display. This may not be the preferred width for the environment (PAL for example).
  • QUERYGRAF_TAG_DEFAULTHEIGHT - int32 - Returns the default display height for the current hardware. The return value is 240 on every machine that is capable of generating a 240-line-tall display. This may not be the preferred height for the environment (PAL for example).
  • QUERYGRAF_TAG_DEFAULTDISPLAYTYPE - int32 - Returns the default display type in the environment. DI_TYPE_NTSC is returned on current NTSC machines. DI_TYPE_PAL1 is returned on current PAL machines.

Arguments

  • tag Tag number indicating information requested.
  • ret Pointer to the location in memory where the requested value is deposited.

Return Value

The call returns 0 if successful or an error code (a negative value) if an error occurred.

GRAFERR_BADTAG is returned if an unknown tag is passed in.

Implementation

Folio call implemented in Graphics folio V21.

Associated Files

graphics.h, graphics.lib

See Also

QueryGraphicsList()

documentation/development/opera/pf25/ppgfldr/ggsfldr/gprfldr/01gpr049.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1