tao 0.35.2

Cross-platform window manager library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2014-2021 The winit contributors
// Copyright 2021-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0

use crate::icon::{BadIcon, RgbaIcon};

#[derive(Debug, Clone)]
pub struct PlatformIcon(RgbaIcon);

impl PlatformIcon {
  pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Result<Self, BadIcon> {
    Ok(PlatformIcon(RgbaIcon::from_rgba(rgba, width, height)?))
  }
}