FileIcon

open class FileIcon(pointer: <Error class: unknown class><<Error class: unknown class>>) : Icon, LoadableIcon

#GFileIcon specifies an icon by pointing to an image file to be used as icon.

Constructors

Link copied to clipboard
constructor(file: File)

Creates a new icon for a file.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val file: File

The file containing the icon.

Link copied to clipboard
val gioFileIconPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gioIconPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gioLoadableIconPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun equal(icon2: Icon? = null): Boolean

Checks if two icons are equal.

Link copied to clipboard
open fun getFile(): File

Gets the #GFile associated with the given @icon.

Link copied to clipboard
open fun loadAsync(size: Int, cancellable: Cancellable? = null, callback: AsyncReadyCallback)

Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load().

Link copied to clipboard
open fun serialize(): <Error class: unknown class>?

Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved back by calling g_icon_deserialize() on the returned value. As serialization will avoid using raw icon data when possible, it only makes sense to transfer the #GVariant between processes on the same machine, (as opposed to over the network), and within the same file system namespace.