commonMain.io.nacular.doodle.image.ImageLoader.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-jvm Show documentation
Show all versions of core-jvm Show documentation
A pure Kotlin, UI framework for the Web and Desktop
package io.nacular.doodle.image
import io.nacular.doodle.datatransport.LocalFile
/**
* Provides a way of loading [Image]s from a given source.
*/
public interface ImageLoader {
/**
* @param source to load image from
* @return an image, or null if there is a failure
*/
public suspend fun load(source: String): Image?
/**
* @param file to load image from
* @return an image, or null if there is a failure
*/
public suspend fun load(file: LocalFile): Image?
/**
* Unloads an image that was previously loaded with [load].
* @param image to unload
*/
public fun unload(image: Image)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy