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.
-
Untyped pointer to the underlying
AtkImageinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
image_ptrDefault implementationTyped pointer to the underlying
AtkImageinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
AtkImageinstance.Declaration
Swift
var image_ptr: UnsafeMutablePointer<AtkImage>! { get } -
Required Initialiser for types conforming to
ImageProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getImageDescription()Extension methodGet a textual description of this image.
Declaration
Swift
@inlinable func getImageDescription() -> String! -
getImageLocale()Extension methodRetrieves the locale identifier associated to the
AtkImage.Declaration
Swift
@inlinable func getImageLocale() -> String! -
getImagePosition(x:Extension methody: coordType: ) 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:Extension methodheight: ) Get the width and height in pixels for the specified image. The values of
widthandheightare 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 -
imageDescriptionExtension methodGet a textual description of this image.
Declaration
Swift
@inlinable var imageDescription: String! { get nonmutating set } -
imageLocaleExtension methodRetrieves the locale identifier associated to the
AtkImage.Declaration
Swift
@inlinable var imageLocale: String! { get }
View on GitHub
Install in Dash
ImageProtocol Protocol Reference