Mac Developer Library

Developer

IOGraphicsTypes.h Reference

Options
Deployment Target:

On This Page

IOGraphicsTypes.h Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Included Headers

  • <IOKit/IOTypes.h>

  • <IOKit/IOKitKeys.h>

Data Types

See the Overview section above for header-level documentation.

  • A structure defining one entry of a color lookup table.

    Declaration

    Objective-C

    struct IOColorEntry { UInt16 index; IOColorComponent red; IOColorComponent green; IOColorComponent blue; };

    Fields

    index

    Number of pixels visible per row.

    red

    Value of red component 0-65535.

    green

    Value of green component 0-65535.

    blue

    Value of blue component 0-65535.

    Discussion

    This structure is used by IOFramebuffer to define an entry of a color lookup table.

  • A structure defining the detailed timing information of a display mode.

    Declaration

    Objective-C

    struct IODetailedTimingInformationV2 { UInt32 __reservedA[3]; // Init to 0 UInt32 horizontalScaledInset; // pixels UInt32 verticalScaledInset; // lines UInt32 scalerFlags; UInt32 horizontalScaled; UInt32 verticalScaled; UInt32 signalConfig; UInt32 signalLevels; UInt64 pixelClock; // Hz UInt64 minPixelClock; // Hz - With error what is slowest actual clock UInt64 maxPixelClock; // Hz - With error what is fasted actual clock UInt32 horizontalActive; // pixels UInt32 horizontalBlanking; // pixels UInt32 horizontalSyncOffset; // pixels UInt32 horizontalSyncPulseWidth; // pixels UInt32 verticalActive; // lines UInt32 verticalBlanking; // lines UInt32 verticalSyncOffset; // lines UInt32 verticalSyncPulseWidth; // lines UInt32 horizontalBorderLeft; // pixels UInt32 horizontalBorderRight; // pixels UInt32 verticalBorderTop; // lines UInt32 verticalBorderBottom; // lines UInt32 horizontalSyncConfig; UInt32 horizontalSyncLevel; // Future use (init to 0) UInt32 verticalSyncConfig; UInt32 verticalSyncLevel; // Future use (init to 0) UInt32 numLinks; UInt32 __reservedB[7]; // Init to 0 };

    Fields

    __reservedA

    Set to zero.

    horizontalScaledInset

    If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image.

    verticalScaledInset

    If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image.

    scalerFlags

    If the mode is scaled, kIOScaleStretchToFit may be set to allow stretching. kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer.

    horizontalScaled

    If the mode is scaled, sets the size of the image before scaling or rotation.

    verticalScaled

    If the mode is scaled, sets the size of the image before scaling or rotation.

    signalConfig

    kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal. See VESA signal standards.

    kIOInterlacedCEATiming set for a CEA style interlaced timing:

    Field 1 vertical blanking = half specified vertical blanking lines.

    Field 2 vertical blanking = (half vertical blanking lines) + 1 line.

    Field 1 vertical offset = half specified vertical sync offset.

    Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines.

    signalLevels

    One of:

    kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.

    kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.

    kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.

    kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.

    pixelClock

    Pixel clock frequency in Hz.

    minPixelClock

    Minimum pixel clock frequency in Hz, with error.

    maxPixelClock

    Maximum pixel clock frequency in Hz, with error.

    horizontalActive

    Pixel clocks per line.

    horizontalBlanking

    Blanking clocks per line.

    horizontalSyncOffset

    First clock of horizontal sync.

    horizontalSyncPulseWidth

    Width of horizontal sync.

    verticalActive

    Number of lines per frame.

    verticalBlanking

    Blanking lines per frame.

    verticalSyncOffset

    First line of vertical sync.

    verticalSyncPulseWidth

    Height of vertical sync.

    horizontalBorderLeft

    Number of pixels in left horizontal border.

    horizontalBorderRight

    Number of pixels in right horizontal border.

    verticalBorderTop

    Number of lines in top vertical border.

    verticalBorderBottom

    Number of lines in bottom vertical border.

    horizontalSyncConfig

    kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative).

    horizontalSyncLevel

    Zero.

    verticalSyncConfig

    kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative).

    verticalSyncLevel

    Zero.

    numLinks

    number of links to be used by a dual link timing, if zero, assume one link.

    __reservedB

    Reserved set to zero.

    Discussion

    This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information.

  • A structure defining the format of a framebuffer.

    Declaration

    Objective-C

    struct IODisplayModeInformation { UInt32 nominalWidth; UInt32 nominalHeight; IOFixed1616 refreshRate; IOIndex maxDepthIndex; UInt32 flags; UInt16 imageWidth; UInt16 imageHeight; UInt32 reserved[ 3 ]; };

    Fields

    nominalWidth

    Number of pixels visible per row.

    nominalHeight

    Number of visible pixel rows.

    refreshRate

    Refresh rate in fixed point 16.16.

    maxDepthIndex

    Highest depth index available in this display mode.

    flags

    Flags for the mode, including:

    kDisplayModeInterlacedFlag mode is interlaced.

    kDisplayModeSimulscanFlag mode is available on multiple display connections.

    kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction).

    kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio.

    imageWidth

    Physical width of active image if known, in millimeters, otherwise zero.

    imageHeight

    Physical height of active image if known, in millimeters, otherwise zero.

    reserved

    Set to zero.

    Discussion

    This structure is used by IOFramebuffer to define the format of the pixels.

  • A structure defining the scaling capabilities of a framebuffer.

    Declaration

    Objective-C

    struct IODisplayScalerInformation { UInt32 __reservedA[1]; // Init to 0 UInt32 version; // Init to 0 UInt32 __reservedB[2]; // Init to 0 IOOptionBits scalerFeatures; UInt32 maxHorizontalPixels; UInt32 maxVerticalPixels; UInt32 __reservedC[5]; // Init to 0 };

    Fields

    __reservedA

    Set to zero.

    version

    Set to zero.

    __reservedB

    Set to zero.

    scalerFeatures

    Mask of scaling features. The following are defined:

    kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.

    kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).

    kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).

    kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.

    kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.

    kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.

    kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.

    maxHorizontalPixels

    Maximum number of horizontal source pixels (horizontalScaled).

    maxVerticalPixels

    Maximum number of vertical source pixels (verticalScaled).

    __reservedC

    Set to zero.

    Discussion

    This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution.

  • A structure defining the limits and attributes of a display or framebuffer.

    Declaration

    Objective-C

    struct IODisplayTimingRange { UInt32 __reservedA[2]; // Init to 0 UInt32 version; // Init to 0 UInt32 __reservedB[5]; // Init to 0 UInt64 minPixelClock; // Min dot clock in Hz UInt64 maxPixelClock; // Max dot clock in Hz UInt32 maxPixelError; // Max dot clock error UInt32 supportedSyncFlags; UInt32 supportedSignalLevels; UInt32 supportedSignalConfigs; UInt32 minFrameRate; // Hz UInt32 maxFrameRate; // Hz UInt32 minLineRate; // Hz UInt32 maxLineRate; // Hz UInt32 maxHorizontalTotal; // Clocks - Maximum total ( active + blanking) UInt32 maxVerticalTotal; // Clocks - Maximum total ( active + blanking) UInt32 __reservedD[2]; // Init to 0 UInt8 charSizeHorizontalActive; UInt8 charSizeHorizontalBlanking; UInt8 charSizeHorizontalSyncOffset; UInt8 charSizeHorizontalSyncPulse; UInt8 charSizeVerticalActive; UInt8 charSizeVerticalBlanking; UInt8 charSizeVerticalSyncOffset; UInt8 charSizeVerticalSyncPulse; UInt8 charSizeHorizontalBorderLeft; UInt8 charSizeHorizontalBorderRight; UInt8 charSizeVerticalBorderTop; UInt8 charSizeVerticalBorderBottom; UInt8 charSizeHorizontalTotal; // Character size for active + blanking UInt8 charSizeVerticalTotal; // Character size for active + blanking UInt16 __reservedE; // Reserved (Init to 0) UInt32 minHorizontalActiveClocks; UInt32 maxHorizontalActiveClocks; UInt32 minHorizontalBlankingClocks; UInt32 maxHorizontalBlankingClocks; UInt32 minHorizontalSyncOffsetClocks; UInt32 maxHorizontalSyncOffsetClocks; UInt32 minHorizontalPulseWidthClocks; UInt32 maxHorizontalPulseWidthClocks; UInt32 minVerticalActiveClocks; UInt32 maxVerticalActiveClocks; UInt32 minVerticalBlankingClocks; UInt32 maxVerticalBlankingClocks; UInt32 minVerticalSyncOffsetClocks; UInt32 maxVerticalSyncOffsetClocks; UInt32 minVerticalPulseWidthClocks; UInt32 maxVerticalPulseWidthClocks; UInt32 minHorizontalBorderLeft; UInt32 maxHorizontalBorderLeft; UInt32 minHorizontalBorderRight; UInt32 maxHorizontalBorderRight; UInt32 minVerticalBorderTop; UInt32 maxVerticalBorderTop; UInt32 minVerticalBorderBottom; UInt32 maxVerticalBorderBottom; UInt32 maxNumLinks; // number of links, if zero, assume link 1 UInt32 minLink0PixelClock; // min pixel clock for link (kHz) UInt32 maxLink0PixelClock; // max pixel clock for link (kHz) UInt32 minLink1PixelClock; // min pixel clock for link 1 (kHz) UInt32 maxLink1PixelClock; // max pixel clock for link 1 (kHz) UInt32 __reservedF[3]; // Init to 0 };

    Fields

    __reservedA

    Set to zero.

    version

    Set to zero.

    __reservedB

    Set to zero.

    minPixelClock

    minimum pixel clock frequency in range, in Hz.

    maximum pixel clock frequency in range, in Hz.

    maxPixelError

    largest variation between specified and actual pixel clock frequency, in Hz.

    supportedSyncFlags

    mask of supported sync attributes. The following are defined:

    kIORangeSupportsSeparateSyncs - digital separate syncs.

    kIORangeSupportsSyncOnGreen - sync on green.

    kIORangeSupportsCompositeSync - composite sync.

    kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.

    supportedSignalLevels

    mask of possible signal levels. The following are defined:

    kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.

    kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.

    kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.

    kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.

    supportedSignalConfigs

    mask of possible signal configurations. The following are defined:

    kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:

    Field 1 vertical blanking = specified vertical blanking lines.

    Field 2 vertical blanking = vertical blanking lines + 1 line.

    Field 1 vertical offset = specified vertical sync offset.

    Field 2 vertical offset = specified vertical sync offset + 0.5 lines.

    kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm.

    minFrameRate

    minimum frame rate (vertical refresh frequency) in range, in Hz.

    maxFrameRate

    maximum frame rate (vertical refresh frequency) in range, in Hz.

    minLineRate

    minimum line rate (horizontal refresh frequency) in range, in Hz.

    maxLineRate

    maximum line rate (horizontal refresh frequency) in range, in Hz.

    maxHorizontalTotal

    maximum clocks in horizontal line (active + blanking).

    maxVerticalTotal

    maximum lines in vertical frame (active + blanking).

    __reservedD

    Set to zero.

    charSizeHorizontalActive

    horizontalActive must be a multiple of charSizeHorizontalActive.

    charSizeHorizontalBlanking

    horizontalBlanking must be a multiple of charSizeHorizontalBlanking.

    charSizeHorizontalSyncOffset

    horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset.

    charSizeHorizontalSyncPulse

    horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse.

    charSizeVerticalActive

    verticalActive must be a multiple of charSizeVerticalActive.

    charSizeVerticalBlanking

    verticalBlanking must be a multiple of charSizeVerticalBlanking.

    charSizeVerticalSyncOffset

    verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset.

    charSizeVerticalSyncPulse

    verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse.

    charSizeHorizontalBorderLeft

    horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft.

    charSizeHorizontalBorderRight

    horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight.

    charSizeVerticalBorderTop

    verticalBorderTop must be a multiple of charSizeVerticalBorderTop.

    charSizeVerticalBorderBottom

    verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom.

    charSizeHorizontalTotal

    (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal.

    charSizeVerticalTotal

    (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal.

    __reservedE

    Set to zero.

    minHorizontalActiveClocks

    minimum value of horizontalActive.

    maxHorizontalActiveClocks

    maximum value of horizontalActive.

    minHorizontalBlankingClocks

    minimum value of horizontalBlanking.

    maxHorizontalBlankingClocks

    maximum value of horizontalBlanking.

    minHorizontalSyncOffsetClocks

    minimum value of horizontalSyncOffset.

    maxHorizontalSyncOffsetClocks

    maximum value of horizontalSyncOffset.

    minHorizontalPulseWidthClocks

    minimum value of horizontalPulseWidth.

    maxHorizontalPulseWidthClocks

    maximum value of horizontalPulseWidth.

    minVerticalActiveClocks

    minimum value of verticalActive.

    maxVerticalActiveClocks

    maximum value of verticalActive.

    minVerticalBlankingClocks

    minimum value of verticalBlanking.

    maxVerticalBlankingClocks

    maximum value of verticalBlanking.

    minVerticalSyncOffsetClocks

    minimum value of verticalSyncOffset.

    maxVerticalSyncOffsetClocks

    maximum value of verticalSyncOffset.

    minVerticalPulseWidthClocks

    minimum value of verticalPulseWidth.

    maxVerticalPulseWidthClocks

    maximum value of verticalPulseWidth.

    minHorizontalBorderLeft

    minimum value of horizontalBorderLeft.

    maxHorizontalBorderLeft

    maximum value of horizontalBorderLeft.

    minHorizontalBorderRight

    minimum value of horizontalBorderRight.

    maxHorizontalBorderRight

    maximum value of horizontalBorderRight.

    minVerticalBorderTop

    minimum value of verticalBorderTop.

    maxVerticalBorderTop

    maximum value of verticalBorderTop.

    minVerticalBorderBottom

    minimum value of verticalBorderBottom.

    maxVerticalBorderBottom

    maximum value of verticalBorderBottom.

    maxNumLinks

    number of links supported, if zero, 1 link is assumed.

    minLink0PixelClock

    minimum pixel clock for link 0 (kHz).

    maxLink0PixelClock

    maximum pixel clock for link 0 (kHz).

    minLink1PixelClock

    minimum pixel clock for link 1 (kHz).

    maxLink1PixelClock

    maximum pixel clock for link 1 (kHz).

    __reservedF

    Set to zero.

    Discussion

    This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range.

  • A structure defining the format of a hardware cursor.

    Declaration

    Objective-C

    struct IOHardwareCursorDescriptor { UInt16 majorVersion; UInt16 minorVersion; UInt32 height; UInt32 width; UInt32 bitDepth; // bits per pixel, or a QD/QT pixel type UInt32 maskBitDepth; // unused UInt32 numColors; // number of colors in the colorMap. ie. UInt32 *colorEncodings; UInt32 flags; UInt32 supportedSpecialEncodings; UInt32 specialEncodings[16]; };

    Fields

    majorVersion

    Set to kHardwareCursorDescriptorMajorVersion.

    minorVersion

    Set to kHardwareCursorDescriptorMinorVersion.

    height

    Maximum size of the cursor.

    width

    Maximum size of the cursor.

    bitDepth

    Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat.

    maskBitDepth

    Unused.

    numColors

    Number of colors for indexed pixel types.

    colorEncodings

    An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types.

    flags

    None defined, set to zero.

    supportedSpecialEncodings

    Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel.

    specialEncodings

    Array of pixel values for each supported special encoding.

    Discussion

    This structure is used by IOFramebuffer to define the format of a hardware cursor.

  • A structure defining the converted data of a hardware cursor.

    Declaration

    Objective-C

    struct IOHardwareCursorInfo { UInt16 majorVersion; UInt16 minorVersion; UInt32 cursorHeight; UInt32 cursorWidth; // nil or big enough for hardware's max colors IOColorEntry *colorMap; UInt8 *hardwareCursorData; UInt16 cursorHotSpotX; UInt16 cursorHotSpotY; UInt32 reserved[5]; };

    Fields

    majorVersion

    Set to kHardwareCursorInfoMajorVersion.

    minorVersion

    Set to kHardwareCursorInfoMinorVersion.

    cursorHeight

    The actual size of the cursor is returned.

    cursorWidth

    The actual size of the cursor is returned.

    colorMap

    Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats.

    hardwareCursorData

    Buffer to receive the converted cursor data.

    cursorHotSpotX

    Cursor's hotspot.

    cursorHotSpotY

    Cursor's hotspot.

    reserved

    Reserved, set to zero.

    Discussion

    This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine.

  • A structure defining the format of a framebuffer.

    Declaration

    Objective-C

    struct IOPixelInformation { UInt32 bytesPerRow; UInt32 bytesPerPlane; UInt32 bitsPerPixel; UInt32 pixelType; UInt32 componentCount; UInt32 bitsPerComponent; UInt32 componentMasks[ 8 * 2 ]; IOPixelEncoding pixelFormat; UInt32 flags; UInt32 activeWidth; UInt32 activeHeight; UInt32 reserved[ 2 ]; };

    Fields

    bytesPerRow

    The number of bytes per row.

    bytesPerPlane

    Not used.

    bitsPerPixel

    The number of bits per pixel, including unused bits and alpha.

    pixelType

    One of kIOCLUTPixels (indexed pixels with changeable CLUT), kIORGBDirectPixels (direct pixels).

    componentCount

    One for indexed pixels, three for direct pixel formats.

    bitsPerComponent

    Number of bits per component in each pixel.

    componentMasks

    Mask of the bits valid for each component of the pixel - in R, G, B order for direct pixels.

    pixelFormat

    String description of the pixel format - IO32BitDirectPixels, IO16BitDirectPixels etc.

    flags

    None defined - set to zero.

    activeWidth

    Number of pixels visible per row.

    activeHeight

    Number of visible pixel rows.

    reserved

    Set to zero.

    Discussion

    This structure is used by IOFramebuffer to define the format of the pixels.