IconSourceProtocol

public protocol IconSourceProtocol

The IconSourceProtocol protocol exposes the methods and properties of an underlying GtkIconSource 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 IconSource. Alternatively, use IconSourceRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkIconSource instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkIconSource instance.

    Default Implementation

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

    Declaration

    Swift

    var icon_source_ptr: UnsafeMutablePointer<GtkIconSource>! { get }
  • Required Initialiser for types conforming to IconSourceProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

IconSource Record: IconSourceProtocol extension (methods and fields)

  • copy() Extension method

    Creates a copy of source; mostly useful for language bindings.

    copy is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func copy() -> IconSourceRef!
  • free() Extension method

    Frees a dynamically-allocated icon source, along with its filename, size, and pixbuf fields if those are not nil.

    free is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func free()
  • getDirection() Extension method

    Obtains the text direction this icon source applies to. The return value is only useful/meaningful if the text direction is not wildcarded.

    get_direction is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getDirection() -> GtkTextDirection
  • getDirectionWildcarded() Extension method

    Gets the value set by gtk_icon_source_set_direction_wildcarded().

    get_direction_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getDirectionWildcarded() -> Bool
  • getFilename() Extension method

    Retrieves the source filename, or nil if none is set. The filename is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

    get_filename is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getFilename() -> String!
  • getIconName() Extension method

    Retrieves the source icon name, or nil if none is set. The icon_name is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

    get_icon_name is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getIconName() -> String!
  • getPixbuf() Extension method

    Retrieves the source pixbuf, or nil if none is set. In addition, if a filename source is in use, this function in some cases will return the pixbuf from loaded from the filename. This is, for example, true for the GtkIconSource passed to the GtkStyle render_icon() virtual function. The reference count on the pixbuf is not incremented.

    get_pixbuf is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getPixbuf() -> PixbufRef!
  • getSize() Extension method

    Obtains the icon size this source applies to. The return value is only useful/meaningful if the icon size is not wildcarded.

    get_size is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getSize() -> GtkIconSize
  • getSizeWildcarded() Extension method

    Gets the value set by gtk_icon_source_set_size_wildcarded().

    get_size_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getSizeWildcarded() -> Bool
  • getState() Extension method

    Obtains the widget state this icon source applies to. The return value is only useful/meaningful if the widget state is not wildcarded.

    get_state is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getState() -> GtkStateType
  • getStateWildcarded() Extension method

    Gets the value set by gtk_icon_source_set_state_wildcarded().

    get_state_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getStateWildcarded() -> Bool
  • set(direction:) Extension method

    Sets the text direction this icon source is intended to be used with.

    Setting the text direction on an icon source makes no difference if the text direction is wildcarded. Therefore, you should usually call gtk_icon_source_set_direction_wildcarded() to un-wildcard it in addition to calling this function.

    set_direction is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(direction: GtkTextDirection)
  • If the text direction is wildcarded, this source can be used as the base image for an icon in any GtkTextDirection. If the text direction is not wildcarded, then the text direction the icon source applies to should be set with gtk_icon_source_set_direction(), and the icon source will only be used with that text direction.

    GtkIconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

    set_direction_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setDirectionWildcarded(setting: Bool)
  • set(filename:) Extension method

    Sets the name of an image file to use as a base image when creating icon variants for GtkIconSet. The filename must be absolute.

    set_filename is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(filename: UnsafePointer<gchar>!)
  • set(iconName:) Extension method

    Sets the name of an icon to look up in the current icon theme to use as a base image when creating icon variants for GtkIconSet.

    set_icon_name is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(iconName: UnsafePointer<gchar>? = nil)
  • set(pixbuf:) Extension method

    Sets a pixbuf to use as a base image when creating icon variants for GtkIconSet.

    set_pixbuf is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set<PixbufT>(pixbuf: PixbufT) where PixbufT : PixbufProtocol
  • set(size:) Extension method

    Sets the icon size this icon source is intended to be used with.

    Setting the icon size on an icon source makes no difference if the size is wildcarded. Therefore, you should usually call gtk_icon_source_set_size_wildcarded() to un-wildcard it in addition to calling this function.

    set_size is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(size: GtkIconSize)
  • setSizeWildcarded(setting:) Extension method

    If the icon size is wildcarded, this source can be used as the base image for an icon of any size. If the size is not wildcarded, then the size the source applies to should be set with gtk_icon_source_set_size() and the icon source will only be used with that specific size.

    GtkIconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

    GtkIconSet will normally scale wildcarded source images to produce an appropriate icon at a given size, but will not change the size of source images that match exactly.

    set_size_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setSizeWildcarded(setting: Bool)
  • set(state:) Extension method

    Sets the widget state this icon source is intended to be used with.

    Setting the widget state on an icon source makes no difference if the state is wildcarded. Therefore, you should usually call gtk_icon_source_set_state_wildcarded() to un-wildcard it in addition to calling this function.

    set_state is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(state: GtkStateType)
  • setStateWildcarded(setting:) Extension method

    If the widget state is wildcarded, this source can be used as the base image for an icon in any GtkStateType. If the widget state is not wildcarded, then the state the source applies to should be set with gtk_icon_source_set_state() and the icon source will only be used with that specific state.

    GtkIconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

    GtkIconSet will normally transform wildcarded source images to produce an appropriate icon for a given state, for example lightening an image on prelight, but will not modify source images that match exactly.

    set_state_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func setStateWildcarded(setting: Bool)
  • Renders the icon specified by source at the given size, returning the result in a pixbuf.

    render_icon_pixbuf is deprecated: Use gtk_icon_theme_load_icon() instead.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func renderIconPixbuf<StyleContextT>(context: StyleContextT, size: GtkIconSize) -> PixbufRef! where StyleContextT : StyleContextProtocol
  • direction Extension method

    Obtains the text direction this icon source applies to. The return value is only useful/meaningful if the text direction is not wildcarded.

    get_direction is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var direction: GtkTextDirection { get nonmutating set }
  • directionWildcarded Extension method

    Gets the value set by gtk_icon_source_set_direction_wildcarded().

    get_direction_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var directionWildcarded: Bool { get nonmutating set }
  • filename Extension method

    Retrieves the source filename, or nil if none is set. The filename is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

    get_filename is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var filename: String! { get nonmutating set }
  • iconName Extension method

    Retrieves the source icon name, or nil if none is set. The icon_name is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

    get_icon_name is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var iconName: String! { get nonmutating set }
  • pixbuf Extension method

    Retrieves the source pixbuf, or nil if none is set. In addition, if a filename source is in use, this function in some cases will return the pixbuf from loaded from the filename. This is, for example, true for the GtkIconSource passed to the GtkStyle render_icon() virtual function. The reference count on the pixbuf is not incremented.

    get_pixbuf is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var pixbuf: PixbufRef! { get nonmutating set }
  • size Extension method

    Obtains the icon size this source applies to. The return value is only useful/meaningful if the icon size is not wildcarded.

    get_size is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var size: GtkIconSize { get nonmutating set }
  • sizeWildcarded Extension method

    Gets the value set by gtk_icon_source_set_size_wildcarded().

    get_size_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var sizeWildcarded: Bool { get nonmutating set }
  • state Extension method

    Obtains the widget state this icon source applies to. The return value is only useful/meaningful if the widget state is not wildcarded.

    get_state is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var state: GtkStateType { get nonmutating set }
  • stateWildcarded Extension method

    Gets the value set by gtk_icon_source_set_state_wildcarded().

    get_state_wildcarded is deprecated: Use #GtkIconTheme instead.

    Declaration

    Swift

    @inlinable
    var stateWildcarded: Bool { get nonmutating set }