# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial

[package]
name = "slint-viewer"
description = "The viewer binary for Slint"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
categories = ["gui", "development-tools", "command-line-utilities"]
keywords = ["viewer", "gui", "ui", "toolkit"]

[features]
backend-qt = ["slint-interpreter/backend-qt"]

backend-winit = ["slint-interpreter/backend-winit"]
backend-winit-x11 = ["slint-interpreter/backend-winit-x11"]
backend-winit-wayland = ["slint-interpreter/backend-winit-wayland"]

renderer-femtovg = ["slint-interpreter/renderer-femtovg"]
renderer-skia = ["slint-interpreter/renderer-skia"]
renderer-skia-opengl = ["slint-interpreter/renderer-skia-opengl"]
renderer-skia-vulkan = ["slint-interpreter/renderer-skia-vulkan"]
renderer-software = ["slint-interpreter/renderer-software"]

# Compat
backend-gl-all = ["backend-winit", "renderer-femtovg"]
backend-gl-wayland = ["backend-winit-wayland", "renderer-femtovg"]
backend-gl-x11 = ["backend-winit-x11", "renderer-femtovg"]
eventloop-qt = ["backend-qt"]
renderer-winit-qt = ["backend-qt"]
renderer-winit-femtovg = ["renderer-femtovg"]
renderer-winit-skia = ["renderer-skia"]
renderer-winit-skia-opengl= ["renderer-skia-opengl"]
renderer-winit-skia-vulkan= ["renderer-skia-vulkan"]
renderer-winit-software = ["renderer-software"]


backend-linuxkms = ["slint-interpreter/backend-linuxkms"]

## Enable the translations using [gettext](https://www.gnu.org/software/gettext/gettext)
##
## the `@tr(...)` code from .slint files will be transformed into call to `dgettext`.
## You should pass --translation-domain and --translation-dir command line argument
## so that the viewer can find the translation
gettext = ["i-slint-core/gettext-rs"]

default = ["backend-qt", "backend-winit", "renderer-femtovg"]

[dependencies]
i-slint-compiler = { workspace = true, features = ["default"] }
i-slint-core = { workspace = true, features = ["default"] }
slint-interpreter = { workspace = true, features = ["display-diagnostics", "compat-1-2", "internal", "accessibility"] }
i-slint-backend-selector = { workspace = true, features = ["default"] }

vtable = { version = "0.1.6", path="../../helper_crates/vtable" }

clap = { version = "4.0", features = ["derive", "wrap_help"] }
codemap = "0.1"
codemap-diagnostic = "0.1.1"
notify = { version = "6.0.0", default-features = false, features = ["macos_kqueue"] }
serde_json = "1"
shlex = "1"
spin_on = "0.1"
env_logger = "0.10.0"
itertools = { workspace = true }

# Enable image-rs' default features to make all image formats available for preview
image = { version = "0.24.0" }

[[bin]]
name = "slint-viewer"
path = "main.rs"
