tawasuyu/llimphi
Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.
1// Copyright 2024 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4use crate::schema::helpers::visual_object::VisualObject;
5use serde::{Deserialize, Serialize};
6use serde_repr::{Deserialize_repr, Serialize_repr};
7
8/// Style Type
9#[repr(u8)]
10#[derive(Deserialize_repr, Serialize_repr, Debug, Clone, PartialEq)]
11pub enum StyleType {
12 Stroke = 0,
13 DropShadow = 1,
14 InnerShadow = 2,
15 OuterGlow = 3,
16 InnerGlow = 4,
17 BevelEmboss = 5,
18 Satin = 6,
19 ColorOverlay = 7,
20 GradientOverlay = 8,
21}
22
23/// Style applied to a layer
24#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
25pub struct LayerStyle {
26 #[serde(flatten)]
27 pub visual_object: VisualObject,
28 /// Style Type
29 #[serde(rename = "ty")]
30 pub style_type: StyleType,
31}