From c70ffd095a6de5cd5b872796a0d82a8c5afc1511 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 20 Jul 2024 17:22:25 +0300 Subject: Initial commit --- src/types/background_type.zig | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/types/background_type.zig (limited to 'src/types/background_type.zig') diff --git a/src/types/background_type.zig b/src/types/background_type.zig new file mode 100644 index 0000000..220465a --- /dev/null +++ b/src/types/background_type.zig @@ -0,0 +1,30 @@ +const json = @import("../json.zig"); + +const BackgroundFill = @import("background_fill.zig").BackgroundFill; +const Document = @import("Document.zig"); + +pub const BackgroundType = union(enum) { + fill: struct { + fill: BackgroundFill, + dark_theme_dimming: u8, + }, + wallpaper: struct { + document: Document, + dark_theme_dimming: u8, + is_blurred: bool = false, + is_moving: bool = false, + }, + pattern: struct { + document: Document, + fill: BackgroundFill, + intensity: u8, + is_inverted: bool = false, + is_moving: bool = false, + }, + chat_theme: struct { + theme_name: []const u8, + }, + + pub const jsonParse = json.makeJsonParse(BackgroundType); + pub const jsonParseFromValue = json.makeJsonParseFromValue(BackgroundType); +}; -- cgit v1.2.3