GR_SCREEN_INFO

Name

GR_SCREEN_INFO -- Screen properties

Synopsis

typedef struct 
{
    GR_COORD   rows;
    GR_COORD   cols;
    GR_SIZE    xdpcm;
    GR_SIZE    ydpcm;
    GR_COUNT   planes;
    GR_COUNT   bpp;
    long       ncolors;
    GR_COUNT   fonts;
    GR_BUTTON  buttons;
    GR_KEYMOD  modifiers;
    int	       pixtype;
    GR_COORD   xpos;
    GR_COORD   ypos;
    GR_SIZE    vs_width;
    GR_SIZE    vs_height;
    GR_SIZE    ws_width;
    GR_SIZE    ws_height;
} GR_SCREEN_INFO;
  

Description

A GR_SCREEN_INFO structure lets your application determine screen properties at run time. The structure is

Fields

TypeNameDescription
GR_COORDrowsThe number of rows of pixels on the screen.
GR_COORDcolsThe number of columns of pixels on the screen.
GR_SIZExdpcmThe number of pixels (dots) per centimeter along the X axis of the screen.
GR_SIZEydpcmThe number of pixels (dots) per centimeter along the Y axis of the screen.
GR_COUNTplanesThe number of color planes in the graphics hardware.
GR_COUNTbppThe number of bits per pixel in the graphics hardware.
longncolorsThe number of colors supported by the hardware.
GR_COUNTfontsThe number of built-in fonts.
GR_BUTTONbuttonsThis field indicates the buttons that are available on the system's pointing device. For a touch screen device only a left button is available, for a GPM mouse three butons are available.
GR_KEYMODmodifiersThis field indicates the modifier keys that are available on the system's keyboard device.
intpixtypeThe screen drivers native pixel format. See below for a list of the available pixel formats.
GR_COORDxposThe current position of the mouse along the X axis.
GR_COORDyposThe current position of the mouse along the Y axis.
GR_SIZEvs_width 
GR_SIZEvs_height 
GR_SIZEws_width 
GR_SIZEws_height 

Pixel Formats

The following table lists the possible pixel format values that may be returned in the GR_SCREEN_INFO structure. There are two pseudo pixel formats. These formats will never be returned from a screen driver, but they are be used as a data type with the GrArea() function.

Pixel FormatDescription
MWPF_RGBThis psuedo format is used as a conversion specifier when working with 32 bit RGB format pixel colors.
MWPF_PIXELVALThis psuedo format is used as a no conversion specifier when working with GR_PIXELVAL pixel colors.
MWPF_PALETTEPalettized pixel color format.
MWPF_TRUECOLOR0888Packed 32 bit 0/8/8/8 true color format.
MWPF_TRUECOLOR888Packed 24 bit 8/8/8 truecolor format.
MWPF_TRUECOLOR565Packed 16 bit 5/6/5 truecolor format.
MWPF_TRUECOLOR555Packed 16 bit 0/5/5/5 truecolor format.
MWPF_TRUECOLOR332Packed 8 bit 3/3/2 truecolor format.

See Also

GrGetScreenInfo(), GR_WINDOW_INFO.