ImageProtocol

public protocol ImageProtocol

AtkImage should be implemented by AtkObject subtypes on behalf of components which display image/pixmap information onscreen, and which provide information (other than just widget borders, etc.) via that image content. For instance, icons, buttons with icons, toolbar elements, and image viewing panes typically should implement AtkImage.

AtkImage primarily provides two types of information: coordinate information (useful for screen review mode of screenreaders, and for use by onscreen magnifiers), and descriptive information. The descriptive information is provided for alternative, text-only presentation of the most significant information present in the image.

The ImageProtocol protocol exposes the methods and properties of an underlying AtkImage instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Image. Alternatively, use ImageRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying AtkImage instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • image_ptr Default implementation

    Typed pointer to the underlying AtkImage instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the AtkImage instance.

    Declaration

    Swift

    var image_ptr: UnsafeMutablePointer<AtkImage>! { get }
  • Required Initialiser for types conforming to ImageProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Image Interface: ImageProtocol extension (methods and fields)

  • getImageDescription() Extension method

    Get a textual description of this image.

    Declaration

    Swift

    @inlinable
    func getImageDescription() -> String!
  • getImageLocale() Extension method

    Retrieves the locale identifier associated to the AtkImage.

    Declaration

    Swift

    @inlinable
    func getImageLocale() -> String!
  • Gets the position of the image in the form of a point specifying the images top-left corner.

    If the position can not be obtained (e.g. missing support), x and y are set to -1.

    Declaration

    Swift

    @inlinable
    func getImagePosition(x: UnsafeMutablePointer<gint>! = nil, y: UnsafeMutablePointer<gint>! = nil, coordType: AtkCoordType)
  • getImageSize(width:height:) Extension method

    Get the width and height in pixels for the specified image. The values of width and height are returned as -1 if the values cannot be obtained (for instance, if the object is not onscreen).

    If the size can not be obtained (e.g. missing support), x and y are set to -1.

    Declaration

    Swift

    @inlinable
    func getImageSize(width: UnsafeMutablePointer<gint>! = nil, height: UnsafeMutablePointer<gint>! = nil)
  • setImage(description:) Extension method

    Sets the textual description for this image.

    Declaration

    Swift

    @inlinable
    func setImage(description: UnsafePointer<gchar>!) -> Bool
  • imageDescription Extension method

    Get a textual description of this image.

    Declaration

    Swift

    @inlinable
    var imageDescription: String! { get nonmutating set }
  • imageLocale Extension method

    Retrieves the locale identifier associated to the AtkImage.

    Declaration

    Swift

    @inlinable
    var imageLocale: String! { get }