Deprecated Quartz Display Services Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Available in OS X v10.0 through OS X v10.6

CGDisplayAddressForPosition

Returns the address in framebuffer memory that corresponds to a position on an online display. (Available in OS X v10.0 through OS X v10.6. There is no replacement; because direct access to the raw framebuffer is not necessary, there is no need to retrieve its memory address.)

void * CGDisplayAddressForPosition (
   CGDirectDisplayID display,
   int32_t x,
   int32_t y
);
Parameters
display

The identifier of the display to be accessed.

x

The x-coordinate of a position in the global display coordinate space. The origin is the upper-left corner of the main display.

y

The y-coordinate of a position in the global display coordinate space. The origin is the upper-left corner of the main display, and the y-axis is oriented down.

Return Value

The address in framebuffer memory that corresponds to the specified position. If the display ID is invalid or the point lies outside the bounds of the display, the return value is NULL.

Discussion

If the display has not been captured, the returned address may refer to read-only memory.

Special Considerations

This deprecated function returned an address in framebuffer memory. Instead of using the raw framebuffer to draw to the screen, you should instead use a supported drawing engine such as Quartz or OpenGL. While accessing the framebuffer directly has been deprecated, it is possible to copy screen data using CGDisplayCreateImageForRect.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBaseAddress

Returns the base address in framebuffer memory of an online display. (Available in OS X v10.0 through OS X v10.6. There is no replacement; because direct access to the raw framebuffer is not necessary, there is no need to retrieve its memory address.)

void * CGDisplayBaseAddress (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The base address in framebuffer memory of the specified display. If the display ID is invalid, the return value is NULL.

Discussion

If the display has not been captured, the returned address may refer to read-only memory.

Special Considerations

This deprecated function returned an address in framebuffer memory. Instead of using the raw framebuffer to draw to the screen, you should instead use a supported drawing engine such as Quartz or OpenGL. While accessing the framebuffer directly has been deprecated, it is possible to copy screen data using CGDisplayCreateImage.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBitsPerPixel

Returns the number of bits used to represent a pixel in the framebuffer. (Available in OS X v10.0 through OS X v10.6. Use CGDisplayModeCopyPixelEncoding instead.)

size_t CGDisplayBitsPerPixel (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The number of bits used to represent a pixel in the framebuffer.

Special Considerations

This deprecated function allows an application to retrieve the number of bits used to represent a pixel in the framebuffer. Starting in OS X v10.6 the CGDisplayModeCopyPixelEncoding should be used because it returns to the user the I/O Kit Graphics Mode, which can be used to determine the bits per pixel, as well as their encoding. This can prevent treating display modes with different encodings, but a similar total number of bits per pixel, in the same way.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBitsPerSample

Returns the number of bits used to represent a pixel component in the framebuffer. (Available in OS X v10.0 through OS X v10.6. Use CGDisplayModeCopyPixelEncoding instead.)

size_t CGDisplayBitsPerSample (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The number of bits used to represent a pixel component such as a color value in the framebuffer.

Special Considerations

This deprecated function allows an application to retrieve the number of bits used to represent a pixel component in the framebuffer. Starting in OS X v10.6 the CGDisplayModeCopyPixelEncoding should be used because it returns to the user the I/O Kit Graphics Mode, which can be used to determine the bits per sample, as well as their encoding. This can prevent treating display modes with different encodings, but a similar total number of bits per sample, in the same way.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBytesPerRow

Returns the number of bytes per row in a display. (Available in OS X v10.0 through OS X v10.6. Use CGDisplayCreateImage or CGDisplayCreateImageForRect instead.)

size_t CGDisplayBytesPerRow (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The number of bytes per row in the display. This number also represents the stride between pixels in the same column of the display.

Special Considerations

This deprecated function required pixel data to be retrieved manually. Starting in OS X v10.6 one of the CGDisplayCreateImage functions should be used to create an image from the display. For more information, see CGImage Reference.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplaySamplesPerPixel

Returns the number of color components used to represent a pixel. (Available in OS X v10.0 through OS X v10.6. Use CGDisplayModeCopyPixelEncoding instead.)

size_t CGDisplaySamplesPerPixel (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The number of color components used to represent a pixel.

Special Considerations

This deprecated function allows an application to retrieve the number of color components used to represent a pixel in the framebuffer. Starting in OS X v10.6 the CGDisplayModeCopyPixelEncoding should be used because it returns to the user the I/O Kit Graphics Mode, which can be used to determine the samples per pixel, as well as their encoding. This can prevent treating display modes with different encodings, but a similar total number of samples per pixel, in the same way.

Availability
  • Available in OS X v10.0 through OS X v10.6.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

Deprecated in OS X v10.6

CGConfigureDisplayMode

Configures the display mode of a display. (Deprecated in OS X v10.6. Use CGConfigureDisplayWithDisplayMode instead.)

CGError CGConfigureDisplayMode (
   CGDisplayConfigRef configRef,
   CGDirectDisplayID display,
   CFDictionaryRef mode
);
Parameters
configRef

A display configuration, acquired by calling CGBeginDisplayConfiguration.

display

The identifier of the display being configured.

mode

A display mode dictionary (see the discussion below).

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

A display mode is a set of properties such as width, height, pixel depth, and refresh rate, and options such as stretched LCD panel filling.

The display mode you provide must be one of the following:

If you use this function to change the mode of a display in a mirroring set, Quartz may adjust the bounds, resolutions, and depth of the other displays in the set to a safe mode, with matching depth and the smallest enclosing size.

Special Considerations

This deprecated function takes as a parameter a display mode dictionary. Starting in OS X v10.6, display mode dictionaries have been replaced by the CGDisplayMode opaque type. For information on the CGDisplayMode opaque type, see “Getting Information About a Display Mode”.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
CGDisplayConfiguration.h

CGDisplayAvailableModes

Returns information about the currently available display modes. (Deprecated in OS X v10.6. Use CGDisplayCopyAllDisplayModes instead.)

CFArrayRef CGDisplayAvailableModes (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

An array of dictionaries with display mode information, or NULL if the display is invalid. The array is owned by the system and you should not release it. Each dictionary in the array contains information about a mode that the display supports. For a list of the properties in a display mode dictionary, see “Display Mode Standard Properties” and “Display Mode Optional Properties.” For general information about using dictionaries, see CFDictionary Reference.

Special Considerations

This deprecated function returns an array of display mode dictionary. Starting in OS X v10.6, display mode dictionaries have been replaced by the CGDisplayMode opaque type. Whereas display mode dictionaries returned by CGDisplayAvailableModes are owned by the system and are not to be released, display mode opaque type references returned by CGDisplayCopyAllDisplayModes are owned by the caller and you must release them.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBestModeForParameters

Returns information about the display mode closest to a specified depth and screen size. (Deprecated in OS X v10.6. Use the display mode query functions instead; see “Getting Information About a Display Mode”.)

CFDictionaryRef CGDisplayBestModeForParameters (
   CGDirectDisplayID display,
   size_t bitsPerPixel,
   size_t width,
   size_t height,
   boolean_t *exactMatch
);
Parameters
display

The identifier of the display to optimize.

bitsPerPixel

Optimal display depth in bits per pixel. Note that this value is not the same as pixel depth, which is the number of bits per channel or component.

width

Optimal display width in pixel units.

height

Optimal display height in pixel units.

exactMatch

A pointer to a Boolean variable. On return, its value is true if an exact match in display depth, width, and height is found; otherwise, false. If this information is not needed, pass NULL.

Return Value

A display mode dictionary, or NULL if the display is invalid. The dictionary is owned by the system and you should not release it. The dictionary contains information about the display mode closest to the specified depth and screen size. For a list of the properties in a display mode dictionary, see “Display Mode Standard Properties” and “Display Mode Optional Properties.” For general information about using dictionaries, see CFDictionary Reference.

Discussion

This function tries to find an optimal display mode for the specified display. The function first tries to find a mode with the specified pixel depth and dimensions equal to or greater than the specified width and height. If no depth match is found, it tries to find a mode with greater depth and the same or greater dimensions. If a suitable display mode is not found, this function simply returns the current display mode.

Special Considerations

This deprecated function selects a display mode closest to the specified parameters. Starting in OS X v10.6 new display mode APIs should be used to query display modes so that an application can tailor its definition of “best” to its graphics and memory needs.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayBestModeForParametersAndRefreshRate

Returns information about the display mode closest to a specified depth, screen size, and refresh rate. (Deprecated in OS X v10.6. Use the display mode query functions instead; see “Getting Information About a Display Mode”.)

CFDictionaryRef CGDisplayBestModeForParametersAndRefreshRate (
   CGDirectDisplayID display,
   size_t bitsPerPixel,
   size_t width,
   size_t height,
   CGRefreshRate refresh,
   boolean_t *exactMatch
);
Parameters
display

The identifier of the display to be accessed.

bitsPerPixel

Optimal display depth, in bits per pixel. Note that this value is not the same as pixel depth, which is the number of bits per channel or component.

width

Optimal display width, in pixel units.

height

Optimal display height, in pixel units.

refresh

Optimal display refresh rate, in frames per second.

exactMatch

A pointer to a Boolean variable. On return, its value is true if an exact match in display depth, width, height, and refresh rate is found; otherwise, false. If this information is not needed, pass NULL.

Return Value

A display mode dictionary, or NULL if the display is invalid. The dictionary is owned by the system and you should not release it. The dictionary contains information about the display mode closest to the specified depth, screen size, and refresh rate. For a list of the properties in a display mode dictionary, see “Display Mode Standard Properties” and “Display Mode Optional Properties.” For general information about using dictionaries, see CFDictionary Reference.

Discussion

This function searches the list of available display modes for a mode that comes closest to satisfying these criteria:

  • Has a pixel depth equal to or greater than the specified depth

  • Has dimensions equal to or greater than the specified height and width

  • Uses a refresh rate equal to or near the specified rate

If a suitable display mode is not found, this function simply returns the current display mode.

Special Considerations

This deprecated function selects a display mode closest to the specified parameters. Starting in OS X v10.6 new display mode APIs should be used to query display modes so that an app can tailor its definition of “best” to its graphics and memory needs.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

CGDisplayCurrentMode

Returns information about the current display mode. (Deprecated in OS X v10.6. Use CGDisplayCopyDisplayMode instead.)

CFDictionaryRef CGDisplayCurrentMode (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

A display mode dictionary, or NULL if the display is invalid. The dictionary is owned by the system and you should not release it. The dictionary contains information about the current display mode. For a list of the properties in a display mode dictionary, see “Display Mode Standard Properties” and “Display Mode Optional Properties.” For general information about using dictionaries, see CFDictionary Reference.

Special Considerations

This deprecated function returns a display mode dictionary. Starting in OS X v10.6, display mode dictionaries have been replaced by the CGDisplayMode opaque type. Whereas display mode dictionaries returned by CGDisplayCurrentModes are owned by the system and are not to be released, display mode opaque type references returned by CGDisplayCopyDisplayMode are owned by the caller and you must release them.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Related Sample Code
Declared In
CGDirectDisplay.h

CGDisplaySwitchToMode

Switches a display to a different mode. (Deprecated in OS X v10.6. Use CGDisplaySetDisplayMode instead.)

CGError CGDisplaySwitchToMode (
   CGDirectDisplayID display,
   CFDictionaryRef mode
);
Parameters
display

The identifier of the display to be accessed.

mode

A display mode dictionary that contains information about the display mode to set. The dictionary passed in must be a dictionary returned by another Quartz display function such as CGDisplayAvailableModes or CGDisplayBestModeForParameters. For a list of the properties in a display mode dictionary, see “Display Mode Standard Properties” and “Display Mode Optional Properties.” For general information about using dictionaries, see CFDictionary Reference.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

This function switches the display mode of the specified display. The operation is always synchronous; the function does not return until the mode switch is complete. Note that after switching, display parameters and addresses may change.

The selected display mode persists for the life of the calling program. When the program terminates, the display mode automatically reverts to the permanent setting in the Displays panel of System Preferences.

When changing the display mode of a display in a mirroring set, other displays in the mirroring set will be assigned a mode that's capable of mirroring the bounds of the display being adjusted. To avoid this automatic behavior, you can use the following procedure: callCGBeginDisplayConfiguration, call CGConfigureDisplayMode for each display to explicitly set the mode, and finally call CGCompleteDisplayConfiguration

Special Considerations

This deprecated function takes as a parameter a display mode dictionary. Starting in OS X v10.6, display mode dictionaries have been replaced by the CGDisplayMode opaque type.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
CGDirectDisplay.h

Deprecated in OS X v10.8

CGRegisterScreenRefreshCallback

Registers a callback function to be invoked when local displays are refreshed or modified. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

CGError CGRegisterScreenRefreshCallback (
   CGScreenRefreshCallback function,
   void *userParameter
);
Parameters
function

A pointer to the callback function to be registered.

userParameter

A pointer to user-defined data, or NULL. The userParameter argument is passed back to the callback function each time it’s invoked.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

A callback function may be registered multiple times with different user-defined data pointers, resulting in multiple registration entries. For each registration, when notification is no longer needed, you should call the function CGUnregisterScreenRefreshCallback to remove the registration.

The callback function you register is invoked only if your application has an active event loop. The callback is invoked in the same thread of execution that is processing events within your application.

Special Considerations

In OS X v10.4 and earlier, the result code returned by this function is a random value and should be ignored. In OS X v10.5 and later, the result code is valid.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGReleaseScreenRefreshRects

Deallocates a list of rectangles that represent changed areas on local displays. (Deprecated in OS X v10.8. There is no replacement.)

void CGReleaseScreenRefreshRects (
   CGRect *rectArray
);
Parameters
rectArray

A list of rectangles obtained by calling CGWaitForScreenRefreshRects or CGWaitForScreenUpdateRects.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGScreenRegisterMoveCallback

Registers a callback function to be invoked when an area of the display is moved. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

CGError CGScreenRegisterMoveCallback (
   CGScreenUpdateMoveCallback function,
   void *userParameter
);
Parameters
function

A pointer to the callback function to be registered.

userParameter

A pointer to user-defined data, or NULL. The userParameter argument is passed back to the callback function each time it’s invoked.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

A callback function may be registered multiple times with different user-defined data pointers, resulting in multiple registration entries. For each registration, when notification is no longer needed, you should remove the registration by calling the function CGScreenUnregisterMoveCallback.

The callback function you register is invoked only if your application has an active event loop. The callback is invoked in the same thread of execution that is processing events within your application.

Special Considerations

This function is implemented in OS X version 10.4.3 and later.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGScreenUnregisterMoveCallback

Removes a previously registered callback function invoked when an area of the display is moved. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

void CGScreenUnregisterMoveCallback (
   CGScreenUpdateMoveCallback function,
   void *userParameter
);
Parameters
function

A pointer to the callback function to be unregistered.

userParameter

A pointer to user-defined data, or NULL. You should pass the same value you used when you registered the callback function.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

When you call this function, the two arguments must match the registered entry to be removed.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGUnregisterScreenRefreshCallback

Removes a previously registered callback function invoked when local displays are refreshed or modified. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

void CGUnregisterScreenRefreshCallback (
   CGScreenRefreshCallback function,
   void *userParameter
);
Parameters
function

A pointer to the callback function to be unregistered.

userParameter

A pointer to user-defined data, or NULL. You should pass the same value you used when you registered the callback function.

Discussion

When you call this function, the two arguments must match the registered entry to be removed.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGWaitForScreenRefreshRects

Waits for screen refresh operations. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

CGError CGWaitForScreenRefreshRects (
   CGRect **pRectArray,
   CGRectCount *pCount
);
Parameters
pRectArray

A pointer to a CGRect* variable. On return, the variable contains an array of rectangles that bound the refreshed areas, specified in the global display coordinate space. When you no longer need the array, you should deallocate it by calling CGReleaseScreenRefreshRects.

pCount

A pointer to a CGRectCount variable. On return, the variable contains the number of entries in the returned array of rectangles.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

In some applications it may be preferable to wait for screen-refresh data synchronously, using this function. You should call this function in a thread other than the main event-processing thread.

As an alternative, Quartz also supports asynchronous notification—see CGRegisterScreenRefreshCallback. If refresh callback functions are registered, this function should not be used.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGWaitForScreenUpdateRects

Waits for screen update operations. (Deprecated in OS X v10.8. Use display streaming instead. See “Streaming the Contents of a Display.”)

CGError CGWaitForScreenUpdateRects (
   CGScreenUpdateOperation requestedOperations,
   CGScreenUpdateOperation *currentOperation,
   CGRect **pRectArray,
   size_t *pCount,
   CGScreenUpdateMoveDelta *pDelta
);
Parameters
requestedOperations

The desired types of screen update operations. There are several possible choices:

  • Specify kCGScreenUpdateOperationRefresh if you want all move operations to be returned as refresh operations.

  • Specify (kCGScreenUpdateOperationRefresh | kCGScreenUpdateOperationMove) if you want to distinguish between move and refresh operations.

  • Add kCGScreenUpdateOperationReducedDirtyRectangleCount to the screen operations if you want to minimize the number of rectangles returned to represent changed areas of the display.

currentOperation

A pointer to a CGScreenUpdateOperation variable. On return, the variable indicates the type of update operation (refresh or move).

pRectArray

A pointer to a CGRect* variable. On return, the variable contains an array of rectangles that bound the updated areas, specified in the global display coordinate space. When you no longer need the array, you should deallocate it by calling CGReleaseScreenRefreshRects.

pCount

A pointer to a size_t variable. On return, the variable contains the number of entries in the returned array of rectangles.

pDelta

A pointer to a CGScreenUpdateMoveDelta variable. On return, if the value of the currentOperation parameter is kCGScreenUpdateOperationMove, the variable contains the distance moved.

Return Value

A result code. See Core Graphics Data Types and Constants Reference.

Discussion

In some applications it may be preferable to wait for screen-update data synchronously, using this function. You should call this function in a thread other than the main event-processing thread.

As an alternative, Quartz also supports asynchronous notification—see CGRegisterScreenRefreshCallback and CGScreenRegisterMoveCallback. If refresh or move callback functions are registered, this function should not be used.

Special Considerations

This function is implemented in OS X version 10.4.3 and later.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

CGWindowServerCFMachPort

Returns a Core Foundation Mach port (CFMachPort) that corresponds to the OS X window server. (Deprecated in OS X v10.8. There is no replacement.)

CFMachPortRef CGWindowServerCFMachPort (
   void
);
Return Value

A Core Foundation Mach port, or NULL if the window server is not running. When you no longer need the port, you should release it using the function CFRelease.

Discussion

You can use this function to detect whether the window server process exits or is not running. If this function returns NULL, the window server is not running. This code example shows how to register a callback function to detect when the window server exits:

static void handleWindowServerDeath( CFMachPortRef port, void *info  )
{
    printf( "Window Server port death detected!\n" );
    CFRelease(port);
    exit(1);
}
 
static void watchForWindowServerDeath()
{
    CFMachPortRef port = CGWindowServerCFMachPort();
    CFMachPortSetInvalidationCallBack(port, handleWindowServerDeath);
}

Note that this callback only works if your program has an active run loop.

Availability
  • Available in OS X v10.1 and later.
  • Deprecated in OS X v10.8.
Declared In
CGRemoteOperation.h

Deprecated in OS X v10.9

CGCursorIsDrawnInFramebuffer

Returns a Boolean value indicating whether the mouse cursor is drawn in framebuffer memory. (Deprecated in OS X v10.9. There is no replacement.)

boolean_t CGCursorIsDrawnInFramebuffer (
   void
);
Return Value

If true, the cursor is drawn in framebuffer memory; otherwise, false.

Discussion

This function returns a Boolean value that indicates whether or not the cursor is drawn in the framebuffer. (The cursor could exist in an overlay plane or a similar mechanism that puts pixels on-screen without altering framebuffer content.) If the cursor is drawn in the framebuffer, it is read back along with window data.

The reported Boolean value is based on the union of the state of the cursor on all displays. If the cursor is drawn in the framebuffer on any display, the function returns true.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.9.
Declared In
CGRemoteOperation.h

CGCursorIsVisible

Returns a Boolean value indicating whether the mouse cursor is visible. (Deprecated in OS X v10.9. There is no replacement.)

boolean_t CGCursorIsVisible (
   void
);
Return Value

If true, the cursor is visible on any display; otherwise, false.

Discussion

To hide or show the cursor, you can use the functions CGDisplayHideCursor and CGDisplayShowCursor.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.9.
Declared In
CGRemoteOperation.h

CGDisplayFadeOperationInProgress

Returns a Boolean value indicating whether a fade operation is currently in progress. (Deprecated in OS X v10.9. There is no replacement.)

boolean_t CGDisplayFadeOperationInProgress (
   void
);
Return Value

If true, a fade operation is currently in progress; otherwise, false.

Discussion

You may call this function from any task running in the system. The calling task need not have a valid fade reservation.

Availability
  • Available in OS X v10.2 and later.
  • Deprecated in OS X v10.9.
Declared In
CGDisplayFade.h

CGDisplayIOServicePort

Returns the I/O Kit service port of the specified display. (Deprecated in OS X v10.9. There is no replacement.)

io_service_t CGDisplayIOServicePort (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

The I/O Kit service port for the specified display.

Discussion

An I/O Kit service port can be passed to I/O Kit to obtain additional information about the display.

The port is owned by the graphics system and should not be destroyed.

Availability
  • Available in OS X v10.2 and later.
  • Deprecated in OS X v10.9.
Related Sample Code
Declared In
CGDisplayConfiguration.h

CGDisplayIsCaptured

Returns a Boolean value indicating whether a display is captured. (Deprecated in OS X v10.9. There is no replacement.)

boolean_t CGDisplayIsCaptured (
   CGDirectDisplayID display
);
Parameters
display

The identifier of the display to be accessed.

Return Value

If true, the specified display is captured; otherwise, false.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.9.
Declared In
CGDirectDisplay.h