Mac Developer Library

Developer

Core Graphics Data Types and Constants Reference

Options
Deployment Target:

On This Page
Language:

Core Graphics Data Types and Constants Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import CoreGraphics

Objective-C

@import CoreGraphics;

This document describes assorted constants and result codes related to Core Graphics and Quartz 2D.

Data Types

  • A uniform type for result codes returned by functions in Core Graphics and Quartz 2D.

    Declaration

    Swift

    typealias CGError = Int32

    Objective-C

    typedef int32_t CGError;

    Import Statement

    Objective-C

    @import CoreGraphics;

    Swift

    import CoreGraphics

    Availability

    Available in OS X v10.0 and later.

Result Codes

This table lists the result codes returned by functions in Core Graphics and Quartz 2D.

  • The requested operation was completed successfully.

    Value

    0

    Description

    The requested operation was completed successfully.

    Available in OS X v10.0 and later.

  • A general failure occurred.

    Value

    1000

    Description

    A general failure occurred.

    Available in OS X v10.0 and later.

  • One or more of the parameters passed to a function are invalid. Check for NULL pointers.

    Value

    1001

    Description

    One or more of the parameters passed to a function are invalid. Check for NULL pointers.

    Available in OS X v10.0 and later.

  • The parameter representing a connection to the window server is invalid.

    Value

    1002

    Description

    The parameter representing a connection to the window server is invalid.

    Available in OS X v10.0 and later.

  • The CPSProcessSerNum or context identifier parameter is not valid.

    Value

    1003

    Description

    The CPSProcessSerNum or context identifier parameter is not valid.

    Available in OS X v10.0 and later.

  • The requested operation is inappropriate for the parameters passed in, or the current system state.

    Value

    1004

    Description

    The requested operation is inappropriate for the parameters passed in, or the current system state.

    Available in OS X v10.0 and later.

  • A parameter, typically a C string, is too long to be used without truncation.

    Value

    1005

    Description

    A parameter, typically a C string, is too long to be used without truncation.

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

  • Return value from obsolete function stubs present for binary compatibility, but not normally called.

    Value

    1006

    Description

    Return value from obsolete function stubs present for binary compatibility, but not normally called.

    Available in OS X v10.0 and later.

  • A parameter passed in has a value that is inappropriate, or which does not map to a useful operation or value.

    Value

    1007

    Description

    A parameter passed in has a value that is inappropriate, or which does not map to a useful operation or value.

    Available in OS X v10.0 and later.

  • A data type or token was encountered that did not match the expected type or token.

    Value

    1008

    Description

    A data type or token was encountered that did not match the expected type or token.

    Available in OS X v10.0 and later.

  • An operation relative to a known point or coordinate could not be done, as there is no known point.

    Value

    1009

    Description

    An operation relative to a known point or coordinate could not be done, as there is no known point.

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

  • The requested operation is not valid for the parameters passed in, or the current system state.

    Value

    1010

    Description

    The requested operation is not valid for the parameters passed in, or the current system state.

    Available in OS X v10.0 and later.

  • The requested operation could not be completed as the indicated resources were not found.

    Value

    1011

    Description

    The requested operation could not be completed as the indicated resources were not found.

    Available in OS X v10.0 and later.

  • Value

    1015

    Description

    The application requires a newer version of the operating system to run than is currently available.

    Available in OS X v10.2 through OS X v10.7.

  • Value

    1016

    Description

    The application is not permitted to run.

    Available in OS X v10.2 through OS X v10.7.

  • Value

    1023

    Description

    The application does not have any executable code for the current system.

    Available in OS X v10.3 through OS X v10.7.

  • Value

    1024

    Description

    The application is in the process of launching but has not yet checked in with the window server.

    Available in OS X v10.3 through OS X v10.7.

  • Value

    1025

    Description

    The application being launched was already running and checked in with the window server.

    Available in OS X v10.3 through OS X v10.7.

  • Value

    1026

    Description

    The application being launched is incompatible with multiple user sessions and is already running in another user session.

    Available in OS X v10.3 through OS X v10.7.

  • Value

    1027

    Description

    The window server could not launch the application. It must be launched by the Classic environment.

    Available in OS X v10.4 through OS X v10.7.

  • Value

    1028

    Description

    The system was unable to fork a new process to launch the application.

    Available in OS X v10.4 through OS X v10.7.

  • Value

    1029

    Description

    The application should retry its registration shortly.

    Available in OS X v10.5 through OS X v10.7.