Scoop API

scoop:scoop.desktop:0.1.0

src/values.scoop

Selected production source · src/values.scoop

1package scoop.desktop
3import scoop.platform.fs.Path
5public struct DesktopApplicationCapabilities(
6 val applicationIcon: Boolean,
7 val badgeText: Boolean,
8 val dockMenu: Boolean,
9 val jumpListTasks: Boolean
12public struct DesktopWindowCapabilities(
13 val windowIcon: Boolean,
14 val overlayIcon: Boolean,
15 val progress: Boolean,
16 val miniwindowCaption: Boolean,
17 val thumbnailTooltip: Boolean
20public enum DesktopProgress {
21 None, Indeterminate, Normal(val completed: ULong, val total: ULong),
22 Paused(val completed: ULong, val total: ULong), Error(val completed: ULong, val total: ULong)
25public class JumpListIcon public constructor(public val path: Path, public val index: Int = 0)
27/** A native task starts this application with arguments, including after this process exits. */
28public class JumpListTask public constructor(
29 public val title: String,
30 public val arguments: Array<String> = [],
31 public val description: String? = None,
32 public val icon: JumpListIcon? = None
33) {
34 init {
35 if (title.byteLength == 0L)
36 throw IllegalArgumentException(Some("Jump List task title is empty"))
37 checkDesktopText(title)
38 checkDesktopText(description ?: "")
39 for (argument in arguments)
40 checkDesktopText(argument)
41 }
44internal fun checkDesktopText(value: String) {
45 for (character in value)
46 if (character.code == 0)
47 throw IllegalArgumentException(Some("desktop text contains NUL"))