text
stringlengths
8
4.13M
use super::super::gl; use std::os::raw::c_void; #[derive(Copy, Clone, Debug)] pub struct TextureFormat { level: gl::GLint, internal_format: gl::GLenum, format: gl::GLenum, type_: gl::GLenum, } impl Default for TextureFormat { fn default() -> Self { Self { level: 0, internal_format: gl::RGBA, format: gl::RGBA, type_: gl::UNSIGNED_BYTE, } } } #[derive(Copy, Clone, Debug)] pub struct GLTexture { texture: gl::GLuint, target: gl::GLenum, level: gl::GLint, internal_format: gl::GLenum, format: gl::GLenum, type_: gl::GLenum, } struct TextureUnit { handle: gl::GLuint, target: gl::GLenum, } pub struct TextureState { active_texture_unit: u32, bound_texture: Option<GLTexture>, bound_texture_units: Vec<TextureUnit>, max_texture_units: i32, } impl TextureState { pub fn build_initialized() -> Self { let max_texture_units = gl::get_integer_v(gl::MAX_COMBINED_TEXTURE_IMAGE_UNITS); let active_texture_unit = 0; let bound_texture = None; let mut bound_texture_units = Vec::with_capacity(max_texture_units as usize); for _ in 0..max_texture_units { bound_texture_units.push(TextureUnit { target: 0, handle: 0, }); } let mut state = Self { active_texture_unit, bound_texture, bound_texture_units, max_texture_units, }; state.set_active_texture_unit(gl::TEXTURE0); state } pub fn set_wrapping(&mut self, wrap_s: gl::GLenum, wrap_t: gl::GLenum) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_parameteri(texture.target, gl::TEXTURE_WRAP_S, wrap_s); gl::tex_parameteri(texture.target, gl::TEXTURE_WRAP_T, wrap_t); } self } pub fn set_wrappings(&mut self, wrap: gl::GLenum) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_parameteri(texture.target, gl::TEXTURE_WRAP_S, wrap); gl::tex_parameteri(texture.target, gl::TEXTURE_WRAP_T, wrap); } self } pub fn set_mig_mag_filters(&mut self, min: gl::GLenum, mag: gl::GLenum) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_parameteri(texture.target, gl::TEXTURE_MIN_FILTER, min); gl::tex_parameteri(texture.target, gl::TEXTURE_MAG_FILTER, mag); } self } pub fn set_mig_mag_filter(&mut self, filter: gl::GLenum) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_parameteri(texture.target, gl::TEXTURE_MIN_FILTER, filter); gl::tex_parameteri(texture.target, gl::TEXTURE_MAG_FILTER, filter); } self } pub fn set_raw_data(&mut self, width: u32, height: u32, data: *const c_void) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_image_2d_raw( texture.target, texture.level, texture.internal_format, width, height, 0, texture.format, texture.type_, data, ); if texture.level > 0 { gl::generate_mipmap(self.active_texture_unit); } } self } pub fn set_data(&mut self, width: u32, height: u32, data: &[u8]) -> &mut Self { if let Some(texture) = &self.bound_texture { gl::tex_image_2d( texture.target, texture.level, texture.internal_format, width, height, 0, texture.format, texture.type_, data, ); if texture.level > 0 { gl::generate_mipmap(self.active_texture_unit); } } self } pub fn create_texture(&self, target: gl::GLenum, format: Option<TextureFormat>) -> GLTexture { let texture = gl::gen_textures(1); let format = format.unwrap_or_default(); GLTexture { texture, target, level: format.level, internal_format: format.internal_format, format: format.format, type_: format.type_, } } pub fn bind_texture(&mut self, texture: GLTexture) -> &mut Self { unsafe { let unit = self .bound_texture_units .get_unchecked_mut(self.active_texture_unit as usize); unit.target = texture.target; unit.handle = texture.texture; self.bound_texture = Some(texture); gl::bind_texture(unit.target, unit.handle); }; self } pub fn set_active_texture_unit(&mut self, unit: u32) -> &mut Self { self.active_texture_unit = unit; gl::active_texture(self.active_texture_unit); self } }
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use color::Color; use geometry::{DevicePixel, LayerPixel}; use tiling::{Tile, TileGrid}; use euclid::Matrix4D; use euclid::scale_factor::ScaleFactor; use euclid::size::{Size2D, TypedSize2D}; use euclid::point::{Point2D, TypedPoint2D}; use euclid::rect::{Rect, TypedRect}; use platform::surface::{NativeDisplay, NativeSurface}; use std::cell::{RefCell, RefMut}; use std::rc::Rc; use util::{project_rect_to_screen, ScreenRect}; #[derive(Clone, Copy, PartialEq, PartialOrd)] pub struct ContentAge { age: usize, } #[cfg(feature = "heapsize")] known_heap_size!(0, ContentAge); impl ContentAge { pub fn new() -> ContentAge { ContentAge { age: 0, } } pub fn next(&mut self) { self.age += 1; } } pub struct TransformState { /// Final, concatenated transform + perspective matrix for this layer pub final_transform: Matrix4D<f32>, /// If this is none, the rect was clipped and is not visible at all! pub screen_rect: Option<ScreenRect>, /// Rectangle in global coordinates, but not transformed. pub world_rect: Rect<f32>, /// True if this layer has a non-identity transform pub has_transform: bool, } #[cfg(feature = "heapsize")] known_heap_size!(0, TransformState); impl TransformState { fn new() -> TransformState { TransformState { final_transform: Matrix4D::identity(), screen_rect: None, world_rect: Rect::zero(), has_transform: false, } } } pub struct Layer<T> { pub children: RefCell<Vec<Rc<Layer<T>>>>, pub transform: RefCell<Matrix4D<f32>>, pub perspective: RefCell<Matrix4D<f32>>, pub tile_size: usize, pub extra_data: RefCell<T>, tile_grid: RefCell<TileGrid>, /// The boundaries of this layer in the coordinate system of the parent layer. pub bounds: RefCell<TypedRect<f32, LayerPixel>>, /// A monotonically increasing counter that keeps track of the current content age. pub content_age: RefCell<ContentAge>, /// The content offset for this layer in unscaled layer pixels. pub content_offset: RefCell<TypedPoint2D<f32, LayerPixel>>, /// Whether this layer clips its children to its boundaries. pub masks_to_bounds: RefCell<bool>, /// The background color for this layer. pub background_color: RefCell<Color>, /// The opacity of this layer, from 0.0 (fully transparent) to 1.0 (fully opaque). pub opacity: RefCell<f32>, /// Whether this stacking context creates a new 3d rendering context. pub establishes_3d_context: bool, /// Collection of state related to transforms for this layer. pub transform_state: RefCell<TransformState>, } impl<T> Layer<T> { pub fn new(bounds: TypedRect<f32, LayerPixel>, tile_size: usize, background_color: Color, opacity: f32, establishes_3d_context: bool, data: T) -> Layer<T> { Layer { children: RefCell::new(vec!()), transform: RefCell::new(Matrix4D::identity()), perspective: RefCell::new(Matrix4D::identity()), bounds: RefCell::new(bounds), tile_size: tile_size, extra_data: RefCell::new(data), tile_grid: RefCell::new(TileGrid::new(tile_size)), content_age: RefCell::new(ContentAge::new()), masks_to_bounds: RefCell::new(false), content_offset: RefCell::new(TypedPoint2D::zero()), background_color: RefCell::new(background_color), opacity: RefCell::new(opacity), establishes_3d_context: establishes_3d_context, transform_state: RefCell::new(TransformState::new()), } } pub fn children(&self) -> RefMut<Vec<Rc<Layer<T>>>> { self.children.borrow_mut() } pub fn add_child(&self, new_child: Rc<Layer<T>>) { self.children().push(new_child); } pub fn remove_child_at_index(&self, index: usize) { self.children().remove(index); } /// Returns buffer requests inside the given dirty rect, and simultaneously throws out tiles /// outside the given viewport rect. pub fn get_buffer_requests(&self, rect_in_layer: TypedRect<f32, LayerPixel>, viewport_in_layer: TypedRect<f32, LayerPixel>, scale: ScaleFactor<f32, LayerPixel, DevicePixel>) -> Vec<BufferRequest> { let mut tile_grid = self.tile_grid.borrow_mut(); tile_grid.get_buffer_requests_in_rect(rect_in_layer * scale, viewport_in_layer * scale, self.bounds.borrow().size * scale, &(self.transform_state.borrow().world_rect.origin * scale.get()), &self.transform_state.borrow().final_transform, *self.content_age.borrow()) } pub fn resize(&self, new_size: TypedSize2D<f32, LayerPixel>) { self.bounds.borrow_mut().size = new_size; } pub fn add_buffer(&self, tile: Box<LayerBuffer>) { self.tile_grid.borrow_mut().add_buffer(tile); } pub fn collect_unused_buffers(&self) -> Vec<Box<LayerBuffer>> { self.tile_grid.borrow_mut().take_unused_buffers() } pub fn collect_buffers(&self) -> Vec<Box<LayerBuffer>> { self.tile_grid.borrow_mut().collect_buffers() } pub fn contents_changed(&self) { self.content_age.borrow_mut().next(); } pub fn create_textures(&self, display: &NativeDisplay) { self.tile_grid.borrow_mut().create_textures(display); } pub fn do_for_all_tiles<F: FnMut(&Tile)>(&self, f: F) { self.tile_grid.borrow().do_for_all_tiles(f); } pub fn update_transform_state(&self, parent_transform: &Matrix4D<f32>, parent_perspective: &Matrix4D<f32>, parent_origin: &Point2D<f32>) { let mut ts = self.transform_state.borrow_mut(); let rect_without_scroll = self.bounds.borrow() .to_untyped() .translate(parent_origin); ts.world_rect = rect_without_scroll.translate(&self.content_offset.borrow().to_untyped()); let x0 = ts.world_rect.origin.x; let y0 = ts.world_rect.origin.y; // Build world space transform let local_transform = Matrix4D::identity() .pre_translated(x0, y0, 0.0) .pre_mul(&*self.transform.borrow()) .pre_translated(-x0, -y0, 0.0); ts.final_transform = parent_perspective .pre_mul(&local_transform) .pre_mul(&parent_transform); ts.screen_rect = project_rect_to_screen(&ts.world_rect, &ts.final_transform); // TODO(gw): This is quite bogus. It's a hack to allow the paint task // to avoid "optimizing" 3d layers with an incorrect clip rect. // We should probably make the display list optimizer work with transforms! // This layer is part of a 3d context if its concatenated transform // is not identity, since 2d transforms don't get layers. ts.has_transform = ts.final_transform != Matrix4D::identity(); // Build world space perspective transform let perspective_transform = Matrix4D::identity() .pre_translated(x0, y0, 0.0) .pre_mul(&*self.perspective.borrow()) .pre_translated(-x0, -y0, 0.0); for child in self.children().iter() { child.update_transform_state(&ts.final_transform, &perspective_transform, &rect_without_scroll.origin); } } /// Calculate the amount of memory used by this layer and all its children. /// The memory may be allocated on the heap or in GPU memory. pub fn get_memory_usage(&self) -> usize { let size_of_children : usize = self.children().iter().map(|ref child| -> usize { child.get_memory_usage() }).sum(); size_of_children + self.tile_grid.borrow().get_memory_usage() } } /// A request from the compositor to the renderer for tiles that need to be (re)displayed. pub struct BufferRequest { /// The rect in pixels that will be drawn to the screen pub screen_rect: Rect<usize>, /// The rect in page coordinates that this tile represents pub page_rect: Rect<f32>, /// The content age of that this BufferRequest corresponds to. pub content_age: ContentAge, /// A cached NativeSurface that can be used to avoid allocating a new one. pub native_surface: Option<NativeSurface>, } impl BufferRequest { pub fn new(screen_rect: Rect<usize>, page_rect: Rect<f32>, content_age: ContentAge) -> BufferRequest { BufferRequest { screen_rect: screen_rect, page_rect: page_rect, content_age: content_age, native_surface: None, } } } pub struct LayerBuffer { /// The native surface which can be shared between threads or processes. On Mac this is an /// `IOSurface`; on Linux this is an X Pixmap; on Android this is an `EGLImageKHR`. pub native_surface: NativeSurface, /// The rect in the containing RenderLayer that this represents. pub rect: Rect<f32>, /// The rect in pixels that will be drawn to the screen. pub screen_pos: Rect<usize>, /// The scale at which this tile is rendered pub resolution: f32, /// Whether or not this buffer was painted with the CPU rasterization. pub painted_with_cpu: bool, /// The content age of that this buffer request corresponds to. pub content_age: ContentAge, } impl LayerBuffer { /// Returns the amount of memory used by the tile pub fn get_mem(&self) -> usize { self.native_surface.get_memory_usage() } /// Returns true if the tile is displayable at the given scale pub fn is_valid(&self, scale: f32) -> bool { (self.resolution - scale).abs() < 1.0e-6 } /// Returns the Size2D of the tile pub fn get_size_2d(&self) -> Size2D<usize> { self.screen_pos.size } /// Marks the layer buffer as not leaking. See comments on /// `NativeSurfaceMethods::mark_wont_leak` for how this is used. pub fn mark_wont_leak(&mut self) { self.native_surface.mark_wont_leak() } /// Destroys the layer buffer. Painting task only. pub fn destroy(self, display: &NativeDisplay) { let mut this = self; this.native_surface.destroy(display) } } /// A set of layer buffers. This is an atomic unit used to switch between the front and back /// buffers. pub struct LayerBufferSet { pub buffers: Vec<Box<LayerBuffer>> } impl LayerBufferSet { /// Notes all buffer surfaces will leak if not destroyed via a call to `destroy`. pub fn mark_will_leak(&mut self) { for buffer in &mut self.buffers { buffer.native_surface.mark_will_leak() } } }
pub use VkPrimitiveTopology::*; #[repr(u32)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum VkPrimitiveTopology { VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, }
use itertools::Itertools; use std::fs::File; use std::io::{self, BufRead}; use std::path::Path; fn read_input(path: &Path) -> Vec<u64> { let file = File::open(path).unwrap(); let lines = io::BufReader::new(file).lines(); let mut res = Vec::new(); for line in lines { res.push(line.unwrap().parse::<u64>().unwrap()); } res } fn updated_input(input: Vec<u64>) -> Vec<u64> { let mut sorted = input.clone(); sorted.push(0); sorted.sort(); sorted.push(sorted.last().unwrap() + 3); sorted } fn diff_of_1_mul_diff_of_3(input: Vec<u64>) -> u64 { let mut nr_of_1_diff = 0; let mut nr_of_3_diff = 0; let sorted = updated_input(input); for i in 1..sorted.len() { let diff = sorted[i] - sorted[i - 1]; if diff == 1 { nr_of_1_diff += 1; } if diff == 3 { nr_of_3_diff += 1; } } nr_of_1_diff * nr_of_3_diff } fn all_valid_combinations(input: Vec<u64>) -> u64 { let mut groups: Vec<u64> = Vec::new(); let sorted = updated_input(input); let mut local_count: u64 = 0; for i in 1..sorted.len() { let diff = sorted[i] - sorted[i - 1]; if diff == 1 { local_count += 1; } else if diff == 2 { panic!("not working"); } else { groups.push(local_count); local_count = 0; } } // The beautiful values below that represent the possible combinations // were computed with a recursive solution that was too slow for the large input. // Said function: `all_valid_combinations_recursion`. groups .into_iter() .filter(|elem| *elem >= 2u64) .map(|elem| match elem { 2 => 2, 3 => 4, 4 => 7, 5 => 13, _ => panic!("too many consecutive values."), }) .fold(1u64, |acc, elem| acc * elem) } fn valid_from(input: &Vec<u64>, correct_solutions: &mut Vec<Vec<u64>>) { for skip in 1..(input.len() - 1) { if input[skip + 1] - input[skip - 1] <= 3 { let try_from = (*input) .iter() .enumerate() .filter(|(index, _)| *index != skip) .map(|(_, v)| *v) .collect_vec(); if !correct_solutions.contains(&try_from) { correct_solutions.push(try_from.clone()); valid_from(&try_from, correct_solutions); } } } } fn all_valid_combinations_recursion(input: Vec<u64>) -> u64 { let input = updated_input(input.clone()); let mut correct_solutions = Vec::<Vec<u64>>::new(); valid_from(&input, &mut correct_solutions); (correct_solutions.len() + 1) as u64 } pub fn solve_puzzle(path: &Path) { let input = read_input(path); println!( "Nr of 1-jolt diff multiplied by the nr of 3-jol = {}", diff_of_1_mul_diff_of_3(input.clone()) ); println!( "Nr of all possible combinations: {}", all_valid_combinations(input) ); } #[cfg(test)] mod tests { use super::*; #[test] fn test_simple() { let input = vec![16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4]; assert_eq!(diff_of_1_mul_diff_of_3(input.clone()), 35); assert_eq!(all_valid_combinations_recursion(input), 8); let input = vec![ 28, 33, 18, 42, 31, 14, 46, 20, 48, 47, 24, 23, 49, 45, 19, 38, 39, 11, 1, 32, 25, 35, 8, 17, 7, 9, 4, 2, 34, 10, 3, ]; assert_eq!(diff_of_1_mul_diff_of_3(input.clone()), 220); assert_eq!(all_valid_combinations(input), 19208); } #[test] fn test_print_valid_comb() { let vec = vec![1, 2]; println!( "# valid combinations for len={} is {}", vec.len() + 1, all_valid_combinations_recursion(vec.clone()) ); let vec = vec![1, 2, 3]; println!( "# valid combinations for len={} is {}", vec.len() + 1, all_valid_combinations_recursion(vec.clone()) ); let vec = vec![1, 2, 3, 4]; println!( "# valid combinations for len={} is {}", vec.len() + 1, all_valid_combinations_recursion(vec.clone()) ); let vec = vec![1, 2, 3, 4, 5]; println!( "# valid combinations for len={} is {}", vec.len() + 1, all_valid_combinations_recursion(vec.clone()) ); } #[test] fn call_solve_puzzle() { solve_puzzle(Path::new("src/dec10/input.txt")); } }
use std::process::Command; use std::io::{self, Write}; use std::error::Error; fn main() -> Result<(), Box<dyn Error>>{ println!("Welcome to dummy command executor v1!"); loop { print!("$ "); io::stdout().flush().expect("fail to flush the stdout"); let mut inp = String::new(); io::stdin().read_line(&mut inp)?; let cmd_to_exec = inp.trim(); let mut child_cmd = Command::new(cmd_to_exec). spawn(). expect("fail to spawn the command"); child_cmd.wait().expect("fail to execute the command"); } }
mod sample; mod acc; mod study_gl; mod etl; mod positionality; extern crate permutohedron; const DATA_ARRAY_LEN: usize = 13; fn main() { let mut best_candidate = vec![-30, -23, 0, 30, 76, 78, 80, 95, 100, 114]; let max_count = study_gl::max_perm_count(&mut best_candidate); println!("Max count: {:?}", max_count); let best_positions = positionality::best_positions(&mut best_candidate, max_count); println!("number of positons: {:?}", best_positions.len()); let pairs_results = positionality::get_pairs_info(&best_positions); let dedupped_results = positionality::dedup_pairs(&pairs_results); println!("len of dedupped pairs: {:?}", dedupped_results.len()); for (pair, bools) in dedupped_results { if bools.0 == 160 { println!("{}: {:?}", pair, bools); } } println!("{:?}", best_candidate); }
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn ldexpf(x: f32, n: i32) -> f32 { super::scalbnf(x, n) }
use std::{ fmt::Display, net::SocketAddrV4, sync::{ atomic::{AtomicU16, Ordering}, Arc, }, }; // These port numbers are chosen to not collide with a development ioxd server // running locally. static NEXT_PORT: AtomicU16 = AtomicU16::new(8090); // represents port on localhost to bind / connect to #[derive(Debug, Clone)] pub struct Address { /// the actual address, on which to bind. Example `127.0.0.1:8089` bind_addr: Arc<str>, /// address on which clients can connect. Example `http://127.0.0.1:8089` client_base: Arc<str>, } impl Address { fn new() -> Self { let bind_addr = Self::get_free_port().to_string(); let client_base = format!("http://{bind_addr}"); Self { bind_addr: bind_addr.into(), client_base: client_base.into(), } } fn get_free_port() -> SocketAddrV4 { let ip = std::net::Ipv4Addr::new(127, 0, 0, 1); loop { let port = NEXT_PORT.fetch_add(1, Ordering::SeqCst); let addr = SocketAddrV4::new(ip, port); if std::net::TcpListener::bind(addr).is_ok() { return addr; } } } pub fn bind_addr(&self) -> Arc<str> { Arc::clone(&self.bind_addr) } pub fn client_base(&self) -> Arc<str> { Arc::clone(&self.client_base) } } /// This structure contains all the addresses a test server could use #[derive(Default, Debug)] pub struct BindAddresses { router_http_api: std::sync::Mutex<Option<Address>>, router_grpc_api: std::sync::Mutex<Option<Address>>, querier_grpc_api: std::sync::Mutex<Option<Address>>, ingester_grpc_api: std::sync::Mutex<Option<Address>>, compactor_grpc_api: std::sync::Mutex<Option<Address>>, } impl BindAddresses { pub fn router_http_api(&self) -> Address { get_or_allocate(&self.router_http_api) } pub fn router_grpc_api(&self) -> Address { get_or_allocate(&self.router_grpc_api) } pub fn querier_grpc_api(&self) -> Address { get_or_allocate(&self.querier_grpc_api) } pub fn ingester_grpc_api(&self) -> Address { get_or_allocate(&self.ingester_grpc_api) } pub fn compactor_grpc_api(&self) -> Address { get_or_allocate(&self.compactor_grpc_api) } } impl Display for BindAddresses { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { if let Some(addr) = self.router_http_api.lock().unwrap().as_ref() { write!(f, "router_http: {} ", addr.bind_addr)? } if let Some(addr) = self.router_grpc_api.lock().unwrap().as_ref() { write!(f, "router_grpc: {} ", addr.bind_addr)? } if let Some(addr) = self.querier_grpc_api.lock().unwrap().as_ref() { write!(f, "querier_grpc: {} ", addr.bind_addr)? } if let Some(addr) = self.ingester_grpc_api.lock().unwrap().as_ref() { write!(f, "ingester_grpc: {} ", addr.bind_addr)? } if let Some(addr) = self.compactor_grpc_api.lock().unwrap().as_ref() { write!(f, "compactor_grpc: {} ", addr.bind_addr)? } Ok(()) } } fn get_or_allocate(locked_addr: &std::sync::Mutex<Option<Address>>) -> Address { let mut locked_addr = locked_addr.lock().unwrap(); let addr = locked_addr.take().unwrap_or_else(Address::new); *locked_addr = Some(addr.clone()); addr }
use crate::{ biginteger::BigInteger384 as BigInteger, field_new, fields::{ fp6_3over2::{Fp6, Fp6Parameters}, Field, Fp2Parameters, }, }; use crate::fields::bn_382::{ fq::Fq, fq2::{Fq2, Fq2Parameters}, }; pub type Fq6 = Fp6<Fq6Parameters>; #[derive(Clone, Copy)] pub struct Fq6Parameters; impl Fp6Parameters for Fq6Parameters { type Fp2Params = Fq2Parameters; // u = sqrt(7) // 2 * u has no cube nor square nor sixth root /// NONRESIDUE = (2 * U) const NONRESIDUE: Fq2 = field_new!( Fq2, // 0 field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), // 2 field_new!( Fq, BigInteger([ 0xfffffffffffffff2, 0xffffffeaff56aeaf, 0xfead580ad5d5eaff, 0x20710ae5c78581ea, 0xcd9cb238575f8686, 0x7c07e8208289635 ]) ), ); const FROBENIUS_COEFF_FP6_C1: [Fq2; 6] = [ // Fq2(2*u)**(((q^0) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xfffffffffffffff9, 0xfffffff57fab5757, 0x7f56ac056aeaf57f, 0x10388572e3c2c0f5, 0xe6ce591c2bafc343, 0x3e03f4104144b1a ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((q^1) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xbc53ef09632f798c, 0x4989a7227b70fe75, 0x9b1ed1eacd0a16a9, 0xde2a63b0719e09f4, 0x600b642eff55005, 0x190429c6be8cecd1 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((q^2) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xbc53ef09632f7993, 0x4989a72cfbc5a71d, 0x1bc825e5621f2129, 0xcdf1de3d8ddb48ff, 0x1f325d26c4458cc2, 0x1523ea85ba78a1b6 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((q^3) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0x8, 0xc0060c0c0, 0xc1848c18180c00, 0xa451b0a144d8480c, 0x8a81e34d84edfc45, 0x202449fed6c43c73 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((q^4) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0x43ac10f69cd08675, 0xb67658df049b19a2, 0xe4f95ea6b5f8ead6, 0xd65fd263b6fcff0c, 0x6b4f8626c0a86f82, 0xb005f791c4b9abd ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((q^5) - 1) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0x43ac10f69cd0866e, 0xb67658d4844670fa, 0x64500aac20e3e056, 0xe69857d69abfc002, 0x521ddf42ec5832c5, 0xee09eba205fe5d8 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), ]; const FROBENIUS_COEFF_FP6_C2: [Fq2; 6] = [ // Fq2(2*u)**(((2q^0) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xfffffffffffffff9, 0xfffffff57fab5757, 0x7f56ac056aeaf57f, 0x10388572e3c2c0f5, 0xe6ce591c2bafc343, 0x3e03f4104144b1a ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((2q^1) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xbc53ef09632f7993, 0x4989a72cfbc5a71d, 0x1bc825e5621f2129, 0xcdf1de3d8ddb48ff, 0x1f325d26c4458cc2, 0x1523ea85ba78a1b6 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((2q^2) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0x43ac10f69cd08675, 0xb67658df049b19a2, 0xe4f95ea6b5f8ead6, 0xd65fd263b6fcff0c, 0x6b4f8626c0a86f82, 0xb005f791c4b9abd ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((2q^3) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xfffffffffffffff9, 0xfffffff57fab5757, 0x7f56ac056aeaf57f, 0x10388572e3c2c0f5, 0xe6ce591c2bafc343, 0x3e03f4104144b1a ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((2q^4) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0xbc53ef09632f7993, 0x4989a72cfbc5a71d, 0x1bc825e5621f2129, 0xcdf1de3d8ddb48ff, 0x1f325d26c4458cc2, 0x1523ea85ba78a1b6 ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), // Fq2(2*u)**(((2q^5) - 2) / 3) field_new!( Fq2, field_new!( Fq, BigInteger([ 0x43ac10f69cd08675, 0xb67658df049b19a2, 0xe4f95ea6b5f8ead6, 0xd65fd263b6fcff0c, 0x6b4f8626c0a86f82, 0xb005f791c4b9abd ]) ), field_new!(Fq, BigInteger([0x0, 0x0, 0x0, 0x0, 0x0, 0x0])), ), ]; /// Multiply this element by the quadratic nonresidue 0 + 2 * u. /// Make this generic. fn mul_fp2_by_nonresidue(fe: &Fq2) -> Fq2 { // 2 U (c0 + U * c1) // == 2*7*c1 + U (2 c0) let mut c0 = Fq2Parameters::mul_fp_by_nonresidue(&fe.c1); // 7*c1 c0.double_in_place(); // 2*7*c1 let mut c1 = fe.c0; c1.double_in_place(); Fq2::new(c0, c1) } } #[cfg(test)] mod test { use super::*; use crate::{Field, UniformRand}; use rand::SeedableRng; use rand_xorshift::XorShiftRng; #[test] fn test_fq2_mul_nonresidue() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); let non_residue = Fq2::new(Fq::zero(), Fq::one() + &Fq::one()); for _ in 0..1000 { let mut a = Fq2::rand(&mut rng); let mut b = a; a = Fq6Parameters::mul_fp2_by_nonresidue(&a); b *= &non_residue; assert_eq!(a, b); } } #[test] fn test_fq6_inversion() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); for _ in 0..1000 { let a = Fq6::rand(&mut rng); let a_inv = a.inverse().unwrap(); assert_eq!(a * &a_inv, Fq6::one()); } } }
#[repr(C)] #[derive(Debug)] pub struct VkDispatchIndirectCommand { pub x: u32, pub y: u32, pub z: u32, }
use super::Symbol; use crate::find_usages::{AddressableUsage, UsageMatcher}; use crate::process::subprocess::exec; use crate::tools::gtags::GTAGS_DIR; use dumb_analyzer::resolve_reference_kind; use rayon::prelude::*; use std::io::{Error, ErrorKind, Result}; use std::path::{PathBuf, MAIN_SEPARATOR}; use subprocess::{Exec, Redirection}; #[derive(Clone, Debug)] pub struct GtagsSearcher { pub project_root: PathBuf, pub db_path: PathBuf, } impl GtagsSearcher { pub fn new(project_root: PathBuf) -> Self { // Directory for GTAGS, GRTAGS, GPATH, e.g., // // `~/.local/share/vimclap/gtags/project_root` let mut db_path = GTAGS_DIR.to_path_buf(); db_path.push( project_root .display() .to_string() .replace(MAIN_SEPARATOR, "_"), ); Self { project_root, db_path, } } /// Create or update the tags db. pub fn create_or_update_tags(&self) -> Result<()> { if self.db_path.exists() { self.update_tags() } else { self.create_tags() } } /// Force recreating the gtags db. pub fn force_recreate(&self) -> Result<()> { std::fs::remove_dir_all(&self.db_path)?; self.create_tags() } /// Constructs a `gtags` command with proper env variables. fn gtags(&self) -> Exec { Exec::cmd("gtags") .stderr(Redirection::None) .env("GTAGSROOT", &self.project_root) .env("GTAGSDBPATH", &self.db_path) } /// Constructs a `global` command with proper env variables. fn global(&self) -> Exec { Exec::cmd("global") .stderr(Redirection::None) // Ignore the error message, the exit status will tell us // whether it's executed sucessfully. .env("GTAGSROOT", &self.project_root) .env("GTAGSDBPATH", &self.db_path) } pub fn create_tags(&self) -> Result<()> { std::fs::create_dir_all(&self.db_path)?; let exit_status = self .gtags() .env("GTAGSLABEL", "native-pygments") .cwd(&self.project_root) .arg(&self.db_path) .join() .map_err(|e| Error::new(ErrorKind::Other, format!("Failed to run gtags: {e:?}")))?; if exit_status.success() { Ok(()) } else { Err(Error::new( ErrorKind::Other, format!("Creating gtags failed, exit_status: {exit_status:?}"), )) } } /// Update tags files increamentally. pub fn update_tags(&self) -> Result<()> { // GTAGSLABEL=native-pygments should be enabled. let exit_status = self .global() .env("GTAGSLABEL", "native-pygments") .cwd(&self.project_root) .arg("--update") .join() .map_err(|e| Error::new(ErrorKind::Other, format!("Failed to update gtags: {e:?}")))?; if exit_status.success() { Ok(()) } else { Err(Error::new( ErrorKind::Other, format!("Updating gtags failed, exit_status: {exit_status:?}"), )) } } /// Search definition tags exactly matching `keyword`. pub fn search_definitions(&self, keyword: &str) -> Result<impl Iterator<Item = Symbol>> { let cmd = self .global() .cwd(&self.project_root) .arg(keyword) .arg("--result") .arg("ctags-x"); execute(cmd) } /// `search_references` and reorder the results based on the language pattern. pub fn search_usages( &self, keyword: &str, usage_matcher: &UsageMatcher, file_ext: &str, ) -> Result<Vec<AddressableUsage>> { let mut gtags_usages = self .search_references(keyword)? .par_bridge() .filter_map(|symbol| { let (kind, kind_weight) = resolve_reference_kind(&symbol.pattern, file_ext); let (line, indices) = symbol.grep_format_gtags(kind, keyword, false); usage_matcher .match_jump_line((line, indices.unwrap_or_default())) .map(|(line, indices)| GtagsUsage { line, indices, kind_weight, path: symbol.path, // TODO: perhaps path_weight? Lower the weight of path containing `test`. line_number: symbol.line_number, }) }) .collect::<Vec<_>>(); gtags_usages.par_sort_unstable_by(|a, b| a.cmp(b)); Ok(gtags_usages .into_par_iter() .map(GtagsUsage::into_addressable_usage) .collect::<Vec<_>>()) } /// Search reference tags exactly matching `keyword`. /// /// Reference means the reference to a symbol which has definitions. pub fn search_references(&self, keyword: &str) -> Result<impl Iterator<Item = Symbol>> { let cmd = self .global() .cwd(&self.project_root) .arg(keyword) .arg("--reference") .arg("--result") .arg("ctags-x"); execute(cmd) } // TODO prefix matching // GTAGSROOT=$(pwd) GTAGSDBPATH=/home/xlc/.local/share/vimclap/gtags/test/ global -g 'ru(.*)' --result=ctags-x } // Returns a stream of tag parsed from the gtags output. fn execute(cmd: Exec) -> Result<impl Iterator<Item = Symbol>> { Ok(exec(cmd)?.flatten().filter_map(|s| Symbol::from_gtags(&s))) } /// Used for sorting the usages from gtags properly. #[derive(Clone, Debug, Default, Eq, PartialEq)] struct GtagsUsage { line: String, indices: Vec<usize>, line_number: usize, path: String, kind_weight: usize, } impl GtagsUsage { fn into_addressable_usage(self) -> AddressableUsage { AddressableUsage { line: self.line, indices: self.indices, path: self.path, line_number: self.line_number, } } } impl PartialOrd for GtagsUsage { fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { Some((self.kind_weight, &self.path, self.line_number).cmp(&( other.kind_weight, &other.path, other.line_number, ))) } } impl Ord for GtagsUsage { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.partial_cmp(other).unwrap() } }
use proconio::input; #[allow(unused_imports)] use proconio::marker::*; #[allow(unused_imports)] use std::cmp::*; #[allow(unused_imports)] use std::collections::*; #[allow(unused_imports)] use std::f64::consts::*; #[allow(unused)] const INF: usize = std::usize::MAX / 4; #[allow(unused)] const M: usize = 1000000007; fn main() { input! { n: usize, ab: [(usize, usize); n], } let mut a = ab.iter().map(|&(ai, _)| ai).collect::<Vec<_>>(); let mut b = ab.iter().map(|&(_, bi)| bi).collect::<Vec<_>>(); a.sort(); b.sort(); if n % 2 == 0 { let a_m = a[n / 2 - 1] + a[n / 2]; let b_m = b[n / 2 - 1] + b[n / 2]; println!("{}", b_m + 1 - a_m); } else { let a_m = a[n / 2]; let b_m = b[n / 2]; println!("{}", b_m + 1 - a_m) } }
use arrayvec::ArrayVec; use num_bigint::BigUint; use num_traits::identities::Zero; /// Type for indexing leaves of a sparse merkle tree pub trait LeafIndex { /// Path from root to leaf // TODO: Return type can be arrayvec? fn to_leaf_path(&self, arity: u8, tree_depth: usize) -> Vec<u8>; } /// When sparse merkle tree can have 2^64 leaves at max impl LeafIndex for u64 { /// Returns the representation of the `u64` as a byte array in MSB form fn to_leaf_path(&self, arity: u8, tree_depth: usize) -> Vec<u8> { assert!(arity.is_power_of_two()); let shift = (arity as f32).log2() as u64; let arity_minus_1 = (arity - 1) as u64; let mut path = vec![]; let mut leaf_index = self.clone(); while (path.len() != tree_depth) && (leaf_index != 0) { // Get last `shift` bytes path.push((leaf_index & arity_minus_1) as u8); // Remove last `shift` bytes leaf_index >>= shift; } while path.len() != tree_depth { path.push(0); } path.reverse(); path } } /// When sparse merkle tree can have arbitrary number (usually > 2^128) of leaves impl LeafIndex for BigUint { /// Returns the representation of the `BigUint` as a byte array in MSB form fn to_leaf_path(&self, arity: u8, tree_depth: usize) -> Vec<u8> { assert!(arity.is_power_of_two()); let mut path = vec![]; for d in self.to_radix_le(arity as u32) { if path.len() >= tree_depth { break; } path.push(d); } while path.len() != tree_depth { path.push(0); } path.reverse(); path } } #[allow(non_snake_case)] #[cfg(test)] mod tests { use super::*; extern crate rand; use self::rand::{thread_rng, Rng}; macro_rules! check_path_for_u64 { ( $idx:expr, $arity: tt, $depth: tt, $path: expr ) => {{ assert_eq!($idx.to_leaf_path($arity, $depth), $path); let i = BigUint::from($idx); assert_eq!(i.to_leaf_path($arity, $depth), $path); }}; } #[test] fn test_leaf_path() { // Test some hardcoded values for both u64 and BigUint let idx = 2u64; check_path_for_u64!(idx, 2, 2, vec![1, 0]); check_path_for_u64!(idx, 2, 3, vec![0, 1, 0]); let idx = 3u64; check_path_for_u64!(idx, 2, 2, vec![1, 1]); check_path_for_u64!(idx, 2, 3, vec![0, 1, 1]); let idx = 8u64; check_path_for_u64!(idx, 2, 2, vec![0, 0]); check_path_for_u64!(idx, 2, 3, vec![0, 0, 0]); check_path_for_u64!(idx, 2, 4, vec![1, 0, 0, 0]); let idx = 15u64; check_path_for_u64!(idx, 2, 2, vec![1, 1]); check_path_for_u64!(idx, 2, 3, vec![1, 1, 1]); check_path_for_u64!(idx, 2, 4, vec![1, 1, 1, 1]); check_path_for_u64!(idx, 2, 5, vec![0, 1, 1, 1, 1]); let idx = 108u64; check_path_for_u64!(idx, 2, 6, vec![1, 0, 1, 1, 0, 0]); check_path_for_u64!(idx, 2, 7, vec![1, 1, 0, 1, 1, 0, 0]); check_path_for_u64!(idx, 2, 8, vec![0, 1, 1, 0, 1, 1, 0, 0]); } #[test] fn test_leaf_path_1() { // Test some hardcoded values for u64 for idx in vec![10503u64, 21522u64, 598162u64] { let p1 = idx.to_leaf_path(16, 30); assert_eq!(p1.len(), 30); assert!(p1.iter().all(|&x| x < 16)); let p2 = idx.to_leaf_path(32, 30); assert_eq!(p2.len(), 30); assert!(p2.iter().all(|&x| x < 32)); let p3 = idx.to_leaf_path(64, 30); assert_eq!(p3.len(), 30); assert!(p3.iter().all(|&x| x < 64)); } } #[test] fn test_equivalence_of_u64_and_BigUint() { let test_cases = 100; let mut rng = thread_rng(); for _ in 0..test_cases { let i = rng.gen_range(0, std::u64::MAX); let depth = rng.gen_range(2, 60); let p1 = i.to_leaf_path(2, depth); let p2 = BigUint::from(i).to_leaf_path(2, depth); assert_eq!(p1, p2); let p1 = i.to_leaf_path(4, depth); let p2 = BigUint::from(i).to_leaf_path(4, depth); assert_eq!(p1, p2); } } }
// auto generated, do not modify. // created: Wed Jan 20 00:44:03 2016 // src-file: /QtQuick/qsgflatcolormaterial.h // dst-file: /src/quick/qsgflatcolormaterial.rs // // header block begin => #![feature(libc)] #![feature(core)] #![feature(collections)] extern crate libc; use self::libc::*; // <= header block end // main block begin => // <= main block end // use block begin => use super::qsgmaterial::QSGMaterial; // 773 use std::ops::Deref; use super::super::gui::qcolor::QColor; // 771 use super::qsgmaterial::QSGMaterialShader; // 773 use super::qsgmaterial::QSGMaterialType; // 773 // <= use block end // ext block begin => // #[link(name = "Qt5Core")] // #[link(name = "Qt5Gui")] // #[link(name = "Qt5Widgets")] // #[link(name = "QtInline")] extern { fn QSGFlatColorMaterial_Class_Size() -> c_int; // proto: void QSGFlatColorMaterial::setColor(const QColor & color); fn _ZN20QSGFlatColorMaterial8setColorERK6QColor(qthis: u64 /* *mut c_void*/, arg0: *mut c_void); // proto: void QSGFlatColorMaterial::QSGFlatColorMaterial(); fn _ZN20QSGFlatColorMaterialC2Ev(qthis: u64 /* *mut c_void*/); // proto: int QSGFlatColorMaterial::compare(const QSGMaterial * other); fn _ZNK20QSGFlatColorMaterial7compareEPK11QSGMaterial(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> c_int; // proto: QSGMaterialShader * QSGFlatColorMaterial::createShader(); fn _ZNK20QSGFlatColorMaterial12createShaderEv(qthis: u64 /* *mut c_void*/) -> *mut c_void; // proto: QSGMaterialType * QSGFlatColorMaterial::type(); fn _ZNK20QSGFlatColorMaterial4typeEv(qthis: u64 /* *mut c_void*/) -> *mut c_void; // proto: const QColor & QSGFlatColorMaterial::color(); fn _ZNK20QSGFlatColorMaterial5colorEv(qthis: u64 /* *mut c_void*/) -> *mut c_void; } // <= ext block end // body block begin => // class sizeof(QSGFlatColorMaterial)=1 #[derive(Default)] pub struct QSGFlatColorMaterial { qbase: QSGMaterial, pub qclsinst: u64 /* *mut c_void*/, } impl /*struct*/ QSGFlatColorMaterial { pub fn inheritFrom(qthis: u64 /* *mut c_void*/) -> QSGFlatColorMaterial { return QSGFlatColorMaterial{qbase: QSGMaterial::inheritFrom(qthis), qclsinst: qthis, ..Default::default()}; } } impl Deref for QSGFlatColorMaterial { type Target = QSGMaterial; fn deref(&self) -> &QSGMaterial { return & self.qbase; } } impl AsRef<QSGMaterial> for QSGFlatColorMaterial { fn as_ref(& self) -> & QSGMaterial { return & self.qbase; } } // proto: void QSGFlatColorMaterial::setColor(const QColor & color); impl /*struct*/ QSGFlatColorMaterial { pub fn setColor<RetType, T: QSGFlatColorMaterial_setColor<RetType>>(& self, overload_args: T) -> RetType { return overload_args.setColor(self); // return 1; } } pub trait QSGFlatColorMaterial_setColor<RetType> { fn setColor(self , rsthis: & QSGFlatColorMaterial) -> RetType; } // proto: void QSGFlatColorMaterial::setColor(const QColor & color); impl<'a> /*trait*/ QSGFlatColorMaterial_setColor<()> for (&'a QColor) { fn setColor(self , rsthis: & QSGFlatColorMaterial) -> () { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZN20QSGFlatColorMaterial8setColorERK6QColor()}; let arg0 = self.qclsinst as *mut c_void; unsafe {_ZN20QSGFlatColorMaterial8setColorERK6QColor(rsthis.qclsinst, arg0)}; // return 1; } } // proto: void QSGFlatColorMaterial::QSGFlatColorMaterial(); impl /*struct*/ QSGFlatColorMaterial { pub fn new<T: QSGFlatColorMaterial_new>(value: T) -> QSGFlatColorMaterial { let rsthis = value.new(); return rsthis; // return 1; } } pub trait QSGFlatColorMaterial_new { fn new(self) -> QSGFlatColorMaterial; } // proto: void QSGFlatColorMaterial::QSGFlatColorMaterial(); impl<'a> /*trait*/ QSGFlatColorMaterial_new for () { fn new(self) -> QSGFlatColorMaterial { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZN20QSGFlatColorMaterialC2Ev()}; let ctysz: c_int = unsafe{QSGFlatColorMaterial_Class_Size()}; let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64; unsafe {_ZN20QSGFlatColorMaterialC2Ev(qthis_ph)}; let qthis: u64 = qthis_ph; let rsthis = QSGFlatColorMaterial{qbase: QSGMaterial::inheritFrom(qthis), qclsinst: qthis, ..Default::default()}; return rsthis; // return 1; } } // proto: int QSGFlatColorMaterial::compare(const QSGMaterial * other); impl /*struct*/ QSGFlatColorMaterial { pub fn compare<RetType, T: QSGFlatColorMaterial_compare<RetType>>(& self, overload_args: T) -> RetType { return overload_args.compare(self); // return 1; } } pub trait QSGFlatColorMaterial_compare<RetType> { fn compare(self , rsthis: & QSGFlatColorMaterial) -> RetType; } // proto: int QSGFlatColorMaterial::compare(const QSGMaterial * other); impl<'a> /*trait*/ QSGFlatColorMaterial_compare<i32> for (&'a QSGMaterial) { fn compare(self , rsthis: & QSGFlatColorMaterial) -> i32 { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZNK20QSGFlatColorMaterial7compareEPK11QSGMaterial()}; let arg0 = self.qclsinst as *mut c_void; let mut ret = unsafe {_ZNK20QSGFlatColorMaterial7compareEPK11QSGMaterial(rsthis.qclsinst, arg0)}; return ret as i32; // return 1; } } // proto: QSGMaterialShader * QSGFlatColorMaterial::createShader(); impl /*struct*/ QSGFlatColorMaterial { pub fn createShader<RetType, T: QSGFlatColorMaterial_createShader<RetType>>(& self, overload_args: T) -> RetType { return overload_args.createShader(self); // return 1; } } pub trait QSGFlatColorMaterial_createShader<RetType> { fn createShader(self , rsthis: & QSGFlatColorMaterial) -> RetType; } // proto: QSGMaterialShader * QSGFlatColorMaterial::createShader(); impl<'a> /*trait*/ QSGFlatColorMaterial_createShader<QSGMaterialShader> for () { fn createShader(self , rsthis: & QSGFlatColorMaterial) -> QSGMaterialShader { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZNK20QSGFlatColorMaterial12createShaderEv()}; let mut ret = unsafe {_ZNK20QSGFlatColorMaterial12createShaderEv(rsthis.qclsinst)}; let mut ret1 = QSGMaterialShader::inheritFrom(ret as u64); return ret1; // return 1; } } // proto: QSGMaterialType * QSGFlatColorMaterial::type(); impl /*struct*/ QSGFlatColorMaterial { pub fn type_<RetType, T: QSGFlatColorMaterial_type_<RetType>>(& self, overload_args: T) -> RetType { return overload_args.type_(self); // return 1; } } pub trait QSGFlatColorMaterial_type_<RetType> { fn type_(self , rsthis: & QSGFlatColorMaterial) -> RetType; } // proto: QSGMaterialType * QSGFlatColorMaterial::type(); impl<'a> /*trait*/ QSGFlatColorMaterial_type_<QSGMaterialType> for () { fn type_(self , rsthis: & QSGFlatColorMaterial) -> QSGMaterialType { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZNK20QSGFlatColorMaterial4typeEv()}; let mut ret = unsafe {_ZNK20QSGFlatColorMaterial4typeEv(rsthis.qclsinst)}; let mut ret1 = QSGMaterialType::inheritFrom(ret as u64); return ret1; // return 1; } } // proto: const QColor & QSGFlatColorMaterial::color(); impl /*struct*/ QSGFlatColorMaterial { pub fn color<RetType, T: QSGFlatColorMaterial_color<RetType>>(& self, overload_args: T) -> RetType { return overload_args.color(self); // return 1; } } pub trait QSGFlatColorMaterial_color<RetType> { fn color(self , rsthis: & QSGFlatColorMaterial) -> RetType; } // proto: const QColor & QSGFlatColorMaterial::color(); impl<'a> /*trait*/ QSGFlatColorMaterial_color<QColor> for () { fn color(self , rsthis: & QSGFlatColorMaterial) -> QColor { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZNK20QSGFlatColorMaterial5colorEv()}; let mut ret = unsafe {_ZNK20QSGFlatColorMaterial5colorEv(rsthis.qclsinst)}; let mut ret1 = QColor::inheritFrom(ret as u64); return ret1; // return 1; } } // <= body block end
extern crate santa17; use santa17::*; fn main() { let (g1, g2) = construct_graph(); let ps = read_solution(&std::env::args().nth(1).unwrap()); let mut count = vec![0; N]; let mut err = false; for i in 0..N { if ps[i] == !0 { err = true; } else { count[ps[i]] += 1; } } if err { println!("mismatch!"); } err = false; for j in 0..N { assert!(count[j] <= 1000); } for i in 0..N3 { if ps[i * 3] != ps[i * 3 + 1] || ps[i * 3] != ps[i * 3 + 2] { err = true; } } if err { println!("triple!"); } err = false; for i in 0..N2 { if ps[N3 * 3 + i * 2] != ps[N3 * 3 + i * 2 + 1] { err = true; } } if err { println!("twin!"); } let mut score1 = 0; let mut score2 = 0; for i in 0..N { for &(j, w) in &g1[i] { if j == ps[i] { score1 += w; } } for &(j, w) in &g2[i] { if j == ps[i] { score2 += w; } } } println!("{} {}", score1, score2); println!("{}", get_score(score1, score2)); }
#[doc = "Reader of register ADC3R"] pub type R = crate::R<u32, super::ADC3R>; #[doc = "Writer for register ADC3R"] pub type W = crate::W<u32, super::ADC3R>; #[doc = "Register ADC3R `reset()`'s with value 0"] impl crate::ResetValue for super::ADC3R { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `AD1TEPER`"] pub type AD1TEPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TEPER`"] pub struct AD1TEPER_W<'a> { w: &'a mut W, } impl<'a> AD1TEPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } #[doc = "Reader of field `AD1TEC4`"] pub type AD1TEC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TEC4`"] pub struct AD1TEC4_W<'a> { w: &'a mut W, } impl<'a> AD1TEC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } #[doc = "Reader of field `AD1TEC3`"] pub type AD1TEC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TEC3`"] pub struct AD1TEC3_W<'a> { w: &'a mut W, } impl<'a> AD1TEC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } #[doc = "Reader of field `AD1TEC2`"] pub type AD1TEC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TEC2`"] pub struct AD1TEC2_W<'a> { w: &'a mut W, } impl<'a> AD1TEC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } #[doc = "Reader of field `AD1TDPER`"] pub type AD1TDPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TDPER`"] pub struct AD1TDPER_W<'a> { w: &'a mut W, } impl<'a> AD1TDPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } #[doc = "Reader of field `AD1TDC4`"] pub type AD1TDC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TDC4`"] pub struct AD1TDC4_W<'a> { w: &'a mut W, } impl<'a> AD1TDC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } #[doc = "Reader of field `AD1TDC3`"] pub type AD1TDC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TDC3`"] pub struct AD1TDC3_W<'a> { w: &'a mut W, } impl<'a> AD1TDC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } #[doc = "Reader of field `AD1TDC2`"] pub type AD1TDC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TDC2`"] pub struct AD1TDC2_W<'a> { w: &'a mut W, } impl<'a> AD1TDC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } #[doc = "Reader of field `AD1TCPER`"] pub type AD1TCPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TCPER`"] pub struct AD1TCPER_W<'a> { w: &'a mut W, } impl<'a> AD1TCPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } #[doc = "Reader of field `AD1TCC4`"] pub type AD1TCC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TCC4`"] pub struct AD1TCC4_W<'a> { w: &'a mut W, } impl<'a> AD1TCC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } #[doc = "Reader of field `AD1TCC3`"] pub type AD1TCC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TCC3`"] pub struct AD1TCC3_W<'a> { w: &'a mut W, } impl<'a> AD1TCC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } #[doc = "Reader of field `AD1TCC2`"] pub type AD1TCC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TCC2`"] pub struct AD1TCC2_W<'a> { w: &'a mut W, } impl<'a> AD1TCC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } #[doc = "Reader of field `AD1TBRST`"] pub type AD1TBRST_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TBRST`"] pub struct AD1TBRST_W<'a> { w: &'a mut W, } impl<'a> AD1TBRST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } #[doc = "Reader of field `AD1TBPER`"] pub type AD1TBPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TBPER`"] pub struct AD1TBPER_W<'a> { w: &'a mut W, } impl<'a> AD1TBPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } #[doc = "Reader of field `AD1TBC4`"] pub type AD1TBC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TBC4`"] pub struct AD1TBC4_W<'a> { w: &'a mut W, } impl<'a> AD1TBC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } #[doc = "Reader of field `AD1TBC3`"] pub type AD1TBC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TBC3`"] pub struct AD1TBC3_W<'a> { w: &'a mut W, } impl<'a> AD1TBC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } #[doc = "Reader of field `AD1TBC2`"] pub type AD1TBC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TBC2`"] pub struct AD1TBC2_W<'a> { w: &'a mut W, } impl<'a> AD1TBC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } #[doc = "Reader of field `AD1TARST`"] pub type AD1TARST_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TARST`"] pub struct AD1TARST_W<'a> { w: &'a mut W, } impl<'a> AD1TARST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } #[doc = "Reader of field `AD1TAPER`"] pub type AD1TAPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TAPER`"] pub struct AD1TAPER_W<'a> { w: &'a mut W, } impl<'a> AD1TAPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } #[doc = "Reader of field `AD1TAC4`"] pub type AD1TAC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TAC4`"] pub struct AD1TAC4_W<'a> { w: &'a mut W, } impl<'a> AD1TAC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } #[doc = "Reader of field `AD1TAC3`"] pub type AD1TAC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TAC3`"] pub struct AD1TAC3_W<'a> { w: &'a mut W, } impl<'a> AD1TAC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `AD1TAC2`"] pub type AD1TAC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1TAC2`"] pub struct AD1TAC2_W<'a> { w: &'a mut W, } impl<'a> AD1TAC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `AD1EEV5`"] pub type AD1EEV5_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1EEV5`"] pub struct AD1EEV5_W<'a> { w: &'a mut W, } impl<'a> AD1EEV5_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `AD1EEV4`"] pub type AD1EEV4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1EEV4`"] pub struct AD1EEV4_W<'a> { w: &'a mut W, } impl<'a> AD1EEV4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } #[doc = "Reader of field `AD1EEV3`"] pub type AD1EEV3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1EEV3`"] pub struct AD1EEV3_W<'a> { w: &'a mut W, } impl<'a> AD1EEV3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } #[doc = "Reader of field `AD1EEV2`"] pub type AD1EEV2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1EEV2`"] pub struct AD1EEV2_W<'a> { w: &'a mut W, } impl<'a> AD1EEV2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } #[doc = "Reader of field `AD1EEV1`"] pub type AD1EEV1_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1EEV1`"] pub struct AD1EEV1_W<'a> { w: &'a mut W, } impl<'a> AD1EEV1_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } #[doc = "Reader of field `AD1MPER`"] pub type AD1MPER_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1MPER`"] pub struct AD1MPER_W<'a> { w: &'a mut W, } impl<'a> AD1MPER_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } #[doc = "Reader of field `AD1MC4`"] pub type AD1MC4_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1MC4`"] pub struct AD1MC4_W<'a> { w: &'a mut W, } impl<'a> AD1MC4_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } #[doc = "Reader of field `AD1MC3`"] pub type AD1MC3_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1MC3`"] pub struct AD1MC3_W<'a> { w: &'a mut W, } impl<'a> AD1MC3_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `AD1MC2`"] pub type AD1MC2_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1MC2`"] pub struct AD1MC2_W<'a> { w: &'a mut W, } impl<'a> AD1MC2_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } #[doc = "Reader of field `AD1MC1`"] pub type AD1MC1_R = crate::R<bool, bool>; #[doc = "Write proxy for field `AD1MC1`"] pub struct AD1MC1_W<'a> { w: &'a mut W, } impl<'a> AD1MC1_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { #[doc = "Bit 31 - AD1TEPER"] #[inline(always)] pub fn ad1teper(&self) -> AD1TEPER_R { AD1TEPER_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - AD1TEC4"] #[inline(always)] pub fn ad1tec4(&self) -> AD1TEC4_R { AD1TEC4_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 29 - AD1TEC3"] #[inline(always)] pub fn ad1tec3(&self) -> AD1TEC3_R { AD1TEC3_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 28 - AD1TEC2"] #[inline(always)] pub fn ad1tec2(&self) -> AD1TEC2_R { AD1TEC2_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 27 - AD1TDPER"] #[inline(always)] pub fn ad1tdper(&self) -> AD1TDPER_R { AD1TDPER_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 26 - AD1TDC4"] #[inline(always)] pub fn ad1tdc4(&self) -> AD1TDC4_R { AD1TDC4_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 25 - AD1TDC3"] #[inline(always)] pub fn ad1tdc3(&self) -> AD1TDC3_R { AD1TDC3_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 24 - AD1TDC2"] #[inline(always)] pub fn ad1tdc2(&self) -> AD1TDC2_R { AD1TDC2_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 23 - AD1TCPER"] #[inline(always)] pub fn ad1tcper(&self) -> AD1TCPER_R { AD1TCPER_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 22 - AD1TCC4"] #[inline(always)] pub fn ad1tcc4(&self) -> AD1TCC4_R { AD1TCC4_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 21 - AD1TCC3"] #[inline(always)] pub fn ad1tcc3(&self) -> AD1TCC3_R { AD1TCC3_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - AD1TCC2"] #[inline(always)] pub fn ad1tcc2(&self) -> AD1TCC2_R { AD1TCC2_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 19 - AD1TBRST"] #[inline(always)] pub fn ad1tbrst(&self) -> AD1TBRST_R { AD1TBRST_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 18 - AD1TBPER"] #[inline(always)] pub fn ad1tbper(&self) -> AD1TBPER_R { AD1TBPER_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 17 - AD1TBC4"] #[inline(always)] pub fn ad1tbc4(&self) -> AD1TBC4_R { AD1TBC4_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - AD1TBC3"] #[inline(always)] pub fn ad1tbc3(&self) -> AD1TBC3_R { AD1TBC3_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - AD1TBC2"] #[inline(always)] pub fn ad1tbc2(&self) -> AD1TBC2_R { AD1TBC2_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - AD1TARST"] #[inline(always)] pub fn ad1tarst(&self) -> AD1TARST_R { AD1TARST_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - AD1TAPER"] #[inline(always)] pub fn ad1taper(&self) -> AD1TAPER_R { AD1TAPER_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - AD1TAC4"] #[inline(always)] pub fn ad1tac4(&self) -> AD1TAC4_R { AD1TAC4_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - AD1TAC3"] #[inline(always)] pub fn ad1tac3(&self) -> AD1TAC3_R { AD1TAC3_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - AD1TAC2"] #[inline(always)] pub fn ad1tac2(&self) -> AD1TAC2_R { AD1TAC2_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - AD1EEV5"] #[inline(always)] pub fn ad1eev5(&self) -> AD1EEV5_R { AD1EEV5_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - AD1EEV4"] #[inline(always)] pub fn ad1eev4(&self) -> AD1EEV4_R { AD1EEV4_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - AD1EEV3"] #[inline(always)] pub fn ad1eev3(&self) -> AD1EEV3_R { AD1EEV3_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - AD1EEV2"] #[inline(always)] pub fn ad1eev2(&self) -> AD1EEV2_R { AD1EEV2_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - AD1EEV1"] #[inline(always)] pub fn ad1eev1(&self) -> AD1EEV1_R { AD1EEV1_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - AD1MPER"] #[inline(always)] pub fn ad1mper(&self) -> AD1MPER_R { AD1MPER_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - AD1MC4"] #[inline(always)] pub fn ad1mc4(&self) -> AD1MC4_R { AD1MC4_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - AD1MC3"] #[inline(always)] pub fn ad1mc3(&self) -> AD1MC3_R { AD1MC3_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - AD1MC2"] #[inline(always)] pub fn ad1mc2(&self) -> AD1MC2_R { AD1MC2_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - AD1MC1"] #[inline(always)] pub fn ad1mc1(&self) -> AD1MC1_R { AD1MC1_R::new((self.bits & 0x01) != 0) } } impl W { #[doc = "Bit 31 - AD1TEPER"] #[inline(always)] pub fn ad1teper(&mut self) -> AD1TEPER_W { AD1TEPER_W { w: self } } #[doc = "Bit 30 - AD1TEC4"] #[inline(always)] pub fn ad1tec4(&mut self) -> AD1TEC4_W { AD1TEC4_W { w: self } } #[doc = "Bit 29 - AD1TEC3"] #[inline(always)] pub fn ad1tec3(&mut self) -> AD1TEC3_W { AD1TEC3_W { w: self } } #[doc = "Bit 28 - AD1TEC2"] #[inline(always)] pub fn ad1tec2(&mut self) -> AD1TEC2_W { AD1TEC2_W { w: self } } #[doc = "Bit 27 - AD1TDPER"] #[inline(always)] pub fn ad1tdper(&mut self) -> AD1TDPER_W { AD1TDPER_W { w: self } } #[doc = "Bit 26 - AD1TDC4"] #[inline(always)] pub fn ad1tdc4(&mut self) -> AD1TDC4_W { AD1TDC4_W { w: self } } #[doc = "Bit 25 - AD1TDC3"] #[inline(always)] pub fn ad1tdc3(&mut self) -> AD1TDC3_W { AD1TDC3_W { w: self } } #[doc = "Bit 24 - AD1TDC2"] #[inline(always)] pub fn ad1tdc2(&mut self) -> AD1TDC2_W { AD1TDC2_W { w: self } } #[doc = "Bit 23 - AD1TCPER"] #[inline(always)] pub fn ad1tcper(&mut self) -> AD1TCPER_W { AD1TCPER_W { w: self } } #[doc = "Bit 22 - AD1TCC4"] #[inline(always)] pub fn ad1tcc4(&mut self) -> AD1TCC4_W { AD1TCC4_W { w: self } } #[doc = "Bit 21 - AD1TCC3"] #[inline(always)] pub fn ad1tcc3(&mut self) -> AD1TCC3_W { AD1TCC3_W { w: self } } #[doc = "Bit 20 - AD1TCC2"] #[inline(always)] pub fn ad1tcc2(&mut self) -> AD1TCC2_W { AD1TCC2_W { w: self } } #[doc = "Bit 19 - AD1TBRST"] #[inline(always)] pub fn ad1tbrst(&mut self) -> AD1TBRST_W { AD1TBRST_W { w: self } } #[doc = "Bit 18 - AD1TBPER"] #[inline(always)] pub fn ad1tbper(&mut self) -> AD1TBPER_W { AD1TBPER_W { w: self } } #[doc = "Bit 17 - AD1TBC4"] #[inline(always)] pub fn ad1tbc4(&mut self) -> AD1TBC4_W { AD1TBC4_W { w: self } } #[doc = "Bit 16 - AD1TBC3"] #[inline(always)] pub fn ad1tbc3(&mut self) -> AD1TBC3_W { AD1TBC3_W { w: self } } #[doc = "Bit 15 - AD1TBC2"] #[inline(always)] pub fn ad1tbc2(&mut self) -> AD1TBC2_W { AD1TBC2_W { w: self } } #[doc = "Bit 14 - AD1TARST"] #[inline(always)] pub fn ad1tarst(&mut self) -> AD1TARST_W { AD1TARST_W { w: self } } #[doc = "Bit 13 - AD1TAPER"] #[inline(always)] pub fn ad1taper(&mut self) -> AD1TAPER_W { AD1TAPER_W { w: self } } #[doc = "Bit 12 - AD1TAC4"] #[inline(always)] pub fn ad1tac4(&mut self) -> AD1TAC4_W { AD1TAC4_W { w: self } } #[doc = "Bit 11 - AD1TAC3"] #[inline(always)] pub fn ad1tac3(&mut self) -> AD1TAC3_W { AD1TAC3_W { w: self } } #[doc = "Bit 10 - AD1TAC2"] #[inline(always)] pub fn ad1tac2(&mut self) -> AD1TAC2_W { AD1TAC2_W { w: self } } #[doc = "Bit 9 - AD1EEV5"] #[inline(always)] pub fn ad1eev5(&mut self) -> AD1EEV5_W { AD1EEV5_W { w: self } } #[doc = "Bit 8 - AD1EEV4"] #[inline(always)] pub fn ad1eev4(&mut self) -> AD1EEV4_W { AD1EEV4_W { w: self } } #[doc = "Bit 7 - AD1EEV3"] #[inline(always)] pub fn ad1eev3(&mut self) -> AD1EEV3_W { AD1EEV3_W { w: self } } #[doc = "Bit 6 - AD1EEV2"] #[inline(always)] pub fn ad1eev2(&mut self) -> AD1EEV2_W { AD1EEV2_W { w: self } } #[doc = "Bit 5 - AD1EEV1"] #[inline(always)] pub fn ad1eev1(&mut self) -> AD1EEV1_W { AD1EEV1_W { w: self } } #[doc = "Bit 4 - AD1MPER"] #[inline(always)] pub fn ad1mper(&mut self) -> AD1MPER_W { AD1MPER_W { w: self } } #[doc = "Bit 3 - AD1MC4"] #[inline(always)] pub fn ad1mc4(&mut self) -> AD1MC4_W { AD1MC4_W { w: self } } #[doc = "Bit 2 - AD1MC3"] #[inline(always)] pub fn ad1mc3(&mut self) -> AD1MC3_W { AD1MC3_W { w: self } } #[doc = "Bit 1 - AD1MC2"] #[inline(always)] pub fn ad1mc2(&mut self) -> AD1MC2_W { AD1MC2_W { w: self } } #[doc = "Bit 0 - AD1MC1"] #[inline(always)] pub fn ad1mc1(&mut self) -> AD1MC1_W { AD1MC1_W { w: self } } }
//! `builtins` contains built-in function definitions. use crate::interpreter::{Environment, InterpreterError, Value}; use std::rc::Rc; /// Add the built-in functions (defined in this module – `builtin`) to an `Environment`. pub fn add_builtins_to_environment(env: &mut Environment) { env.set("+".to_string(), Rc::new(Value::Builtin(builtin_add))); env.set("-".to_string(), Rc::new(Value::Builtin(builtin_sub))); env.set("*".to_string(), Rc::new(Value::Builtin(builtin_mul))); env.set("=".to_string(), Rc::new(Value::Builtin(builtin_equals))); env.set( ">".to_string(), Rc::new(Value::Builtin(builtin_is_greater_than)), ); env.set( "<".to_string(), Rc::new(Value::Builtin(builtin_is_less_than)), ); env.set("print".to_string(), Rc::new(Value::Builtin(builtin_print))); } type Arguments = Vec<Rc<Value>>; type Return = Result<Rc<Value>, InterpreterError>; // Name: "=". fn builtin_equals(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: "=", got: args.len(), takes: "2", }); } let equal = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) if l == r => true, _ => false, }; Ok(Rc::new(Value::Integer(if equal { 1 } else { 0 }))) } // Name: "+". fn builtin_add(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: "+", got: args.len(), takes: "2", }); } let value = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) => Value::Integer(l + r), (Value::Integer(_), invalid) => { return Err(InterpreterError::BuiltinTypeError { name: "+", expected: "int", found: invalid.type_name(), }) } (invalid, Value::Integer(_)) => { return Err(InterpreterError::BuiltinTypeError { name: "+", expected: "int", found: invalid.type_name(), }) } _ => { return Err(InterpreterError::BuiltinTypeError { name: "+", expected: "two integers", found: "something non-integer", }) } }; Ok(Rc::new(value)) } // Name: "-". fn builtin_sub(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: "-", got: args.len(), takes: "2", }); } let value = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) => Value::Integer(l - r), (Value::Integer(_), invalid) => { return Err(InterpreterError::BuiltinTypeError { name: "-", expected: "int", found: invalid.type_name(), }) } (invalid, Value::Integer(_)) => { return Err(InterpreterError::BuiltinTypeError { name: "-", expected: "int", found: invalid.type_name(), }) } _ => { return Err(InterpreterError::BuiltinTypeError { name: "-", expected: "two integers", found: "something non-integer", }) } }; Ok(Rc::new(value)) } // Name: "*". fn builtin_mul(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: "*", got: args.len(), takes: "2", }); } let value = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) => Value::Integer(l * r), (Value::Integer(_), invalid) => { return Err(InterpreterError::BuiltinTypeError { name: "*", expected: "int", found: invalid.type_name(), }) } (invalid, Value::Integer(_)) => { return Err(InterpreterError::BuiltinTypeError { name: "*", expected: "int", found: invalid.type_name(), }) } _ => { return Err(InterpreterError::BuiltinTypeError { name: "*", expected: "two integers", found: "?", }) } }; Ok(Rc::new(value)) } // Name: "print". fn builtin_print(args: Arguments) -> Return { for (i, arg) in args.iter().enumerate() { if i != 0 { print!(" "); } print!("{}", arg); } println!(); Ok(Rc::new(Value::Integer(0))) } // Name: ">". fn builtin_is_greater_than(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: ">", got: args.len(), takes: "2", }); } let is_greater = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) => l > r, _ => false, }; Ok(Rc::new(Value::Integer(if is_greater { 1 } else { 0 }))) } // Name "<". fn builtin_is_less_than(args: Arguments) -> Return { if args.len() != 2 { return Err(InterpreterError::BuiltinArgumentError { name: "<", got: args.len(), takes: "2", }); } let is_less = match (&*args[0], &*args[1]) { (Value::Integer(l), Value::Integer(r)) => l < r, _ => false, }; Ok(Rc::new(Value::Integer(if is_less { 1 } else { 0 }))) }
//! Linux auxv support, for Mustang. //! //! # Safety //! //! This uses raw pointers to locate and read the kernel-provided auxv array. #![allow(unsafe_code)] use crate::backend::c; use crate::backend::elf::*; #[cfg(feature = "param")] use crate::ffi::CStr; use core::ffi::c_void; use core::mem::size_of; use core::ptr::{null, read}; #[cfg(feature = "runtime")] use core::slice; use linux_raw_sys::general::{ AT_CLKTCK, AT_EXECFN, AT_HWCAP, AT_HWCAP2, AT_NULL, AT_PAGESZ, AT_PHDR, AT_PHENT, AT_PHNUM, AT_SYSINFO_EHDR, }; #[cfg(feature = "param")] #[inline] pub(crate) fn page_size() -> usize { // SAFETY: This is initialized during program startup. unsafe { PAGE_SIZE } } #[cfg(feature = "param")] #[inline] pub(crate) fn clock_ticks_per_second() -> u64 { // SAFETY: This is initialized during program startup. unsafe { CLOCK_TICKS_PER_SECOND as u64 } } #[cfg(feature = "param")] #[inline] pub(crate) fn linux_hwcap() -> (usize, usize) { // SAFETY: This is initialized during program startup. unsafe { (HWCAP, HWCAP2) } } #[cfg(feature = "param")] #[inline] pub(crate) fn linux_execfn() -> &'static CStr { // SAFETY: This is initialized during program startup. And we // assume it's a valid pointer to a NUL-terminated string. unsafe { CStr::from_ptr(EXECFN.0.cast()) } } #[cfg(feature = "runtime")] #[inline] pub(crate) fn exe_phdrs() -> (*const c_void, usize) { // SAFETY: This is initialized during program startup. unsafe { (PHDR.0.cast(), PHNUM) } } #[cfg(feature = "runtime")] #[inline] pub(in super::super) fn exe_phdrs_slice() -> &'static [Elf_Phdr] { let (phdr, phnum) = exe_phdrs(); // SAFETY: We assume the `AT_PHDR` and `AT_PHNUM` values provided by the // kernel form a valid slice. unsafe { slice::from_raw_parts(phdr.cast(), phnum) } } /// `AT_SYSINFO_EHDR` isn't present on all platforms in all configurations, /// so if we don't see it, this function returns a null pointer. #[inline] pub(in super::super) fn sysinfo_ehdr() -> *const Elf_Ehdr { // SAFETY: This is initialized during program startup. unsafe { SYSINFO_EHDR.0 } } /// A const pointer to `T` that implements [`Sync`]. #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SyncConstPtr<T>(*const T); unsafe impl<T> Sync for SyncConstPtr<T> {} impl<T> SyncConstPtr<T> { /// Creates a `SyncConstPointer` from a raw pointer. /// /// Behavior is undefined if `ptr` is actually not /// safe to share across threads. pub const unsafe fn new(ptr: *const T) -> Self { Self(ptr) } } static mut PAGE_SIZE: usize = 0; static mut CLOCK_TICKS_PER_SECOND: usize = 0; static mut HWCAP: usize = 0; static mut HWCAP2: usize = 0; static mut SYSINFO_EHDR: SyncConstPtr<Elf_Ehdr> = unsafe { SyncConstPtr::new(null()) }; static mut PHDR: SyncConstPtr<Elf_Phdr> = unsafe { SyncConstPtr::new(null()) }; static mut PHNUM: usize = 0; static mut EXECFN: SyncConstPtr<c::c_char> = unsafe { SyncConstPtr::new(null()) }; /// On mustang, we export a function to be called during initialization, and /// passed a pointer to the original environment variable block set up by the /// OS. pub(crate) unsafe fn init(envp: *mut *mut u8) { init_from_envp(envp); } /// # Safety /// /// This must be passed a pointer to the environment variable buffer /// provided by the kernel, which is followed in memory by the auxv array. unsafe fn init_from_envp(mut envp: *mut *mut u8) { while !(*envp).is_null() { envp = envp.add(1); } init_from_auxp(envp.add(1).cast()) } /// Process auxv entries from the auxv array pointed to by `auxp`. /// /// # Safety /// /// This must be passed a pointer to an auxv array. /// /// The buffer contains `Elf_aux_t` elements, though it need not be aligned; /// function uses `read_unaligned` to read from it. unsafe fn init_from_auxp(mut auxp: *const Elf_auxv_t) { loop { let Elf_auxv_t { a_type, a_val } = read(auxp); match a_type as _ { AT_PAGESZ => PAGE_SIZE = a_val as usize, AT_CLKTCK => CLOCK_TICKS_PER_SECOND = a_val as usize, AT_HWCAP => HWCAP = a_val as usize, AT_HWCAP2 => HWCAP2 = a_val as usize, AT_PHDR => PHDR = SyncConstPtr::new(a_val.cast::<Elf_Phdr>()), AT_PHNUM => PHNUM = a_val as usize, AT_PHENT => assert_eq!(a_val as usize, size_of::<Elf_Phdr>()), AT_EXECFN => EXECFN = SyncConstPtr::new(a_val.cast::<c::c_char>()), AT_SYSINFO_EHDR => SYSINFO_EHDR = SyncConstPtr::new(a_val.cast::<Elf_Ehdr>()), AT_NULL => break, _ => (), } auxp = auxp.add(1); } } // ELF ABI #[repr(C)] #[derive(Copy, Clone)] struct Elf_auxv_t { a_type: usize, // Some of the values in the auxv array are pointers, so we make `a_val` a // pointer, in order to preserve their provenance. For the values which are // integers, we cast this to `usize`. a_val: *const c_void, }
mod me_state_machine; pub mod rpc_server;
// auto generated, do not modify. // created: Mon Feb 22 23:57:02 2016 // src-file: /QtCore/qshareddata.h // dst-file: /src/core/qshareddata.rs // // header block begin => #![feature(libc)] #![feature(core)] #![feature(collections)] extern crate libc; use self::libc::*; // <= header block end // main block begin => // <= main block end // use block begin => use std::ops::Deref; // <= use block end // ext block begin => // #[link(name = "Qt5Core")] // #[link(name = "Qt5Gui")] // #[link(name = "Qt5Widgets")] // #[link(name = "QtInline")] extern { fn QSharedData_Class_Size() -> c_int; // proto: void QSharedData::QSharedData(); fn C_ZN11QSharedDataC2Ev() -> u64; // proto: void QSharedData::QSharedData(const QSharedData & ); fn C_ZN11QSharedDataC2ERKS_(arg0: *mut c_void) -> u64; } // <= ext block end // body block begin => // class sizeof(QSharedData)=1 #[derive(Default)] pub struct QSharedData { // qbase: None, pub qclsinst: u64 /* *mut c_void*/, } impl /*struct*/ QSharedData { pub fn inheritFrom(qthis: u64 /* *mut c_void*/) -> QSharedData { return QSharedData{qclsinst: qthis, ..Default::default()}; } } // proto: void QSharedData::QSharedData(); impl /*struct*/ QSharedData { pub fn new<T: QSharedData_new>(value: T) -> QSharedData { let rsthis = value.new(); return rsthis; // return 1; } } pub trait QSharedData_new { fn new(self) -> QSharedData; } // proto: void QSharedData::QSharedData(); impl<'a> /*trait*/ QSharedData_new for () { fn new(self) -> QSharedData { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZN11QSharedDataC2Ev()}; let ctysz: c_int = unsafe{QSharedData_Class_Size()}; let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64; let qthis: u64 = unsafe {C_ZN11QSharedDataC2Ev()}; let rsthis = QSharedData{qclsinst: qthis, ..Default::default()}; return rsthis; // return 1; } } // proto: void QSharedData::QSharedData(const QSharedData & ); impl<'a> /*trait*/ QSharedData_new for (&'a QSharedData) { fn new(self) -> QSharedData { // let qthis: *mut c_void = unsafe{calloc(1, 32)}; // unsafe{_ZN11QSharedDataC2ERKS_()}; let ctysz: c_int = unsafe{QSharedData_Class_Size()}; let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64; let arg0 = self.qclsinst as *mut c_void; let qthis: u64 = unsafe {C_ZN11QSharedDataC2ERKS_(arg0)}; let rsthis = QSharedData{qclsinst: qthis, ..Default::default()}; return rsthis; // return 1; } } // <= body block end
use super::*; use crate::{prefix_type::PrefixRefTrait, utils::leak_value}; /// The root module of a dynamic library, /// which may contain other modules,function pointers,and static references. /// /// /// # Examples /// /// For a more in-context example of a type implementing this trait you can look /// at either the example in the readme for this crate, /// or the `example/example_*_interface` crates in this crates' repository . /// /// ### Basic /// /// ```rust /// use abi_stable::{library::RootModule, sabi_types::VersionStrings, StableAbi}; /// /// #[repr(C)] /// #[derive(StableAbi)] /// #[sabi(kind(Prefix(prefix_ref = Module_Ref, prefix_fields = Module_Prefix)))] /// pub struct Module { /// pub first: u8, /// // The `#[sabi(last_prefix_field)]` attribute here means that this is /// // the last field in this module that was defined in the /// // first compatible version of the library, /// #[sabi(last_prefix_field)] /// pub second: u16, /// pub third: u32, /// } /// impl RootModule for Module_Ref { /// abi_stable::declare_root_module_statics! {Module_Ref} /// const BASE_NAME: &'static str = "example_root_module"; /// const NAME: &'static str = "example_root_module"; /// const VERSION_STRINGS: VersionStrings = abi_stable::package_version_strings!(); /// } /// /// # fn main(){} /// ``` pub trait RootModule: Sized + StableAbi + PrefixRefTrait + 'static { /// The name of the dynamic library,which is the same on all platforms. /// This is generally the name of the `implementation crate`. const BASE_NAME: &'static str; /// The name of the library used in error messages. const NAME: &'static str; /// The version number of the library that this is a root module of. /// /// Initialize this with /// [`package_version_strings!()`](../macro.package_version_strings.html) const VERSION_STRINGS: VersionStrings; /// All the constants of this trait and supertraits. /// /// It can safely be used as a proxy for the associated constants of this trait. const CONSTANTS: RootModuleConsts = RootModuleConsts { base_name: RStr::from_str(Self::BASE_NAME), name: RStr::from_str(Self::NAME), version_strings: Self::VERSION_STRINGS, layout: IsLayoutChecked::Yes(<Self as StableAbi>::LAYOUT), c_abi_testing_fns: crate::library::c_abi_testing::C_ABI_TESTING_FNS, _priv: (), }; /// Like `Self::CONSTANTS`, /// except without including the type layout constant for the root module. const CONSTANTS_NO_ABI_INFO: RootModuleConsts = RootModuleConsts { layout: IsLayoutChecked::No, ..Self::CONSTANTS }; /// Gets the statics for Self. /// /// To define this associated function use: /// [`abi_stable::declare_root_module_statics!{TypeOfSelf}` /// ](../macro.declare_root_module_statics.html). /// Passing `Self` instead of `TypeOfSelf` won't work. /// fn root_module_statics() -> &'static RootModuleStatics<Self>; /// Gets the root module,returning None if the module is not yet loaded. #[inline] fn get_module() -> Option<Self> { Self::root_module_statics().root_mod.get() } /// Gets the RawLibrary of the module, /// returning None if the dynamic library failed to load /// (it doesn't exist or layout checking failed). /// /// Note that if the root module is initialized using `Self::load_module_with`, /// this will return None even though `Self::get_module` does not. /// #[inline] fn get_raw_library() -> Option<&'static RawLibrary> { Self::root_module_statics().raw_lib.get() } /// Returns the path the library would be loaded from,given a directory(folder). fn get_library_path(directory: &Path) -> PathBuf { let base_name = Self::BASE_NAME; RawLibrary::path_in_directory(directory, base_name, LibrarySuffix::NoSuffix) } /// Loads the root module,with a closure which either /// returns the root module or an error. /// /// If the root module was already loaded, /// this will return the already loaded root module, /// without calling the closure. fn load_module_with<F, E>(f: F) -> Result<Self, E> where F: FnOnce() -> Result<Self, E>, { Self::root_module_statics().root_mod.try_init(f) } /// Loads this module from the path specified by `where_`, /// first loading the dynamic library if it wasn't already loaded. /// /// Once the root module is loaded, /// this will return the already loaded root module. /// /// # Warning /// /// If this function is called within a dynamic library, /// it must be called either within the root module loader function or /// after that function has been called. /// /// **DO NOT** call this in the static initializer of a dynamic library, /// since this library relies on setting up its global state before /// calling the root module loader. /// /// # Errors /// /// This will return these errors: /// /// - `LibraryError::OpenError`: /// If the dynamic library itself could not be loaded. /// /// - `LibraryError::GetSymbolError`: /// If the root module was not exported. /// /// - `LibraryError::InvalidAbiHeader`: /// If the abi_stable version used by the library is not compatible. /// /// - `LibraryError::ParseVersionError`: /// If the version strings in the library can't be parsed as version numbers, /// this can only happen if the version strings are manually constructed. /// /// - `LibraryError::IncompatibleVersionNumber`: /// If the version number of the library is incompatible. /// /// - `LibraryError::AbiInstability`: /// If the layout of the root module is not the expected one. /// /// - `LibraryError::RootModule` : /// If the root module initializer returned an error or panicked. /// fn load_from(where_: LibraryPath<'_>) -> Result<Self, LibraryError> { let statics = Self::root_module_statics(); statics.root_mod.try_init(|| { let lib = statics.raw_lib.try_init(|| -> Result<_, LibraryError> { let raw_library = load_raw_library::<Self>(where_)?; // if the library isn't leaked // it would cause any use of the module to be a use after free. // // By leaking the library // this allows the root module loader to do anything that'd prevent // sound library unloading. Ok(leak_value(raw_library)) })?; let items = unsafe { lib_header_from_raw_library(lib)? }; items.ensure_layout::<Self>()?; // safety: the layout was checked in the code above, unsafe { items .init_root_module_with_unchecked_layout::<Self>()? .initialization() } }) } /// Loads this module from the directory specified by `where_`, /// first loading the dynamic library if it wasn't already loaded. /// /// Once the root module is loaded, /// this will return the already loaded root module. /// /// Warnings and Errors are detailed in [`load_from`](#method.load_from), /// fn load_from_directory(where_: &Path) -> Result<Self, LibraryError> { Self::load_from(LibraryPath::Directory(where_)) } /// Loads this module from the file at `path_`, /// first loading the dynamic library if it wasn't already loaded. /// /// Once the root module is loaded, /// this will return the already loaded root module. /// /// Warnings and Errors are detailed in [`load_from`](#method.load_from), /// fn load_from_file(path_: &Path) -> Result<Self, LibraryError> { Self::load_from(LibraryPath::FullPath(path_)) } /// Defines behavior that happens once the module is loaded. /// /// This is ran in the `RootModule::load*` associated functions /// after the root module has succesfully been loaded. /// /// The default implementation does nothing. fn initialization(self) -> Result<Self, LibraryError> { Ok(self) } } /// Loads the raw library at `where_` fn load_raw_library<M>(where_: LibraryPath<'_>) -> Result<RawLibrary, LibraryError> where M: RootModule, { let path = match where_ { LibraryPath::Directory(directory) => M::get_library_path(directory), LibraryPath::FullPath(full_path) => full_path.to_owned(), }; RawLibrary::load_at(&path) } /// Gets the LibHeader of a library. /// /// # Errors /// /// This will return these errors: /// /// - `LibraryError::GetSymbolError`: /// If the root module was not exported. /// /// - `LibraryError::InvalidAbiHeader`: /// If the abi_stable used by the library is not compatible. /// /// # Safety /// /// The LibHeader is implicitly tied to the lifetime of the library, /// it will contain dangling `'static` references if the library is dropped before it does. /// /// pub unsafe fn lib_header_from_raw_library( raw_library: &RawLibrary, ) -> Result<&'static LibHeader, LibraryError> { unsafe { abi_header_from_raw_library(raw_library)?.upgrade() } } /// Gets the AbiHeaderRef of a library. /// /// # Errors /// /// This will return these errors: /// /// - `LibraryError::GetSymbolError`: /// If the root module was not exported. /// /// # Safety /// /// The AbiHeaderRef is implicitly tied to the lifetime of the library, /// it will contain dangling `'static` references if the library is dropped before it does. /// /// pub unsafe fn abi_header_from_raw_library( raw_library: &RawLibrary, ) -> Result<AbiHeaderRef, LibraryError> { let mangled = ROOT_MODULE_LOADER_NAME_WITH_NUL; let header: AbiHeaderRef = unsafe { *raw_library.get::<AbiHeaderRef>(mangled.as_bytes())? }; Ok(header) } /// Gets the LibHeader of the library at the path. /// /// This leaks the underlying dynamic library, /// if you need to do this without leaking you'll need to use /// `lib_header_from_raw_library` instead. /// /// # Errors /// /// This will return these errors: /// /// - `LibraryError::OpenError`: /// If the dynamic library itself could not be loaded. /// /// - `LibraryError::GetSymbolError`: /// If the root module was not exported. /// /// - `LibraryError::InvalidAbiHeader`: /// If the abi_stable version used by the library is not compatible. /// /// pub fn lib_header_from_path(path: &Path) -> Result<&'static LibHeader, LibraryError> { let raw_lib = RawLibrary::load_at(path)?; let library_getter = unsafe { lib_header_from_raw_library(&raw_lib)? }; mem::forget(raw_lib); Ok(library_getter) } /// Gets the AbiHeaderRef of the library at the path. /// /// This leaks the underlying dynamic library, /// if you need to do this without leaking you'll need to use /// `lib_header_from_raw_library` instead. /// /// # Errors /// /// This will return these errors: /// /// - `LibraryError::OpenError`: /// If the dynamic library itself could not be loaded. /// /// - `LibraryError::GetSymbolError`: /// If the root module was not exported. /// /// pub fn abi_header_from_path(path: &Path) -> Result<AbiHeaderRef, LibraryError> { let raw_lib = RawLibrary::load_at(path)?; let library_getter = unsafe { abi_header_from_raw_library(&raw_lib)? }; mem::forget(raw_lib); Ok(library_getter) } ////////////////////////////////////////////////////////////////////// macro_rules! declare_root_module_consts { ( fields=[ $( $(#[$field_meta:meta])* method_docs=$method_docs:expr, $field:ident : $field_ty:ty ),* $(,)* ] ) => ( /// All the constants of the [`RootModule`] trait for some erased type. /// /// [`RootModule`]: ./trait.RootModule.html #[repr(C)] #[derive(StableAbi,Copy,Clone)] pub struct RootModuleConsts{ $( $(#[$field_meta])* $field : $field_ty, )* _priv:(), } impl RootModuleConsts{ $( #[doc=$method_docs] pub const fn $field(&self)->$field_ty{ self.$field } )* } ) } declare_root_module_consts! { fields=[ method_docs=" The name of the dynamic library,which is the same on all platforms. This is generally the name of the implementation crate.", base_name: RStr<'static>, method_docs="The name of the library used in error messages.", name: RStr<'static>, method_docs="The version number of the library this was created from.", version_strings: VersionStrings, method_docs="The (optional) type layout constant of the root module.", layout: IsLayoutChecked, method_docs="\ Functions used to test that the C abi is the same in both the library and the loader\ ", c_abi_testing_fns:&'static CAbiTestingFns, ] }
use atoms::{Location, Token}; use traits::HasLocation; /// /// A literal that is bound by some symbol. /// ie. a String literal "hello, world" or /// a char literal '. /// #[derive(Debug)] pub struct SymbolBoundLiteral { /// /// The token used as the left-hand bound /// of this token. /// pub open_symbol: Token, /// /// The tokens that make up the inside of this literal. /// pub contents: Vec<Token>, /// /// The token used as the right-hand bound /// of this token. /// pub close_symbol: Token, } impl HasLocation for SymbolBoundLiteral { fn start(&self) -> Location { self.open_symbol.start() } }
use std::fmt::Display; use async_trait::async_trait; use crate::{ error::{DynError, ErrorKind, SimpleError}, file_classification::FilesForProgress, PartitionInfo, }; use super::PostClassificationPartitionFilter; #[derive(Debug)] pub struct PossibleProgressFilter { max_parquet_bytes: usize, } impl PossibleProgressFilter { pub fn new(max_parquet_bytes: usize) -> Self { Self { max_parquet_bytes } } } impl Display for PossibleProgressFilter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "possible_progress") } } #[async_trait] impl PostClassificationPartitionFilter for PossibleProgressFilter { async fn apply( &self, partition_info: &PartitionInfo, files_to_make_progress_on: &FilesForProgress, ) -> Result<bool, DynError> { if !files_to_make_progress_on.is_empty() { // There is some files to compact or split; we can make progress Ok(true) } else { // No files means the split_compact cannot find any reasonable set of files to make progress on Err(SimpleError::new( ErrorKind::OutOfMemory, format!( "partition {} has overlapped files that exceed max compact size limit {}. \ This may happen if a large amount of data has the same timestamp", partition_info.partition_id, self.max_parquet_bytes ), ) .into()) } } } #[cfg(test)] mod tests { use std::sync::Arc; use crate::{ error::ErrorKindExt, file_classification::{CompactReason, FilesToSplitOrCompact}, test_utils::PartitionInfoBuilder, }; use iox_tests::ParquetFileBuilder; use super::*; #[test] fn test_display() { assert_eq!( PossibleProgressFilter::new(10).to_string(), "possible_progress" ); } #[tokio::test] async fn test_apply_empty() { let filter = PossibleProgressFilter::new(10); let p_info = Arc::new(PartitionInfoBuilder::new().with_partition_id(1).build()); let err = filter .apply(&p_info, &FilesForProgress::empty()) .await .unwrap_err(); assert_eq!(err.classify(), ErrorKind::OutOfMemory); assert_eq!( err.to_string(), "partition 1 has overlapped files that exceed max compact size limit 10. \ This may happen if a large amount of data has the same timestamp" ); } #[tokio::test] async fn test_apply_not_empty() { let filter = PossibleProgressFilter::new(10); let p_info = Arc::new(PartitionInfoBuilder::new().with_partition_id(1).build()); let f1 = ParquetFileBuilder::new(1).with_file_size_bytes(7).build(); let files_for_progress = FilesForProgress { upgrade: vec![], split_or_compact: FilesToSplitOrCompact::Compact( vec![f1], // This reason is arbitrary CompactReason::ManySmallFiles, ), }; assert!(filter.apply(&p_info, &files_for_progress).await.unwrap()); } }
use std::f64::EPSILON; use crate::{ config, material::Material, ray::Ray, sdf::SDF, traits::{HitRecord, Hittable}, P3, V3, }; use cgmath::{EuclideanSpace, InnerSpace, Matrix4, Transform, Transform3, Vector3}; use std::cell::Cell; use std::ops::Neg; #[derive(Debug)] pub enum ObjectData { Sphere { radius: f64 }, Plane { normal: V3 }, SDF { sdf: SDF }, } #[derive(Debug)] pub struct Object { transform: Matrix4<f64>, material: Material, odata: ObjectData, } impl From<config::Object> for Object { fn from(o: config::Object) -> Self { match o { config::Object::Sphere { material, pos, radius, } => Self { transform: Matrix4::from_translation(pos.into()), material: material.into(), odata: ObjectData::Sphere { radius }, }, config::Object::SDF { pos, sdf, material } => Self { transform: Matrix4::from_translation(pos.into()), material: material.into(), odata: ObjectData::SDF { sdf: sdf.into() }, }, config::Object::Plane { material, pos, normal, } => Self { transform: Matrix4::from_translation(pos.into()), material: material.into(), odata: ObjectData::Plane { normal: normal.into(), }, }, } } } impl From<Object> for config::Object { fn from(o: Object) -> config::Object { let material = o.material.into(); let pos = o.transform.transform_point(P3::origin()).into(); match o.odata { ObjectData::Sphere { radius } => config::Object::Sphere { radius, material, pos, }, ObjectData::Plane { normal } => config::Object::Plane { normal: normal.into(), material, pos, }, ObjectData::SDF { sdf } => config::Object::SDF { material, pos, sdf: sdf.into(), }, } } } impl Hittable for Object { fn hit(&self, ray: &Ray, tmin: f64, tmax: f64) -> Option<HitRecord> { let local_ray = ray.transformed(&self.transform); match &self.odata { ObjectData::SDF { sdf } => { let mut depth = tmin; let mut pos = local_ray.pos(); for _ in 0..1000 { let dist = sdf.sdf(pos); if dist < EPSILON { return Some(HitRecord::from_hit( ray, sdf.sdf_d(pos), depth, self.material, )); } if depth > tmax { return None; } depth += dist; pos = local_ray.at(depth); } return None; } ObjectData::Sphere { radius } => { let oc: Vector3<_> = local_ray.pos().to_vec(); let a = local_ray.dir().magnitude2(); let halfb = oc.dot(local_ray.dir()); let c = oc.magnitude2() - radius * radius; let discriminant = halfb * halfb - a * c; if discriminant < 0.0 { return None; } let sqrt = discriminant.sqrt(); let r0 = (-halfb - sqrt) / a; let r1 = (-halfb + sqrt) / a; let t = if r0 < tmin && r1 < tmin { return None; } else if r0 < tmin { r1 } else if r1 < tmin { r0 } else { if r0 < r1 { r0 } else { r1 } }; if t > tmax { None } else { Some(HitRecord::from_hit( ray, ray.at(t).to_vec() / *radius, t, self.material, )) } } ObjectData::Plane { normal } => { let denominator = normal.dot(local_ray.dir()); if denominator > f64::EPSILON { let t = local_ray.pos().to_vec().neg().dot(*normal) / denominator; if (tmin..=tmax).contains(&t) { Some(HitRecord::from_hit(ray, *normal, t, self.material)) } else { None } } else { None } } } } }
use P22::range; pub fn main() { println!("{:?}", range(4, 9)); }
use std::fs; use std::io; use std::num; use std::io::Read; use std::collections::HashSet; #[derive(Debug)] enum CliError { IoError(io::Error), ParseError(num::ParseIntError) } impl From<io::Error> for CliError { fn from(error: io::Error) -> Self { CliError::IoError(error) } } impl From<num::ParseIntError> for CliError { fn from(error: num::ParseIntError) -> Self{ CliError::ParseError(error) } } fn main() -> Result<(), CliError> { let contents = import_file_string("input.txt")?; let resulting_frequency = resulting_frequency(&contents)?; println!("Part 1: Resulting frequency: {}", resulting_frequency); let first_repeat = first_repeated_frequency(&contents)?; println!("Part 2: First repeated frequency: {}", first_repeat); Ok(()) } fn import_file_string(filename: &str) -> Result<String, CliError> { let mut contents = String::new(); fs::File::open(filename)?.read_to_string(&mut contents)?; Ok(contents) } fn resulting_frequency(input: &str) -> Result<i32, CliError> { let mut sum = 0; for line in input.lines() { let change : i32 = line.trim().parse()?; sum += change; } Ok(sum) } fn first_repeated_frequency(input: &str) -> Result<i32, CliError> { let mut sum = 0; let mut observed_frequencies: HashSet<i32> = vec!(sum).into_iter().collect(); loop { for line in input.lines() { let change : i32 = line.trim().parse()?; sum += change; let is_new = !observed_frequencies.insert(sum); if is_new { return Ok(sum); } } } } #[cfg(test)] mod tests { use super::{resulting_frequency, first_repeated_frequency}; #[test] fn test_resulting_frequency() { assert_eq!(resulting_frequency("+1\n+1\n+1").unwrap(), 3); assert_eq!(resulting_frequency("+1\n+1\n-2").unwrap(), 0); assert_eq!(resulting_frequency("-1\n-2\n-3").unwrap(), -6); } #[test] fn test_first_repeated_frequency() { assert_eq!(first_repeated_frequency("+1\n-1").unwrap(), 0); assert_eq!(first_repeated_frequency("+3\n+3\n+4\n-2\n-4").unwrap(), 10); assert_eq!(first_repeated_frequency("-6\n+3\n+8\n+5\n-6").unwrap(), 5); assert_eq!(first_repeated_frequency("+7\n+7\n-2\n-7\n-4").unwrap(), 14); } }
use super::Material; use crate::{Color, Ray, Vec3}; pub struct Metal { albedo: Color, fuzz: f64, } impl Metal { pub fn new(albedo: Color, fuzz: f64) -> Self { Self { albedo, fuzz } } } impl Material for Metal { fn scatter( &self, ray: &crate::Ray, rec: &mut crate::HitRecord, attenuation: &mut Color, scattered: &mut crate::Ray, ) -> bool { let reflected = Vec3::reflect(ray.direction().unit_vector(), rec.normal); *scattered = Ray::new(rec.p, reflected + Vec3::random_in_unit_sphere() * self.fuzz); *attenuation = self.albedo; rec.normal.dot(scattered.direction()) > 0.0 } }
//use std::io::{Read, Seek}; // //pub struct ObjMeshLoader<R: Read + Seek> { // //} // //impl<R: Read + Seek> ObjMeshLoader<R> { // //}
use std::collections::HashMap; fn main() { let (x, y) = day_3_part_1(347991); println!("{}", x.abs() + y.abs()); day_3_part_2(347991); } // Beware, math ahead. // Abandon all hope ye who enter here. // Calculates the coordinates for any number in the spiral // // 17 16 15 14 13 // 18 5 4 3 12 // 19 6 1 2 11 // 20 7 8 9 10 // 21 22 23 24 25 -> // // How it works: // // The diagnal leading south-east from the center (1) // always contains the square of the next odd number // starting from 3 (3^2 = 9, 5^2 = 25, etc) // and the coordinates of them can be found by the forumla // let square_root = odd_square.sqrt(); // let x_coord = square_root - ((square_root - 1) / 2 + 1); // let y_coord = -x; // // This forumla essentially maps the odd integers to the set of // natural numbers which allows us to explicity define the // coordinates for the squares. // // Using this knowledge, if we can know which "side" the number // we're looking for resides on, we can figure out either its // x or y coordinate immediately based on the next odd sqaure. // // The "sides" defined by this algorithm are as follows: // [1] [1] [1] [1] // 17 16 15 14 13 [0] // [2] 18 12 [0] // [2] 19 11 [0] // [2] 20 10 [0] // [2] 21 22 23 24 25 // [3] [3] [3] [3] // // (technically 25 would be considered "4", but that case is // handled easily) // // So to find the side we're working with, we first normalize // the ... I've forgotten what else to write and am tired, // you get the gist. ayy lmao fn day_3_part_1(n: u64) -> (i64, i64) { let n = n as f64; let p = n.sqrt().ceil(); let next_odd_square = if p as u64 % 2 == 0 { (p + 1.0) * (p + 1.0) } else { p * p }; let last_odd_square = (next_odd_square.sqrt() - 2.0) * (next_odd_square.sqrt() - 2.0); let nums_in_spiral = next_odd_square - (last_odd_square + 1.0); let side = ((n - (last_odd_square + 1.0)) / ((next_odd_square - (last_odd_square + 1.0)) * 0.25)) .floor(); let side_x_end = |x: f64| ((last_odd_square + 1.0) + (x * 0.25 * nums_in_spiral)).floor(); let (x, y) = match side as i64 { 0 => { let sqt = next_odd_square.sqrt() as i64; let (mut coordx, mut coordy) = ((sqt - ((sqt - 1) / 2 + 1)), 0); let diff = side_x_end(1 as f64) as i64 - (n as i64); coordy = coordx - diff; (coordx, coordy) } 1 => { let sqt = next_odd_square.sqrt() as i64; let (mut coordx, mut coordy) = (0, (sqt - ((sqt - 1) / 2 + 1))); let diff = side_x_end(2 as f64) as i64 - (n as i64); coordx = -coordy + diff; (coordx, coordy) } 2 => { let sqt = next_odd_square.sqrt() as i64; let (mut coordx, mut coordy) = (-(sqt - ((sqt - 1) / 2 + 1)), 0); let diff = side_x_end(3 as f64) as i64 - (n as i64); coordy = coordx + diff; (coordx, coordy) } 3 => { let sqt = next_odd_square.sqrt() as i64; let (mut coordx, mut coordy) = (0, -(sqt - ((sqt - 1) / 2 + 1))); let diff = side_x_end(4 as f64) as i64 - (n as i64); coordx = -coordy - diff; (coordx, coordy) } _ => { let sqt = next_odd_square.sqrt() as i64; ((sqt - ((sqt - 1) / 2 + 1)), -(sqt - ((sqt - 1) / 2 + 1))) } }; (x, y) } fn day_3_part_2(n: u64) -> u64 { enum Direction { North, East, South, West, } #[derive(Clone, Copy, Debug)] struct Point { x: i64, y: i64, } let mut larger = 0; let mut dir = Direction::East; let mut dir_count = 1; let mut spiral: HashMap<(i64, i64), u64> = HashMap::new(); spiral.insert((0, 0), 1); let mut last_coords = Point { x: 0, y: 0 }; let mut d_count = dir_count; loop { let mut new_coords = last_coords; match dir { Direction::East => { new_coords.x += 1; d_count -= 1; if d_count == 0 { dir = Direction::North; } } Direction::North => { new_coords.y += 1; d_count -= 1; if d_count == 0 { dir = Direction::West; dir_count += 1; } } Direction::South => { new_coords.y -= 1; d_count -= 1; if d_count == 0 { dir = Direction::East; dir_count += 1; } } Direction::West => { new_coords.x -= 1; d_count -= 1; if d_count == 0 { dir = Direction::South; //dir_count += 1; } } }; if d_count == 0 { d_count = dir_count; } let mut sum = 0; let left = (new_coords.x - 1, new_coords.y); let up = (new_coords.x, new_coords.y + 1); let right = (new_coords.x + 1, new_coords.y); let down = (new_coords.x, new_coords.y - 1); let left_up = (new_coords.x - 1, new_coords.y + 1); let left_down = (new_coords.x - 1, new_coords.y - 1); let right_up = (new_coords.x + 1, new_coords.y + 1); let right_down = (new_coords.x + 1, new_coords.y - 1); if let Some(v) = spiral.get(&left) { sum += v; } if let Some(v) = spiral.get(&up) { sum += v; } if let Some(v) = spiral.get(&down) { sum += v; } if let Some(v) = spiral.get(&right) { sum += v; } if let Some(v) = spiral.get(&left_up) { sum += v; } if let Some(v) = spiral.get(&left_down) { sum += v; } if let Some(v) = spiral.get(&right_up) { sum += v; } if let Some(v) = spiral.get(&right_down) { sum += v; } if sum > n { println!("{}", sum); break; } else { spiral.insert((new_coords.x, new_coords.y), sum); } last_coords = new_coords; } larger }
use crate::rand::Rng; use std::cmp::Ordering; #[macro_use] extern crate text_io; extern crate rand; fn main() { println!("Guess the number!"); let secret_number: u32 = rand::thread_rng().gen_range(1, 100); println!("Please Input your guess: "); loop { let guess: u32 = read!(); println!("You guessed: {}",guess); match guess.cmp(&secret_number) { Ordering::Less => println!("Too small :("), Ordering::Greater => println!("Too big..."), Ordering::Equal => { println!("You guessed the secret number!"); break; } } } }
use clap::{App, Arg, ArgMatches}; pub fn match_args<'a>() -> ArgMatches<'a> { return App::new("sup") .version("0.1") .author("Mahmoud G. <mhmoudgmal.89@gmail.com>") .about("TODO://") .arg( Arg::with_name("stackfile") .short("f") .long("stackfile") .value_name("FILE") .help("TODO://") .takes_value(true), ) .get_matches(); }
/* * @lc app=leetcode.cn id=563 lang=rust * * [563] 二叉树的坡度 * * https://leetcode-cn.com/problems/binary-tree-tilt/description/ * * algorithms * Easy (47.23%) * Total Accepted: 2.5K * Total Submissions: 5.3K * Testcase Example: '[1,2,3]' * * 给定一个二叉树,计算整个树的坡度。 * * 一个树的节点的坡度定义即为,该节点左子树的结点之和和右子树结点之和的差的绝对值。空结点的的坡度是0。 * * 整个树的坡度就是其所有节点的坡度之和。 * * 示例: * * * 输入: * ⁠ 1 * ⁠ / \ * ⁠ 2 3 * 输出: 1 * 解释: * 结点的坡度 2 : 0 * 结点的坡度 3 : 0 * 结点的坡度 1 : |2-3| = 1 * 树的坡度 : 0 + 0 + 1 = 1 * * * 注意: * * * 任何子树的结点的和不会超过32位整数的范围。 * 坡度的值不会超过32位整数的范围。 * * */ // Definition for a binary tree node. #[derive(Debug, PartialEq, Eq)] pub struct TreeNode { pub val: i32, pub left: Option<Rc<RefCell<TreeNode>>>, pub right: Option<Rc<RefCell<TreeNode>>>, } impl TreeNode { #[inline] pub fn new(val: i32) -> Self { TreeNode { val, left: None, right: None, } } } use std::cell::RefCell; use std::rc::Rc; impl Solution { pub fn find_tilt(root: Option<Rc<RefCell<TreeNode>>>) -> i32 { let t = Self::v_node(&root); t.1 } fn v_node(node: &Option<Rc<RefCell<TreeNode>>>) -> (i32, i32) { match node { Some(node) => { let x = node.borrow(); let (l_sum, l_tilt) = Self::v_node(&x.left); let (r_sum, r_tilt) = Self::v_node(&x.right); ( l_sum + r_sum + x.val, l_tilt + r_tilt + (l_sum - r_sum).abs(), ) } _ => (0, 0), } } } struct Solution {} fn main() {}
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use failure::{bail, Error}; use fidl_fuchsia_bluetooth_gatt::{ self as gatt, AttributePermissions, Characteristic, Descriptor, LocalServiceDelegateControlHandle, LocalServiceDelegateMarker, LocalServiceDelegateOnReadValueResponder, LocalServiceDelegateOnWriteValueResponder, LocalServiceDelegateRequestStream, LocalServiceMarker, LocalServiceProxy, SecurityRequirements, Server_Marker, Server_Proxy, ServiceInfo, }; use fuchsia_async as fasync; use fuchsia_component as app; use fuchsia_syslog::{self, fx_log_err, fx_log_info}; use fuchsia_zircon as zx; use futures::stream::TryStreamExt; use parking_lot::RwLock; use serde_json::value::Value; use std::collections::HashMap; use crate::bluetooth::constants::{ GATT_MAX_ATTRIBUTE_VALUE_LENGTH, PERMISSION_READ_ENCRYPTED, PERMISSION_READ_ENCRYPTED_MITM, PERMISSION_WRITE_ENCRYPTED, PERMISSION_WRITE_ENCRYPTED_MITM, PERMISSION_WRITE_SIGNED, PERMISSION_WRITE_SIGNED_MITM, PROPERTY_INDICATE, PROPERTY_NOTIFY, }; use crate::common_utils::error::Sl4fError; #[derive(Debug)] struct Counter { count: u64, } impl Counter { pub fn new() -> Counter { Counter { count: 0 } } fn next(&mut self) -> u64 { let id: u64 = self.count; self.count += 1; id } } #[derive(Debug)] struct InnerGattServerFacade { /// attribute_value_mapping: A Hashmap that will be used for capturing /// and updating Characteristic and Descriptor values for each service. /// The bool value represents whether value size of the initial Characteristic /// Descriptor value should be enforced or not for prepared writes. True /// for enforce, false to allow the size to grow to max values. attribute_value_mapping: HashMap<u64, (Vec<u8>, bool)>, /// A generic counter GATT server attributes generic_id_counter: Counter, /// The current Gatt Server Proxy server_proxy: Option<Server_Proxy>, /// service_proxies: List of LocalServiceProxy objects in use service_proxies: Vec<LocalServiceProxy>, } /// Perform Gatt Server operations. /// /// Note this object is shared among all threads created by server. /// #[derive(Debug)] pub struct GattServerFacade { inner: RwLock<InnerGattServerFacade>, } impl GattServerFacade { pub fn new() -> GattServerFacade { GattServerFacade { inner: RwLock::new(InnerGattServerFacade { attribute_value_mapping: HashMap::new(), generic_id_counter: Counter::new(), server_proxy: None, service_proxies: Vec::new(), }), } } pub fn create_server_proxy(&self) -> Result<Server_Proxy, Error> { let tag = "GattServerFacade::create_server_proxy:"; match self.inner.read().server_proxy.clone() { Some(service) => { fx_log_info!(tag: &[tag, &line!().to_string()].join(""), "Current service proxy: {:?}", service); Ok(service) } None => { fx_log_info!(tag: &[tag, &line!().to_string()].join(""), "Setting new server proxy"); let service = app::client::connect_to_service::<Server_Marker>(); if let Err(err) = service { fx_log_err!(tag: &[tag, &line!().to_string()].join(""), "Failed to create server proxy: {:?}", err); bail!("Failed to create server proxy: {:?}", err); } service } } } /// Function to take the input attribute value and parse it to /// a byte array. Types can be Strings, u8, or generic Array. pub fn parse_attribute_value_to_byte_array(&self, value_to_parse: &Value) -> Vec<u8> { match value_to_parse { Value::String(obj) => String::from(obj.as_str()).into_bytes(), Value::Number(obj) => match obj.as_u64() { Some(num) => vec![num as u8], None => vec![], }, Value::Array(obj) => { obj.into_iter().filter_map(|v| v.as_u64()).map(|v| v as u8).collect() } _ => vec![], } } pub fn on_characteristic_configuration( peer_id: String, notify: bool, indicate: bool, characteristic_id: u64, control_handle: LocalServiceDelegateControlHandle, service_proxy: &LocalServiceProxy, ) { let tag = "GattServerFacade::on_characteristic_configuration:"; fx_log_info!( tag: &[tag, &line!().to_string()].join(""), "OnCharacteristicConfiguration: (notify: {}, indicate: {}, id: {})", notify, indicate, peer_id ); control_handle.shutdown(); let value = if indicate { [0x02, 0x00].to_vec() } else if notify { [0x01, 0x00].to_vec() } else { [0x00, 0x00].to_vec() }; let confirm = true; let _result = service_proxy.notify_value( characteristic_id, &peer_id, &mut value.to_vec().into_iter(), confirm, ); } pub fn on_read_value( id: u64, offset: i32, responder: LocalServiceDelegateOnReadValueResponder, value_in_mapping: Option<&(Vec<u8>, bool)>, ) { let tag = "GattServerFacade::on_read_value:"; fx_log_info!( tag: &[tag, &line!().to_string()].join(""), "OnReadValue request at id: {:?}, with offset: {:?}", id, offset ); match value_in_mapping { Some(v) => { let (value, _enforce_initial_attribute_length) = v; if value.len() < offset as usize { let _result = responder.send(None, gatt::ErrorCode::InvalidOffset); } else { let value_to_write = value.clone().split_off(offset as usize); let _result = responder.send( Some(&mut value_to_write.to_vec().into_iter()), gatt::ErrorCode::NoError, ); } } None => { // ID doesn't exist in the database let _result = responder.send(None, gatt::ErrorCode::NotPermitted); } }; } pub fn write_and_extend(value: &mut Vec<u8>, value_to_write: Vec<u8>, offset: usize) { let split_idx = (value.len() - offset).min(value_to_write.len()); let (overlapping, extending) = value_to_write.split_at(split_idx); let end_of_overlap = offset + overlapping.len(); value.splice(offset..end_of_overlap, overlapping.iter().cloned()); value.extend_from_slice(extending); } pub fn on_write_value( id: u64, offset: u16, value_to_write: Vec<u8>, responder: LocalServiceDelegateOnWriteValueResponder, value_in_mapping: Option<&mut (Vec<u8>, bool)>, ) { let tag = "GattServerFacade::on_write_value:"; fx_log_info!( tag: &[tag, &line!().to_string()].join(""), "OnWriteValue request at id: {:?}, with offset: {:?}, with value: {:?}", id, offset, value_to_write ); match value_in_mapping { Some(v) => { let (value, enforce_initial_attribute_length) = v; let max_attribute_size: usize = match enforce_initial_attribute_length { true => value.len(), false => GATT_MAX_ATTRIBUTE_VALUE_LENGTH, }; if max_attribute_size < (value_to_write.len() + offset as usize) { let _result = responder.send(gatt::ErrorCode::InvalidValueLength); } else if value.len() < offset as usize { let _result = responder.send(gatt::ErrorCode::InvalidOffset); } else { &mut GattServerFacade::write_and_extend(value, value_to_write, offset as usize); let _result = responder.send(gatt::ErrorCode::NoError); } } None => { // ID doesn't exist in the database let _result = responder.send(gatt::ErrorCode::NotPermitted); } } } pub fn on_write_without_response( id: u64, offset: u16, value_to_write: Vec<u8>, value_in_mapping: Option<&mut (Vec<u8>, bool)>, ) { let tag = "GattServerFacade::on_write_without_response:"; fx_log_info!( tag: &[tag, &line!().to_string()].join(""), "OnWriteWithoutResponse request at id: {:?}, with offset: {:?}, with value: {:?}", id, offset, value_to_write ); if let Some(v) = value_in_mapping { let (value, _enforce_initial_attribute_length) = v; &mut GattServerFacade::write_and_extend(value, value_to_write, offset as usize); } } pub async fn monitor_delegate_request_stream( stream: LocalServiceDelegateRequestStream, mut attribute_value_mapping: HashMap<u64, (Vec<u8>, bool)>, service_proxy: LocalServiceProxy, ) -> Result<(), Error> { use fidl_fuchsia_bluetooth_gatt::LocalServiceDelegateRequest::*; stream .map_ok(move |request| match request { OnCharacteristicConfiguration { peer_id, notify, indicate, characteristic_id, control_handle, } => { GattServerFacade::on_characteristic_configuration( peer_id, notify, indicate, characteristic_id, control_handle, &service_proxy, ); } OnReadValue { id, offset, responder } => { GattServerFacade::on_read_value( id, offset, responder, attribute_value_mapping.get(&id), ); } OnWriteValue { id, offset, value, responder } => { GattServerFacade::on_write_value( id, offset, value, responder, attribute_value_mapping.get_mut(&id), ); } OnWriteWithoutResponse { id, offset, value, .. } => { GattServerFacade::on_write_without_response( id, offset, value, attribute_value_mapping.get_mut(&id), ); } }) .try_collect::<()>() .await .map_err(|e| e.into()) } /// Convert a number representing permissions into AttributePermissions. /// /// Fuchsia GATT Server uses a u32 as a property value and an AttributePermissions /// object to represent Characteristic and Descriptor permissions. In order to /// simplify the incomming json object the incoming permission value will be /// treated as a u32 and converted into the proper AttributePermission object. /// /// The incoming permissions number is represented by adding the numbers representing /// the permission level. /// Values: /// 0x001 - Allow read permission /// 0x002 - Allow encrypted read operations /// 0x004 - Allow reading with man-in-the-middle protection /// 0x010 - Allow write permission /// 0x020 - Allow encrypted writes /// 0x040 - Allow writing with man-in-the-middle protection /// 0x080 - Allow signed writes /// 0x100 - Allow signed write perations with man-in-the-middle protection /// /// Example input that allows read and write: 0x01 | 0x10 = 0x11 /// This function will convert this to the proper AttributePermission permissions. pub fn permissions_and_properties_from_raw_num( &self, permissions: u32, properties: u32, ) -> AttributePermissions { let mut read_encryption_required = false; let mut read_authentication_required = false; let mut read_authorization_required = false; let mut write_encryption_required = false; let mut write_authentication_required = false; let mut write_authorization_required = false; let mut update_encryption_required = false; let mut update_authentication_required = false; let mut update_authorization_required = false; if permissions & PERMISSION_READ_ENCRYPTED != 0 { read_encryption_required = true; } if permissions & PERMISSION_READ_ENCRYPTED_MITM != 0 { read_encryption_required = true; read_authentication_required = true; read_authorization_required = true; } if permissions & PERMISSION_WRITE_ENCRYPTED != 0 { write_encryption_required = true; update_encryption_required = true; } if permissions & PERMISSION_WRITE_ENCRYPTED_MITM != 0 { write_encryption_required = true; write_authentication_required = true; write_authorization_required = true; update_encryption_required = true; update_authentication_required = true; update_authorization_required = true; } if permissions & PERMISSION_WRITE_SIGNED != 0 { write_authorization_required = true; } if permissions & PERMISSION_WRITE_SIGNED_MITM != 0 { write_encryption_required = true; write_authentication_required = true; write_authorization_required = true; update_encryption_required = true; update_authentication_required = true; update_authorization_required = true; } // Update Security Requirements only required if notify or indicate // properties set. let update_sec_requirement = if properties & (PROPERTY_NOTIFY | PROPERTY_INDICATE) != 0 { Some(Box::new(SecurityRequirements { encryption_required: update_encryption_required, authentication_required: update_authentication_required, authorization_required: update_authorization_required, })) } else { None }; let read_sec_requirement = SecurityRequirements { encryption_required: read_encryption_required, authentication_required: read_authentication_required, authorization_required: read_authorization_required, }; let write_sec_requirement = SecurityRequirements { encryption_required: write_encryption_required, authentication_required: write_authentication_required, authorization_required: write_authorization_required, }; AttributePermissions { read: Some(Box::new(read_sec_requirement)), write: Some(Box::new(write_sec_requirement)), update: update_sec_requirement, } } pub fn generate_descriptors( &self, descriptor_list_json: &Value, ) -> Result<Vec<Descriptor>, Error> { let mut descriptors: Vec<Descriptor> = Vec::new(); // Fuchsia will automatically setup these descriptors and manage them. // Skip setting them up if found in the input descriptor list. let banned_descriptor_uuids = [ "00002900-0000-1000-8000-00805f9b34fb".to_string(), // CCC Descriptor "00002902-0000-1000-8000-00805f9b34fb".to_string(), // Client Configuration Descriptor "00002903-0000-1000-8000-00805f9b34fb".to_string(), // Server Configuration Descriptor ]; if descriptor_list_json.is_null() { return Ok(descriptors); } let descriptor_list = match descriptor_list_json.as_array() { Some(d) => d, None => bail!("Attribute 'descriptors' is not a parseable list."), }; for descriptor in descriptor_list.into_iter() { let descriptor_uuid = match descriptor["uuid"].as_str() { Some(uuid) => uuid.to_string(), None => bail!("Descriptor uuid was unable to cast to str."), }; let descriptor_value = self.parse_attribute_value_to_byte_array(&descriptor["value"]); let raw_enforce_enforce_initial_attribute_length = descriptor["enforce_initial_attribute_length"].as_bool().unwrap_or(false); // No properties for descriptors. let properties = 0u32; if banned_descriptor_uuids.contains(&descriptor_uuid) { continue; } let raw_descriptor_permissions = match descriptor["permissions"].as_u64() { Some(permissions) => permissions as u32, None => bail!("Descriptor permissions was unable to cast to u64."), }; let desc_permission_attributes = self .permissions_and_properties_from_raw_num(raw_descriptor_permissions, properties); let descriptor_id = self.inner.write().generic_id_counter.next(); self.inner.write().attribute_value_mapping.insert( descriptor_id, (descriptor_value, raw_enforce_enforce_initial_attribute_length), ); let descriptor_obj = Descriptor { id: descriptor_id, type_: descriptor_uuid.clone(), permissions: Some(Box::new(desc_permission_attributes)), }; descriptors.push(descriptor_obj); } Ok(descriptors) } pub fn generate_characteristics( &self, characteristic_list_json: &Value, ) -> Result<Vec<Characteristic>, Error> { let mut characteristics: Vec<Characteristic> = Vec::new(); if characteristic_list_json.is_null() { return Ok(characteristics); } let characteristic_list = match characteristic_list_json.as_array() { Some(c) => c, None => bail!("Attribute 'characteristics' is not a parseable list."), }; for characteristic in characteristic_list.into_iter() { let characteristic_uuid = match characteristic["uuid"].as_str() { Some(uuid) => uuid.to_string(), None => bail!("Characteristic uuid was unable to cast to str."), }; let characteristic_properties = match characteristic["properties"].as_u64() { Some(properties) => properties as u32, None => bail!("Characteristic properties was unable to cast to u64."), }; let raw_characteristic_permissions = match characteristic["permissions"].as_u64() { Some(permissions) => permissions as u32, None => bail!("Characteristic permissions was unable to cast to u64."), }; let characteristic_value = self.parse_attribute_value_to_byte_array(&characteristic["value"]); let raw_enforce_enforce_initial_attribute_length = characteristic["enforce_initial_attribute_length"].as_bool().unwrap_or(false); let descriptor_list = &characteristic["descriptors"]; let descriptors = self.generate_descriptors(descriptor_list)?; let characteristic_permissions = self.permissions_and_properties_from_raw_num( raw_characteristic_permissions, characteristic_properties, ); let characteristic_id = self.inner.write().generic_id_counter.next(); self.inner.write().attribute_value_mapping.insert( characteristic_id, (characteristic_value, raw_enforce_enforce_initial_attribute_length), ); let characteristic_obj = Characteristic { id: characteristic_id, type_: characteristic_uuid, properties: characteristic_properties, permissions: Some(Box::new(characteristic_permissions)), descriptors: Some(descriptors), }; characteristics.push(characteristic_obj); } Ok(characteristics) } pub fn generate_service(&self, service_json: &Value) -> Result<ServiceInfo, Error> { // Determine if the service is primary or not. let service_id = self.inner.write().generic_id_counter.next(); let service_type = &service_json["type"]; let is_service_primary = match service_type.as_i64() { Some(val) => match val { 0 => true, 1 => false, _ => bail!("Invalid Service type. Expected 0 or 1."), }, None => bail!("Service type was unable to cast to i64."), }; // Get the service UUID. let service_uuid = match service_json["uuid"].as_str() { Some(s) => s, None => bail!("Service uuid was unable to cast to str."), }; //Get the Characteristics from the service. let characteristics = self.generate_characteristics(&service_json["characteristics"])?; // Includes: TBD let includes = None; Ok(ServiceInfo { id: service_id, primary: is_service_primary, type_: service_uuid.to_string(), characteristics: Some(characteristics), includes: includes, }) } pub async fn publish_service( &self, mut service_info: ServiceInfo, service_uuid: String, ) -> Result<(), Error> { let tag = "GattServerFacade::publish_service:"; let (service_local, service_remote) = zx::Channel::create()?; let service_local = fasync::Channel::from_channel(service_local)?; let service_proxy = LocalServiceProxy::new(service_local); let (delegate_client, delegate_request_stream) = fidl::endpoints::create_request_stream::<LocalServiceDelegateMarker>()?; let service_server = fidl::endpoints::ServerEnd::<LocalServiceMarker>::new(service_remote); self.inner.write().service_proxies.push(service_proxy.clone()); match &self.inner.read().server_proxy { Some(server) => { let status = server .publish_service(&mut service_info, delegate_client, service_server) .await?; match status.error { None => fx_log_info!( tag: &[tag, &line!().to_string()].join(""), "Successfully published GATT service with uuid {:?}", service_uuid ), Some(e) => bail!("Failed to create GATT Service: {}", Sl4fError::from(*e)), } } None => bail!("No Server Proxy created."), } let monitor_delegate_fut = GattServerFacade::monitor_delegate_request_stream( delegate_request_stream, self.inner.read().attribute_value_mapping.clone(), service_proxy, ); let fut = async { let result = monitor_delegate_fut.await; if let Err(err) = result { fx_log_err!(tag: "publish_service", "Failed to create or monitor the gatt service delegate: {:?}", err); } }; fasync::spawn(fut); Ok(()) } /// Publish a GATT Server. /// /// The input is a JSON object representing the attributes of the GATT /// server Database to setup. This function will also start listening for /// incoming requests to Characteristics and Descriptors in each Service. /// /// This is primarially using the same input syntax as in the Android AOSP /// ACTS test framework at: /// <aosp_root>/tools/test/connectivity/acts/framework/acts/test_utils/bt/gatt_test_database.py /// /// /// Example python dictionary that's turned into JSON (sub dic values can be found /// in <aosp_root>/tools/test/connectivity/acts/framework/acts/test_utils/bt/bt_constants.py: /// /// SMALL_DATABASE = { /// 'services': [{ /// 'uuid': '00001800-0000-1000-8000-00805f9b34fb', /// 'type': gatt_service_types['primary'], /// 'characteristics': [{ /// 'uuid': gatt_char_types['device_name'], /// 'properties': gatt_characteristic['property_read'], /// 'permissions': gatt_characteristic['permission_read'], /// 'handle': 0x0003, /// 'value_type': gatt_characteristic_value_format['string'], /// 'value': 'Test Database' /// }, { /// 'uuid': gatt_char_types['appearance'], /// 'properties': gatt_characteristic['property_read'], /// 'permissions': gatt_characteristic['permission_read'], /// 'handle': 0x0005, /// 'value_type': gatt_characteristic_value_format['sint32'], /// 'offset': 0, /// 'value': 17 /// }, { /// 'uuid': gatt_char_types['peripheral_pref_conn'], /// 'properties': gatt_characteristic['property_read'], /// 'permissions': gatt_characteristic['permission_read'], /// 'handle': 0x0007 /// }] /// }, { /// 'uuid': '00001801-0000-1000-8000-00805f9b34fb', /// 'type': gatt_service_types['primary'], /// 'characteristics': [{ /// 'uuid': gatt_char_types['service_changed'], /// 'properties': gatt_characteristic['property_indicate'], /// 'permissions': gatt_characteristic['permission_read'] | /// gatt_characteristic['permission_write'], /// 'handle': 0x0012, /// 'value_type': gatt_characteristic_value_format['byte'], /// 'value': [0x0000], /// 'descriptors': [{ /// 'uuid': gatt_char_desc_uuids['client_char_cfg'], /// 'permissions': gatt_descriptor['permission_read'] | /// gatt_descriptor['permission_write'], /// 'value': [0x0000] /// }] /// }, { /// 'uuid': '0000b004-0000-1000-8000-00805f9b34fb', /// 'properties': gatt_characteristic['property_read'], /// 'permissions': gatt_characteristic['permission_read'], /// 'handle': 0x0015, /// 'value_type': gatt_characteristic_value_format['byte'], /// 'value': [0x04] /// }] /// }] /// } pub async fn publish_server(&self, args: Value) -> Result<(), Error> { let tag = "GattServerFacade::publish_server:"; fx_log_info!(tag: &[tag, &line!().to_string()].join(""), "Publishing service"); let server_proxy = self.create_server_proxy()?; self.inner.write().server_proxy = Some(server_proxy); let database = args.get("database"); let services = match database { Some(d) => match d.get("services") { Some(s) => s, None => bail!("No services found."), }, None => bail!("Could not find the 'services' key in the json database."), }; let service_list = match services.as_array() { Some(s) => s, None => bail!("Attribute 'service' is not a parseable list."), }; for service in service_list.into_iter() { self.inner.write().attribute_value_mapping.clear(); let service_info = self.generate_service(service)?; let service_uuid = &service["uuid"]; self.publish_service(service_info, service_uuid.to_string()).await?; } Ok(()) } pub async fn close_server(&self) { self.inner.write().server_proxy = None } // GattServerFacade for cleaning up objects in use. pub fn cleanup(&self) { let tag = "GattServerFacade::cleanup:"; fx_log_info!(tag: &[tag, &line!().to_string()].join(""), "Cleanup GATT server objects"); let mut inner = self.inner.write(); inner.server_proxy = None; inner.service_proxies.clear(); } // GattServerFacade for printing useful information pertaining to the facade for // debug purposes. pub fn print(&self) { let tag = "GattServerFacade::print:"; fx_log_info!(tag: &[tag, &line!().to_string()].join(""), "Unimplemented print function"); } }
// The MIT License (MIT) // // Copyright (c) 2013 Jeremy Letang (letang.jeremy@gmail.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #![allow(dead_code, non_camel_case_types)] use libc::{c_char, c_double, c_void}; use types::{PaError, PaDeviceIndex, PaHostApiIndex, PaStreamCallbackFlags, PaStreamCallbackTimeInfo, PaStreamInfo, PaTime, PaStreamCallbackResult}; // Sample format pub type PaSampleFormat = u64; pub const PA_FLOAT_32: PaSampleFormat = 0x00000001; pub const PA_INT_32: PaSampleFormat = 0x00000002; // pub const PA_INT_24: PaSampleFormat = 0x00000004; pub const PA_INT_16: PaSampleFormat = 0x00000008; pub const PA_INT_8: PaSampleFormat = 0x00000010; pub const PA_UINT_8: PaSampleFormat = 0x00000020; pub const PA_CUSTOM_FORMAT: PaSampleFormat = 0x00010000; pub const PA_NON_INTERLEAVED: PaSampleFormat = 0x80000000; // Stream flags pub type PaStreamFlags = u64; pub const PA_NO_FLAG: PaStreamFlags = 0; pub const PA_CLIP_OFF: PaStreamFlags = 0x00000001; pub const PA_DITHER_OFF: PaStreamFlags = 0x00000002; pub const PA_NEVER_DROP_INPUT: PaStreamFlags = 0x00000004; pub const PA_PRIME_OUTPUT_BUFFERS_USING_STREAM_CALLBACK: PaStreamFlags = 0x00000008; pub const PA_PLATFORM_SPECIFIC_FLAGS: PaStreamFlags = 0xFFFF0000; /// Unchanging unique identifiers for each supported host API pub type PaHostApiTypeId = i32; pub const PA_IN_DEVELOPMENT: PaHostApiTypeId = 0; pub const PA_DIRECT_SOUND: PaHostApiTypeId = 1; pub const PA_MME: PaHostApiTypeId = 2; pub const PA_ASIO: PaHostApiTypeId = 3; pub const PA_SOUND_MANAGER: PaHostApiTypeId = 4; pub const PA_CORE_AUDIO: PaHostApiTypeId = 5; pub const PA_OSS: PaHostApiTypeId = 7; pub const PA_ALSA: PaHostApiTypeId = 8; pub const PA_AL: PaHostApiTypeId = 9; pub const PA_BE_OS: PaHostApiTypeId = 10; pub const PA_WDMKS: PaHostApiTypeId = 11; pub const PA_JACK: PaHostApiTypeId = 12; pub const PA_WASAPI: PaHostApiTypeId = 13; pub const PA_AUDIO_SCIENCE_HPI: PaHostApiTypeId = 14; pub type C_PaStream = c_void; #[repr(C)] pub struct C_PaStreamParameters { pub device : PaDeviceIndex, pub channel_count : i32, pub sample_format : PaSampleFormat, pub suggested_latency : PaTime, pub host_api_specific_stream_info : *mut c_void } #[repr(C)] pub struct C_PaDeviceInfo { pub struct_version: i32, pub name: *const c_char, pub host_api: PaHostApiIndex, pub max_input_channels: i32, pub max_output_channels: i32, pub default_low_input_latency: PaTime, pub default_low_output_latency: PaTime, pub default_high_input_latency: PaTime, pub default_high_output_latency: PaTime, pub default_sample_rate: c_double } #[repr(C)] pub struct C_PaHostErrorInfo { pub error_code: u32, pub error_text: *const c_char } #[repr(C)] pub struct C_PaHostApiInfo { pub struct_version: i32, pub host_type: i32, pub name: *const c_char, pub device_count: i32, pub default_input_device: i32, pub default_output_device: i32 } extern "C" { /// PortAudio portable API pub fn Pa_GetVersion() -> i32; pub fn Pa_GetVersionText() -> *const c_char; pub fn Pa_GetErrorText(errorCode : PaError) -> *const c_char; pub fn Pa_Initialize() -> PaError; pub fn Pa_Terminate() -> PaError; pub fn Pa_GetHostApiCount() -> PaHostApiIndex; pub fn Pa_GetDefaultHostApi() -> PaHostApiIndex; pub fn Pa_GetHostApiInfo(hostApi : PaHostApiIndex) -> *const C_PaHostApiInfo; pub fn Pa_HostApiTypeIdToHostApiIndex(type_id : PaHostApiTypeId) -> PaHostApiIndex; pub fn Pa_HostApiDeviceIndexToDeviceIndex(hostApi : PaHostApiIndex, hostApiDeviceIndex : i32) -> PaDeviceIndex; pub fn Pa_GetLastHostErrorInfo() -> *const C_PaHostErrorInfo; pub fn Pa_GetDeviceCount() -> PaDeviceIndex; pub fn Pa_GetDefaultInputDevice() -> PaDeviceIndex; pub fn Pa_GetDefaultOutputDevice() -> PaDeviceIndex; pub fn Pa_GetDeviceInfo(device : PaDeviceIndex) -> *const C_PaDeviceInfo; pub fn Pa_IsFormatSupported(input_parameters : *const C_PaStreamParameters, outputParameters : *const C_PaStreamParameters, sampleRate : c_double) -> PaError; pub fn Pa_GetSampleSize(format : PaSampleFormat) -> PaError; pub fn Pa_Sleep(msec : i32) -> (); pub fn Pa_OpenStream(stream : *mut *mut C_PaStream, inputParameters : *const C_PaStreamParameters, outputParameters : *const C_PaStreamParameters, sampleRate : c_double, framesPerBuffer : u32, streamFlags : PaStreamFlags, streamCallback : Option<extern "C" fn(*const c_void, *mut c_void, u32, *const PaStreamCallbackTimeInfo, PaStreamCallbackFlags, *mut c_void) -> PaStreamCallbackResult>, userData : *mut c_void) -> PaError; pub fn Pa_OpenDefaultStream(stream : *mut *mut C_PaStream, numInputChannels : i32, numOutputChannels : i32, sampleFormat : PaSampleFormat, sampleRate : c_double, framesPerBuffer : u32, streamCallback : Option<extern "C" fn(*const c_void, *mut c_void, u32, *const PaStreamCallbackTimeInfo, PaStreamCallbackFlags, *mut c_void) -> PaStreamCallbackResult>, userData : *mut c_void) -> PaError; pub fn Pa_CloseStream(stream : *mut C_PaStream) -> PaError; //pub fn Pa_SetStreamFinishedCallback (stream : *PaStream, PaStreamFinishedCallback *streamFinishedCallback) -> PaError; pub fn Pa_StartStream(stream : *mut C_PaStream) -> PaError; pub fn Pa_StopStream(stream : *mut C_PaStream) -> PaError; pub fn Pa_AbortStream(stream : *mut C_PaStream) -> PaError; pub fn Pa_IsStreamStopped(stream : *mut C_PaStream) -> PaError; pub fn Pa_IsStreamActive(stream : *mut C_PaStream) -> i32; pub fn Pa_GetStreamInfo(stream : *mut C_PaStream) -> *const PaStreamInfo; pub fn Pa_GetStreamTime(stream : *mut C_PaStream) -> PaTime; pub fn Pa_GetStreamCpuLoad(stream : *mut C_PaStream) -> c_double; pub fn Pa_ReadStream(stream : *mut C_PaStream, buffer : *mut c_void, frames : u32) -> PaError; pub fn Pa_WriteStream(stream : *mut C_PaStream, buffer : *mut c_void, frames : u32) -> PaError; pub fn Pa_GetStreamReadAvailable(stream : *mut C_PaStream) -> i64; pub fn Pa_GetStreamWriteAvailable(stream : *mut C_PaStream) -> i64; /* * PortAudio Specific ASIO */ pub fn PaAsio_GetAvailableBufferSizes(device : PaDeviceIndex, minBufferSizeFrames : *mut i32, maxBufferSizeFrames : *mut i32, preferredBufferSizeFrames : *mut i32, granularity : *mut i32) -> PaError; pub fn PaAsio_GetInputChannelName(device : PaDeviceIndex, channelIndex : i32, channelName : *mut *const c_char) -> PaError; pub fn PaAsio_GetOutputChannelName(device : PaDeviceIndex, channelIndex : i32, channelName : *mut *const c_char) -> PaError; pub fn PaAsio_SetStreamSampleRate(stream : *mut C_PaStream, sampleRate : c_double) -> PaError; /* * PortAudio Specific MAC_CORE */ pub fn PaMacCore_GetStreamInputDevice(s : *mut C_PaStream) -> PaDeviceIndex; pub fn PaMacCore_GetStreamOutputDevice(s : *mut C_PaStream) -> PaDeviceIndex; // pub fn PaMacCore_GetChannelName (int device, int channelIndex, bool intput) -> *c_char pub fn PaMacCore_GetBufferSizeRange(device : PaDeviceIndex, minBufferSizeFrames : *mut u32, maxBufferSizeFrames : *mut u32) -> PaError; //pub fn PaMacCore_SetupStreamInfo(PaMacCoreStreamInfo *data, unsigned long flags) -> (); //pub fn PaMacCore_SetupChannelMap(PaMacCoreStreamInfo *data, const SInt32 *const channelMap, unsigned long channelMapSize) -> (); }
extern crate winapi; extern crate widestring; extern crate chrono; use std::mem; use std::thread; use std::time::Duration; use std::ptr; use std::collections::HashMap; use chrono::prelude::*; use winapi::um::errhandlingapi; use winapi::um::eventtrace; use widestring::WideCString; use winapi::shared::winerror; const INVALID_PROCESSTRACE_HANDLE: eventtrace::TRACEHANDLE = -1isize as eventtrace::TRACEHANDLE; fn main() { let s_name = WideCString::from_str(eventtrace::KERNEL_LOGGER_NAMEW).unwrap().into_vec_with_nul(); let mut prop_buf = vec![0u8; mem::size_of::<eventtrace::EVENT_TRACE_PROPERTIES>() + s_name.len() * 2]; let prop = prop_buf.as_mut_ptr() as eventtrace::PEVENT_TRACE_PROPERTIES; unsafe { (*prop).Wnode.BufferSize = prop_buf.len() as u32; (*prop).Wnode.Guid = eventtrace::SystemTraceControlGuid; (*prop).Wnode.ClientContext = 1; (*prop).Wnode.Flags = eventtrace::WNODE_FLAG_TRACED_GUID; (*prop).EnableFlags = eventtrace::EVENT_TRACE_FLAG_NETWORK_TCPIP; (*prop).MaximumFileSize = 1; (*prop).LogFileMode = eventtrace::EVENT_TRACE_REAL_TIME_MODE; (*prop).LoggerNameOffset = mem::size_of::<eventtrace::EVENT_TRACE_PROPERTIES>() as u32; let mut s_handle = 0; match eventtrace::StartTraceW(&mut s_handle, s_name.as_ptr(), prop) { winerror::ERROR_SUCCESS | winerror::ERROR_ALREADY_EXISTS => { thread::spawn(move || { run(); }); loop { thread::sleep(Duration::new(1, 0)); } } winerror::ERROR_ACCESS_DENIED => println!("ERROR_ACCESS_DENIED"), x @ _ => println!("0x{:x}", x), } } } fn run() { let mut l: eventtrace::EVENT_TRACE_LOGFILE; unsafe { l = mem::zeroed(); let s_name = WideCString::from_str(eventtrace::KERNEL_LOGGER_NAMEW).unwrap(); l.LoggerName = s_name.into_raw(); l.EventTraceLogFile_u = eventtrace::EVENT_TRACE_LOGFILE_u([eventtrace::PROCESS_TRACE_MODE_REAL_TIME | eventtrace::PROCESS_TRACE_MODE_EVENT_RECORD]); l.EventTraceLogFile_u2 = eventtrace::EVENT_TRACE_LOGFILE_u2([process_event as u64]); let mut h = eventtrace::OpenTraceW(&mut l); if h == INVALID_PROCESSTRACE_HANDLE { println!("ERROR 0x{:x}", errhandlingapi::GetLastError()); } else { println!("Success: 0x{:x}", h); let r = eventtrace::ProcessTrace(&mut h, 1, ptr::null_mut(), ptr::null_mut()); if r != winerror::ERROR_SUCCESS { println!("ERROR 0x{:x}", r); eventtrace::CloseTrace(h); } } } } unsafe extern "system" fn process_event(p_event: eventtrace::PEVENT_RECORD) { let mut buff_size = 0; if eventtrace::TdhGetEventInformation(p_event, 0, ptr::null_mut(), ptr::null_mut(), &mut buff_size) != winerror::ERROR_INSUFFICIENT_BUFFER { return; } let buff = vec![0u8; buff_size as usize]; let info = buff.as_ptr() as eventtrace::PTRACE_EVENT_INFO; if eventtrace::TdhGetEventInformation(p_event, 0, ptr::null_mut(), info, &mut buff_size) != winerror::ERROR_SUCCESS { return; } get_event_info(p_event, info).map(|x| println!("time:{}\tvalue:{:?}", Local::now(), x)); } unsafe fn get_event_info(p_event: eventtrace::PEVENT_RECORD, p_info: eventtrace::PTRACE_EVENT_INFO) -> Option<TdhInfo> { let p = p_info as *const u8; println!("Id: {:}.", (*p_event).EventHeader.EventDescriptor.Id); println!("Task: {:}.", (*p_event).EventHeader.EventDescriptor.Task); println!("PID: {:}.", (*p_event).EventHeader.ProcessId); println!("Provider: {:}.", read_wstring(p, (*p_info).ProviderNameOffset as isize).to_string_lossy()); println!("Level: {:}.", read_wstring(p, (*p_info).LevelNameOffset as isize).to_string_lossy()); println!("Channel: {:}.", read_wstring(p, (*p_info).ChannelNameOffset as isize).to_string_lossy()); println!("Keywords: {:}.", read_wstring(p, (*p_info).KeywordsNameOffset as isize).to_string_lossy()); println!("Task: {:}.", read_wstring(p, (*p_info).TaskNameOffset as isize).to_string_lossy()); println!("Opcode: {:}.", read_wstring(p, (*p_info).OpcodeNameOffset as isize).to_string_lossy()); println!("ActivityID: {:}.", read_wstring(p, (*p_info).ActivityIDNameOffset as isize).to_string_lossy()); println!("RelatedActivityID: {:}.", read_wstring(p, (*p_info).RelatedActivityIDNameOffset as isize).to_string_lossy()); println!("TopLevelPropertyCount: {:}.", (*p_info).TopLevelPropertyCount); if (*p_info).TopLevelPropertyCount <= 0 { return None; } let a = TdhInfo { property: (0..(*p_info).TopLevelPropertyCount - 1) .into_iter() .map(|i| { get_property_info(p_event, p_info, (*p_info).EventPropertyInfoArray[i as usize]) }) .collect(), }; Some(a) } #[derive(Debug)] struct TdhInfo { property: HashMap<String, TdhProperty>, } #[derive(Debug)] enum TdhProperty { Struct(Box<HashMap<String, TdhProperty>>), Map(Box<HashMap<String, TdhProperty>>), WString(WideCString), Int8(i8), UInt8(u8), Int16(i16), UInt16(u16), Int32(i32), UInt32(u32), Int64(i64), UInt64(u64), Float(f32), Double(f64), Bool(bool), Pointer32(u32), Pointer64(u64), NoImple, } unsafe fn get_property_map(p_event: eventtrace::PEVENT_RECORD, p_info: eventtrace::PTRACE_EVENT_INFO) -> HashMap<String, TdhProperty> { if (*p_info).TopLevelPropertyCount <= 0 { return HashMap::new(); } (0..(*p_info).TopLevelPropertyCount - 1) .into_iter() .map(|i| { get_property_info(p_event, p_info, (*p_info).EventPropertyInfoArray[i as usize]) }) .collect() } unsafe fn get_property_info(p_event: eventtrace::PEVENT_RECORD, p_info: eventtrace::PTRACE_EVENT_INFO, property_info: eventtrace::EVENT_PROPERTY_INFO) -> (String, TdhProperty) { let name = read_wstring(p_info as *const u8, property_info.NameOffset as isize); if property_info.Flags == eventtrace::PropertyStruct { let r = get_property_map(p_event, p_info); (name.to_string_lossy(), TdhProperty::Struct(Box::new(r))) } else { // TODO: use Result get_property_info_non_struct(p_event, p_info, property_info, None) .expect("!!!!!!!!!!!!") } } unsafe fn get_property_info_non_struct(p_event: eventtrace::PEVENT_RECORD, p_info: eventtrace::PTRACE_EVENT_INFO, property_info: eventtrace::EVENT_PROPERTY_INFO, struct_name: Option<&WideCString>) -> Result<(String, TdhProperty), u32> { use winapi::shared::ntdef::{PSHORT, PUSHORT, PLONG, PULONG, PULONGLONG, DOUBLE, PCHAR, PUCHAR, PLONGLONG}; use winapi::shared::minwindef::{PFLOAT, PBOOL}; let name = read_wstring(p_info as *const u8, property_info.NameOffset as isize); let mut a = if let Some(pat) = struct_name { vec![eventtrace::PROPERTY_DATA_DESCRIPTOR { PropertyName: pat.as_ptr() as u64, ArrayIndex: 0, Reserved: 0, }, eventtrace::PROPERTY_DATA_DESCRIPTOR { PropertyName: name.as_ptr() as u64, ArrayIndex: std::u32::MAX, Reserved: 0, }] } else { vec![eventtrace::PROPERTY_DATA_DESCRIPTOR { PropertyName: name.as_ptr() as u64, ArrayIndex: std::u32::MAX, Reserved: 0, }] }; let mut buff_size = 0; let status = eventtrace::TdhGetPropertySize(p_event, 0, ptr::null_mut(), a.len() as u32, a.as_mut_ptr(), &mut buff_size); if status != winerror::ERROR_SUCCESS { return Err(status) } let mut buff = vec![0u8; buff_size as usize]; eventtrace::TdhGetProperty(p_event, 0, ptr::null_mut(), a.len() as u32, a.as_mut_ptr(), buff_size, buff.as_mut_ptr()); if property_info.EventPropertyInfo_u1.nonStructType().MapNameOffset == 0 { if property_info.Flags == eventtrace::PropertyStruct { let p: *mut eventtrace::EVENT_PROPERTY_INFO = &mut (*p_info).EventPropertyInfoArray[0]; let a: HashMap<String, TdhProperty> = (0..property_info.EventPropertyInfo_u1.StructType().NumOfStructMembers - 1) .into_iter() .map(|i| { get_property_info_non_struct(p_event, p_info, *(p.offset(i as isize + property_info.EventPropertyInfo_u1.StructType().StructStartIndex as isize)), Some(&name)) }) .filter_map(|x| x.ok()) .collect(); return Ok((name.to_string_lossy(), TdhProperty::Struct(Box::new(a)))); } let contain_name = struct_name.map_or(name.to_string_lossy(), |wc| { format!("{:}.{:}", wc.to_string_lossy(), name.to_string_lossy()) }); let v = match property_info.EventPropertyInfo_u1.nonStructType().InType as u32 { eventtrace::TDH_INTYPE_UNICODESTRING => { TdhProperty::WString(WideCString::from_ptr_str(buff.as_ptr() as *const u16)) } // eventtrace::TDH_INTYPE_ANSISTRING => (), eventtrace::TDH_INTYPE_INT8 => TdhProperty::Int8(*(buff.as_ptr() as PCHAR)), eventtrace::TDH_INTYPE_UINT8 => TdhProperty::UInt8(*(buff.as_ptr() as PUCHAR)), eventtrace::TDH_INTYPE_INT16 => TdhProperty::Int16(*(buff.as_ptr() as PSHORT)), eventtrace::TDH_INTYPE_UINT16 => TdhProperty::UInt16(*(buff.as_ptr() as PUSHORT)), eventtrace::TDH_INTYPE_INT32 => TdhProperty::Int32(*(buff.as_ptr() as PLONG)), eventtrace::TDH_INTYPE_UINT32 => TdhProperty::UInt32(*(buff.as_ptr() as PULONG)), eventtrace::TDH_INTYPE_INT64 => TdhProperty::Int64(*(buff.as_ptr() as PLONGLONG)), eventtrace::TDH_INTYPE_UINT64 => TdhProperty::UInt64(*(buff.as_ptr() as PULONGLONG)), eventtrace::TDH_INTYPE_FLOAT => TdhProperty::Float(*(buff.as_ptr() as PFLOAT)), eventtrace::TDH_INTYPE_DOUBLE => TdhProperty::Double(*(buff.as_ptr() as *const DOUBLE)), eventtrace::TDH_INTYPE_BOOLEAN => TdhProperty::Bool(*(buff.as_ptr() as PBOOL) != 0), // eventtrace::TDH_INTYPE_BINARY => (), // eventtrace::TDH_INTYPE_GUID => (), eventtrace::TDH_INTYPE_POINTER => if (*p_event).EventHeader.Flags & 0x0020 == 0x0020 {TdhProperty::Pointer32(buff.as_ptr() as u32)} else {TdhProperty::Pointer64(buff.as_ptr() as u64)}, // eventtrace::TDH_INTYPE_FILETIME => (), // eventtrace::TDH_INTYPE_SYSTEMTIME => (), // eventtrace::TDH_INTYPE_SID => (), // eventtrace::TDH_INTYPE_HEXINT32 => (), // eventtrace::TDH_INTYPE_HEXINT64 => (), // eventtrace::TDH_INTYPE_COUNTEDSTRING => (), // eventtrace::TDH_INTYPE_COUNTEDANSISTRING => (), // eventtrace::TDH_INTYPE_REVERSEDCOUNTEDSTRING => (), // eventtrace::TDH_INTYPE_REVERSEDCOUNTEDANSISTRING => (), // eventtrace::TDH_INTYPE_NONNULLTERMINATEDSTRING => (), // eventtrace::TDH_INTYPE_NONNULLTERMINATEDANSISTRING => (), // eventtrace::TDH_INTYPE_UNICODECHAR => (), // eventtrace::TDH_INTYPE_ANSICHAR => (), // eventtrace::TDH_INTYPE_SIZET => (), // eventtrace::TDH_INTYPE_HEXDUMP => (), // eventtrace::TDH_INTYPE_WBEMSID => (), _ => TdhProperty::NoImple, }; Ok((contain_name, v)) } else { let map_name = (p_info as *const u8) .offset(property_info.EventPropertyInfo_u1.nonStructType().MapNameOffset as isize); let map_value = *(buff.as_ptr() as PULONG); let mut map_buff_size = 0; let status = eventtrace::TdhGetEventMapInformation(p_event, map_name as *mut u16, ptr::null_mut(), &mut map_buff_size); if status != winerror::ERROR_INSUFFICIENT_BUFFER { return Err(status); } let map_buff = vec![0u8; map_buff_size as usize]; let map = map_buff.as_ptr() as eventtrace::PEVENT_MAP_INFO; let status = eventtrace::TdhGetEventMapInformation(p_event, map_name as *mut u16, map, &mut map_buff_size); if status != winerror::ERROR_SUCCESS { return Err(status); } if (*map).Flag == eventtrace::EVENTMAP_INFO_FLAG_MANIFEST_VALUEMAP { let a: HashMap<String, TdhProperty> = (0..(*map).EntryCount - 1) .into_iter() .filter(|&x| (*map).MapEntryArray[x as usize].EventMapEntry_u.Value() == &map_value) .map(|i| { let key_name = read_wstring(map as *const u8, (*map).MapEntryArray[i as usize].OutputOffset as isize); (key_name.to_string_lossy(), TdhProperty::UInt32(map_value)) }) .collect(); Ok((read_wstring((p_info as *const u8), property_info.EventPropertyInfo_u1 .nonStructType() .MapNameOffset as isize) .to_string_lossy(), TdhProperty::Map(Box::new(a)))) } else { Err(1) } } } unsafe fn read_wstring(p: *const u8, offset: isize) -> WideCString { WideCString::from_ptr_str(p.wrapping_offset(offset) as *const u16) }
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use clean::*; use rustc::lint as lint; use rustc::hir; use rustc::hir::def::Def; use rustc::ty; use syntax; use syntax::ast::{self, Ident, NodeId}; use syntax::feature_gate::UnstableFeatures; use syntax::symbol::Symbol; use syntax_pos::{self, DUMMY_SP}; use std::ops::Range; use core::DocContext; use fold::DocFolder; use html::markdown::markdown_links; use passes::Pass; pub const COLLECT_INTRA_DOC_LINKS: Pass = Pass::early("collect-intra-doc-links", collect_intra_doc_links, "reads a crate's documentation to resolve intra-doc-links"); pub fn collect_intra_doc_links(krate: Crate, cx: &DocContext) -> Crate { if !UnstableFeatures::from_environment().is_nightly_build() { krate } else { let mut coll = LinkCollector::new(cx); coll.fold_crate(krate) } } #[derive(Debug)] enum PathKind { /// can be either value or type, not a macro Unknown, /// macro Macro, /// values, functions, consts, statics, everything in the value namespace Value, /// types, traits, everything in the type namespace Type, } struct LinkCollector<'a, 'tcx: 'a, 'rcx: 'a, 'cstore: 'rcx> { cx: &'a DocContext<'a, 'tcx, 'rcx, 'cstore>, mod_ids: Vec<NodeId>, } impl<'a, 'tcx, 'rcx, 'cstore> LinkCollector<'a, 'tcx, 'rcx, 'cstore> { fn new(cx: &'a DocContext<'a, 'tcx, 'rcx, 'cstore>) -> Self { LinkCollector { cx, mod_ids: Vec::new(), } } /// Resolve a given string as a path, along with whether or not it is /// in the value namespace. Also returns an optional URL fragment in the case /// of variants and methods fn resolve(&self, path_str: &str, is_val: bool, current_item: &Option<String>) -> Result<(Def, Option<String>), ()> { let cx = self.cx; // In case we're in a module, try to resolve the relative // path if let Some(id) = self.mod_ids.last() { let result = cx.resolver.borrow_mut() .with_scope(*id, |resolver| { resolver.resolve_str_path_error(DUMMY_SP, &path_str, is_val) }); if let Ok(result) = result { // In case this is a trait item, skip the // early return and try looking for the trait let value = match result.def { Def::Method(_) | Def::AssociatedConst(_) => true, Def::AssociatedTy(_) => false, Def::Variant(_) => return handle_variant(cx, result.def), // not a trait item, just return what we found _ => return Ok((result.def, None)) }; if value != is_val { return Err(()) } } else if let Some(prim) = is_primitive(path_str, is_val) { return Ok((prim, Some(path_str.to_owned()))) } else { // If resolution failed, it may still be a method // because methods are not handled by the resolver // If so, bail when we're not looking for a value if !is_val { return Err(()) } } // Try looking for methods and associated items let mut split = path_str.rsplitn(2, "::"); let item_name = if let Some(first) = split.next() { first } else { return Err(()) }; let mut path = if let Some(second) = split.next() { second.to_owned() } else { return Err(()) }; if path == "self" || path == "Self" { if let Some(name) = current_item.as_ref() { path = name.clone(); } } let ty = cx.resolver.borrow_mut() .with_scope(*id, |resolver| { resolver.resolve_str_path_error(DUMMY_SP, &path, false) })?; match ty.def { Def::Struct(did) | Def::Union(did) | Def::Enum(did) | Def::TyAlias(did) => { let item = cx.tcx.inherent_impls(did) .iter() .flat_map(|imp| cx.tcx.associated_items(*imp)) .find(|item| item.ident.name == item_name); if let Some(item) = item { let out = match item.kind { ty::AssociatedKind::Method if is_val => "method", ty::AssociatedKind::Const if is_val => "associatedconstant", _ => return Err(()) }; Ok((ty.def, Some(format!("{}.{}", out, item_name)))) } else { match cx.tcx.type_of(did).sty { ty::TyAdt(def, _) => { if let Some(item) = if def.is_enum() { def.all_fields().find(|item| item.ident.name == item_name) } else { def.non_enum_variant() .fields .iter() .find(|item| item.ident.name == item_name) } { Ok((ty.def, Some(format!("{}.{}", if def.is_enum() { "variant" } else { "structfield" }, item.ident)))) } else { Err(()) } } _ => Err(()), } } } Def::Trait(did) => { let item = cx.tcx.associated_item_def_ids(did).iter() .map(|item| cx.tcx.associated_item(*item)) .find(|item| item.ident.name == item_name); if let Some(item) = item { let kind = match item.kind { ty::AssociatedKind::Const if is_val => "associatedconstant", ty::AssociatedKind::Type if !is_val => "associatedtype", ty::AssociatedKind::Method if is_val => { if item.defaultness.has_value() { "method" } else { "tymethod" } } _ => return Err(()) }; Ok((ty.def, Some(format!("{}.{}", kind, item_name)))) } else { Err(()) } } _ => Err(()) } } else { Err(()) } } } impl<'a, 'tcx, 'rcx, 'cstore> DocFolder for LinkCollector<'a, 'tcx, 'rcx, 'cstore> { fn fold_item(&mut self, mut item: Item) -> Option<Item> { let item_node_id = if item.is_mod() { if let Some(id) = self.cx.tcx.hir.as_local_node_id(item.def_id) { Some(id) } else { debug!("attempting to fold on a non-local item: {:?}", item); return self.fold_item_recur(item); } } else { None }; let current_item = match item.inner { ModuleItem(..) => { if item.attrs.inner_docs { if item_node_id.unwrap() != NodeId::new(0) { item.name.clone() } else { None } } else { match self.mod_ids.last() { Some(parent) if *parent != NodeId::new(0) => { //FIXME: can we pull the parent module's name from elsewhere? Some(self.cx.tcx.hir.name(*parent).to_string()) } _ => None, } } } ImplItem(Impl { ref for_, .. }) => { for_.def_id().map(|did| self.cx.tcx.item_name(did).to_string()) } // we don't display docs on `extern crate` items anyway, so don't process them ExternCrateItem(..) => return self.fold_item_recur(item), ImportItem(Import::Simple(ref name, ..)) => Some(name.clone()), MacroItem(..) => None, _ => item.name.clone(), }; if item.is_mod() && item.attrs.inner_docs { self.mod_ids.push(item_node_id.unwrap()); } let cx = self.cx; let dox = item.attrs.collapsed_doc_value().unwrap_or_else(String::new); for (ori_link, link_range) in markdown_links(&dox) { // bail early for real links if ori_link.contains('/') { continue; } let link = ori_link.replace("`", ""); let (def, fragment) = { let mut kind = PathKind::Unknown; let path_str = if let Some(prefix) = ["struct@", "enum@", "type@", "trait@", "union@"].iter() .find(|p| link.starts_with(**p)) { kind = PathKind::Type; link.trim_left_matches(prefix) } else if let Some(prefix) = ["const@", "static@", "value@", "function@", "mod@", "fn@", "module@", "method@"] .iter().find(|p| link.starts_with(**p)) { kind = PathKind::Value; link.trim_left_matches(prefix) } else if link.ends_with("()") { kind = PathKind::Value; link.trim_right_matches("()") } else if link.starts_with("macro@") { kind = PathKind::Macro; link.trim_left_matches("macro@") } else if link.ends_with('!') { kind = PathKind::Macro; link.trim_right_matches('!') } else { &link[..] }.trim(); if path_str.contains(|ch: char| !(ch.is_alphanumeric() || ch == ':' || ch == '_')) { continue; } match kind { PathKind::Value => { if let Ok(def) = self.resolve(path_str, true, &current_item) { def } else { resolution_failure(cx, &item.attrs, path_str, &dox, link_range); // this could just be a normal link or a broken link // we could potentially check if something is // "intra-doc-link-like" and warn in that case continue; } } PathKind::Type => { if let Ok(def) = self.resolve(path_str, false, &current_item) { def } else { resolution_failure(cx, &item.attrs, path_str, &dox, link_range); // this could just be a normal link continue; } } PathKind::Unknown => { // try everything! if let Some(macro_def) = macro_resolve(cx, path_str) { if let Ok(type_def) = self.resolve(path_str, false, &current_item) { let (type_kind, article, type_disambig) = type_ns_kind(type_def.0, path_str); ambiguity_error(cx, &item.attrs, path_str, article, type_kind, &type_disambig, "a", "macro", &format!("macro@{}", path_str)); continue; } else if let Ok(value_def) = self.resolve(path_str, true, &current_item) { let (value_kind, value_disambig) = value_ns_kind(value_def.0, path_str) .expect("struct and mod cases should have been \ caught in previous branch"); ambiguity_error(cx, &item.attrs, path_str, "a", value_kind, &value_disambig, "a", "macro", &format!("macro@{}", path_str)); } (macro_def, None) } else if let Ok(type_def) = self.resolve(path_str, false, &current_item) { // It is imperative we search for not-a-value first // Otherwise we will find struct ctors for when we are looking // for structs, and the link won't work. // if there is something in both namespaces if let Ok(value_def) = self.resolve(path_str, true, &current_item) { let kind = value_ns_kind(value_def.0, path_str); if let Some((value_kind, value_disambig)) = kind { let (type_kind, article, type_disambig) = type_ns_kind(type_def.0, path_str); ambiguity_error(cx, &item.attrs, path_str, article, type_kind, &type_disambig, "a", value_kind, &value_disambig); continue; } } type_def } else if let Ok(value_def) = self.resolve(path_str, true, &current_item) { value_def } else { resolution_failure(cx, &item.attrs, path_str, &dox, link_range); // this could just be a normal link continue; } } PathKind::Macro => { if let Some(def) = macro_resolve(cx, path_str) { (def, None) } else { resolution_failure(cx, &item.attrs, path_str, &dox, link_range); continue } } } }; if let Def::PrimTy(_) = def { item.attrs.links.push((ori_link, None, fragment)); } else { let id = register_def(cx, def); item.attrs.links.push((ori_link, Some(id), fragment)); } } if item.is_mod() && !item.attrs.inner_docs { self.mod_ids.push(item_node_id.unwrap()); } if item.is_mod() { let ret = self.fold_item_recur(item); self.mod_ids.pop(); ret } else { self.fold_item_recur(item) } } } /// Resolve a string as a macro fn macro_resolve(cx: &DocContext, path_str: &str) -> Option<Def> { use syntax::ext::base::{MacroKind, SyntaxExtension}; use syntax::ext::hygiene::Mark; let segment = ast::PathSegment::from_ident(Ident::from_str(path_str)); let path = ast::Path { segments: vec![segment], span: DUMMY_SP }; let mut resolver = cx.resolver.borrow_mut(); let mark = Mark::root(); let res = resolver .resolve_macro_to_def_inner(mark, &path, MacroKind::Bang, false); if let Ok(def) = res { if let SyntaxExtension::DeclMacro { .. } = *resolver.get_macro(def) { return Some(def); } } if let Some(def) = resolver.all_macros.get(&Symbol::intern(path_str)) { return Some(*def); } None } fn span_of_attrs(attrs: &Attributes) -> syntax_pos::Span { if attrs.doc_strings.is_empty() { return DUMMY_SP; } let start = attrs.doc_strings[0].span(); let end = attrs.doc_strings.last().expect("No doc strings provided").span(); start.to(end) } fn resolution_failure( cx: &DocContext, attrs: &Attributes, path_str: &str, dox: &str, link_range: Option<Range<usize>>, ) { let sp = span_of_attrs(attrs); let msg = format!("`[{}]` cannot be resolved, ignoring it...", path_str); let code_dox = sp.to_src(cx); let doc_comment_padding = 3; let mut diag = if let Some(link_range) = link_range { // blah blah blah\nblah\nblah [blah] blah blah\nblah blah // ^ ~~~~~~ // | link_range // last_new_line_offset let mut diag; if dox.lines().count() == code_dox.lines().count() { let line_offset = dox[..link_range.start].lines().count(); // The span starts in the `///`, so we don't have to account for the leading whitespace let code_dox_len = if line_offset <= 1 { doc_comment_padding } else { // The first `///` doc_comment_padding + // Each subsequent leading whitespace and `///` code_dox.lines().skip(1).take(line_offset - 1).fold(0, |sum, line| { sum + doc_comment_padding + line.len() - line.trim().len() }) }; // Extract the specific span let sp = sp.from_inner_byte_pos( link_range.start + code_dox_len, link_range.end + code_dox_len, ); diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE, NodeId::new(0), sp, &msg); diag.span_label(sp, "cannot be resolved, ignoring"); } else { diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE, NodeId::new(0), sp, &msg); let last_new_line_offset = dox[..link_range.start].rfind('\n').map_or(0, |n| n + 1); let line = dox[last_new_line_offset..].lines().next().unwrap_or(""); // Print the line containing the `link_range` and manually mark it with '^'s diag.note(&format!( "the link appears in this line:\n\n{line}\n\ {indicator: <before$}{indicator:^<found$}", line=line, indicator="", before=link_range.start - last_new_line_offset, found=link_range.len(), )); } diag } else { cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE, NodeId::new(0), sp, &msg) }; diag.help("to escape `[` and `]` characters, just add '\\' before them like \ `\\[` or `\\]`"); diag.emit(); } fn ambiguity_error(cx: &DocContext, attrs: &Attributes, path_str: &str, article1: &str, kind1: &str, disambig1: &str, article2: &str, kind2: &str, disambig2: &str) { let sp = span_of_attrs(attrs); cx.sess() .struct_span_warn(sp, &format!("`{}` is both {} {} and {} {}", path_str, article1, kind1, article2, kind2)) .help(&format!("try `{}` if you want to select the {}, \ or `{}` if you want to \ select the {}", disambig1, kind1, disambig2, kind2)) .emit(); } /// Given a def, returns its name and disambiguator /// for a value namespace /// /// Returns None for things which cannot be ambiguous since /// they exist in both namespaces (structs and modules) fn value_ns_kind(def: Def, path_str: &str) -> Option<(&'static str, String)> { match def { // structs, variants, and mods exist in both namespaces. skip them Def::StructCtor(..) | Def::Mod(..) | Def::Variant(..) | Def::VariantCtor(..) => None, Def::Fn(..) => Some(("function", format!("{}()", path_str))), Def::Method(..) => Some(("method", format!("{}()", path_str))), Def::Const(..) => Some(("const", format!("const@{}", path_str))), Def::Static(..) => Some(("static", format!("static@{}", path_str))), _ => Some(("value", format!("value@{}", path_str))), } } /// Given a def, returns its name, the article to be used, and a disambiguator /// for the type namespace fn type_ns_kind(def: Def, path_str: &str) -> (&'static str, &'static str, String) { let (kind, article) = match def { // we can still have non-tuple structs Def::Struct(..) => ("struct", "a"), Def::Enum(..) => ("enum", "an"), Def::Trait(..) => ("trait", "a"), Def::Union(..) => ("union", "a"), _ => ("type", "a"), }; (kind, article, format!("{}@{}", kind, path_str)) } /// Given an enum variant's def, return the def of its enum and the associated fragment fn handle_variant(cx: &DocContext, def: Def) -> Result<(Def, Option<String>), ()> { use rustc::ty::DefIdTree; let parent = if let Some(parent) = cx.tcx.parent(def.def_id()) { parent } else { return Err(()) }; let parent_def = Def::Enum(parent); let variant = cx.tcx.expect_variant_def(def); Ok((parent_def, Some(format!("{}.v", variant.name)))) } const PRIMITIVES: &[(&str, Def)] = &[ ("u8", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::U8))), ("u16", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::U16))), ("u32", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::U32))), ("u64", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::U64))), ("u128", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::U128))), ("usize", Def::PrimTy(hir::PrimTy::TyUint(syntax::ast::UintTy::Usize))), ("i8", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::I8))), ("i16", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::I16))), ("i32", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::I32))), ("i64", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::I64))), ("i128", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::I128))), ("isize", Def::PrimTy(hir::PrimTy::TyInt(syntax::ast::IntTy::Isize))), ("f32", Def::PrimTy(hir::PrimTy::TyFloat(syntax::ast::FloatTy::F32))), ("f64", Def::PrimTy(hir::PrimTy::TyFloat(syntax::ast::FloatTy::F64))), ("str", Def::PrimTy(hir::PrimTy::TyStr)), ("bool", Def::PrimTy(hir::PrimTy::TyBool)), ("char", Def::PrimTy(hir::PrimTy::TyChar)), ]; fn is_primitive(path_str: &str, is_val: bool) -> Option<Def> { if is_val { None } else { PRIMITIVES.iter().find(|x| x.0 == path_str).map(|x| x.1) } }
use spiro_sys::{self, bezctx}; use std::os::raw::c_int; macro_rules! spiro_cp { ({$x:literal, $y:literal, $ty:literal}) => { spiro_sys::spiro_cp { x: $x as f64, y: $y as f64, ty: $ty as i8 } } } unsafe extern "C" fn println_moveto(_bc: *mut bezctx, x: f64, y: f64, _is_open: c_int) { println!("M {}, {} ", x, y); } unsafe extern "C" fn println_lineto(_bc: *mut bezctx, x: f64, y: f64) { println!("L {}, {} ", x, y); } unsafe extern "C" fn println_quadto(_bc: *mut bezctx, x1: f64, y1: f64, x2: f64, y2: f64) { println!("Q {}, {}, {}, {} ", x1, y1, x2, y2); } unsafe extern "C" fn println_curveto(_bc: *mut bezctx, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64) { println!("C {}, {}, {}, {}, {}, {} ", x1, y1, x2, y2, x3, y3); } #[test] fn spiro_to_beziers() { // Path from // https://github.com/fontforge/libspiro/blob/84ce4dfd24f0e3ee83589bbfb02723dff5c03414/tests/call-test.c#L278 let mut path5 = vec![ spiro_cp!({ 0, 0, '{'}), spiro_cp!({100, 100, 'c'}), spiro_cp!({200, 200, '['}), spiro_cp!({300, 200, ']'}), spiro_cp!({400, 150, 'c'}), spiro_cp!({300, 100, '['}), spiro_cp!({200, 100, ']'}), spiro_cp!({150, 50, 'c'}), spiro_cp!({100, 0, '['}), spiro_cp!({ 0,-100, ']'}), spiro_cp!({-50,-200, 'c'}), spiro_cp!({-80,-250, '}'}), ]; let mut ctx = bezctx { moveto: Some(println_moveto), lineto: Some(println_lineto), quadto: Some(println_quadto), curveto: Some(println_curveto), mark_knot: None }; unsafe { spiro_sys::TaggedSpiroCPsToBezier(path5.as_mut_ptr(), &mut ctx); } }
use std::net::UdpSocket; const serv_addr: &str = "127.0.0.1:8000"; const cli_addr: &str = "0.0.0.0:0"; fn main() { let mut socket = UdpSocket::bind(cli_addr).unwrap(); let mut buf = [4; 10]; socket.send_to(&buf, serv_addr); }
use const_regex::match_regex; const fn is_star_wars<const N: usize>(subtitle: &[u8; N]) -> bool { let mut bytes = *subtitle; let mut i = 0; while i < bytes.len() { bytes[i] = bytes[i].to_ascii_lowercase(); i += 1; } match_regex!("m | [tn]|b", &bytes) } fn main() { dbg!(is_star_wars(b"The Phantom Menace")); dbg!(is_star_wars(b"Attack of the Clones")); dbg!(is_star_wars(b"The Empire Strikes Back")); }
extern crate juniper; extern crate sys_info; extern crate libc; use self::libc::timeval; use self::juniper::Context; pub enum ByteUnit { KB, MB, GB, TB } pub enum CycleUnit { MHz, GHz } fn get_byte_conversion(unit: Option<ByteUnit>) -> u64 { match unit { Some(u) => match u { ByteUnit::KB => 1, ByteUnit::MB => 1_000, ByteUnit::GB => 1_000_000, ByteUnit::TB => 1_000_000_000 }, None => 1 } } fn get_cycle_conversion(unit: Option<CycleUnit>) -> u64 { match unit { Some(u) => match u { CycleUnit::MHz => 1, CycleUnit::GHz => 1_000 }, None => 1 } } fn convert_to_string(value: u64, conversion_rate: u64) -> String { if conversion_rate == 0 { return String::from("0"); } let result = value as f32 / conversion_rate as f32; format!("{:.2}", result) } pub struct DiskInformation { pub total: String, pub free: String } pub struct LoadAverage { pub one: String, pub five: String, pub fifteen: String } pub struct MemoryInformation { pub total: String, pub free: String, pub available: String, pub buffers: String, pub cached: String, pub swap_total: String, pub swap_free: String } pub struct System { pub os_type: String, pub os_release: String, pub hostname: String, pub cpu_speed: u64, pub cpu_num: u32 } pub struct BootTime { pub up_seconds: String, pub idle_seconds: String } impl System { pub fn new() -> System { System { os_type: sys_info::os_type().unwrap_or("Unsupported Operating System".into()), os_release: sys_info::os_release().unwrap_or("Failed to get OS release version".into()), hostname: sys_info::hostname().unwrap_or("Failed to get host name".into()), cpu_speed: sys_info::cpu_speed().unwrap_or(0), cpu_num: sys_info::cpu_num().unwrap_or(0) } } pub fn get_disk_info(&self, unit: Option<ByteUnit>) -> DiskInformation { let disk = sys_info::disk_info().unwrap_or(sys_info::DiskInfo{ total: 0, free: 0 }); let conversion_rate = get_byte_conversion(unit); DiskInformation { total: convert_to_string(disk.total, conversion_rate), free: convert_to_string(disk.free, conversion_rate) } } pub fn get_load_average(&self) -> LoadAverage { match sys_info::loadavg() { Ok(r) => LoadAverage { one: r.one.to_string(), five: r.five.to_string(), fifteen: r.fifteen.to_string() }, Err(_) => LoadAverage { one: "0".into(), five: "0".into(), fifteen: "0".into() } } } pub fn get_memory_information(&self, unit: Option<ByteUnit>) -> MemoryInformation { let mem_info = sys_info::mem_info().unwrap_or(sys_info::MemInfo{ total: 0, free: 0, avail: 0, buffers: 0, cached: 0, swap_total: 0, swap_free: 0 }); let conversion = get_byte_conversion(unit); MemoryInformation { total: convert_to_string(mem_info.total, conversion), free: convert_to_string(mem_info.free, conversion), available: convert_to_string(mem_info.avail, conversion), buffers: convert_to_string(mem_info.buffers, conversion), cached: convert_to_string(mem_info.cached, conversion), swap_total: convert_to_string(mem_info.swap_total, conversion), swap_free: convert_to_string(mem_info.swap_free, conversion) } } pub fn get_cpu_speed(&self, unit: Option<CycleUnit>) -> String { convert_to_string(self.cpu_speed, get_cycle_conversion(unit)) } pub fn get_proc_total(&self) -> String { // Not supported on Windows match sys_info::proc_total() { Ok(result) => result.to_string(), Err(_) => String::from("Failed to get proccess quantity.") } } pub fn get_boot_time(&self) -> BootTime { let boot_time = sys_info::boottime().unwrap_or(timeval { tv_sec: 0, tv_usec: 0 }); BootTime { up_seconds: boot_time.tv_sec.to_string(), idle_seconds: boot_time.tv_usec.to_string() } } } impl Context for System {}
#[derive(Debug, Clone, Copy)] pub enum BinaryOp { Add, Sub, Mul, Div, } #[derive(Debug, Clone)] pub enum Term { Num(f64), Binary(Box<Term>, BinaryOp, Box<Term>), } impl Term { pub fn calc(&self) -> f64 { use BinaryOp::*; use Term::*; match &self { Num(num) => *num, Binary(left, Add, right) => left.calc() + right.calc(), Binary(left, Sub, right) => left.calc() - right.calc(), Binary(left, Mul, right) => left.calc() * right.calc(), Binary(left, Div, right) => left.calc() / right.calc(), } } } #[test] fn test_term() -> Result<(), Box<dyn std::error::Error>> { use Term::*; let terms = &[ Num(1423523.08), Binary(Num(0.1).into(), BinaryOp::Add, Num(0.2).into()), Binary(Num(0.5).into(), BinaryOp::Sub, Num(1.).into()), Binary(Num(10.).into(), BinaryOp::Mul, Num(0.5).into()), Binary(Num(10.).into(), BinaryOp::Div, Num(0.5).into()), ]; let expecteds = &[1423523.08, 0.1 + 0.2, -0.5, 5., 20.]; for (term, expected) in terms.iter().zip(expecteds.iter()) { assert_eq!(term.calc(), *expected); } Ok(()) } #[derive(Debug)] pub struct SyntaxError;
/** By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? */ #[cfg(test)] mod tests { use super::*; #[test] fn test() { assert_eq!(get_prime(6), 13); assert_eq!(get_prime(10001), 104743); } } pub fn get_prime(c: u32) -> u32 { let mut primes = vec![2, 3, 5]; let mut v = 5; loop { v += 2; // Number has to be odd if is_prime(v, &primes) { primes.push(v); if primes.len() as u32 == c { return *primes.last().unwrap(); } } } } fn is_prime(v: u32, existing: &Vec<u32>) -> bool { for factor in existing.iter() { if v % *factor == 0 { return false } } true }
#![cfg(test)] use std::str; use collectxyz::nft::{Config, Coordinates, ExecuteMsg, InstantiateMsg, QueryMsg, XyzExtension}; use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{BankMsg, Binary, Coin, DepsMut, StdError, Uint128}; use serde_json::json; use crate::contract::{execute, instantiate, query}; use crate::error::ContractError; use crate::execute as ExecHandler; use crate::query as QueryHandler; const OWNER: &str = "owner"; const NONOWNER: &str = "nonowner"; // rsa public key with corresponding private key: // // (DO NOT USE THIS PRIVATE KEY FOR ANYTHING REAL, OBVIOUSLY!!!!!) // // -----BEGIN RSA PRIVATE KEY----- // MIIEowIBAAKCAQEAvuwZ6A6CWwOUkSN0ZIkGurUiFCkV/HBanARwNTXGfEzPW5j3 // nkKM1V/oVDQ0dScm39SFlaHOrCINnU/IK+xNo9fiSRD4oRG1Wa6w/sIWIZgMKsaF // dvLv/+JtTvMfFSXi2Z8FeF3jz8jWFEc7RhwndTtBA6KNXTW7EPTLk03+HUFi2yO7 // 9HQaFHdBQkQPgdry2AHI+y2BOPKgwhQJM6Ys3KMp8CYPAhhmBNttG2L9xwW3N91P // yth6jBxOmrwuHRO+9Wq7UhA6LG0O5m/VO7Th4WnFviwnoFeLnIiam2FGJnbM4uUL // mhExnz7aIH4lyNIHbl/zOp5cs5MA09HBNvIbtwIDAQABAoIBAQCXAXDgHRG3YNaS // ESPPHJ4I8Jj6ryBnoInaGpyRSW4rBCmBvjQjpWl0nr3IU94lxwi1QodBuVAYz3pL // MT4Wl3k1HNwqhFTSOIpiW4w8g1Az0+nTr18CnNV8Yx+nsR2lgWiyTVdrQ3+a6bOB // KHHWWxBOZcZfVKNQ1N2XZLbbVHWntp79hWSJnbqNwgTWvzYb3wBATKilcufL+Gng // TI7PhtPTBfM9jOxcIKzJSz3Qq8zvyrUS9MvcK7Y6u85XN/4YkZgpIJN0UitWk7nK // gj+A1P+8jUGhHJvhsjIc99nz8JLV3YCmHjRSj3BpWQRvB7A4RAuzUAOoGCNyvlDs // uHXd+OXpAoGBAPX9O7ifI5t7W5OJPewLQeq86VSJVnAr+7A3tTm3fUFkYQDYvG1c // xbykxN293LBAZSg2cgMJddn40a95ZXAW0I5KJrsun7UPeHi+CuZM+uVxtWXhIoDA // grtgV2rdJ4A9nf0xTC7yUNzOZf/SJX2dRlX3uhtrJqnTA2fgMzUquO/dAoGBAMax // K1KrVM9mBhkoD8URji49ymm8qM8fuI8dgN4X6PTTEXzjwKSKJlTz2bMEwekX8RSj // zQYTwDlzvNbz6RxDTAqr8YuW5P39fspomQl83v6HFGhTnalF56ul5/1dKrN9pRDE // wBQPL0aGLRB+ZlTBP2jT2S0vnv5hoFs1DQdlUcqjAoGAGpbg2bf59ViEMZJoKxec // bG83GXgu67kVX5rl7/Mxitv60EidNYUNqrJ0xTM8o6CSTqJz+HgRURpgMAODP3Z3 // 3KmPPjRv9vZRI1wHeZVgmWSNIxIO1LP6bZ6gVGDLYEVIypGFlp2CuBtnUxu4Cbfy // XmCEsWoHp9uzRospfdm8W9ECgYBG2ulzKqws5doo4HN3OIJ2lQx41pFwg4RibQgG // q4okvJxQ6DtLsgRnaSpqP7kS8bnEPYGguCxlkJN4KDUqIgmdCKIzwFTbCqpLbi+d // BY3UQMGTTrY7pjUurhRj8vSGW7kgmLlSrfOS98hcSGcftGZzcJDTH1dYqeHwhKOn // zobzdwKBgDWZ86AmjCrsFJpjbpikm7taCXC7n9A5UIl2qouDwLdZpeSsXwVEhw02 // 60pBcDbp8zpeNQKM3dCG6luhtu6jkC02YchWCEL/1PjlislUCbQ8Al/dj2PGN7rq // xJPwpXCTmZKyW5j0kBthltS2pKz2RybSiKVdQUMB9cuh8WCeFTLb // -----END RSA PRIVATE KEY----- const RSA_PUBLIC_KEY: &str = "-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvuwZ6A6CWwOUkSN0ZIkG urUiFCkV/HBanARwNTXGfEzPW5j3nkKM1V/oVDQ0dScm39SFlaHOrCINnU/IK+xN o9fiSRD4oRG1Wa6w/sIWIZgMKsaFdvLv/+JtTvMfFSXi2Z8FeF3jz8jWFEc7Rhwn dTtBA6KNXTW7EPTLk03+HUFi2yO79HQaFHdBQkQPgdry2AHI+y2BOPKgwhQJM6Ys 3KMp8CYPAhhmBNttG2L9xwW3N91Pyth6jBxOmrwuHRO+9Wq7UhA6LG0O5m/VO7Th 4WnFviwnoFeLnIiam2FGJnbM4uULmhExnz7aIH4lyNIHbl/zOp5cs5MA09HBNvIb twIDAQAB -----END PUBLIC KEY----- "; const SIG_X1Y2Z3: &str = "rGU6WeFYjeIluTAcl5PeNn5VOvpfUjIFQ/Zan87wqvRSPZXkBo7k4/IAGNAs/qmcwFgbIcBeXmyCc9x+lVXvdq0fLGen0TTRCpgFgv7cpFw8BkAeEeZrJDvYgKVbwinOvmUKfQafPLnN7E7oIqk0s2GWXWRJJLzky54DeaUzhhcoxz6iCYck2GEPKd9i7QmFEz52rqqGDQorDj3ojYVj5pzilRPXgYkEfdU432YgPfpcmAmnL8vL2PczBeB/jFUETvQnuMawTTU+aDI4APIIPUjmy2eVYsTIJvoU1lDAskjzqA57rNG4+w0XovH0rtXfG0BV1hb+1fPpnBgpqNixPQ=="; const SIG_X3Y2Z1: &str = "tz4YIUjHJZwdcExPe6YLmGuzPHemygNzVQ02F1C/d1iAboPhnsrPchlKKcHAKb2MbghN72HD1rtlvzPPNrJWjbwE5zeZG8lQq5a7Sjzh+xeYYy938I0l/HtY7gyOaqD/DMsQYV4tIxY6LIJS9oC+5uuhxXpqs/HARnMQbhcbmRpPbGjlXM4YTOHeSLp4Ve8Xts6bKRyEA6MIEJPTxrk8QX0sTJPeDWEGQzN1QotSw2wN/xppFRGRAenPbUMx1+kGVbiuk44FmcwQ2GwZapX/ab1x3TaTynSccHo9w63nBl42RXmnZvNanjwcu15Jc84cQOsNmeh8PB35qhHr2iLXUg=="; const SIG_X2Y2Z2: &str = "Q5lblSk4zba0rILfiUs+ZS+PU9XZHTMrblriZ8TGILIC9PfzHApoEtzzm530VeQVrwY5CaaCTp8k34w8ySsJtgMBa5MKAbqDOeerEVQiKGEV3eBvUVIVSePVUwE9UuQXLeImzqqlARQki/cI2hK8kLFKkrolKzurv8kwKdAG3iHZUXApVse4Dhpx7nLMM8k/4P01VnujJG4DtCjZJzizcKxHCW03PCg83k3Kc3WG6bg7Don91gCSs+RpA4hVDlG/RKD5MdDZh4ktAE7VFg7Yv6uAoyqulUFlHbZcHXAgiXkliVhTVKMalQXltYsqpr1GV6FNbe/iki/C58RMO5acuQ=="; const SIG_X1Y1Z1: &str = "fFF0OW5vgKkqU+0L39/26vCc0SoRYD9KhzkeG1q6xb5+gXp+QSE4tZDNr02Bg5av+gOfGLn5JQCofpjSqZ+m3VyDQUvgaJ8DeGV4GW+dht7kkULFL39cW0xiiYSHH3g4hAntwPO/40bI9tBm40pNwfLA6cS7O1a8509uL63h4WBEtUvre2MmbbzIc/cdKKpQWH0sBKOZG3jMHnShp9YvGvfM3OzEUZpOjkBG1U/fUM2JsbdBQjIXum3DIn2vGvHxtPkkRf4AkLLp5MWpULqV7MdIk8wPd8KS+kjUY33TMdeN6Xz9YJsKeshLMvO80jm/usZFDrLz+sr9dF89RWZ+oQ=="; const SIG_X0Y0Z0: &str = "deu6I5cNYdtWt3WcUxVixs5t/A0udL1/I86RvqChSZ5RRUtN6L3QtG6HqqpkuFXkSQvVwAMWV5NMkB4CKuB/i3CrpHJxKtK5xia8C3PQDYpgAl0QaScuTEGSL3P4Kct/8ntBCcaF2Oatc8t6VwzvKUsVC5t4sxTBp11JldfY3P9tm6iUC1IZCj/GweWNyuPHFYqPJXIAFx5yG9LYUL2CGmYCjOZwFYJpAheTiqdMD/hnMPaVg3N80WQmCdmch7aepfIH17DFIrBaeIVBry52HUco098mpFQznqmXt5Ki1pJSx+/w+pst/Z9T87f6MVy63cS57bKL2Lx+nQH30G5fJg=="; fn mock_config() -> Config { Config { public_minting_enabled: true, max_coordinate_value: 1000, mint_fee: Coin::new(0, "uluna"), token_supply: 10000, wallet_limit: 5, move_nanos_per_step: 1, base_move_nanos: 10, move_fee_per_step: Uint128::new(1), base_move_fee: Coin::new(100, "uluna"), } } fn setup_contract( deps: DepsMut, mint_fee: Option<Coin>, token_supply: Option<u64>, wallet_limit: Option<u32>, ) { let mut msg = InstantiateMsg { captcha_public_key: String::from(RSA_PUBLIC_KEY), config: mock_config(), }; if let Some(mint_fee) = mint_fee { msg.config.mint_fee = mint_fee; } if let Some(token_supply) = token_supply { msg.config.token_supply = token_supply; } if let Some(wallet_limit) = wallet_limit { msg.config.wallet_limit = wallet_limit; } let info = mock_info(OWNER, &[]); let res = instantiate(deps, mock_env(), info, msg).unwrap(); assert_eq!(0, res.messages.len()); } fn as_json(binary: &Binary) -> serde_json::Value { let b64_binary = binary.to_base64(); let decoded_bytes = base64::decode(&b64_binary).unwrap(); let decoded_str = str::from_utf8(&decoded_bytes).unwrap(); serde_json::from_str(decoded_str).unwrap() } #[test] fn minting() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); // nonowner with invalid signature cannot mint let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from("Zm9vYmFyCg=="), // "foobar" in base64 coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // nonowner with mismatched signature cannot mint let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 1, z: 1 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // nonowner with valid signature can mint let res = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(); // ensure response event emits the minted token_id assert!(res .attributes .iter() .any(|attr| attr.key == "token_id" && attr.value == "1")); // random cannot mint a token with same coordinates twice let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::Claimed {}); assert!(format!("{}", err).contains("Coordinates already claimed")); // random cannot mint out-of-bounds coordinates let config = mock_config(); for cfg in &["x", "y", "z", "xy", "xz", "yz", "xyz"] { for sign in &[-1, 1] { let mut coords = Coordinates { x: sign * config.max_coordinate_value, y: sign * config.max_coordinate_value, z: sign * config.max_coordinate_value, }; if cfg.contains('x') { coords.x += sign; } if cfg.contains('y') { coords.y += sign; } if cfg.contains('z') { coords.z += sign; } let oob_mint_msg = ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: coords, }; let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), oob_mint_msg, ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::GenericErr { msg: String::from("coordinate values must be between -1000 and 1000") }) ); } } // ensure num tokens increases let count = as_json(&query(deps.as_ref(), mock_env(), QueryMsg::NumTokens {}).unwrap()); assert_eq!(count["count"], 1); // non-existent token_id returns error let _ = query( deps.as_ref(), mock_env(), QueryMsg::NftInfo { token_id: String::from("foo"), }, ) .unwrap_err(); // correct token_id yields expected token info let info = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::NftInfo { token_id: String::from("1"), }, ) .unwrap(), ); assert_eq!(info["extension"]["name"], "xyz #1"); assert_eq!( info["extension"]["description"], "Explore the metaverse, starting with xyz." ); if let serde_json::Value::String(image) = &info["extension"]["image"] { assert!(image.starts_with("data:image/svg+xml;base64,")); } else { panic!("NftInfo response 'image' had wrong data type"); } // owner info is correct let owner = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::OwnerOf { token_id: "1".to_string(), include_expired: None, }, ) .unwrap(), ); assert_eq!(owner["owner"], NONOWNER); assert_eq!(owner["approvals"], serde_json::Value::Array(vec![])); // list the token_ids let tokens = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::AllTokens { limit: None, start_after: None, }, ) .unwrap(), ); assert_eq!( tokens["tokens"], serde_json::Value::Array(vec![serde_json::Value::String(String::from("1"))]) ); } #[test] fn mint_fee() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), Some(Coin::new(10000, "uluna")), None, None); // mint blocked when insufficient funds or incorrect denoms sent for funds in vec![ vec![], vec![Coin::new(1000, "uusd")], vec![Coin::new(9999, "uluna")], ] .iter() { let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, funds), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::generic_err("insufficient funds sent")) ); } // non-owner can mint when sufficient funds sent let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[Coin::new(10000, "uluna")]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(); // owner is allowed to mint with insufficient funds let _ = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap(); } #[test] fn wallet_limit() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, Some(1)); // non-owner is allowed to mint within wallet limit let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(); // non-owner isn't allowed to mint beyond of wallet limit let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::WalletLimit {}); // owner is allowed to mint beyond wallet limit for msg in vec![ ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y1Z1), coordinates: Coordinates { x: 1, y: 1, z: 1 }, }, ExecuteMsg::Mint { captcha_signature: String::from(SIG_X0Y0Z0), coordinates: Coordinates { x: 0, y: 0, z: 0 }, }, ] { let _ = execute(deps.as_mut(), mock_env(), mock_info(OWNER, &[]), msg).unwrap(); } } #[test] fn token_supply_and_public_minting() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, Some(5), None); // mint 4 tokens for the non-owner for (sig, coords) in &[ (SIG_X1Y2Z3, Coordinates { x: 1, y: 2, z: 3 }), (SIG_X3Y2Z1, Coordinates { x: 3, y: 2, z: 1 }), (SIG_X0Y0Z0, Coordinates { x: 0, y: 0, z: 0 }), (SIG_X1Y1Z1, Coordinates { x: 1, y: 1, z: 1 }), ] { let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(*sig), coordinates: *coords, }, ) .unwrap(); } // disable public minting let mut config = QueryHandler::query_config(deps.as_ref()).unwrap(); config.public_minting_enabled = false; let _ = ExecHandler::execute_update_config(deps.as_mut(), mock_info(OWNER, &[]), config.clone()) .unwrap(); // non-owner can't mint when public minting is disabled let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // owner is allowed to mint when public minting is disabled let _ = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X2Y2Z2), coordinates: Coordinates { x: 2, y: 2, z: 2 }, }, ) .unwrap(); // owner can't mint beyond token supply let err = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::SupplyExhausted {}); // re-enable public minting config.public_minting_enabled = true; let _ = ExecHandler::execute_update_config(deps.as_mut(), mock_info(OWNER, &[]), config).unwrap(); // non-owner can't mint beyond token supply let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::SupplyExhausted {}); } #[test] fn update_and_query_config() { let initial_config = mock_config(); let mut deps = mock_dependencies(&[]); setup_contract( deps.as_mut(), Some(initial_config.mint_fee.clone()), Some(initial_config.token_supply), Some(initial_config.wallet_limit), ); // query initial config let res = QueryHandler::query_config(deps.as_ref()).unwrap(); assert_eq!(res, initial_config); // change the config let mut new_config = initial_config.clone(); new_config.mint_fee = Coin::new(10000, "uluna"); new_config.move_nanos_per_step = 123456; // nonowner can't update config let err = ExecHandler::execute_update_config( deps.as_mut(), mock_info(NONOWNER, &[]), new_config.clone(), ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // check config was unchanged let res = QueryHandler::query_config(deps.as_ref()).unwrap(); assert_eq!(res, initial_config); // owner can update config let _ = ExecHandler::execute_update_config( deps.as_mut(), mock_info(OWNER, &[]), new_config.clone(), ) .unwrap(); // check config was updated let res = QueryHandler::query_config(deps.as_ref()).unwrap(); assert_eq!(res, new_config); } #[test] fn update_captcha_public_key() { let new_public_key = "-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu+hYpXLZ9Ja495clsIcc aAycTgtO0/ZDlfU4LUrLxENW8KtF/qJ8TNDRYWIqx614AFPZh1Eyj4XCwZmy1Ixg fVZe1ZUHvlc6Hbozym76XfnQdM64QVpRh+6ZwzL76V3G1Iy6mur4Sa8at/3pJBpI kdHOhBe4vfjazZz0jKM8RWbz67mjw45nKRiEB9GksywibhUdXvnXODNeSKjGwJ34 CaFpJ7aRiqaXJwH1SMpcniMWP22mjKt1zA8nipSmr3EUU7eNAYSQoK3QzEZSRayE BSiq+BBw9jGcrekeFQll1zX95pHttBsm9tB4CHOIJPyxTMM5oGWzCRLouSJR9TJq 8wIDAQAB -----END PUBLIC KEY----- "; let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); // non-owner can't update the public key let err = ExecHandler::execute_update_captcha_public_key( deps.as_mut(), mock_info(NONOWNER, &[]), new_public_key.to_string(), ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // owner can't update to an invalid public key let err = ExecHandler::execute_update_captcha_public_key( deps.as_mut(), mock_info(OWNER, &[]), "foobar".to_string(), ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::generic_err("invalid public key")) ); // owner can update to a valid public key let _ = ExecHandler::execute_update_captcha_public_key( deps.as_mut(), mock_info(OWNER, &[]), new_public_key.to_string(), ) .unwrap(); let stored_key = QueryHandler::query_captcha_public_key(deps.as_ref()).unwrap(); assert_eq!(stored_key, new_public_key); } #[test] fn withdraw() { let balance = vec![Coin::new(10000, "uluna")]; let mut deps = mock_dependencies(&balance); setup_contract(deps.as_mut(), None, None, None); // non-owner can't withdraw let err = ExecHandler::execute_withdraw( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), vec![Coin::new(100, "uluna")], ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // owner can withdraw let res = ExecHandler::execute_withdraw( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), vec![Coin::new(100, "uluna")], ) .unwrap(); assert_eq!( res.messages[0].msg, BankMsg::Send { amount: vec![Coin::new(100, "uluna")], to_address: mock_info(OWNER, &[]).sender.to_string() } .into() ) } #[test] fn num_tokens_for_owner() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); let _ = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(); let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X3Y2Z1), coordinates: Coordinates { x: 3, y: 2, z: 1 }, }, ) .unwrap(); for owner in &[OWNER, NONOWNER] { let num_tokens = QueryHandler::query_num_tokens_for_owner( deps.as_ref(), mock_info(owner, &[]).sender.to_string(), ) .unwrap(); assert_eq!(num_tokens.count, 1); } let num_tokens = QueryHandler::query_num_tokens_for_owner( deps.as_ref(), mock_info("someotherguy", &[]).sender.to_string(), ) .unwrap(); assert_eq!(num_tokens.count, 0) } #[test] fn move_token() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); // mint some tokens let nonowner_xyz_id = "xyz #1"; let nonowner_coords = Coordinates { x: 0, y: 0, z: 0 }; let owner_xyz_id = "xyz #2"; let owner_coords = Coordinates { x: 1, y: 1, z: 1 }; let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: SIG_X0Y0Z0.to_string(), coordinates: nonowner_coords, }, ) .unwrap(); let _ = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Mint { captcha_signature: SIG_X1Y1Z1.to_string(), coordinates: owner_coords, }, ) .unwrap(); // can't move a non-existent token let err = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Move { token_id: "foo".to_string(), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::not_found("collectxyz::nft::XyzTokenInfo")) ); // can't move a token that isn't yours let err = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // can't move to a space that's occupied let err = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: nonowner_coords, }, ) .unwrap_err(); assert_eq!(err, ContractError::Unauthorized {}); // can't move to a space that's out of bounds let err = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Move { token_id: owner_xyz_id.to_string(), coordinates: Coordinates { x: 0, y: 0, z: mock_config().max_coordinate_value + 1, }, }, ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::generic_err( "coordinate values must be between -1000 and 1000" )) ); // non-owner must pay a move fee let nonowner_target = Coordinates { x: 400, y: 500, z: 600, }; let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: nonowner_target, }, ) .unwrap_err(); assert_eq!( err, ContractError::Std(StdError::generic_err("insufficient funds sent")) ); // look up the move fee let move_params = QueryHandler::query_move_params( deps.as_ref(), nonowner_xyz_id.to_string(), nonowner_target, ) .unwrap(); println!("{:#?}", move_params); // nonowner can move with sufficient move fee paid let res = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[move_params.fee.clone()]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: nonowner_target, }, ) .unwrap(); // ensure response event emits the moved token_id assert!(res .attributes .iter() .any(|attr| attr.key == "token_id" && attr.value == "1")); // look up the updated token let res = QueryHandler::query_xyz_nft_info(deps.as_ref(), nonowner_xyz_id.to_string()).unwrap(); // check that the token metadata is correct assert_eq!( res.extension, XyzExtension { coordinates: nonowner_target, prev_coordinates: Some(nonowner_coords), arrival: mock_env().block.time.plus_nanos(move_params.duration_nanos), } ); // can't move a token that's currently moving let err = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[move_params.fee.clone()]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: nonowner_coords, }, ) .unwrap_err(); assert_eq!(err, ContractError::MoveInProgress {}); // can move a moved coordinate once it's arrived let mut env = mock_env(); env.block.time = env.block.time.plus_nanos(move_params.duration_nanos + 1); let _ = execute( deps.as_mut(), env, mock_info(NONOWNER, &[move_params.fee]), ExecuteMsg::Move { token_id: nonowner_xyz_id.to_string(), coordinates: nonowner_coords, }, ); // owner can move without paying a move fee let owner_target = Coordinates { x: 2, y: 1, z: 1 }; let _ = execute( deps.as_mut(), mock_env(), mock_info(OWNER, &[]), ExecuteMsg::Move { token_id: owner_xyz_id.to_string(), coordinates: owner_target, }, ) .unwrap(); let res = QueryHandler::query_xyz_nft_info(deps.as_ref(), owner_xyz_id.to_string()).unwrap(); assert_eq!( res.extension, XyzExtension { coordinates: owner_target, prev_coordinates: Some(owner_coords), arrival: mock_env().block.time.plus_nanos(10 + 1), } ); } #[test] fn xyz_nft_info_by_coords() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); // throws error on coordinate with no nft let err = query( deps.as_ref(), mock_env(), QueryMsg::XyzNftInfoByCoords { coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap_err(); assert_eq!(err, StdError::not_found("xyz_token_info")); // mint the associated nft let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y2Z3), coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(); let res = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::XyzNftInfoByCoords { coordinates: Coordinates { x: 1, y: 2, z: 3 }, }, ) .unwrap(), ); assert_eq!(res["name"], "xyz #1"); assert_eq!(res["owner"], NONOWNER); } #[test] fn all_xyz_tokens() { let mut deps = mock_dependencies(&[]); setup_contract(deps.as_mut(), None, None, None); // check no tokens returned let res = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::AllXyzTokens { limit: Some(1), start_after: None, }, ) .unwrap(), ); assert_eq!(res, json!({ "tokens": [] })); // mint the associated nft let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X0Y0Z0), coordinates: Coordinates { x: 0, y: 0, z: 0 }, }, ) .unwrap(); // mint the associated nft let _ = execute( deps.as_mut(), mock_env(), mock_info(NONOWNER, &[]), ExecuteMsg::Mint { captcha_signature: String::from(SIG_X1Y1Z1), coordinates: Coordinates { x: 1, y: 1, z: 1 }, }, ) .unwrap(); // check both tokens returned let res = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::AllXyzTokens { limit: Some(2), start_after: None, }, ) .unwrap(), ); assert_eq!(res["tokens"][0]["name"], "xyz #1"); assert_eq!(res["tokens"][1]["name"], "xyz #2"); // check only second token returned let res = as_json( &query( deps.as_ref(), mock_env(), QueryMsg::AllXyzTokens { limit: Some(2), start_after: Some("xyz #1".to_string()), }, ) .unwrap(), ); assert_eq!(res["tokens"][0]["name"], "xyz #2"); }
use crate::map_head::MapHead; use crate::map_type::MapType; use crate::map::Map; use crate::rlew_reader::RlewReader; use std::io::Read; use std::io::Cursor; use crate::plane::Plane; pub struct MapBuilder { map_head: MapHead, //map_type: MapType data: Vec<u8> } impl MapBuilder { pub fn new(map_head: MapHead, data: Vec<u8>) -> Self { Self { map_head: map_head, data: data } } pub fn build(&self, map_idx: u16) -> Option<Map> { // idx in the data // parse the MapType // get the indexed data let offset = self.map_head.header_offsets[map_idx as usize] as usize; let m_end = self.data.len(); let map_type = MapType::parse(&self.data[offset..m_end])?; let mut plane1_data: Vec<u8> = Vec::new(); let p1_start = map_type.plane_start[0] as usize; let p1_length = map_type.plane_length[0] as usize; let mut plane2_data: Vec<u8> = Vec::new(); let p2_start = map_type.plane_start[1] as usize; let p2_length = map_type.plane_length[1] as usize; let mut c = Cursor::new(&self.data); let mut reader = RlewReader::new(&mut c); let mut plane1_data = reader.read_offset(p1_start, p1_length, 64 * 64); let mut plane2_data = reader.read_offset(p2_start, p2_length, 64 * 64); Some(Map { width: map_type.width, height: map_type.height, name: map_type.name, plane1: Plane { data: plane1_data }, plane2: Plane { data: plane2_data } }) } }
#[macro_use] extern crate nom; pub(crate) mod helpers; pub(crate) mod parser; pub(crate) mod structs; use crate::parser::elm; use crate::structs::{ElmCode, ElmModule, Function, Type, TypeOrFunction}; use hashbrown::HashSet; #[derive(Debug, Clone)] pub enum ElmExport { Function { name: String, type_signature: Option<Vec<String>>, }, Type { name: String, definition: String, }, } #[derive(Debug, Clone)] pub struct ElmExports { pub exports: Vec<ElmExport>, } impl ElmExports { fn new() -> ElmExports { ElmExports { exports: vec![] } } } pub fn get_elm_exports(code: &str) -> Result<ElmExports, ()> { let (_, (module, elm_code)) = match elm(code) { Ok(v) => v, Err(_) => return Err(()), }; if let ElmModule::List(l) = module { Ok(exports_from_module_list(l.as_ref(), elm_code.as_ref())) } else { Ok(exports_from_module_all(elm_code.as_ref())) } } fn exports_from_module_list(l: &[TypeOrFunction], elm_code: &[ElmCode]) -> ElmExports { let mut exports = ElmExports::new(); // get a set containing all types & functions that will be exported and we care about let to_export: HashSet<&str> = l .iter() .map(|export| match export { TypeOrFunction::Type(Type { ref name, .. }) => *name, TypeOrFunction::Function(Function { ref name, .. }) => *name, }) .collect(); // collect functions and types that are defined in the module exports for exp in l.iter() { match exp { TypeOrFunction::Type(Type { ref name, definition: Some(def), }) => exports.exports.push(ElmExport::Type { name: String::from(*name), definition: String::from(*def), }), TypeOrFunction::Function(Function { ref name, type_signature: Some(sig), }) => exports.exports.push(ElmExport::Function { name: String::from(*name), type_signature: Some(sig.clone()), }), // ignore if there is not an inline definition _ => {} } } // collect functions and types from code for code_bit in elm_code.iter() { match code_bit { ElmCode::Type(Type { ref name, ref definition, }) => { if to_export.contains(*name) { exports.exports.push(ElmExport::Type { name: String::from(*name), definition: definition .map(|def| String::from(def)) .unwrap_or_else(|| String::new()), }) } } ElmCode::Function(Function { ref name, ref type_signature, }) => { if to_export.contains(*name) { exports.exports.push(ElmExport::Function { name: String::from(*name), type_signature: type_signature.clone(), }) } } // do nothing _ => {} } } exports } fn exports_from_module_all(elm_code: &[ElmCode]) -> ElmExports { let mut exports = ElmExports::new(); // collect functions and types from code for code_bit in elm_code.iter() { match code_bit { ElmCode::Type(Type { ref name, ref definition, }) => exports.exports.push(ElmExport::Type { name: String::from(*name), definition: definition .map(|def| String::from(def)) .unwrap_or_else(|| String::new()), }), ElmCode::Function(Function { ref name, ref type_signature, }) => exports.exports.push(ElmExport::Function { name: String::from(*name), type_signature: type_signature.clone(), }), // do nothing _ => {} } } exports }
use crate::macos::keyboard::Keyboard; use crate::rdev::{Button, Event, EventType}; use cocoa::base::id; use core_graphics::event::{CGEvent, CGEventFlags, CGEventTapLocation, CGEventType, EventField}; use lazy_static::lazy_static; use std::convert::TryInto; use std::os::raw::c_void; use std::sync::Mutex; use std::time::SystemTime; use crate::macos::keycodes::key_from_code; pub type CFMachPortRef = *const c_void; pub type CFIndex = u64; pub type CFAllocatorRef = id; pub type CFRunLoopSourceRef = id; pub type CFRunLoopRef = id; pub type CFRunLoopMode = id; pub type CGEventTapProxy = id; pub type CGEventRef = CGEvent; // https://developer.apple.com/documentation/coregraphics/cgeventtapplacement?language=objc pub type CGEventTapPlacement = u32; #[allow(non_upper_case_globals)] pub const kCGHeadInsertEventTap: u32 = 0; // https://developer.apple.com/documentation/coregraphics/cgeventtapoptions?language=objc #[allow(non_upper_case_globals)] #[repr(u32)] pub enum CGEventTapOption { #[cfg(feature = "unstable_grab")] Default = 0, ListenOnly = 1, } pub static mut LAST_FLAGS: CGEventFlags = CGEventFlags::CGEventFlagNull; lazy_static! { pub static ref KEYBOARD_STATE: Mutex<Keyboard> = Mutex::new(Keyboard::new().unwrap()); } // https://developer.apple.com/documentation/coregraphics/cgeventmask?language=objc pub type CGEventMask = u64; #[allow(non_upper_case_globals)] pub const kCGEventMaskForAllEvents: u64 = (1 << CGEventType::LeftMouseDown as u64) + (1 << CGEventType::LeftMouseUp as u64) + (1 << CGEventType::RightMouseDown as u64) + (1 << CGEventType::RightMouseUp as u64) + (1 << CGEventType::MouseMoved as u64) + (1 << CGEventType::LeftMouseDragged as u64) + (1 << CGEventType::RightMouseDragged as u64) + (1 << CGEventType::KeyDown as u64) + (1 << CGEventType::KeyUp as u64) + (1 << CGEventType::FlagsChanged as u64) + (1 << CGEventType::ScrollWheel as u64); #[cfg(target_os = "macos")] #[link(name = "Cocoa", kind = "framework")] extern "C" { #[allow(improper_ctypes)] pub fn CGEventTapCreate( tap: CGEventTapLocation, place: CGEventTapPlacement, options: CGEventTapOption, eventsOfInterest: CGEventMask, callback: QCallback, user_info: id, ) -> CFMachPortRef; pub fn CFMachPortCreateRunLoopSource( allocator: CFAllocatorRef, tap: CFMachPortRef, order: CFIndex, ) -> CFRunLoopSourceRef; pub fn CFRunLoopAddSource(rl: CFRunLoopRef, source: CFRunLoopSourceRef, mode: CFRunLoopMode); pub fn CFRunLoopGetCurrent() -> CFRunLoopRef; pub fn CGEventTapEnable(tap: CFMachPortRef, enable: bool); pub fn CFRunLoopRun(); pub static kCFRunLoopCommonModes: CFRunLoopMode; } pub type QCallback = unsafe extern "C" fn( proxy: CGEventTapProxy, _type: CGEventType, cg_event: CGEventRef, user_info: *mut c_void, ) -> CGEventRef; pub unsafe fn convert( _type: CGEventType, cg_event: &CGEvent, keyboard_state: &mut Keyboard, ) -> Option<Event> { let option_type = match _type { CGEventType::LeftMouseDown => Some(EventType::ButtonPress(Button::Left)), CGEventType::LeftMouseUp => Some(EventType::ButtonRelease(Button::Left)), CGEventType::RightMouseDown => Some(EventType::ButtonPress(Button::Right)), CGEventType::RightMouseUp => Some(EventType::ButtonRelease(Button::Right)), CGEventType::MouseMoved => { let point = cg_event.location(); Some(EventType::MouseMove { x: point.x, y: point.y, }) } CGEventType::KeyDown => { let code = cg_event.get_integer_value_field(EventField::KEYBOARD_EVENT_KEYCODE); Some(EventType::KeyPress(key_from_code(code.try_into().ok()?))) } CGEventType::KeyUp => { let code = cg_event.get_integer_value_field(EventField::KEYBOARD_EVENT_KEYCODE); Some(EventType::KeyRelease(key_from_code(code.try_into().ok()?))) } CGEventType::FlagsChanged => { let code = cg_event.get_integer_value_field(EventField::KEYBOARD_EVENT_KEYCODE); let code = code.try_into().ok()?; let flags = cg_event.get_flags(); if flags < LAST_FLAGS { LAST_FLAGS = flags; Some(EventType::KeyRelease(key_from_code(code))) } else { LAST_FLAGS = flags; Some(EventType::KeyPress(key_from_code(code))) } } CGEventType::ScrollWheel => { let delta_y = cg_event.get_integer_value_field(EventField::SCROLL_WHEEL_EVENT_POINT_DELTA_AXIS_1); let delta_x = cg_event.get_integer_value_field(EventField::SCROLL_WHEEL_EVENT_POINT_DELTA_AXIS_2); Some(EventType::Wheel { delta_x, delta_y }) } _ => None, }; if let Some(event_type) = option_type { let name = match event_type { EventType::KeyPress(_) => { let code = cg_event.get_integer_value_field(EventField::KEYBOARD_EVENT_KEYCODE) as u32; let flags = cg_event.get_flags(); keyboard_state.create_string_for_key(code, flags) } _ => None, }; return Some(Event { event_type, time: SystemTime::now(), name, }); } None }
//! The floating panel that displays the sidebearings, advance, and other //! glyph metrics use druid::widget::{prelude::*, Controller, Flex}; use druid::{FontDescriptor, FontFamily, LensExt, WidgetExt}; use crate::data::{EditorState, GlyphDetail, Sidebearings}; use crate::widgets::{EditableLabel, GlyphPainter}; use crate::{consts, theme}; /// A panel for editing the selected coordinate pub struct GlyphPane; impl GlyphPane { // this is not a blessed pattern #[allow(clippy::new_ret_no_self)] pub fn new() -> impl Widget<EditorState> { build_widget() } } impl<W: Widget<Sidebearings>> Controller<Sidebearings, W> for GlyphPane { #[allow(clippy::float_cmp)] fn event( &mut self, child: &mut W, ctx: &mut EventCtx, event: &Event, data: &mut Sidebearings, env: &Env, ) { let mut child_data = data.clone(); child.event(ctx, event, &mut child_data, env); // if an edit has occured in the panel, we turn it into // a command so that the Editor can update undo state: let (d_x, is_left) = if child_data.left != data.left { (child_data.left - data.left, true) } else if child_data.right != data.right { (child_data.right - data.right, false) } else { (0.0, false) }; if d_x != 0.0 { let args = consts::cmd::AdjustSidebearing { delta: d_x, is_left, }; ctx.submit_command(consts::cmd::ADJUST_SIDEBEARING.with(args)); } // suppress clicks so that the editor doesn't handle them. if matches!(event, Event::MouseUp(_) | Event::MouseDown(_)) { ctx.set_handled(); } } } fn build_widget() -> impl Widget<EditorState> { let glyph_font: FontDescriptor = FontDescriptor::new(FontFamily::MONOSPACE); Flex::column() .with_child( Flex::row() .with_child( EditableLabel::parse() .with_font(glyph_font.clone()) .with_text_size(16.0) .with_text_alignment(druid::TextAlignment::End) .lens(Sidebearings::left) .controller(GlyphPane) .lens(EditorState::sidebearings) .fix_width(40.0), ) .with_child( GlyphPainter::new() .color(theme::SECONDARY_TEXT_COLOR) .draw_layout_frame(true) .fix_height(128.0) .padding((8.0, 8.0)) .lens(EditorState::detail_glyph), ) .with_child( EditableLabel::parse() .with_font(glyph_font.clone()) .with_text_size(16.0) .with_text_alignment(druid::TextAlignment::Start) .lens(Sidebearings::right) .controller(GlyphPane) .lens(EditorState::sidebearings) .fix_width(40.0), ), ) .with_child( EditableLabel::parse() .with_font(glyph_font) .with_text_size(16.0) .with_text_alignment(druid::TextAlignment::Center) .lens(EditorState::detail_glyph.then(GlyphDetail::advance)) .fix_width(64.0), ) .padding(8.0) }
use std::collections::HashMap; use std::fmt; #[derive(Clone, Eq, PartialEq, Hash)] struct Tile(Vec<Vec<bool>>, u64); impl Tile { fn at(&self, mut x: usize, mut y: usize, transform: u8) -> bool { if (transform & 0x1) == 0x01 { std::mem::swap(&mut x, &mut y); } if (transform & 0x2) == 0x02 { x = self.0[0].len() - 1 - x; } if (transform & 0x4) == 0x04 { y = self.0.len() - 1 - y; } self.0[y][x] } fn height(&self, transform: u8) -> usize { if transform & 0x01 == 0x01 { self.0[0].len() } else { self.0.len() } } fn width(&self, transform: u8) -> usize { if transform & 0x01 == 0x01 { self.0.len() } else { self.0[0].len() } } fn edges(&self) -> [Vec<bool>; 4] { [self.top(0), self.left(0), self.bottom(0), self.right(0)] } fn row(&self, y: usize, transform: u8) -> Vec<bool> { (0..self.width(transform)) .map(|x| self.at(x, y, transform)) .collect() } fn col(&self, x: usize, transform: u8) -> Vec<bool> { (0..self.height(transform)) .map(|y| self.at(x, y, transform)) .collect() } fn top(&self, transform: u8) -> Vec<bool> { self.row(0, transform) } fn bottom(&self, transform: u8) -> Vec<bool> { self.row(self.height(transform) - 1, transform) } fn left(&self, transform: u8) -> Vec<bool> { self.col(0, transform) } fn right(&self, transform: u8) -> Vec<bool> { self.col(self.width(transform) - 1, transform) } } impl fmt::Debug for Tile { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for y in 0..self.height(0) { for x in 0..self.width(0) { write!(f, "{}", if self.at(x, y, 0) { b'#' } else { b'.' } as char)?; } if y == 0 { write!(f, " {}", self.1)?; } writeln!(f, "")?; } Ok(()) } } fn parse(input: &str) -> Vec<Tile> { input .trim() .split("\n\n") .map(|tile| { let mut lines = tile.trim().lines(); let id = lines .next() .unwrap() .trim() .split_whitespace() .nth(1) .unwrap() .trim_end_matches(":") .parse::<u64>() .unwrap(); let lines = lines .map(|s| s.bytes().map(|b| b == b'#').collect()) .collect::<Vec<_>>(); Tile(lines, id) }) .collect() } fn find_corners(tiles: &[Tile]) -> Vec<&Tile> { let mut edge_index: HashMap<Vec<bool>, Vec<&Tile>> = HashMap::new(); for tile in tiles { for edge in tile.edges().iter() { let mut reversed = edge.clone(); reversed.reverse(); let min = edge.min(&reversed); edge_index.entry(min.clone()).or_default().push(tile); } } let uniques_edges: Vec<(Vec<bool>, &Tile)> = edge_index .iter() .filter(|(_, v)| v.len() == 1) .map(|(k, v)| (k.clone(), v[0])) .collect(); let mut unique_per_tile: HashMap<&Tile, usize> = HashMap::new(); for edge in uniques_edges { *unique_per_tile.entry(edge.1).or_default() += 1; } let corners: Vec<&Tile> = unique_per_tile .iter() .filter(|(_, v)| **v == 2) .map(|(id, _)| *id) .collect(); assert_eq!(corners.len(), 4); corners } fn find_right<'a>(tiles: &'a [Tile], from: (&Tile, u8)) -> Option<(&'a Tile, u8)> { tiles .iter() .filter(|tile| tile != &from.0) .flat_map(|tile| (0u8..8).map(move |tr| (tile, tr))) .find(|(tile, tr)| tile.left(*tr) == from.0.right(from.1)) } fn find_down<'a>(tiles: &'a [Tile], from: (&Tile, u8)) -> Option<(&'a Tile, u8)> { tiles .iter() .filter(|tile| tile != &from.0) .flat_map(|tile| (0u8..8).map(move |tr| (tile, tr))) .find(|(tile, tr)| tile.top(*tr) == from.0.bottom(from.1)) } fn solve<'t>(tiles: &'t [Tile], corner: &'t Tile) -> Vec<Vec<(&'t Tile, u8)>> { let corner_tr = (0..8) .find(|&tr| { find_down(tiles, (corner, tr)).is_some() && find_right(tiles, (corner, tr)).is_some() }) .unwrap(); let mut solved = vec![vec![(corner, corner_tr)]]; while let Some(down) = find_down(&tiles, solved.last().unwrap()[0]) { solved.push(vec![down]); } for row in solved.iter_mut() { while let Some(right) = find_right(&tiles, *row.last().unwrap()) { row.push(right) } } solved } fn build_map(solution: &[Vec<(&Tile, u8)>]) -> Vec<Vec<bool>> { let h = solution.len() * 8; let w = solution[0].len() * 8; let mut map = vec![]; for y in 0..h { let (ty, dy) = (y / 8, y % 8); let mut line = vec![]; for x in 0..w { let (tx, dx) = (x / 8, x % 8); let tile = solution[ty][tx]; line.push(tile.0.at(dx + 1, dy + 1, tile.1)); } map.push(line); } map } fn monster() -> Tile { let input = r#"..................#. #....##....##....### .#..#..#..#..#..#..."#; let lines = input .lines() .map(|s| s.bytes().map(|b| b == b'#').collect()) .collect::<Vec<_>>(); Tile(lines, 0) } fn main() { let input = std::fs::read_to_string("input").unwrap(); dbg!(run(&input)); } fn run(input: &str) -> (u64, usize) { let tiles = parse(&input); let corners = find_corners(&tiles); let part1 = corners.iter().map(|t| t.1).product::<u64>(); let corner = corners[0]; let solved = solve(&tiles, corner); let mut map = Tile(build_map(&solved), 0); let monster = monster(); let mut monsters = vec![]; for tr in 0..8 { let mh = monster.height(tr); let mw = monster.width(tr); for x in 0..map.width(0) - mw { 'm: for y in 0..map.height(0) - mh { for mx in 0..mw { for my in 0..mh { if monster.at(mx, my, tr) && !map.at(x + mx, y + my, 0) { continue 'm; } } } monsters.push((x, y, tr)); } } } for (x, y, tr) in monsters { let mh = monster.height(tr); let mw = monster.width(tr); for mx in 0..mw { for my in 0..mh { if monster.at(mx, my, tr) { map.0[y + my][x + mx] = false; } } } } let part2 = map .0 .iter() .map(|l| l.iter().filter(|x| **x).count()) .sum::<usize>(); (part1, part2) } #[test] fn t() { let input = std::fs::read_to_string("test").unwrap(); assert_eq!(run(&input), (20899048083289u64, 273)); }
use block_modes::BlockModeError; use derive_more::Display; use failure::Backtrace; use failure::Fail; use std::io; use std::path::{Path, PathBuf}; use std::str::Utf8Error; use std::string::FromUtf8Error; use ini; use std::borrow::Cow; #[derive(Debug, Fail, Display)] pub enum Error { #[display(fmt = "Failed to deserialize: {}", _0)] Deserialization(#[cause] serde_json::error::Error), #[display(fmt = "{}: {}", "_1.display()", _0)] Io(#[cause] io::Error, PathBuf, Backtrace), #[display( fmt = "Internal IO Error (please submit a bug report with the backtrace): {}", _0 )] IoInternal(#[cause] io::Error, Backtrace), #[display(fmt = "Decryption failed")] BlockMode(BlockModeError, Backtrace), #[display(fmt = "Error parsing the INI file: {}", _0)] Ini(#[cause] ini::ini::Error, Backtrace), #[display(fmt = "Key derivation error: {}", _0)] Crypto(String, Backtrace), #[display(fmt = "Invalid keyblob {}: {}.", _1, _0)] MacError(cmac::crypto_mac::MacError, usize, Backtrace), #[display(fmt = "Invalid PFS0: {}.", _0)] InvalidPfs0(&'static str, Backtrace), #[display(fmt = "Failed to convert filename to UTF8: {}.", _0)] Utf8Conversion(String, #[cause] Utf8Error, Backtrace), #[display(fmt = "Can't handles symlinks in romfs: {}", "_0.display()")] RomFsSymlink(PathBuf, Backtrace), #[display(fmt = "Unknown file type at {}", "_0.display()")] RomFsFiletype(PathBuf, Backtrace), #[display(fmt = "Invalid NPDM value for field {}", "_0")] InvalidNpdmValue(Cow<'static, str>, Backtrace), #[display(fmt = "Failed to serialize NPDM.")] BincodeError(#[cause] Box<bincode::ErrorKind>, Backtrace), #[display(fmt = "Failed to sign NPDM.")] RsaError(#[cause] rsa::errors::Error, Backtrace), #[display(fmt = "Failed to sign NPDM, invalid PEM.")] PemError(#[cause] pem::PemError, Backtrace), #[display(fmt = "Failed to sign NPDM, invalid PEM.")] Asn1Error(#[cause] yasna::ASN1Error, Backtrace), } impl Error { fn with_path<T: AsRef<Path>>(self, path: T) -> Error { if let Error::IoInternal(err, backtrace) = self { Error::Io(err, path.as_ref().to_owned(), backtrace) } else { self } } } pub trait ResultExt { fn with_path<T: AsRef<Path>>(self, path: T) -> Self; } impl<T> ResultExt for Result<T, Error> { fn with_path<U: AsRef<Path>>(self, path: U) -> Result<T, Error> { self.map_err(|err| err.with_path(path)) } } impl From<io::Error> for Error { fn from(err: io::Error) -> Error { Error::IoInternal(err, Backtrace::new()) } } impl<T: AsRef<Path>> From<(io::Error, T)> for Error { fn from((err, path): (io::Error, T)) -> Error { Error::Io(err, path.as_ref().to_owned(), Backtrace::new()) } } impl From<ini::ini::Error> for Error { fn from(err: ini::ini::Error) -> Error { Error::Ini(err, Backtrace::new()) } } impl From<BlockModeError> for Error { fn from(err: BlockModeError) -> Error { Error::BlockMode(err, Backtrace::new()) } } impl From<serde_json::error::Error> for Error { fn from(err: serde_json::error::Error) -> Error { Error::Deserialization(err) } } impl From<FromUtf8Error> for Error { fn from(err: FromUtf8Error) -> Error { // Why the heck does OsStr not have display()? Error::Utf8Conversion( String::from_utf8_lossy(err.as_bytes()).into_owned(), err.utf8_error(), Backtrace::new(), ) } } impl From<(usize, cmac::crypto_mac::MacError)> for Error { fn from((id, err): (usize, cmac::crypto_mac::MacError)) -> Error { Error::MacError(err, id, Backtrace::new()) } } impl From<Box<bincode::ErrorKind>> for Error { fn from(err: Box<bincode::ErrorKind>) -> Error { Error::BincodeError(err, Backtrace::new()) } } impl From<rsa::errors::Error> for Error { fn from(err: rsa::errors::Error) -> Error { Error::RsaError(err, Backtrace::new()) } } impl From<pem::PemError> for Error { fn from(err: pem::PemError) -> Error { Error::PemError(err, Backtrace::new()) } } impl From<yasna::ASN1Error> for Error { fn from(err: yasna::ASN1Error) -> Error { Error::Asn1Error(err, Backtrace::new()) } }
pub mod checksum; pub mod keys; pub mod name; pub mod numeric; pub mod permission; pub mod serialize; pub mod time; pub use checksum::*; pub use keys::*; pub use name::*; pub use numeric::*; pub use permission::*; pub use serialize::*; pub use time::*;
use std::ffi::{CStr, NulError}; use std::error; use std::fmt; use std::str; use libc::c_int; use {raw, ErrorCode}; /// A structure to represent errors coming out of libgit2. #[derive(Debug)] pub struct Error { klass: c_int, message: String, } impl Error { /// Returns the last error, or `None` if one is not available. pub fn last_error() -> Option<Error> { ::init(); unsafe { let ptr = raw::giterr_last(); if ptr.is_null() { None } else { Some(Error::from_raw(ptr)) } } } unsafe fn from_raw(ptr: *const raw::git_error) -> Error { let msg = CStr::from_ptr((*ptr).message as *const _).to_bytes(); let msg = str::from_utf8(msg).unwrap(); Error { klass: (*ptr).klass, message: msg.to_string() } } /// Creates a new error from the given string as the error. pub fn from_str(s: &str) -> Error { Error { klass: raw::GIT_ERROR as c_int, message: s.to_string() } } /// Return the error code associated with this error. pub fn code(&self) -> ErrorCode { match self.raw_code() { raw::GIT_OK => super::ErrorCode::GenericError, raw::GIT_ERROR => super::ErrorCode::GenericError, raw::GIT_ENOTFOUND => super::ErrorCode::NotFound, raw::GIT_EEXISTS => super::ErrorCode::Exists, raw::GIT_EAMBIGUOUS => super::ErrorCode::Ambiguous, raw::GIT_EBUFS => super::ErrorCode::BufSize, raw::GIT_EUSER => super::ErrorCode::User, raw::GIT_EBAREREPO => super::ErrorCode::BareRepo, raw::GIT_EUNBORNBRANCH => super::ErrorCode::UnbornBranch, raw::GIT_EUNMERGED => super::ErrorCode::Unmerged, raw::GIT_ENONFASTFORWARD => super::ErrorCode::NotFastForward, raw::GIT_EINVALIDSPEC => super::ErrorCode::InvalidSpec, raw::GIT_ECONFLICT => super::ErrorCode::Conflict, raw::GIT_ELOCKED => super::ErrorCode::Locked, raw::GIT_EMODIFIED => super::ErrorCode::Modified, raw::GIT_PASSTHROUGH => super::ErrorCode::GenericError, raw::GIT_ITEROVER => super::ErrorCode::GenericError, raw::GIT_EAUTH => super::ErrorCode::Auth, raw::GIT_ECERTIFICATE => super::ErrorCode::Certificate, raw::GIT_EAPPLIED => super::ErrorCode::Applied, raw::GIT_EPEEL => super::ErrorCode::Peel, raw::GIT_EEOF => super::ErrorCode::Eof, raw::GIT_EINVALID => super::ErrorCode::Invalid, raw::GIT_EUNCOMMITTED => super::ErrorCode::Uncommitted, raw::GIT_EDIRECTORY => super::ErrorCode::Directory, } } /// Return the raw error code associated with this error. pub fn raw_code(&self) -> raw::git_error_code { macro_rules! check( ($($e:ident,)*) => ( $(if self.klass == raw::$e as c_int { raw::$e }) else * else { raw::GIT_ERROR } ) ); check!( GIT_OK, GIT_ERROR, GIT_ENOTFOUND, GIT_EEXISTS, GIT_EAMBIGUOUS, GIT_EBUFS, GIT_EUSER, GIT_EBAREREPO, GIT_EUNBORNBRANCH, GIT_EUNMERGED, GIT_ENONFASTFORWARD, GIT_EINVALIDSPEC, GIT_ECONFLICT, GIT_ELOCKED, GIT_EMODIFIED, GIT_EAUTH, GIT_ECERTIFICATE, GIT_EAPPLIED, GIT_EPEEL, GIT_EEOF, GIT_EINVALID, GIT_EUNCOMMITTED, GIT_PASSTHROUGH, GIT_ITEROVER, ) } /// Return the message associated with this error pub fn message(&self) -> &str { &self.message } } impl error::Error for Error { fn description(&self) -> &str { &self.message } } impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { try!(write!(f, "[{}] ", self.klass)); f.write_str(&self.message) } } impl From<NulError> for Error { fn from(_: NulError) -> Error { Error::from_str("data contained a nul byte that could not be \ represented as a string") } }
#[derive(Clone)] pub struct VM { initial_program: Vec<i64>, program: Vec<i64>, program_pos: usize, relative_base: i64, input: Vec<i64>, input_pos: usize, output: Vec<i64>, output_pos: usize, } #[derive(Debug, Eq, PartialEq)] pub enum StepResult { Continue, Exit, InputRequired, } impl VM { pub fn reset(&mut self) { self.program.resize(self.initial_program.len(), 0); self.program.copy_from_slice(&self.initial_program); self.program_pos = 0; self.relative_base = 0; self.input.clear(); self.input_pos = 0; self.output.clear(); self.output_pos = 0; } pub fn peek_input(&self) -> &[i64] { &self.input[self.input_pos..] } pub fn set_memory(&mut self, index: usize, v: i64) { self.program[index] = v; } pub fn push_input(&mut self, v: i64) { self.input.push(v); } pub fn read_output(&mut self) -> &[i64] { let output_pos = self.output_pos; self.output_pos = self.output.len(); &self.output[output_pos..] } pub fn output(&self) -> &[i64] { &self.output } fn resolve_addr(&self, addr: usize, mode: i32) -> usize { match mode { 0 => self.program[addr] as usize, 1 => addr, 2 => (self.program[addr] + self.relative_base) as usize, _ => unreachable!(), } } fn get_addr(&mut self, addr: usize, mode: i32) -> usize { let addr = self.resolve_addr(addr, mode); if addr >= self.program.len() { self.program.resize(addr + 9, 0); } addr } fn read(&self, addr: usize) -> i64 { self.program[addr] } fn write(&mut self, addr: usize, v: i64) { self.program[addr] = v; } pub fn print_next(&self) { let position = self.program_pos; let (opcode, m1, m2, m3) = parse_opcode(self.program[position] as i32); let chars = ['&', '=', 'r']; match opcode { 1 => println!("{}{} + {}{} => {}{}", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], chars[m3 as usize], self.program[position+3], ), 2 => println!("{}{} * {}{} => {}{}", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], chars[m3 as usize], self.program[position+3], ), 3 => println!("read({}{})", chars[m1 as usize], self.program[position+1], ), 4 => println!("write({}{})", chars[m1 as usize], self.program[position+1], ), 5 => println!("jit({}{}, {}{})", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], ), 6 => println!("jif({}{}, {}{})", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], ), 7 => println!("{}{} < {}{} => {}{}", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], chars[m3 as usize], self.program[position+3], ), 8 => println!("{}{} == {}{} => {}{}", chars[m1 as usize], self.program[position+1], chars[m2 as usize], self.program[position+2], chars[m3 as usize], self.program[position+3], ), 9 => println!("relative({}{})", chars[m1 as usize], self.program[position+1], ), 99 => println!("exit"), _ => panic!("unknown opcode {}", opcode), } } pub fn run(&mut self) -> StepResult { loop { let result = self.step(); if result != StepResult::Continue { return result; } } } pub fn quick_run(&mut self, input: &[i64]) -> i64 { self.reset(); for v in input { self.push_input(*v); } self.run(); *self.output.last().unwrap() } pub fn step(&mut self) -> StepResult { let position = self.program_pos; let (opcode, m1, m2, m3) = parse_opcode(self.program[position] as i32); match opcode { 1 => { self.program_pos += 4; let addr1 = self.get_addr(position + 1, m1); let addr2 = self.get_addr(position + 2, m2); let addr3 = self.get_addr(position + 3, m3); self.write(addr3, self.read(addr2) + self.read(addr1)); StepResult::Continue } 2 => { self.program_pos += 4; let addr1 = self.get_addr(position + 1, m1); let addr2 = self.get_addr(position + 2, m2); let addr3 = self.get_addr(position + 3, m3); self.write(addr3, self.read(addr2) * self.read(addr1)); StepResult::Continue } 3 => { if self.input_pos == self.input.len() { StepResult::InputRequired } else { self.program_pos += 2; let addr1 = self.get_addr(position + 1, m1); self.write(addr1, self.input[self.input_pos]); self.input_pos += 1; if self.input_pos == self.input.len() { self.input_pos = 0; self.input.clear(); } StepResult::Continue } } 4 => { if self.output_pos > 0 && self.output_pos == self.output.len() { self.output_pos = 0; self.output.clear(); } self.program_pos += 2; let addr1 = self.get_addr(position + 1, m1); self.output.push(self.read(addr1)); StepResult::Continue } 5 => { let addr1 = self.get_addr(position + 1, m1); if self.read(addr1) != 0 { let addr2 = self.get_addr(position + 2, m2); self.program_pos = self.read(addr2) as usize; } else { self.program_pos += 3; } StepResult::Continue } 6 => { let addr1 = self.get_addr(position + 1, m1); if self.read(addr1) == 0 { let addr2 = self.get_addr(position + 2, m2); self.program_pos = self.read(addr2) as usize; } else { self.program_pos += 3; } StepResult::Continue } 7 => { self.program_pos += 4; let addr1 = self.get_addr(position + 1, m1); let addr2 = self.get_addr(position + 2, m2); let addr3 = self.get_addr(position + 3, m3); self.write(addr3, (self.read(addr1) < self.read(addr2)) as i64, ); StepResult::Continue } 8 => { self.program_pos += 4; let addr1 = self.get_addr(position + 1, m1); let addr2 = self.get_addr(position + 2, m2); let addr3 = self.get_addr(position + 3, m3); self.write(addr3, (self.read(addr1) == self.read(addr2)) as i64, ); StepResult::Continue } 9 => { self.program_pos += 2; let addr1 = self.get_addr(position + 1, m1); self.relative_base += self.read(addr1); StepResult::Continue } 99 => { StepResult::Exit } _ => panic!("Unknown opcode {}", opcode) } } pub fn new(initial_program: &[i64]) -> VM { VM{ initial_program: initial_program.to_vec(), program: initial_program.to_vec(), program_pos: 0, relative_base: 0, input: Vec::with_capacity(16), input_pos: 0, output: Vec::with_capacity(16), output_pos: 0, } } pub fn parse(program_data: &str) -> VM { let data: Vec<i64> = program_data.split(',').map(|t| t.parse::<i64>().unwrap()).collect(); Self::new(&data) } } pub fn parse_opcode(code: i32) -> (i32, i32, i32, i32) { (code % 100, ((code / 100) % 10), ((code / 1000) % 10), ((code / 10000) % 10)) } #[cfg(test)] mod tests { use super::*; #[test] fn test_vm() { let mut vm = VM::parse("103,13,1001,13,5,13,1002,13,14,14,4,14,99,5,5"); vm.reset(); assert_eq!(vm.step(), StepResult::InputRequired); vm.push_input(5); assert_eq!(vm.step(), StepResult::Continue); assert_eq!(vm.step(), StepResult::Continue); assert_eq!(vm.step(), StepResult::Continue); assert_eq!(vm.step(), StepResult::Continue); assert_eq!(vm.step(), StepResult::Exit); assert_eq!(vm.output().len(), 1); assert_eq!(vm.output()[0], 140); } #[test] fn test_day05_part2() { let mut vm1 = VM::parse("3,9,8,9,10,9,4,9,99,-1,8"); assert_eq!(vm1.quick_run(&[8]), 1); assert_eq!(vm1.quick_run(&[7]), 0); assert_eq!(vm1.quick_run(&[9]), 0); let mut vm2 = VM::parse("3,9,7,9,10,9,4,9,99,-1,8"); assert_eq!(vm2.quick_run(&[8]), 0); assert_eq!(vm2.quick_run(&[7]), 1); assert_eq!(vm2.quick_run(&[9]), 0); let mut vm3 = VM::parse("3,3,1108,-1,8,3,4,3,99"); assert_eq!(vm3.quick_run(&[8]), 1); assert_eq!(vm3.quick_run(&[7]), 0); assert_eq!(vm3.quick_run(&[9]), 0); let mut vm4 = VM::parse("3,3,1107,-1,8,3,4,3,99"); assert_eq!(vm4.quick_run(&[8]), 0); assert_eq!(vm4.quick_run(&[7]), 1); assert_eq!(vm4.quick_run(&[9]), 0); let mut vm5 = VM::parse("3,12,6,12,15,1,13,14,13,4,13,99,-1,0,1,9"); assert_eq!(vm5.quick_run(&[0]), 0); assert_eq!(vm5.quick_run(&[-1]), 1); assert_eq!(vm5.quick_run(&[1]), 1); let mut vm6 = VM::parse("3,3,1105,-1,9,1101,0,0,12,4,12,99,1"); assert_eq!(vm6.quick_run(&[0]), 0); assert_eq!(vm6.quick_run(&[-1]), 1); assert_eq!(vm6.quick_run(&[1]), 1); let mut vm7 = VM::parse("3,21,1008,21,8,20,1005,20,22,107,8,21,20,1006,20,31,1106,0,36,98,0,0,1002,21,125,20,4,20,1105,1,46,104,999,1105,1,46,1101,1000,1,20,4,20,1105,1,46,98,99"); assert_eq!(vm7.quick_run(&[-4]), 999); assert_eq!(vm7.quick_run(&[8]), 1000); assert_eq!(vm7.quick_run(&[14]), 1001); } #[test] fn test_day09_part1() { let mut vm1 = VM::parse("109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99"); assert_eq!(vm1.run(), StepResult::Exit); assert_eq!(vm1.output(), &[109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99]); let mut vm3 = VM::parse("1102,34915192,34915192,7,4,7,99,0"); assert!(vm3.quick_run(&[]) >= 1000000000000000); let mut vm3 = VM::parse("104,1125899906842624,99"); assert_eq!(vm3.quick_run(&[]), 1125899906842624); } #[test] fn test_read_output() { let mut vm = VM::parse("104,1,104,2,104,3,99"); assert_eq!(vm.run(), StepResult::Exit); assert_eq!(vm.read_output(), &[1, 2, 3]); assert_eq!(vm.read_output(), &[]); } #[test] fn test_parse_opcode() { assert_eq!(parse_opcode(99), (99, 0, 0, 0)); assert_eq!(parse_opcode(199), (99, 1, 0, 0)); assert_eq!(parse_opcode(10102), (2, 1, 0, 1)); assert_eq!(parse_opcode(1102), (2, 1, 1, 0)); assert_eq!(parse_opcode(1003), (3, 0, 1, 0)); assert_eq!(parse_opcode(10004), (4, 0, 0, 1)); } }
// This experiment helped me learn about the ndarray crate, which is a very // Rust-y way to re-implement numpy. // // To experiment with ndarray, I implemented a batched outer product in three // different ways. The batched outer product takes an input of shape (..., Z) // and outputs an input of shape (..., Z, Z), where output[..., i, j] is the // product input[..., i] * input[..., j]. use ndarray::{Array, Axis, Dimension, IntoDimension, Ix3, Ix4, LinalgScalar}; use ndarray_rand::rand_distr::Uniform; use ndarray_rand::RandomExt; use std::time::Instant; fn main() { // The RandomExt trait puts this method on ArrayBase which is // the type underlying Array. let arr = Array::<f32, Ix4>::random((8, 3, 6, 128), Uniform::new(-1., 1.)); // The mean reduction returns None only for empty arrays. println!("input array mean: {:.5}", arr.mean().unwrap()); // Time a few different techniques for computing the batched // outer product, where every axis except the last is considered // the "batch" dimension. let t1 = Instant::now(); let naive_out = outer_products_naive(&arr); let t2 = Instant::now(); let fast_out = outer_products_faster(&arr); let t3 = Instant::now(); let bcast_out = outer_products_bcast(&arr); let t4 = Instant::now(); println!("naive method took {:.5} seconds", (t2 - t1).as_secs_f64()); println!("faster method took {:.5} seconds", (t3 - t2).as_secs_f64()); println!("bcast method took {:.5} seconds", (t4 - t3).as_secs_f64()); // Make sure the faster techniques are actually correct. println!( "faster <-> naive error: {:.5}", (naive_out.clone() - fast_out) .map(|x| x.abs()) .mean() .unwrap() ); println!( "bcast <-> naive error: {:.5}", (naive_out - bcast_out).map(|x| x.abs()).mean().unwrap() ); } // Compute a batched outer product by iterating over every element of the // output, getting the two inputs corresponding to this output, and // multiplying them. // // This is very slow because it requires constructing index tuples for every // iteration of the inner loop. fn outer_products_naive<A: LinalgScalar, D: Dimension>(a: &Array<A, D>) -> Array<A, D::Larger> { let input_dim = a.raw_dim(); let d = input_dim.ndim(); let vec_size = input_dim[d - 1]; let mut output_dim = D::Larger::zeros(d + 1); output_dim.slice_mut()[0..d].clone_from_slice(input_dim.slice()); output_dim[d] = vec_size; let mut res = Array::<A, D::Larger>::zeros(output_dim.clone()); for (dst_idx_pattern, dst_val) in res.indexed_iter_mut() { // The dst_index is something like (X, Y, ..., Z1, Z2), and we want // two source indices (X, Y, ..., Z1) and (X, Y, ..., Z2). let dst_idx = dst_idx_pattern.into_dimension(); let mut src_idx = input_dim.clone(); src_idx.slice_mut().clone_from_slice(&dst_idx.slice()[0..d]); let val_1 = a[src_idx.clone()]; src_idx[d - 1] = dst_idx[d]; let val_2 = a[src_idx]; *dst_val = val_1 * val_2; } res } // Compute batched outer products by looping over vectors in the input and // matrices of the output with zip(), and copying outer products accordingly. fn outer_products_faster<A: LinalgScalar, D: Dimension>(a: &Array<A, D>) -> Array<A, D::Larger> { let d = a.raw_dim().ndim(); let inner_size = a.shape()[d - 1]; let outer_size = a.raw_dim().size() / inner_size; let mut flat_out = Array::<A, Ix3>::zeros((outer_size, inner_size, inner_size)); for (src, mut dst) in Iterator::zip(a.rows().into_iter(), flat_out.outer_iter_mut().into_iter()) { let v = src.clone().into_shape((inner_size, 1)).unwrap(); let v_t = v.clone().reversed_axes(); dst.assign(&v.dot(&v_t)); } let mut out_shape = <D as Dimension>::Larger::zeros(d + 1); out_shape.slice_mut()[0..d].clone_from_slice(a.shape()); out_shape[d] = inner_size; flat_out.into_shape(out_shape).unwrap() } // The simplest possible way to compute batched outer products, using broadcast // semantics. An array of shape (X, Y, ..., Z) can be turned into two views of // shape (X, Y, ..., 1, Z) and (X, Y, ..., Z, 1). These, when multiplied // together, create an outer product over the Z axis. fn outer_products_bcast<A: LinalgScalar, D: Dimension>(a: &Array<A, D>) -> Array<A, D::Larger> { let d = a.raw_dim().ndim(); let arr_1 = a.clone().insert_axis(Axis(d)); let arr_2 = a.clone().insert_axis(Axis(d - 1)); return arr_1 * arr_2; }
//! Constant Q Transform //! //! This is a frequency transform on time-series data. //! It's like a Fourier transform, except that the bins are //! logarithmically spaced rather than linearly spaced. //! Humans perceive pitch in a similar way. //! Therefore, the CQT is useful for musical analysis. pub mod window; use std::f64; /// Directly calculates the CQT for a single frequency bin, from some samples. /// /// Currently, samples at the centre of data. /// Panics if too few samples. /// Doesn't care about phase. /// /// * `root_freq`: root frequency (e.g. 220hz) /// * `bin`: which bin this is (e.g. 2) -- might be 1-indexed in the source literature? /// * `rate`: sampling frequency (e.g. 44100hz) /// * `resolution`: bins per octave (e.g. 12) /// * `data`: handle to array of samples /// * `window_fn`: a windowing function matching `fn_name(left_bound: usize, right_bound: usize, n: usize) -> f64` pub fn naive_cqt<W>(root_freq: f64, bin: u8, rate: f64, resolution: u8, data: &[i16], window_fn: &W) -> u16 where W: Fn(usize, usize, usize) -> f64{ // first we need to calculate the centre frequency for bin `k` let f_k: f64 = calc_f_k(root_freq, bin, resolution); let N_k: f64 = calc_N_k(rate, resolution, f_k); //println!("data length: {}\t, N_k: {}", data.len(), N_k); let left_bound: usize = (data.len() - (N_k.floor() as usize)) / 2; let right_bound: usize = (data.len() + (N_k.floor() as usize)) / 2; // X_cq[n] = sum{j=left..right}(x[j] * conj(a_k(j - n + N_k/2)) // and a_k(t) = (1/N_k) * window(t) * exp(-2*pi*i*t*f_k/f_s) // and window(t) is some window fn that's zero for samples more than N_k/2 away from n // so the complex conjugate of that is the reversal of the // sign of the imaginary part. The conjugate of the sum equals // the sum of the conjugates, so we should be able to safely // ignore it given a real-only everything else. // Better question: can we formulate the exponential in such a way // as to only get the amplitude and have that answer work? // No. sum of amplitudes doesn't equal amplitude of sum let mut sum_real: f64 = 0.0; let mut sum_imag: f64 = 0.0; for j in left_bound..right_bound { let real_common = (data[j] as f64) * N_k.recip() * window_fn(left_bound, right_bound, j); let complex_common = exp_complex( (j as i16 + (N_k.floor() as i16) / 2) - (data.len() / 2) as i16, f_k, rate, ); sum_real += real_common * complex_common.1; sum_imag += real_common * complex_common.0; } return sum_real.hypot(sum_imag).round() as u16; } /// Calculate the value of centre frequency *f_k* in Hz. /// /// `root_freq * (2.0 ^ (bin / 12.0))` if 12/octave pub fn calc_f_k(root_freq: f64, bin: u8, resolution: u8) -> f64 { // Schoerkhuber and Klapuri have a 1-indexed `bin` here. We should not. return root_freq * 2.0_f64.powf( bin as f64 / resolution as f64 ); } /// Width (N) of the *kth* bin in Hz. /// /// `(sample rate / ()((2 ^ (1 / resolution)) - 1)) * f_k)` pub fn calc_N_k(rate: f64, resolution: u8, f_k: f64) -> f64 { return rate / ((2.0_f64.powf(1.0 / resolution as f64) - 1.0) * f_k); } /// Calculate the complex and real (respectively) values of the exponent in the atom function. /// /// The atom function: `a_k(t) = (1/N_k) * window(t) * exp(-2*pi*i*t*f_k/f_s)`. /// This function considers just the exponential part of the atom - /// the other parts of the atom are purely real. /// We can pub fn exp_complex(j: i16, f_k: f64, rate: f64) -> (f64, f64) { return (-2.0 * (f64::consts::PI) * (j as f64) * f_k / rate).sin_cos(); } /// Calculate the CQT over some number of octaves. /// /// Generally the same parameters as `naive_cqt`, except now we want the number of `octaves`, /// rather than which `bin` within an octave. /// /// Loops over `naive_cqt` so you don't have to. pub fn naive_cqt_octaves<W>(root_freq: f64, octaves: u8, rate: f64, resolution: u8, data: &[i16], window_fn: &W) -> Vec<u16> where W: Fn(usize, usize, usize) -> f64{ // We can't just return an u16 any more. // Instead, return a Vec of them. let mut output: Vec<u16> = Vec::with_capacity((resolution * octaves) as usize); for i in 0..(resolution * octaves){ output.push(naive_cqt(root_freq, i as u8, rate, resolution, data, window_fn)); } return output; } /* *** Tests! *** */ #[cfg(test)] mod tests { use super::*; use window; use std::f64; #[test] fn special_values() { let root_freq: f64 = 440.0; let bin: u8 = 0; let rate: f64 = 44100.0; let resolution: u8 = 12; // 440 * 2 ^ (2/12) = 493.88330125612 let f_k: f64 = calc_f_k(root_freq, 2, resolution); assert_eq!(494.0, f_k.round()); // Width of bin `k` in Hz // precalc'd the 2^(1/12) - 1 = 0.05946309436 // and since 44100 is preset too // 44100 / 0.05946309436 = 741636.480150375 let N_k_precalc: f64 = 741636.480150375 / f_k; assert_eq!( N_k_precalc.round(), calc_N_k(rate, resolution, f_k).round() ); } #[test] // show the result of this one with `cargo test -- --nocapture` fn waves() { use std::f64; let root_freq: f64 = 110.0; let bin: u8 = 0; let rate: f64 = 44100.0; let resolution: u8 = 12; let mut circular_buffer = [0_i16; 22050]; // half a second's worth of samples /* // sine combination of ~A5 and ~E6 println!("test type: sine, A5 and E6"); for i in 0..22050 { circular_buffer[i] = ( (32768.0 / (3.0 + 1.0)) * ( (i as f64 * 2.0 * f64::consts::PI * 882.0 / rate).sin() * 3.0 + (i as f64 * 2.0 * f64::consts::PI * 1320.0 / rate).sin() * 1.0 ) ) as i16; } */ // saw wave combination of all 12 tones in octave println!("saw wave combination: (do, mi, le) "); for i in 0..22050 { let mut addend:f64; for j in 0..3 { let freq = root_freq * (2.0_f64).powf((j as f64) / 3.0); addend = ((32768.0 / 3.0) * (2.0 * ((i as f64 * freq / rate) - (0.5 + (i as f64 * freq / rate)).floor()))); circular_buffer[i] += addend as i16; } } for j in 0..3 { let freq = root_freq * (2.0_f64).powf((j as f64) / 3.0); println!("freq {}: {}", j, freq); } /* // square waves println!("test type: square waves"); for i in 0..22050 { let mut addend = 0.0_f64; for j in 0..12 { let freq = root_freq * (2.0_f64).powf((j as f64)/12.0); addend = ((32768.0 / 12.0) * (i as f64 * 2.0 * f64::consts::PI * freq / rate).sin().signum() ); circular_buffer[i] += addend as i16; } } */ let mut cb_start = [ 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, 0_i16, ]; for i in 0..10 { cb_start[i] = circular_buffer[i]; } println!("Circular buffer, 1st 10 values: {:?}", cb_start); println!("analysis root_freq: {}; rate: {}; resolution: {}", root_freq, rate, resolution); println!("f_k\tc"); let vals = naive_cqt_octaves(root_freq, 4, rate, resolution, &circular_buffer, &window::rect); for i in 0..48 { let c = vals[i]; println!( "{}\t{}", calc_f_k(root_freq, i as u8, resolution).round(), c ); } } }
use proconio::input; fn main() { input! { a: u64, b: u64, c: u64, d: u64, e: u64, f: u64, }; let mo: u64 = 998244353; let (a, b, c, d, e, f) = (a % mo, b % mo, c % mo, d % mo, e % mo, f % mo); let x = a * b % mo * c % mo; let y = d * e % mo * f % mo; let ans = (mo + x - y) % mo; println!("{}", ans); }
//! The IPC is a bi-directional communication channel between the broker and sandbox //! //! Permitted calls are executed by the broker and results returned to the sandbox //! //! The following commands are defined: //! * ping - Return "pong" //! * open - Check whether permitted by the policy and return an fd // NOTE: This is pretty naïve, but it _is_ supposed to be a toy. Maybe don't roll your own and // use a real IPC library instead if you are building something important :) It's also // poorly abstracted; things are coupled in places where they shouldn't be, there's heaps of // code duplication and you keep having to change multiple places to modify behaviour. mod dsl { // NOTE: If you haven't used parser combinators before this part probably looks crazy. Also, // the Rust ones are built on macros and look kind of crazy regardless. They're really // powerful though, and once you get used to how they work they're actually significantly // simpler than any other sort of parsing construct. I would highly recommend checking // them out if you use a language that has sensible library support for them (I know // Haskell/Scala/Rust/etc. do, but I don't know if Python/Ruby/Java/etc. do) and you need // to parse things. pub mod request { use nom::{IResult, space}; use std::str; pub enum Command<'a> { Ping, Open(&'a str), } named!(cstr<&str>, do_parse!( s: map_res!(take_until_s!("\0"), str::from_utf8) >> tag!("\0") >> (s) )); named!(ping_parser, terminated!(tag!("ping"), tag!("\0"))); named!(open_parser<&str>, do_parse!( tag!("open") >> space >> filename: cstr >> (filename) ) ); named!(parser<&[u8], Command>, alt!( map!(complete!(ping_parser), |_| Command::Ping) | map!(complete!(open_parser), |filename| Command::Open(filename)) )); pub fn parse(s: &[u8]) -> Option<Command> { match parser(s) { IResult::Done(_, parsed) => Some(parsed), _ => None, } } } pub mod response { use nom::IResult; named!(ping_parser<&[u8]>, terminated!(tag!("pong"), tag!("\0"))); named!(parser<&[u8], Option<()>>, map!(ping_parser, |_| Some(()))); pub fn parse(s: &[u8]) -> Option<()> { match parser(s) { IResult::Done(unparsed, parsed) => { assert_eq!(unparsed, b"", "expected unparsed to be empty"); parsed }, _ => None, } } } } // FIXME: The error handling here is _terrible_ :/ pub mod server { use unix; use futures::{Future, Poll}; use ipc::dsl::request; use std::fs::File; use std::io; use std::os::unix::io::AsRawFd; use std::os::unix::net::SocketAddr; use std::str; use std::thread; use std::time::Duration; use tokio_core::reactor::Core; use tokio_uds::UnixDatagram; enum PolicyAction { Allow, Deny } // FIXME: This is supposed to be provided by the _caller_ fn permitted(filename: &str) -> PolicyAction { match filename.starts_with("/tmp/sandpit.sandbox") { true => PolicyAction::Allow, false => PolicyAction::Deny, } } fn ping(socket: &UnixDatagram) -> Result<(), io::Error> { match socket.send(b"pong\0") { Ok(_) => Ok(()), Err(e) => Err(e), } } fn open(socket: &UnixDatagram, filename: &str) -> Result<(), io::Error> { use std::os::unix::io::IntoRawFd; let socketfd = socket.as_raw_fd(); // Check if permitted match permitted(filename) { PolicyAction::Allow => (), PolicyAction::Deny => { println!("[ipc server] Request failed policy"); // FIXME: This isn't reporting errors properly return match unix::open_sendmsg_err(socketfd) { Some(_) => Ok(()), None => Err(io::Error::new(io::ErrorKind::Other, "Error in sendmsg")), }; } } // Create an fd to send let file = match File::open(filename) { Ok(val) => val, Err(e) => { println!("[ipc server] open request failed: {}", e); // FIXME: This isn't reporting errors properly return match unix::open_sendmsg_err(socketfd) { Some(_) => Ok(()), None => Err(io::Error::new(io::ErrorKind::Other, "Error in sendmsg")), }; } }; let fd = file.into_raw_fd(); match unix::open_sendmsg(socketfd, fd) { Some(_) => Ok(()), None => Err(io::Error::new(io::ErrorKind::Other, "Error in sendmsg")), } } fn handle(message: &[u8], socket: &UnixDatagram) -> Result<(), io::Error> { if let Some(command) = request::parse(message) { match command { request::Command::Ping => ping(socket), request::Command::Open(filename) => open(socket, filename), } } else { println!("[ipc server] Received invalid command"); Ok(()) } } struct Server { socket: UnixDatagram, buf: Vec<u8>, // This represents whether there's more left in the socket to read state: Option<(usize, SocketAddr)>, } impl Future for Server { type Item = (); type Error = io::Error; fn poll(&mut self) -> Poll<(), io::Error> { // NOTE: Saying I'm handing a message around is a bit misleading, as everything is // stored in a mutable buffer, but it makes it a bit easier to see what's going // on logically loop { // Check to see if there's a message and handle it self.state = match self.state { Some((size, _)) => { // Get message content and handle let message = &self.buf[..size]; match handle(message, &self.socket) { _ => () }; // Set state to finished None }, None => { // Get message and set state to ready let message = try_nb!(self.socket.recv_from(&mut self.buf)); Some(message) } } } } } pub fn start() -> Result<(), io::Error> { // Create the event loop // FIXME: The caller is supposed to own the event loop // FIXME: Handle errors gracefully let mut core = match Core::new() { Ok(val) => val, Err(e) => panic!("[ipc server] Can't create core: {}", e), }; let handle = core.handle(); let res = UnixDatagram::bind("server", &handle); // FIXME: Handle errors gracefully let socket = match res { Ok(val) => val, Err(e) => panic!("[ipc server] bind(): {}", e), }; // Wait for sandbox // TODO: Should be its own future loop { match socket.connect("client") { Ok(_) => { println!("[ipc server] Connected to client"); break; }, Err(e) => println!("[ipc server] connect(): {}", e), } thread::sleep(Duration::from_secs(1)); } // Run the server core.run(Server { socket: socket, buf: vec![0; 64], state: None, }) } } // FIXME: The client is supposed to also be async // FIXME: The error handling here is _terrible_ :/ pub mod client { use unix; use ipc::dsl::response; use std::os::unix::net::UnixDatagram; use std::thread; use std::time::Duration; pub struct Client { socket: UnixDatagram, buf: Vec<u8>, } impl Client { // FIXME: Should be a Result pub fn ping(&mut self) -> Option<()> { // Send ping match self.socket.send(b"ping\0") { Ok(_) => (), Err(e) => { println!("Something went wrong send()ing ping: {}", e); return None; }, }; // Recv pong let size = match self.socket.recv(&mut self.buf) { Ok(val) => val, Err(e) => { println!("Something went wrong recv()ing pong: {}", e); return None; }, }; // Parse and return result response::parse(&self.buf[..size]) } // FIXME: Should be a Result pub fn open(&mut self, filename: &str) -> Option<i32> { let msg = format!("open {}\0", filename); match self.socket.send(msg.as_bytes()) { Ok(_) => (), Err(e) => { println!("Something went wrong send()ing open: {}", e); return None; }, }; unix::open_recvmsg(&self.socket) } } // FIXME: Should be a Result pub fn connect() -> Option<Client> { // FIXME: Handle errors gracefully let res = UnixDatagram::bind("client"); let socket = match res { Ok(val) => val, Err(e) => panic!("[ipc client] bind(): {}", e), }; // Wait for broker // TODO: Should be its own future loop { match socket.connect("server") { Ok(_) => { println!("[ipc client] Connected to server"); break; }, Err(e) => println!("[ipc client] connect(): {}", e), } thread::sleep(Duration::from_secs(1)); } Some(Client { socket: socket, buf: vec![0; 64], }) } }
//! Handle network connections for a varlink service #![allow(dead_code)] use crate::error::*; use chainerror::*; //#![feature(getpid)] //use std::process; use std::io::{BufRead, BufReader, Read, Write}; use std::net::{Shutdown, TcpListener, TcpStream}; use std::process; use std::sync::{mpsc, Arc, Mutex, RwLock}; use std::{env, fs, thread}; #[cfg(unix)] use std::os::unix::net::{UnixListener, UnixStream}; #[cfg(windows)] use uds_windows::{UnixListener, UnixStream}; #[cfg(unix)] use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; #[cfg(windows)] use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}; use std::mem; #[derive(Debug)] pub enum Listener { TCP(Option<TcpListener>, bool), UNIX(Option<UnixListener>, bool), } #[derive(Debug)] pub enum Stream { TCP(TcpStream), UNIX(UnixStream), } impl<'a> Stream { #[allow(dead_code)] pub fn split(&mut self) -> Result<(Box<Read + Send + Sync>, Box<Write + Send + Sync>)> { match *self { Stream::TCP(ref mut s) => Ok(( Box::new(s.try_clone().map_err(minto_cherr!())?), Box::new(s.try_clone().map_err(minto_cherr!())?), )), Stream::UNIX(ref mut s) => Ok(( Box::new(s.try_clone().map_err(minto_cherr!())?), Box::new(s.try_clone().map_err(minto_cherr!())?), )), } } pub fn shutdown(&mut self) -> Result<()> { match *self { Stream::TCP(ref mut s) => s.shutdown(Shutdown::Both).map_err(minto_cherr!())?, Stream::UNIX(ref mut s) => s.shutdown(Shutdown::Both).map_err(minto_cherr!())?, } Ok(()) } pub fn try_clone(&mut self) -> ::std::io::Result<Stream> { match *self { Stream::TCP(ref mut s) => Ok(Stream::TCP(s.try_clone()?)), Stream::UNIX(ref mut s) => Ok(Stream::UNIX(s.try_clone()?)), } } pub fn set_nonblocking(&mut self, b: bool) -> Result<()> { match *self { Stream::TCP(ref mut s) => { s.set_nonblocking(b).map_err(minto_cherr!())?; Ok(()) } Stream::UNIX(ref mut s) => { s.set_nonblocking(b).map_err(minto_cherr!())?; Ok(()) } } } #[cfg(unix)] pub fn as_raw_fd(&mut self) -> RawFd { match *self { Stream::TCP(ref mut s) => s.as_raw_fd(), Stream::UNIX(ref mut s) => s.as_raw_fd(), } } #[cfg(windows)] pub fn as_raw_socket(&mut self) -> RawSocket { match self { Stream::TCP(ref mut s) => s.as_raw_socket(), Stream::UNIX(ref mut s) => s.as_raw_socket(), } } } impl ::std::io::Write for Stream { fn write(&mut self, buf: &[u8]) -> ::std::io::Result<usize> { match *self { Stream::TCP(ref mut s) => s.write(buf), Stream::UNIX(ref mut s) => s.write(buf), } } fn flush(&mut self) -> ::std::io::Result<()> { match *self { Stream::TCP(ref mut s) => s.flush(), Stream::UNIX(ref mut s) => s.flush(), } } fn write_all(&mut self, buf: &[u8]) -> ::std::io::Result<()> { match *self { Stream::TCP(ref mut s) => s.write_all(buf), Stream::UNIX(ref mut s) => s.write_all(buf), } } fn write_fmt(&mut self, fmt: ::std::fmt::Arguments) -> ::std::io::Result<()> { match *self { Stream::TCP(ref mut s) => s.write_fmt(fmt), Stream::UNIX(ref mut s) => s.write_fmt(fmt), } } } impl ::std::io::Read for Stream { fn read(&mut self, buf: &mut [u8]) -> ::std::io::Result<usize> { match *self { Stream::TCP(ref mut s) => s.read(buf), Stream::UNIX(ref mut s) => s.read(buf), } } fn read_to_end(&mut self, buf: &mut Vec<u8>) -> ::std::io::Result<usize> { match *self { Stream::TCP(ref mut s) => s.read_to_end(buf), Stream::UNIX(ref mut s) => s.read_to_end(buf), } } fn read_to_string(&mut self, buf: &mut String) -> ::std::io::Result<usize> { match *self { Stream::TCP(ref mut s) => s.read_to_string(buf), Stream::UNIX(ref mut s) => s.read_to_string(buf), } } fn read_exact(&mut self, buf: &mut [u8]) -> ::std::io::Result<()> { match *self { Stream::TCP(ref mut s) => s.read_exact(buf), Stream::UNIX(ref mut s) => s.read_exact(buf), } } } fn activation_listener() -> Result<Option<usize>> { let nfds: usize; match env::var("LISTEN_FDS") { Ok(ref n) => match n.parse::<usize>() { Ok(n) if n >= 1 => nfds = n, _ => return Ok(None), }, _ => return Ok(None), } match env::var("LISTEN_PID") { Ok(ref pid) if pid.parse::<usize>() == Ok(process::id() as usize) => {} _ => return Ok(None), } if nfds == 1 { return Ok(Some(3)); } let fdnames: String; match env::var("LISTEN_FDNAMES") { Ok(n) => { fdnames = n; } _ => return Ok(None), } for (i, v) in fdnames.split(':').enumerate() { if v == "varlink" { return Ok(Some(3 + i as usize)); } } Ok(None) } #[cfg(any(target_os = "linux", target_os = "android"))] fn get_abstract_unixlistener(addr: &str) -> Result<UnixListener> { // FIXME: abstract unix domains sockets still not in std // FIXME: https://github.com/rust-lang/rust/issues/14194 use std::os::unix::io::FromRawFd; use unix_socket::UnixListener as AbstractUnixListener; unsafe { Ok(UnixListener::from_raw_fd( AbstractUnixListener::bind(addr) .map_err(minto_cherr!())? .into_raw_fd(), )) } } #[cfg(not(any(target_os = "linux", target_os = "android")))] fn get_abstract_unixlistener(_addr: &str) -> Result<UnixListener> { Err(into_cherr!(ErrorKind::InvalidAddress)) } impl Listener { #[allow(clippy::new_ret_no_self)] pub fn new<S: ?Sized + AsRef<str>>(address: &S) -> Result<Self> { let address = address.as_ref(); if let Some(l) = activation_listener()? { #[cfg(windows)] { if address.starts_with("tcp:") { unsafe { return Ok(Listener::TCP( Some(TcpListener::from_raw_socket(l as u64)), true, )); } } else if address.starts_with("unix:") { unsafe { return Ok(Listener::UNIX( Some(UnixListener::from_raw_socket(l as u64)), true, )); } } else { return Err(into_cherr!(ErrorKind::InvalidAddress)); } } #[cfg(unix)] { if address.starts_with("tcp:") { unsafe { return Ok(Listener::TCP( Some(TcpListener::from_raw_fd(l as i32)), true, )); } } else if address.starts_with("unix:") { unsafe { return Ok(Listener::UNIX( Some(UnixListener::from_raw_fd(l as i32)), true, )); } } else { return Err(into_cherr!(ErrorKind::InvalidAddress)); } } } if address.starts_with("tcp:") { Ok(Listener::TCP( Some(TcpListener::bind(&address[4..]).map_err(minto_cherr!())?), false, )) } else if address.starts_with("unix:") { let mut addr = String::from(address[5..].split(';').next().unwrap()); if addr.starts_with('@') { addr = addr.replacen('@', "\0", 1); return get_abstract_unixlistener(&addr) .and_then(|v| Ok(Listener::UNIX(Some(v), false))); } // ignore error on non-existant file let _ = fs::remove_file(&*addr); Ok(Listener::UNIX( Some(UnixListener::bind(addr).map_err(minto_cherr!())?), false, )) } else { Err(into_cherr!(ErrorKind::InvalidAddress)) } } #[cfg(windows)] pub fn accept(&self, timeout: u64) -> Result<Stream> { use winapi::um::winsock2::WSAEINTR as EINTR; use winapi::um::winsock2::{fd_set, select, timeval}; if timeout > 0 { let socket: usize = match self { Listener::TCP(Some(l), _) => l.as_raw_socket(), Listener::UNIX(Some(l), _) => l.as_raw_socket(), _ => return Err(into_cherr!(ErrorKind::ConnectionClosed)), } as usize; unsafe { let mut readfs: fd_set = mem::zeroed(); loop { readfs.fd_count = 1; readfs.fd_array[0] = socket; let mut writefds: fd_set = mem::zeroed(); let mut errorfds: fd_set = mem::zeroed(); let mut timeout = timeval { tv_sec: timeout as i32, tv_usec: 0, }; let ret = select(0, &mut readfs, &mut writefds, &mut errorfds, &mut timeout); if ret != EINTR { break; } } if readfs.fd_count == 0 || readfs.fd_array[0] != socket { return Err(into_cherr!(ErrorKind::Timeout)); } } } match self { &Listener::TCP(Some(ref l), _) => { let (s, _addr) = l.accept().map_err(minto_cherr!())?; Ok(Stream::TCP(s)) } Listener::UNIX(Some(ref l), _) => { let (s, _addr) = l.accept().map_err(minto_cherr!())?; Ok(Stream::UNIX(s)) } _ => Err(into_cherr!(ErrorKind::ConnectionClosed)), } } #[cfg(unix)] pub fn accept(&self, timeout: u64) -> Result<Stream> { use libc::{fd_set, select, time_t, timeval, EAGAIN, EINTR, FD_ISSET, FD_SET, FD_ZERO}; if timeout > 0 { let fd = match self { Listener::TCP(Some(l), _) => l.as_raw_fd(), Listener::UNIX(Some(l), _) => l.as_raw_fd(), _ => return Err(into_cherr!(ErrorKind::ConnectionClosed)), }; unsafe { let mut readfs: libc::fd_set = mem::uninitialized(); loop { FD_ZERO(&mut readfs); let mut writefds: fd_set = mem::uninitialized(); FD_ZERO(&mut writefds); let mut errorfds: fd_set = mem::uninitialized(); FD_ZERO(&mut errorfds); let mut timeout = timeval { tv_sec: timeout as time_t, tv_usec: 0, }; FD_SET(fd, &mut readfs); let ret = select( fd + 1, &mut readfs, &mut writefds, &mut errorfds, &mut timeout, ); if ret != EINTR && ret != EAGAIN { break; } } if !FD_ISSET(fd, &mut readfs) { return Err(into_cherr!(ErrorKind::Timeout)); } } } match self { &Listener::TCP(Some(ref l), _) => { let (s, _addr) = l.accept().map_err(minto_cherr!())?; Ok(Stream::TCP(s)) } Listener::UNIX(Some(ref l), _) => { let (s, _addr) = l.accept().map_err(minto_cherr!())?; Ok(Stream::UNIX(s)) } _ => Err(into_cherr!(ErrorKind::ConnectionClosed)), } } pub fn set_nonblocking(&self, b: bool) -> Result<()> { match *self { Listener::TCP(Some(ref l), _) => l.set_nonblocking(b).map_err(minto_cherr!())?, Listener::UNIX(Some(ref l), _) => l.set_nonblocking(b).map_err(minto_cherr!())?, _ => Err(into_cherr!(ErrorKind::ConnectionClosed))?, } Ok(()) } #[cfg(unix)] pub fn as_raw_fd(&self) -> RawFd { match *self { Listener::TCP(Some(ref l), _) => l.as_raw_fd(), Listener::UNIX(Some(ref l), _) => l.as_raw_fd(), _ => panic!("pattern `TCP(None, _)` not covered"), } } #[cfg(windows)] pub fn into_raw_socket(&self) -> RawSocket { match *self { Listener::TCP(Some(ref l), _) => l.as_raw_socket(), Listener::UNIX(Some(ref l), _) => l.as_raw_socket(), _ => panic!("pattern `TCP(None, _)` not covered"), } } } impl Drop for Listener { fn drop(&mut self) { match *self { Listener::UNIX(Some(ref listener), false) => { if let Ok(local_addr) = listener.local_addr() { if let Some(path) = local_addr.as_pathname() { let _ = fs::remove_file(path); } } } Listener::UNIX(ref mut listener, true) => { if let Some(l) = listener.take() { #[cfg(unix)] unsafe { let s = UnixStream::from_raw_fd(l.into_raw_fd()); let _ = s.set_read_timeout(None); } #[cfg(windows)] let _ = l; } } Listener::TCP(ref mut listener, true) => { if let Some(l) = listener.take() { #[cfg(unix)] unsafe { let s = TcpStream::from_raw_fd(l.into_raw_fd()); let _ = s.set_read_timeout(None); } #[cfg(windows)] unsafe { let s = TcpStream::from_raw_socket(l.into_raw_socket()); let _ = s.set_read_timeout(None); } } } _ => {} } } } enum Message { NewJob(Job), Terminate, } struct ThreadPool { max_workers: usize, workers: Vec<Worker>, num_busy: Arc<RwLock<usize>>, sender: mpsc::Sender<Message>, receiver: Arc<Mutex<mpsc::Receiver<Message>>>, } trait FnBox { fn call_box(self: Box<Self>); } impl<F: FnOnce()> FnBox for F { fn call_box(self: Box<F>) { (*self)() } } type Job = Box<FnBox + Send + 'static>; impl ThreadPool { /// Create a new ThreadPool. /// /// The initial_worker is the number of threads in the pool. /// /// # Panics /// /// The `new` function will panic if the initial_worker is zero. pub fn new(initial_worker: usize, max_workers: usize) -> ThreadPool { assert!(initial_worker > 0); let (sender, receiver) = mpsc::channel(); let receiver = Arc::new(Mutex::new(receiver)); let mut workers = Vec::with_capacity(initial_worker); let num_busy = Arc::new(RwLock::new(0 as usize)); for _ in 0..initial_worker { workers.push(Worker::new(Arc::clone(&receiver), Arc::clone(&num_busy))); } ThreadPool { max_workers, workers, sender, receiver, num_busy, } } pub fn execute<F>(&mut self, f: F) where F: FnOnce() + Send + 'static, { let job = Box::new(f); self.sender.send(Message::NewJob(job)).unwrap(); if ((self.num_busy() + 1) >= self.workers.len()) && (self.workers.len() <= self.max_workers) { self.workers.push(Worker::new( Arc::clone(&self.receiver), Arc::clone(&self.num_busy), )); } } pub fn num_busy(&self) -> usize { let num_busy = self.num_busy.read().unwrap(); *num_busy } } impl Drop for ThreadPool { fn drop(&mut self) { for _ in &mut self.workers { self.sender.send(Message::Terminate).unwrap(); } for worker in &mut self.workers { if let Some(thread) = worker.thread.take() { thread.join().unwrap(); } } } } struct Worker { thread: Option<thread::JoinHandle<()>>, } impl Worker { fn new(receiver: Arc<Mutex<mpsc::Receiver<Message>>>, num_busy: Arc<RwLock<usize>>) -> Worker { let thread = thread::spawn(move || loop { let message = receiver.lock().unwrap().recv().unwrap(); match message { Message::NewJob(job) => { { let mut num_busy = num_busy.write().unwrap(); *num_busy += 1; } job.call_box(); { let mut num_busy = num_busy.write().unwrap(); *num_busy -= 1; } } Message::Terminate => { break; } } }); Worker { thread: Some(thread), } } } /// `listen` creates a server, with `num_worker` threads listening on `varlink_uri`. /// /// If an `idle_timeout` != 0 is specified, this function returns after the specified /// amount of seconds, if no new connection is made in that time frame. It still waits for /// all pending connections to finish. /// ///# Examples /// ///``` /// extern crate varlink; /// /// let service = varlink::VarlinkService::new( /// "org.varlink", /// "test service", /// "0.1", /// "http://varlink.org", /// vec![/* Your varlink interfaces go here */], /// ); /// /// if let Err(e) = varlink::listen(service, "unix:test_listen_timeout", 1, 10, 1) { /// if *e.kind() != varlink::ErrorKind::Timeout { /// panic!("Error listen: {:?}", e); /// } /// } ///``` ///# Note /// You don't have to use this simple server. With the `VarlinkService::handle()` method you /// can implement your own server model using whatever framework you prefer. pub fn listen<S: ?Sized + AsRef<str>, H: crate::ConnectionHandler + Send + Sync + 'static>( handler: H, address: &S, initial_worker_threads: usize, max_worker_threads: usize, idle_timeout: u64, ) -> Result<()> { let handler = Arc::new(handler); let listener = Listener::new(address)?; listener.set_nonblocking(false)?; let mut pool = ThreadPool::new(initial_worker_threads, max_worker_threads); loop { let mut stream = match listener.accept(idle_timeout) { Err(e) => match e.kind() { ErrorKind::Timeout => { if pool.num_busy() == 0 { return Err(e); } continue; } _ => { return Err(e); } }, r => r?, }; let handler = handler.clone(); pool.execute(move || { let (r, mut w) = stream.split().unwrap(); let mut br = BufReader::new(r); let mut iface: Option<String> = None; loop { match handler.handle(&mut br, &mut w, iface.clone()) { Ok((_, i)) => { iface = i; match br.fill_buf() { Err(_) => break, Ok(buf) if buf.is_empty() => break, _ => {} } } Err(err) => { match err.kind() { ErrorKind::ConnectionClosed | ErrorKind::SerdeJsonDe(_) => {} _ => { eprintln!("Worker error: {:?}", err); } } let _ = stream.shutdown(); break; } } } }); } }
#[doc = "Reader of register WRPROT2"] pub type R = crate::R<u32, super::WRPROT2>; #[doc = "Reader of field `WRPROT2`"] pub type WRPROT2_R = crate::R<u16, u16>; impl R { #[doc = "Bits 0:15 - Write Protection"] #[inline(always)] pub fn wrprot2(&self) -> WRPROT2_R { WRPROT2_R::new((self.bits & 0xffff) as u16) } }
use crate::connection::ConnectOptions; use crate::error::Error; use crate::postgres::{PgConnectOptions, PgConnection}; use futures_core::future::BoxFuture; use log::LevelFilter; use std::time::Duration; impl ConnectOptions for PgConnectOptions { type Connection = PgConnection; fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>> where Self::Connection: Sized, { Box::pin(PgConnection::establish(self)) } fn log_statements(&mut self, level: LevelFilter) -> &mut Self { self.log_settings.log_statements(level); self } fn log_slow_statements(&mut self, level: LevelFilter, duration: Duration) -> &mut Self { self.log_settings.log_slow_statements(level, duration); self } }
//! A wrapper around TCP channels that Noria uses to communicate between clients and servers, and //! inside the data-flow graph. At this point, this is mostly a thin wrapper around //! [`async-bincode`](https://docs.rs/async-bincode/), and it might go away in the long run. use std::borrow::Borrow; use std::collections::HashMap; use std::hash::Hash; use std::io::{self, BufWriter, Read, Write}; use std::marker::PhantomData; use std::net::SocketAddr; use std::ops::{Deref, DerefMut}; use std::sync::mpsc::{self, SendError}; use std::sync::RwLock; use async_bincode::{AsyncBincodeWriter, AsyncDestination}; use byteorder::{ByteOrder, NetworkEndian}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use tokio::prelude::*; pub mod rpc; pub mod tcp; pub use self::tcp::{channel, DualTcpStream, TcpReceiver, TcpSender}; pub const CONNECTION_FROM_BASE: u8 = 1; pub const CONNECTION_FROM_DOMAIN: u8 = 2; pub struct Remote; pub struct MaybeLocal; pub struct DomainConnectionBuilder<D, T> { sport: Option<u16>, addr: SocketAddr, chan: Option<tokio_sync::mpsc::UnboundedSender<T>>, is_for_base: bool, _marker: D, } impl<T> DomainConnectionBuilder<Remote, T> { pub fn for_base(addr: SocketAddr) -> Self { DomainConnectionBuilder { sport: None, chan: None, addr, is_for_base: true, _marker: Remote, } } } impl<D, T> DomainConnectionBuilder<D, T> { pub fn maybe_on_port(mut self, sport: Option<u16>) -> Self { self.sport = sport; self } pub fn on_port(mut self, sport: u16) -> Self { self.sport = Some(sport); self } } impl<T> DomainConnectionBuilder<Remote, T> where T: serde::Serialize, { pub fn build_async( self, ) -> io::Result<AsyncBincodeWriter<BufWriter<tokio::net::TcpStream>, T, AsyncDestination>> { // TODO: async // we must currently write and call flush, because the remote end (currently) does a // synchronous read upon accepting a connection. let s = self.build_sync()?.into_inner().into_inner()?; tokio::net::TcpStream::from_std(s, &tokio::reactor::Handle::default()) .map(BufWriter::new) .map(AsyncBincodeWriter::from) .map(AsyncBincodeWriter::for_async) } pub fn build_sync(self) -> io::Result<TcpSender<T>> { let mut s = TcpSender::connect_from(self.sport, &self.addr)?; { let s = s.get_mut(); s.write_all(&[if self.is_for_base { CONNECTION_FROM_BASE } else { CONNECTION_FROM_DOMAIN }])?; s.flush()?; } Ok(s) } } pub trait Sender { type Item; fn send(&mut self, t: Self::Item) -> Result<(), tcp::SendError>; } impl<T> Sender for tokio_sync::mpsc::UnboundedSender<T> { type Item = T; fn send(&mut self, t: Self::Item) -> Result<(), tcp::SendError> { self.try_send(t).map_err(|_| { tcp::SendError::IoError(io::Error::new( io::ErrorKind::BrokenPipe, "local peer went away", )) }) } } impl<T> DomainConnectionBuilder<MaybeLocal, T> where T: serde::Serialize + 'static + Send, { pub fn build_async( self, ) -> io::Result<Box<dyn Sink<SinkItem = T, SinkError = bincode::Error> + Send>> { if let Some(chan) = self.chan { Ok( Box::new(chan.sink_map_err(|_| serde::de::Error::custom("failed to do local send"))) as Box<_>, ) } else { DomainConnectionBuilder { sport: self.sport, chan: None, addr: self.addr, is_for_base: false, _marker: Remote, } .build_async() .map(|c| Box::new(c) as Box<_>) } } pub fn build_sync(self) -> io::Result<Box<dyn Sender<Item = T> + Send>> { if let Some(chan) = self.chan { Ok(Box::new(chan)) } else { DomainConnectionBuilder { sport: self.sport, chan: None, addr: self.addr, is_for_base: false, _marker: Remote, } .build_sync() .map(|c| Box::new(c) as Box<_>) } } } #[derive(Debug)] pub enum ChannelSender<T> { Local(mpsc::Sender<T>), LocalSync(mpsc::SyncSender<T>), } impl<T> Clone for ChannelSender<T> { fn clone(&self) -> Self { // derive(Clone) uses incorrect bound, so we implement it ourselves. See issue #26925. match *self { ChannelSender::Local(ref s) => ChannelSender::Local(s.clone()), ChannelSender::LocalSync(ref s) => ChannelSender::LocalSync(s.clone()), } } } impl<T> Serialize for ChannelSender<T> { fn serialize<S: Serializer>(&self, _serializer: S) -> Result<S::Ok, S::Error> { unreachable!() } } impl<'de, T> Deserialize<'de> for ChannelSender<T> { fn deserialize<D: Deserializer<'de>>(_deserializer: D) -> Result<Self, D::Error> { unreachable!() } } impl<T> ChannelSender<T> { pub fn send(&self, t: T) -> Result<(), SendError<T>> { match *self { ChannelSender::Local(ref s) => s.send(t), ChannelSender::LocalSync(ref s) => s.send(t), } } pub fn from_local(local: mpsc::Sender<T>) -> Self { ChannelSender::Local(local) } } mod panic_serialize { use serde::{Deserializer, Serializer}; pub fn serialize<S, T>(_t: &T, _serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { unreachable!() } pub fn deserialize<'de, D, T>(_deserializer: D) -> Result<T, D::Error> where D: Deserializer<'de>, { unreachable!() } } /// A wrapper around TcpSender that appears to be Serializable, but panics if it is ever serialized. #[derive(Serialize, Deserialize)] pub struct STcpSender<T>(#[serde(with = "panic_serialize")] pub TcpSender<T>); impl<T> Deref for STcpSender<T> { type Target = TcpSender<T>; fn deref(&self) -> &Self::Target { &self.0 } } impl<T> DerefMut for STcpSender<T> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } pub type TraceSender<T> = ChannelSender<T>; pub type TransactionReplySender<T> = ChannelSender<T>; pub type StreamSender<T> = ChannelSender<T>; struct ChannelCoordinatorInner<K: Eq + Hash + Clone, T> { /// Map from key to remote address. addrs: HashMap<K, SocketAddr>, /// Map from key to channel sender for local connections. locals: HashMap<K, tokio_sync::mpsc::UnboundedSender<T>>, } pub struct ChannelCoordinator<K: Eq + Hash + Clone, T> { inner: RwLock<ChannelCoordinatorInner<K, T>>, } impl<K: Eq + Hash + Clone, T> Default for ChannelCoordinator<K, T> { fn default() -> Self { Self::new() } } impl<K: Eq + Hash + Clone, T> ChannelCoordinator<K, T> { pub fn new() -> Self { Self { inner: RwLock::new(ChannelCoordinatorInner { addrs: Default::default(), locals: Default::default(), }), } } pub fn insert_remote(&self, key: K, addr: SocketAddr) { let mut inner = self.inner.write().unwrap(); inner.addrs.insert(key, addr); } pub fn insert_local(&self, key: K, chan: tokio_sync::mpsc::UnboundedSender<T>) { let mut inner = self.inner.write().unwrap(); inner.locals.insert(key, chan); } pub fn has<Q>(&self, key: &Q) -> bool where K: Borrow<Q>, Q: Hash + Eq + ?Sized, { self.inner.read().unwrap().addrs.contains_key(key) } pub fn get_addr<Q>(&self, key: &Q) -> Option<SocketAddr> where K: Borrow<Q>, Q: Hash + Eq + ?Sized, { self.inner.read().unwrap().addrs.get(key).cloned() } pub fn is_local<Q>(&self, key: &Q) -> Option<bool> where K: Borrow<Q>, Q: Hash + Eq + ?Sized, { self.inner.read().unwrap().locals.get(key).map(|_| true) } pub fn builder_for<Q>(&self, key: &Q) -> Option<DomainConnectionBuilder<MaybeLocal, T>> where K: Borrow<Q>, Q: Hash + Eq + ?Sized, { let inner = self.inner.read().unwrap(); Some(DomainConnectionBuilder { sport: None, addr: *inner.addrs.get(key)?, chan: inner.locals.get(key).cloned(), is_for_base: false, _marker: MaybeLocal, }) } } /// A wrapper around a writer that handles `Error::WouldBlock` when attempting to write. /// /// Instead of return that error, it places the bytes into a buffer so that subsequent calls to /// `write()` can retry writing them. pub struct NonBlockingWriter<T> { writer: T, buffer: Vec<u8>, cursor: usize, } impl<T: Write> NonBlockingWriter<T> { pub fn new(writer: T) -> Self { Self { writer, buffer: Vec::new(), cursor: 0, } } pub fn needs_flush_to_inner(&self) -> bool { self.buffer.len() != self.cursor } pub fn flush_to_inner(&mut self) -> io::Result<()> { if !self.buffer.is_empty() { while self.cursor < self.buffer.len() { match self.writer.write(&self.buffer[self.cursor..])? { 0 => return Err(io::Error::from(io::ErrorKind::BrokenPipe)), n => self.cursor += n, } } self.buffer.clear(); self.cursor = 0; } Ok(()) } pub fn get_ref(&self) -> &T { &self.writer } pub fn get_mut(&mut self) -> &mut T { &mut self.writer } } impl<T: Write> Write for NonBlockingWriter<T> { fn write(&mut self, buf: &[u8]) -> io::Result<usize> { self.buffer.extend_from_slice(buf); match self.flush_to_inner() { Ok(_) => Ok(buf.len()), Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => Ok(buf.len()), Err(e) => { let old_len = self.buffer.len() - buf.len(); self.buffer.truncate(old_len); Err(e) } } } fn flush(&mut self) -> io::Result<()> { self.flush_to_inner()?; self.writer.flush() } } impl<T: Read> Read for NonBlockingWriter<T> { fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.writer.read(buf) } } #[derive(Debug)] pub enum ReceiveError { WouldBlock, IoError(io::Error), DeserializationError(bincode::Error), } impl From<io::Error> for ReceiveError { fn from(error: io::Error) -> Self { if error.kind() == io::ErrorKind::WouldBlock { ReceiveError::WouldBlock } else { ReceiveError::IoError(error) } } } impl From<bincode::Error> for ReceiveError { fn from(error: bincode::Error) -> Self { ReceiveError::DeserializationError(error) } } #[derive(Default)] pub struct DeserializeReceiver<T> { buffer: Vec<u8>, size: usize, phantom: PhantomData<T>, } impl<T> DeserializeReceiver<T> where for<'a> T: Deserialize<'a>, { pub fn new() -> Self { Self { buffer: Vec::new(), size: 0, phantom: PhantomData, } } fn fill_from<R: Read>( &mut self, stream: &mut R, target_size: usize, ) -> Result<(), ReceiveError> { if self.buffer.len() < target_size { self.buffer.resize(target_size, 0u8); } while self.size < target_size { let n = stream.read(&mut self.buffer[self.size..target_size])?; if n == 0 { return Err(io::Error::from(io::ErrorKind::BrokenPipe).into()); } self.size += n; } Ok(()) } pub fn try_recv<R: Read>(&mut self, reader: &mut R) -> Result<T, ReceiveError> { if self.size < 4 { self.fill_from(reader, 5)?; } let message_size: u32 = NetworkEndian::read_u32(&self.buffer[0..4]); let target_buffer_size = message_size as usize + 4; self.fill_from(reader, target_buffer_size)?; let message = bincode::deserialize(&self.buffer[4..target_buffer_size])?; self.size = 0; Ok(message) } }
fn main() { let v = vec![1, 2, 3, 4]; let sum: i32 = v.iter().map(|x| x*x).sum(); println!("{}", sum); }
use crate::macros::Storage; use crate::shared::Description; use crate::Spanned; use runestick::{Source, SpannedError}; use thiserror::Error; error! { /// An error during resolving. #[derive(Debug, Clone)] pub struct ResolveError { kind: ResolveErrorKind, } } impl ResolveError { /// Construct an expectation error. pub(crate) fn expected<A, E>(actual: A, expected: E) -> Self where A: Description + Spanned, E: Description, { Self::new( actual.span(), ResolveErrorKind::Expected { actual: actual.description(), expected: expected.description(), }, ) } } impl From<ResolveError> for SpannedError { fn from(error: ResolveError) -> Self { SpannedError::new(error.span, error.kind) } } /// The kind of a resolve error. #[allow(missing_docs)] #[derive(Debug, Clone, Copy, Error)] pub enum ResolveErrorKind { #[error("{message}")] Custom { message: &'static str }, #[error("expected {expected}, but got `{actual}`")] Expected { actual: &'static str, expected: &'static str, }, #[error("tried to read bad slice from source")] BadSlice, #[error("tried to get bad synthetic identifier `{id}` for {kind}")] BadSyntheticId { kind: &'static str, id: usize }, #[error("bad escape sequence")] BadEscapeSequence, #[error("bad unicode escape")] BadUnicodeEscape, #[error( "this form of character escape may only be used with characters in the range [\\x00-\\x7f]" )] BadHexEscapeChar, #[error( "this form of byte escape may only be used with characters in the range [\\x00-\\xff]" )] BadHexEscapeByte, #[error("bad byte escape")] BadByteEscape, #[error("bad character literal")] BadCharLiteral, #[error("bad byte literal")] BadByteLiteral, #[error("unicode escapes are not supported as a byte or byte string")] BadUnicodeEscapeInByteString, #[error("number literal not valid")] BadNumberLiteral, } /// A type that can be resolved to an internal value based on a source. pub trait Resolve<'a>: ResolveOwned { /// The output type being resolved into. type Output: 'a; /// Resolve the value from parsed AST. fn resolve(&self, storage: &Storage, source: &'a Source) -> Result<Self::Output, ResolveError>; } /// Trait for resolving a token into an owned value. pub trait ResolveOwned { /// The output type being resolved into. type Owned; /// Resolve into an owned value. fn resolve_owned( &self, storage: &Storage, source: &Source, ) -> Result<Self::Owned, ResolveError>; }
extern crate rand; use rand::{random}; use std::time::Instant; use std::io::{Write, Result}; use std::fs::File; mod hitable; use hitable::{Hitable, HitRecord}; mod hitablelist; use hitablelist::HitableList; mod vec3; use vec3::Vec3; mod ray; use ray::Ray; mod sphere; use sphere::Sphere; mod camera; mod material; use material::{Lambertian, Metal, Dielectric}; fn color(r: &Ray, world: &HitableList, depth: i32) -> Vec3 { let max_float = std::f32::MAX; let rec = &mut HitRecord::new(); if world.hit(r, 0.001, max_float, rec) { // setup up temp vars let mut scattered = Ray::new(Vec3::new(), Vec3::new()); let mut attenuation = Vec3::new(); if depth < 50 && rec.material.scatter(r, rec, &mut attenuation, &mut scattered) { attenuation * color(&scattered, world, depth + 1) } else { Vec3::new() } } else { let unit_direction = vec3::unit_vector(*r.direction()); let t = 0.5 * (unit_direction.y() + 1.0); Vec3 { e: [1.0, 1.0, 1.0] } * (1.0 - t) + Vec3 { e: [0.5, 0.7, 1.0] } * t } } #[allow(dead_code)] fn get_spheres() -> Vec<Sphere> { let sphere_01 = Sphere{ center:Vec3{e:[0.0, 0.0, -1.0]}, radius:0.5, material: Lambertian::new(0.1, 0.2, 0.8) }; let sphere_02 = Sphere{ center:Vec3{e:[0.0, -100.5, -1.0]}, radius:100.0, material: Lambertian::new(0.8, 0.8, 0.0) }; let sphere_03 = Sphere{ center:Vec3{e:[1.0, 0.0, -1.0]}, radius:0.5, material: Metal::new(0.8, 0.6, 0.2, 0.3) }; let sphere_04 = Sphere{ center:Vec3{e:[-1.0, 0.0, -1.0]}, radius:0.5, material: Dielectric::new(1.5) // air = 1, // glass = 1.3-1.7, // diamond = 2.4 }; let sphere_05 = Sphere{ center:Vec3{e:[-1.0, 0.0, -1.0]}, radius:-0.45, material: Dielectric::new(1.5) }; vec!(sphere_01, sphere_02, sphere_03, sphere_04, sphere_05) } fn random_scene() -> Vec<Sphere> { let mut scene = vec!(); scene.push(Sphere{ center:Vec3{e:[0.0, -1000.0, 0.0]}, radius:1000.0, material: Lambertian::new(0.5, 0.5, 0.5) }); for a in -11..11 { for b in -11..11 { let choose_mat = random::<f32>(); let center = Vec3{e:[a as f32 + 0.9 + random::<f32>(), 0.2, b as f32 + 0.9 + random::<f32>()]}; if (center - Vec3 { e: [4.0, 0.2, 0.0] }).length() > 0.9 { if choose_mat < 0.8 { // scene.push( Sphere { center, radius: 0.2, material: Lambertian::new(random::<f32>() * random::<f32>(), random::<f32>() * random::<f32>(), random::<f32>() * random::<f32>()) }) } else if choose_mat > 0.8 && choose_mat < 0.95 { // scene.push(Sphere { center, radius: 0.2, material: Metal::new(0.5 * (1.0 + random::<f32>()), 0.5 * (1.0 + random::<f32>()), 0.5 * (1.0 + random::<f32>()), 0.5 * random::<f32>()) }); } else { // glass scene.push(Sphere { center, radius: 0.2, material: Dielectric::new(1.5)}) }; } } } scene.push(Sphere{ center:Vec3{e:[0.0, 1.0, 0.0]}, radius:1.0, material: Dielectric::new(1.5) }); scene.push(Sphere{ center:Vec3{e:[-4.0, 1.0, 0.0]}, radius:1.0, material: Lambertian::new(0.4, 0.2, 0.1) }); scene.push(Sphere{ center:Vec3{e:[4.0, 1.0, 0.0]}, radius:1.0, material: Metal::new(0.7, 0.6, 0.5, 0.0) }); scene } fn render_ppm(aa_quality: i32) -> Result<()> { // Writes out PPM file which is a text based image format. // let mut buffer = File::create("helloworld.ppm")?; let nx = 800; let ny = 400; let aa_samples = aa_quality; write!(buffer, "P3\n{} {}\n255\n", nx, ny); let objects = random_scene(); //get_spheres(); let world = hitablelist::HitableList{hit_records: &objects}; let look_from = Vec3{e:[-8.0, 2.0, 2.0]}; let look_at = Vec3{e:[0.0, 0.0, -1.0]}; let distance_to_focus = (look_from - look_at).length(); let aperture = 0.22; let cam = &camera::Camera::new( look_from, look_at, Vec3{e:[0.0, 1.0, 0.0]}, 30.0, nx as f32 / ny as f32, aperture, distance_to_focus ); for j in (0..ny).rev() { for i in 0..nx { let mut col = Vec3::new(); for _s in 0..aa_samples { let u = (i as f32 + random::<f32>()) / nx as f32; let v = (j as f32 + random::<f32>()) / ny as f32; let r = cam.get_ray(u, v); //let _p = r.point_at_parameter(2.0); col = col + color(&r, &world, 0); } col = col / (aa_samples as f32); col = Vec3{e: [col.r().sqrt(), col.g().sqrt(), col.b().sqrt()]} ; let ir = (255.99 * col.r()) as i32; let ig = (255.99 * col.g()) as i32; let ib = (255.99 * col.b()) as i32; writeln!(buffer, "{} {} {}\n", ir, ig, ib); } } Ok(()) } fn main() { // Marker for benchmarking start let start = Instant::now(); render_ppm(100).unwrap(); // Benchmarking let time = Instant::now() - start; let time_secs = time.as_secs(); let time_millis = time.subsec_millis(); println!("Rendered in {} seconds.", time_secs as f32 + time_millis as f32 / 1000.0); }
use eosio::{ AccountName, BlockNum, BlockNumOrId, ScopeName, SymbolCode, TableName, }; use structopt::StructOpt; /// Retrieve various items and information from the blockchain #[derive(StructOpt, Debug)] pub enum Get { /// Get current blockchain information Info, /// Retrieve a full block from the blockchain Block(GetBlock), /// Retrieve an account from the blockchain Account(GetAccount), /// Retrieve the code and ABI for an account Code(GetCode), /// Retrieve the ABI for an account Abi(GetAbi), /// Retrieve the contents of a database table Table(GetTable), /// Retrieve a list of scopes and tables owned by a contract Scope(GetScope), /// Retrieve information related to standard currencies Currency(GetCurrency), /// Retrieve accounts associated with a public key Accounts(GetAccounts), /// Retrieve accounts which are servants of a given account Servants(GetServants), /// Retrieve a transaction from the blockchain Transaction(GetTransaction), /// Retrieve all actions with specific account name referenced in authorization or receiver Actions(GetActions), /// Retrieve the producer schedule Schedule, /// Get transaction id given transaction object TransactionId(GetTransactionId), } /// Retrieve a full block from the blockchain #[derive(StructOpt, Debug)] pub struct GetBlock { /// The number or ID of the block to retrieve pub block: BlockNumOrId, /// Get block header state from fork database instead #[structopt(long)] pub header_state: bool, } /// Retrieve an account from the blockchain #[derive(StructOpt, Debug)] pub struct GetAccount { /// The name of the account to retrieve pub name: AccountName, /// The expected core symbol of the chain you are querying pub core_symbol: Option<SymbolCode>, /// Output in JSON format #[structopt(short, long)] pub json: bool, } /// Retrieve the code and ABI for an account #[derive(StructOpt, Debug)] pub struct GetCode { /// The name of the account whose code should be retrieved pub name: AccountName, /// The name of the file to save the contract .wast/wasm to #[structopt(short, long)] pub code: Option<String>, /// The name of the file to save the contract .abi to #[structopt(short, long)] pub abi: Option<String>, /// Save contract as wasm #[structopt(long)] pub wasm: bool, } /// Retrieve the ABI for an account #[derive(StructOpt, Debug)] pub struct GetAbi { /// The name of the account whose abi should be retrieved pub name: AccountName, /// The name of the file to save the contract .abi to instead of writing to console #[structopt(short, long)] pub file: Option<String>, } /// Retrieve the contents of a database table #[derive(StructOpt, Debug)] pub struct GetTable { /// The account who owns the table pub account: AccountName, /// The scope within the contract in which the table is found pub scope: ScopeName, /// The name of the table as specified by the contract abi pub table: TableName, /// Return the value as BINARY rather than using abi to interpret as JSON #[structopt(short, long)] pub binary: bool, /// The maximum number of rows to return #[structopt(short, long)] pub limit: Option<u64>, /// JSON representation of lower bound value of key, defaults to first #[structopt(short = "L", long)] pub lower: Option<String>, /// JSON representation of upper bound value of key, defaults to last #[structopt(short = "U", long)] pub upper: Option<String>, /// Index number, 1 - primary (first), 2 - secondary index (in order defined by /// multi_index), 3 - third index, etc. Number or name of index can be specified, /// e.g. 'secondary' or '2'. #[structopt(long)] pub index: Option<String>, /// The key type of --index, primary only supports (i64), all others support (i64, /// i128, i256, float64, float128, ripemd160, sha256). Special type 'name' indicates /// an account name. #[structopt(long)] pub key_type: Option<String>, /// The encoding type of key_type (i64, i128, float64, float128) only support decimal /// encoding e.g. 'dec'i256 - supports both 'dec' and 'hex', ripemd160 and sha256 is /// 'hex' only #[structopt(long)] pub encode_type: Option<String>, /// Iterate in reverse order #[structopt(short, long)] pub reverse: bool, /// show RAM payer #[structopt(long)] pub show_payer: bool, } /// Retrieve a list of scopes and tables owned by a contract #[derive(StructOpt, Debug)] pub struct GetScope { /// The contract who owns the table pub contract: AccountName, /// The name of the table as filter #[structopt(short, long)] pub table: Option<TableName>, /// The maximum number of rows to return #[structopt(short, long)] pub limit: Option<u64>, /// lower bound of scope #[structopt(short = "L", long)] pub lower: Option<String>, /// upper bound of scope #[structopt(short = "U", long)] pub upper: Option<String>, /// Iterate in reverse order #[structopt(short, long)] pub reverse: bool, } /// Retrieve information related to standard currencies #[derive(StructOpt, Debug)] pub enum GetCurrency { /// Retrieve the balance of an account for a given currency Balance(GetCurrencyBalance), /// Retrieve the stats of for a given currency Stats(GetCurrencyStats), } /// Retrieve the balance of an account for a given currency #[derive(StructOpt, Debug)] pub struct GetCurrencyBalance { /// The contract that operates the currency pub contract: AccountName, /// The account to query balances for pub account: AccountName, /// The symbol for the currency if the contract operates multiple currencies pub symbol: Option<SymbolCode>, } /// Retrieve the stats of for a given currency #[derive(StructOpt, Debug)] pub struct GetCurrencyStats { /// The contract that operates the currency pub contract: AccountName, /// The symbol for the currency if the contract operates multiple currencies pub symbol: SymbolCode, } /// Retrieve accounts associated with a public key #[derive(StructOpt, Debug)] pub struct GetAccounts { /// The public key to retrieve accounts for pub public_key: String, } /// Retrieve accounts which are servants of a given account #[derive(StructOpt, Debug)] pub struct GetServants { /// The name of the controlling account pub account: AccountName, } /// Retrieve a transaction from the blockchain #[derive(StructOpt, Debug)] pub struct GetTransaction { /// ID of the transaction to retrieve pub id: String, /// the block number this transaction may be in #[structopt(short, long)] pub block_hint: Option<BlockNum>, } /// Retrieve all actions with specific account name referenced in authorization /// or receiver #[derive(StructOpt, Debug)] pub struct GetActions { /// name of account to query on pub account_name: AccountName, /// sequence number of action for this account, -1 for last pub pos: Option<i64>, /// get actions [pos,pos+offset] for positive offset or [pos-offset,pos] for /// negative offset pub offset: Option<i64>, /// print full json #[structopt(short, long)] pub json: bool, /// don't truncate action json #[structopt(long)] pub full: bool, /// pretty print full action json #[structopt(long)] pub pretty: bool, /// print console output generated by action #[structopt(long)] pub console: bool, } /// Get transaction id given transaction object #[derive(StructOpt, Debug)] pub struct GetTransactionId { /// The JSON string or filename defining the transaction which transaction id we /// want to retrieve pub transaction: String, }
use super::*; use rand::{Rng, thread_rng}; use std::fmt; use std::fmt::Display; use std::collections::HashSet; #[derive(Debug, Clone)] pub struct Player { pub food: usize, pub fields: usize, pub grains: usize, pub vegetables: usize, pub wood: usize, pub clay: usize, pub reed: usize, pub stone: usize, pub sheep: usize, pub cattle: usize, pub boar: usize, pub actions: usize, pub total_actions: usize, pub actions_taken: Vec<String>, pub player_mat: PlayerMat, pub house_type: HouseType, pub beggers: usize, pub children: usize, pub stables: usize, pub fences: usize, pub pastures: Vec<Pasture>, pub pet: Option<Animal>, pub improvements: Vec<MajorImprovement> } impl Player { pub fn new(food: usize) -> Player { let mut new_player = Player { food: food, fields: 0, grains: 0, vegetables: 0, wood: 0, clay: 0, reed: 0, stone: 0, sheep: 0, boar: 0, cattle: 0, actions: 2, total_actions: 2, actions_taken: Vec::new(), player_mat: PlayerMat::new(), house_type: HouseType::Wood, beggers: 0, children: 0, fences: 0, pastures: Vec::new(), stables: 0, pet: None, improvements: Vec::new() }; let new_player_display = format!("{}", new_player); new_player.actions_taken.push(format!("Round: 0 [2/2] Init\n{}", new_player_display)); new_player } pub fn score(&self, verbose: bool) -> i32 { let mut result: i32 = 0; let mut score = -1; match self.fields { 0|1 => score = -1, 2 => score = 1, 3 => score = 2, 4 => score = 3, _ => score = 4 } result += score; if verbose { println!("Fields: {} -> {} pts", self.fields, score); } result += (self.pastures.len() * 1) as i32; if verbose { println!("Pastures: {} -> {} pts", self.pastures.len(), self.pastures.len()); } let grain_in_fields: usize = self.player_mat.tiles.iter() .filter_map(|t| t.field.clone()) .filter(|t| t.is_grain()) .map(|t| t.count) .sum(); match (self.grains + grain_in_fields) { 0 => score = -1, 1|2|3 => score = 1, 4|5 => score = 2, 6|7 => score = 3, _ => score = 4, }; result += score; if verbose { println!("Grains: {} (in hand) + {} (in fields) -> {} pts", self.grains, grain_in_fields, score); } let veg_in_fields: usize = self.player_mat.tiles.iter() .filter_map(|t| t.field.clone()) .filter(|t| t.is_vegetable()) .map(|t| t.count) .sum(); match (self.vegetables + veg_in_fields) { 0 => score = -1, 1 => score = 1, 2 => score = 2, 3 => score = 3, _ => score = 4, }; result += score; if verbose { println!("Vegetables: {} (in hand) + {} (in fields) -> {} pts", self.vegetables, veg_in_fields, score); } match self.sheep { 0 => score = -1, 1|2|3 => score = 1, 4|5 => score = 2, 6|7 => score = 3, _ => score = 4, }; result += score; if verbose { println!("Sheep: {} -> {} pts", self.sheep, score); } match self.boar { 0 => score = -1, 1|2 => score = 1, 3|4 => score = 2, 5|6 => score = 3, _ => score = 4, }; result += score; if verbose { println!("Boar: {} -> {} pts", self.boar, score); } match self.cattle { 0 => score = -1, 1 => score = 1, 2|3 => score = 2, 4|5 => score = 3, _ => score = 4, }; if verbose { println!("Cattle: {} -> {} pts", self.cattle, score); } let empty_spaces: Vec<&FarmTile> = self.player_mat.tiles.iter() .filter(|&t| t.is_empty()) .collect(); if verbose { println!("Empty Spaces: {} -> -{} pts", empty_spaces.len(), empty_spaces.len()); } result -= empty_spaces.len() as i32; let num_rooms = self.player_mat.tiles.iter() .filter(|t| t.house.is_some()) .count(); match self.house_type { HouseType::Wood => score = 0 as i32, HouseType::Clay => score = (num_rooms * 1) as i32, HouseType::Stone => score = (num_rooms * 2) as i32, } result += score; if verbose { println!("Rooms [{:?}]: {} -> {} pts", self.house_type, num_rooms, score); } result -= (self.beggers * 3) as i32; if verbose { println!("Beggers: {} -> -{} pts", self.beggers, 3 * self.beggers); } let mut fenced_stables = 0; for pasture in &self.pastures { result += pasture.stables as i32; fenced_stables += pasture.stables as i32; } if verbose { println!("Fenced stables: {} pts", fenced_stables); } result += (self.total_actions * 3) as i32; if verbose { println!("Total actions: {} -> {} pts", self.total_actions, self.total_actions*3); } if self.improvements.contains(&MajorImprovement::Fireplace_2) { result += 1; if verbose { println!("Fireplace_2 -> 1 pt") } }; if self.improvements.contains(&MajorImprovement::Fireplace_3) { result += 1; if verbose { println!("Fireplace_3 -> 1 pt") } }; if self.improvements.contains(&MajorImprovement::CookingHearth_4) { result += 1; if verbose { println!("CookingHearth_4 -> 1 pt") } }; if self.improvements.contains(&MajorImprovement::CookingHearth_5) { result += 1; if verbose { println!("CookingHearth_5 -> 1 pt") } }; if self.improvements.contains(&MajorImprovement::ClayOven) { result += 2; if verbose { println!("ClayOven -> 2 pt") } }; if self.improvements.contains(&MajorImprovement::StoneOven) { result += 3; if verbose { println!("StoneOven -> 3 pt") } }; if self.improvements.contains(&MajorImprovement::Pottery) { result += 2; match self.clay { 0|1|2 => { if verbose { println!("Pottery -> 2 pt + 0 pt") } }, 3|4 => { result += 1; if verbose { println!("Pottery -> 2 pt + 1 pt (3-4 clay)") } }, 5|6 => { result += 2; if verbose { println!("Pottery -> 2 pt + 2 pt (5-6 clay)") } }, _ => { result += 3; if verbose { println!("Pottery -> 2 pt + 3 pt (7+ clay)") } }, } }; if self.improvements.contains(&MajorImprovement::Joinery) { result += 2; match self.wood { 0|1|2 => { if verbose { println!("Joinery -> 2 pt + 0 pt") } }, 3|4 => { result += 1; if verbose { println!("Joinery -> 2 pt + 1 pt (3-4 wood)") } }, 5|6 => { result += 2; if verbose { println!("Joinery -> 2 pt + 2 pt (5-6 wood)") } }, _ => { result += 3; if verbose { println!("Joinery -> 2 pt + 3 pt (7+ wood)") } }, } }; if self.improvements.contains(&MajorImprovement::BasketmakersWorkshop) { result += 2; match self.reed { 0|1 => { if verbose { println!("Basketmaker's Workshop -> 2 pt + 0 pt") } }, 2|3 => { result += 1; if verbose { println!("Basketmaker's Workshop -> 2 pt + 1 pt (2-3 reed)") } }, 4 => { result += 2; if verbose { println!("Basketmaker's Workshop -> 2 pt + 2 pt (4 reed)") } }, _ => { result += 3; if verbose { println!("Basketmaker's Workshop -> 2 pt + 3 pt (5+ reed)") } }, } }; if self.improvements.contains(&MajorImprovement::Well) { result += 4; if verbose { println!("Well -> 4 pt") } }; result } /// Randomly plow a field if none exists. If a field already exists, plow a random field /// connected to an existing field pub fn plow(&mut self) { { let empty_spaces: Vec<&FarmTile> = self.player_mat.tiles.iter() .filter(|t| t.is_empty() && t.north_fence == false && t.south_fence == false && t.west_fence == false && t.east_fence == false) .collect(); if empty_spaces.len() == 0 { // println!("Cannot plow field... no more empty spaces"); return; } } if self.fields == 0 { loop { let num = thread_rng().gen_range(0, 15); if self.player_mat.tiles[num].is_empty() { self.player_mat.tiles[num].plow(); break; } } } else { self.player_mat.plow_random_field(); } self.fields += 1; } pub fn can_build_room(&self) -> bool { if self.reed < 2 { return false; } match self.house_type { HouseType::Wood => { if self.wood < 5 { return false; } } HouseType::Clay => { if self.clay < 5 { return false; } } HouseType::Stone => { if self.stone < 5 { return false; } } } return true; } pub fn pay_for_room(&mut self) { match self.house_type { HouseType::Wood => { self.wood -= 5; }, HouseType::Clay => { self.clay -= 5; }, HouseType::Stone => { self.stone -= 5; } } } pub fn build_room(&mut self) { if !self.can_build_room() { return; } let curr_rooms: Vec<usize> = self.player_mat.tiles .iter() .enumerate() .filter(|&(i, t)| !(t.house.is_none())) .map(|(i, t)| i) .collect(); // Filter surrounding tiles if they are empty let possible_rooms: Vec<usize> = curr_rooms.iter() .flat_map(|&i| self.player_mat.tiles[i].surrounding_tiles.clone()) .filter(|&i| self.player_mat.tiles[i].is_empty() && self.player_mat.tiles[i].north_fence == false && self.player_mat.tiles[i].south_fence == false && self.player_mat.tiles[i].west_fence == false && self.player_mat.tiles[i].east_fence == false) .collect(); if possible_rooms.len() == 0 { return; } let random_room = ::rand::thread_rng().choose(&possible_rooms).unwrap(); self.player_mat.tiles[*random_room].build_room(self.house_type.clone()); self.pay_for_room(); } pub fn build_stables(&mut self) { let available_stables = 4 - self.stables; let max_stables = ::std::cmp::min(available_stables, self.wood / 2); if max_stables == 0 { return; } let num_stables = ::rand::random::<usize>() % (max_stables) + 1; // Always guarentee at least one stable for _ in 0..num_stables { let possibles: Vec<usize> = self.player_mat.tiles .iter() .enumerate() .filter(|&(i, t)| t.is_empty()) .map(|(i, t)| i) .collect(); if possibles.len() == 0 { return; } let random_tile = ::rand::thread_rng().choose(&possibles).unwrap(); self.player_mat.tiles[*random_tile].stable(); self.wood -= 2; self.stables += 1; } } pub fn build_stable(&mut self) { if self.wood == 0 || self.stables == 4{ // Not enough wood to buy one stable or no available stables return; } let possibles: Vec<usize> = self.player_mat.tiles .iter() .enumerate() .filter(|&(i, t)| t.is_empty()) .map(|(i, t)| i) .collect(); if possibles.len() == 0 { return; } let random_tile = ::rand::thread_rng().choose(&possibles).unwrap(); self.player_mat.tiles[*random_tile].stable(); self.wood -= 1; self.stables += 1; } pub fn sow(&mut self) { let mut empty_fields: Vec<usize> = self.player_mat.tiles.iter() .enumerate() .filter(|&(i, t)| t.field.is_some() && t.clone().field.unwrap().count == 0) .map(|(i, f)| i) .collect(); while empty_fields.len() > 0 && self.vegetables > 0 { let curr_field_index = empty_fields.pop().unwrap(); self.sow_veg(curr_field_index); self.vegetables -= 1; } while empty_fields.len() > 0 && self.grains > 0 { let curr_field_index = empty_fields.pop().unwrap(); self.sow_grain(curr_field_index); self.grains -= 1; } } pub fn sow_veg(&mut self, index: usize) { self.player_mat.tiles[index].sow_veg(); } pub fn sow_grain(&mut self, index: usize) { self.player_mat.tiles[index].sow_grain(); } pub fn upgrade_house(&mut self) { for tile in self.player_mat.tiles.iter_mut() { if tile.house.is_some() { tile.upgrade() } } match self.house_type { HouseType::Wood => self.house_type = HouseType::Clay, HouseType::Clay => self.house_type = HouseType::Stone, HouseType::Stone => {} } } pub fn make_pastures(&mut self) -> usize { let mut fences_built = 0; for i in 0..20 { let mut curr_pasture = HashSet::new(); { let empty_spaces: Vec<&FarmTile> = self.player_mat.tiles.iter() .filter(|&t| t.can_be_fenced()) .collect(); if let Some(temp_space) = ::rand::thread_rng().choose(&empty_spaces) { let mut curr_space = *temp_space; curr_pasture.insert(curr_space.index); loop { if ::rand::random::<usize>() % 100 < 20 { break; } let surrounding_tiles: Vec<&usize> = curr_space.surrounding_tiles.iter() .filter(|&t| self.player_mat.tiles[*t].can_be_fenced()) .collect(); if let Some(surrounding_tile) = ::rand::thread_rng().choose(&surrounding_tiles) { curr_space = &self.player_mat.tiles[**surrounding_tile]; curr_pasture.insert(**surrounding_tile); } else { break; } } } else { // println!("[Make Pastures] No more empty spaces.. cannot make pasture"); } } // println!("Fences: {} Wood: {}", self.fences, self.wood); // println!("Max fences: min({}, {})", 15-self.fences, self.wood); let max_fences = std::cmp::min(15-self.fences, self.wood); if curr_pasture.len() > 0 { if let Some(wood_used) = self.player_mat.make_pasture(curr_pasture.clone().into_iter().collect(), max_fences) { // if wood_used+self.fences > 15 { // println!("Max fences: min({}, {})", 15-self.fences, self.wood); // println!("Wood used: {}", wood_used); // } let stables = curr_pasture.iter().filter(|&&t| self.player_mat.tiles[t].stable == true).collect::<Vec<&usize>>().len(); self.wood -= wood_used; self.fences += wood_used; self.pastures.push( Pasture::new(curr_pasture.into_iter().collect(), stables) ); fences_built += wood_used; } } } fences_built } pub fn place_animals(&mut self) { let orig_state = self.clone(); let mut best_score = -999; let mut best_state = orig_state; // TODO: We try 10 times to find the best animal placement.. more/less? for i in 0..20 { // println!("i: {}", i); let mut temp_state = self.clone(); temp_state.animal_reset(); let mut animals_to_place = Vec::new(); let mut sheep_count = temp_state.sheep; let mut boar_count = temp_state.boar; let mut cattle_count = temp_state.cattle; if sheep_count > 0 { animals_to_place.push("sheep"); } if boar_count > 0 { animals_to_place.push("boar"); } if cattle_count > 0 { animals_to_place.push("cattle"); } temp_state.sheep = 0; temp_state.boar = 0; temp_state.cattle = 0; // println!("[{:?}] -- Placing {} sheep, {} boar, {} cattle", animals_to_place, sheep_count, boar_count, cattle_count); while animals_to_place.len() > 0 { let available_pastures: Vec<&Pasture> = temp_state.pastures.iter() .filter(|p| { // Check if one of the tiles in the pasture is occupied temp_state.player_mat.tiles[p.tiles[0]].animal_type.is_none() }).collect(); if let Some(ref mut pasture) = rand::thread_rng().choose(&available_pastures) { let mut index = None; if let Some(random_animal) = rand::thread_rng().choose(&animals_to_place) { match random_animal { &"sheep" => { for tile_index in &pasture.tiles { if temp_state.player_mat.tiles[*tile_index].animal_count > 0 { continue; } if sheep_count >= pasture.capacity { // println!("[{}] {:?}", pasture.capacity, tile_index); let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Sheep); curr_tile.animal_count = pasture.capacity; sheep_count -= pasture.capacity; temp_state.sheep += pasture.capacity; if sheep_count == 0 { index = animals_to_place.iter().position(|x| *x == "sheep"); } } else if sheep_count >= 0 { let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Sheep); curr_tile.animal_count = sheep_count; temp_state.sheep += sheep_count; sheep_count = 0; index = animals_to_place.iter().position(|x| *x == "sheep"); } } }, &"boar" => { for tile_index in &pasture.tiles { if boar_count >= pasture.capacity { let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Boar); curr_tile.animal_count = pasture.capacity; boar_count -= pasture.capacity; temp_state.boar += pasture.capacity; if boar_count == 0 { index = animals_to_place.iter().position(|x| *x == "boar"); } } else if boar_count >= 0 { let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Boar); curr_tile.animal_count = boar_count; temp_state.boar += boar_count; boar_count = 0; index = animals_to_place.iter().position(|x| *x == "boar"); } } }, &"cattle" => { for tile_index in &pasture.tiles { if cattle_count >= pasture.capacity { let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Cattle); curr_tile.animal_count = pasture.capacity; cattle_count -= pasture.capacity; temp_state.cattle += pasture.capacity; if cattle_count == 0 { index = animals_to_place.iter().position(|x| *x == "cattle"); } } else if cattle_count >= 0 { let mut curr_tile = &mut temp_state.player_mat.tiles[*tile_index]; curr_tile.animal_type = Some(Animal::Cattle); curr_tile.animal_count = cattle_count; temp_state.cattle += cattle_count; cattle_count = 0; index = animals_to_place.iter().position(|x| *x == "cattle"); } } }, _ => {} } } if let Some(i) = index { animals_to_place.remove(i); } } // println!("[{:?}] -- No pastures.. trying single stables..", animals_to_place); for single_stable in temp_state.player_mat.tiles.iter_mut().filter(|t| t.stable == true && t.pasture == false && t.animal_type.is_none()) { let mut index = None; if let Some(random_animal) = rand::thread_rng().choose(&animals_to_place) { match random_animal { &"sheep" => { single_stable.animal_type = Some(Animal::Sheep); single_stable.animal_count = 1; sheep_count -= 1; temp_state.sheep += 1; if sheep_count == 0 { index = animals_to_place.iter().position(|x| *x == "sheep"); } }, &"boar" => { single_stable.animal_type = Some(Animal::Boar); single_stable.animal_count = 1; boar_count -= 1; temp_state.boar += 1; if boar_count == 0 { index = animals_to_place.iter().position(|x| *x == "boar"); } }, &"cattle" => { single_stable.animal_type = Some(Animal::Cattle); single_stable.animal_count = 1; cattle_count -= 1; temp_state.cattle += 1; if cattle_count == 0 { index = animals_to_place.iter().position(|x| *x == "cattle"); } }, _ => {} } } if let Some(i) = index { animals_to_place.remove(i); } } let mut index = None; if temp_state.pet.is_none() && animals_to_place.len() > 0 { // println!("[{:?}] -- No pastures left, no single stables, trying pet..", animals_to_place); if let Some(random_animal) = rand::thread_rng().choose(&animals_to_place) { match random_animal { &"sheep" => { temp_state.pet = Some(Animal::Sheep); temp_state.player_mat.tiles[10].animal_type = Some(Animal::Sheep); temp_state.player_mat.tiles[10].animal_count = 1; temp_state.sheep += 1; sheep_count -= 1; if sheep_count == 0 { index = animals_to_place.iter().position(|x| *x == "sheep"); } }, &"boar" => { temp_state.pet = Some(Animal::Boar); temp_state.player_mat.tiles[10].animal_type = Some(Animal::Boar); temp_state.player_mat.tiles[10].animal_count = 1; temp_state.boar += 1; boar_count -=1 ; if boar_count == 0 { index = animals_to_place.iter().position(|x| *x == "boar"); } }, &"cattle" => { temp_state.pet = Some(Animal::Cattle); temp_state.player_mat.tiles[10].animal_type = Some(Animal::Cattle); temp_state.player_mat.tiles[10].animal_count = 1; temp_state.cattle += 1; cattle_count -= 1; if cattle_count == 0 { index = animals_to_place.iter().position(|x| *x == "cattle"); } }, _ => {} } } } if let Some(i) = index { animals_to_place.remove(i); } break; // nothing else is available.. break } if self.improvements.contains(&MajorImprovement::CookingHearth_4) || self.improvements.contains(&MajorImprovement::CookingHearth_5) && (sheep_count > 0 || boar_count > 0 || cattle_count > 0) { // println!("Killing animals in cooking hearth: sheep {} ({}) boar {} ({}) cattle {} ({})", sheep_count, 2*sheep_count, boar_count, 2*boar_count, cattle_count, 3*cattle_count); temp_state.food += 2 * sheep_count; temp_state.food += 3 * boar_count; temp_state.food += 4 * cattle_count; } else if self.improvements.contains(&MajorImprovement::Fireplace_2) || self.improvements.contains(&MajorImprovement::Fireplace_3) && (sheep_count > 0 || boar_count > 0 || cattle_count > 0) { // println!("Killing animals in fireplace: sheep {} ({}) boar {} ({}) cattle {} ({})", sheep_count, 2*sheep_count, boar_count, 2*boar_count, cattle_count, 3*cattle_count); temp_state.food += 2 * sheep_count; temp_state.food += 2 * boar_count; temp_state.food += 3 * cattle_count; } if temp_state.score(false) > best_score { best_score = temp_state.score(false); best_state = temp_state; } } self.sheep = best_state.sheep; self.boar = best_state.boar; self.cattle = best_state.cattle; self.player_mat = best_state.player_mat; self.food = best_state.food; } fn animal_reset(&mut self) { self.pet = None; for pasture in &self.pastures { for tile_index in &pasture.tiles { self.player_mat.tiles[*tile_index].animal_type = None; self.player_mat.tiles[*tile_index].animal_count = 0; } } for single_stable in self.player_mat.tiles.iter_mut().filter(|t| t.stable == true && t.pasture == false) { single_stable.animal_type = None; } self.player_mat.tiles[10].animal_type = None; self.player_mat.tiles[10].animal_count = 0; } pub fn bake_bread(&mut self) -> usize { if self.grains == 0 { return 0; } let mut food_gained = 0; if self.improvements.contains(&MajorImprovement::ClayOven) { self.grains -= 1; self.food += 5; food_gained += 5; } else if self.improvements.contains(&MajorImprovement::StoneOven) { match self.grains { 2..100 => { self.grains -= 2; self.food += 8; food_gained += 8 }, 1 => { self.grains -= 1; self.food += 4; food_gained += 4 }, _ => {}, } } else if self.improvements.contains(&MajorImprovement::CookingHearth_4) || self.improvements.contains(&MajorImprovement::CookingHearth_5) { food_gained = self.grains * 3; self.food += self.grains * 3; self.grains = 0; } else if self.improvements.contains(&MajorImprovement::Fireplace_2) || self.improvements.contains(&MajorImprovement::Fireplace_3) { food_gained = self.grains * 2; self.food += food_gained; self.grains = 0; } food_gained } } impl Display for Player { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Score: {}\n", self.score(false)); write!(f, "[Food: {} Wood: {} Clay: {} Reed: {} Stone: {} Actions: {}/{} Fields: {} Beggers: {}]\n", self.food, self.wood, self.clay, self.reed, self.stone, self.actions, self.total_actions, self.fields, self.beggers); write!(f, "[Grain: {} Veg: {}]\n", self.grains, self.vegetables); write!(f, "[Sheep: {} Boar: {} Cattle: {}]\n", self.sheep, self.boar, self.cattle); write!(f, "[Fences: {}]\n", self.fences); write!(f, "[Pastures: {:?}]\n", self.pastures); write!(f, "{}", self.player_mat); write!(f, "Improvements: {:?}", self.improvements) } }
#[doc = "Reader of register IF2MCTL"] pub type R = crate::R<u32, super::IF2MCTL>; #[doc = "Writer for register IF2MCTL"] pub type W = crate::W<u32, super::IF2MCTL>; #[doc = "Register IF2MCTL `reset()`'s with value 0"] impl crate::ResetValue for super::IF2MCTL { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `DLC`"] pub type DLC_R = crate::R<u8, u8>; #[doc = "Write proxy for field `DLC`"] pub struct DLC_W<'a> { w: &'a mut W, } impl<'a> DLC_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } #[doc = "Reader of field `EOB`"] pub type EOB_R = crate::R<bool, bool>; #[doc = "Write proxy for field `EOB`"] pub struct EOB_W<'a> { w: &'a mut W, } impl<'a> EOB_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } #[doc = "Reader of field `TXRQST`"] pub type TXRQST_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TXRQST`"] pub struct TXRQST_W<'a> { w: &'a mut W, } impl<'a> TXRQST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } #[doc = "Reader of field `RMTEN`"] pub type RMTEN_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RMTEN`"] pub struct RMTEN_W<'a> { w: &'a mut W, } impl<'a> RMTEN_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `RXIE`"] pub type RXIE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RXIE`"] pub struct RXIE_W<'a> { w: &'a mut W, } impl<'a> RXIE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `TXIE`"] pub type TXIE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TXIE`"] pub struct TXIE_W<'a> { w: &'a mut W, } impl<'a> TXIE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `UMASK`"] pub type UMASK_R = crate::R<bool, bool>; #[doc = "Write proxy for field `UMASK`"] pub struct UMASK_W<'a> { w: &'a mut W, } impl<'a> UMASK_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } #[doc = "Reader of field `INTPND`"] pub type INTPND_R = crate::R<bool, bool>; #[doc = "Write proxy for field `INTPND`"] pub struct INTPND_W<'a> { w: &'a mut W, } impl<'a> INTPND_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } #[doc = "Reader of field `MSGLST`"] pub type MSGLST_R = crate::R<bool, bool>; #[doc = "Write proxy for field `MSGLST`"] pub struct MSGLST_W<'a> { w: &'a mut W, } impl<'a> MSGLST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } #[doc = "Reader of field `NEWDAT`"] pub type NEWDAT_R = crate::R<bool, bool>; #[doc = "Write proxy for field `NEWDAT`"] pub struct NEWDAT_W<'a> { w: &'a mut W, } impl<'a> NEWDAT_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } impl R { #[doc = "Bits 0:3 - Data Length Code"] #[inline(always)] pub fn dlc(&self) -> DLC_R { DLC_R::new((self.bits & 0x0f) as u8) } #[doc = "Bit 7 - End of Buffer"] #[inline(always)] pub fn eob(&self) -> EOB_R { EOB_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Transmit Request"] #[inline(always)] pub fn txrqst(&self) -> TXRQST_R { TXRQST_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Remote Enable"] #[inline(always)] pub fn rmten(&self) -> RMTEN_R { RMTEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Receive Interrupt Enable"] #[inline(always)] pub fn rxie(&self) -> RXIE_R { RXIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Transmit Interrupt Enable"] #[inline(always)] pub fn txie(&self) -> TXIE_R { TXIE_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Use Acceptance Mask"] #[inline(always)] pub fn umask(&self) -> UMASK_R { UMASK_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Interrupt Pending"] #[inline(always)] pub fn intpnd(&self) -> INTPND_R { INTPND_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Message Lost"] #[inline(always)] pub fn msglst(&self) -> MSGLST_R { MSGLST_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - New Data"] #[inline(always)] pub fn newdat(&self) -> NEWDAT_R { NEWDAT_R::new(((self.bits >> 15) & 0x01) != 0) } } impl W { #[doc = "Bits 0:3 - Data Length Code"] #[inline(always)] pub fn dlc(&mut self) -> DLC_W { DLC_W { w: self } } #[doc = "Bit 7 - End of Buffer"] #[inline(always)] pub fn eob(&mut self) -> EOB_W { EOB_W { w: self } } #[doc = "Bit 8 - Transmit Request"] #[inline(always)] pub fn txrqst(&mut self) -> TXRQST_W { TXRQST_W { w: self } } #[doc = "Bit 9 - Remote Enable"] #[inline(always)] pub fn rmten(&mut self) -> RMTEN_W { RMTEN_W { w: self } } #[doc = "Bit 10 - Receive Interrupt Enable"] #[inline(always)] pub fn rxie(&mut self) -> RXIE_W { RXIE_W { w: self } } #[doc = "Bit 11 - Transmit Interrupt Enable"] #[inline(always)] pub fn txie(&mut self) -> TXIE_W { TXIE_W { w: self } } #[doc = "Bit 12 - Use Acceptance Mask"] #[inline(always)] pub fn umask(&mut self) -> UMASK_W { UMASK_W { w: self } } #[doc = "Bit 13 - Interrupt Pending"] #[inline(always)] pub fn intpnd(&mut self) -> INTPND_W { INTPND_W { w: self } } #[doc = "Bit 14 - Message Lost"] #[inline(always)] pub fn msglst(&mut self) -> MSGLST_W { MSGLST_W { w: self } } #[doc = "Bit 15 - New Data"] #[inline(always)] pub fn newdat(&mut self) -> NEWDAT_W { NEWDAT_W { w: self } } }
use crate::algebra::FloatLike; use crate::collection::id_map::IdMap; use std::marker::PhantomData; #[derive(Clone, Debug)] struct Dist<W> { pub forward: W, forward_cause: Option<CId>, pub backward: W, backward_cause: Option<CId>, } impl<W: FloatLike> Dist<W> { fn default() -> Self { Dist { forward: W::infty(), forward_cause: None, backward: W::neg_infty(), backward_cause: None, } } fn zero() -> Self { Dist { forward: W::zero(), forward_cause: None, backward: W::zero(), backward_cause: None, } } } #[derive(Debug)] struct Distances<N, W> { pub dists: Vec<Dist<W>>, node: PhantomData<N>, } impl<N: Into<usize>, W: FloatLike> Distances<N, W> { pub fn new(source: N, n: usize) -> Self { let mut dists = vec![Dist::default(); n]; dists[source.into()] = Dist::zero(); Distances { dists, node: PhantomData, } } pub fn to(&self, n: N) -> W { self.dists[n.into()].forward } pub fn from(&self, n: N) -> W { self.dists[n.into()].backward } } /// X <= Y + w #[derive(Clone, Copy, Debug)] pub struct LEQ<N, W> { x: N, y: N, w: W, } type VId = usize; const ORIGIN: VId = 0; pub struct STN<N, W> { variables: Vec<(Dom<W>, Option<N>)>, external_vars: IdMap<N, VId>, constraints: Vec<Const<W>>, } #[derive(Copy, Clone, Debug)] pub struct Dom<W> { pub min: W, pub max: W, } #[derive(Copy, Clone, Debug)] struct Const<W> { internal: bool, active: bool, c: LEQ<VId, W>, } #[allow(clippy::new_without_default)] impl<N: Into<usize> + Copy, W: FloatLike> STN<N, W> { pub fn new() -> Self { let mut variables = Vec::with_capacity(16); let d_zero = Dom { min: W::zero(), max: W::zero(), }; variables.push((d_zero, None)); // reserve first slot for origin STN { variables, external_vars: IdMap::new(), constraints: Vec::with_capacity(16), } } #[inline] fn origin(&self) -> VId { ORIGIN } pub fn add_node(&mut self, label: N, min: W, max: W) { assert!(!self.external_vars.contains_key(label)); assert!(W::neg_infty() <= min && max <= W::infty()); let id = self.variables.len(); self.variables.push((Dom { min, max }, Some(label))); self.external_vars.insert(label, id); self.constraints.push(Const { internal: true, active: true, c: LEQ { x: self.origin(), y: id, w: -min, }, }); self.constraints.push(Const { internal: true, active: true, c: LEQ { x: id, y: self.origin(), w: max, }, }); } pub fn record_constraint(&mut self, x: N, y: N, w: W, active: bool) -> CId { let xi = self.external_vars[x]; let yi = self.external_vars[y]; self.constraints.push(Const { internal: false, active, c: LEQ { x: xi, y: yi, w }, }); self.constraints.len() - 1 } pub fn set_active(&mut self, cid: CId, active: bool) { self.constraints[cid].active = active; } } /// Identifier of a constraint type CId = usize; pub fn domains<N, W>(stn: &STN<N, W>) -> Result<IdMap<N, Dom<W>>, Vec<CId>> where N: Into<usize> + Copy + std::fmt::Debug, W: FloatLike + std::fmt::Debug, { let n = stn.variables.len(); let mut distances = Distances::<VId, W>::new(stn.origin(), n); let d = &mut distances.dists; let mut updated = false; for _ in 0..n { updated = false; for (cid, c) in stn.constraints.iter().enumerate() { if c.active { let s: usize = c.c.x; let e: usize = c.c.y; let w = c.c.w; if d[e].forward > d[s].forward + w { d[e].forward = d[s].forward + w; d[e].forward_cause = Some(cid); updated = true; } if d[s].backward < d[e].backward - w { d[s].backward = d[e].backward - w; d[s].backward_cause = Some(cid); updated = true; } } } if !updated { // exit early if distances where not updated in this iteration break; } } if updated { // distances updated in the last iteration, look for negative cycle for (cid, c) in stn.constraints.iter().enumerate() { if c.active { let s: usize = c.c.x; let e: usize = c.c.y; let w = c.c.w; if d[e].forward > d[s].forward + w { // found negative cycle let mut cycle = vec![cid]; let mut current = s; loop { let next_constraint_id = d[current] .forward_cause .expect("No cause on member of cycle"); if cycle.contains(&next_constraint_id) { break; } let nc = &stn.constraints[next_constraint_id]; // println!("{:?} nc", nc); // println!("cur: {}, next_cid: {}, ({} <= {} +?)", current, next_constraint_id, nc.c.x, nc.c.y); if !nc.internal { cycle.push(next_constraint_id); } current = nc.c.x; } return Result::Err(cycle); } } } panic!("No cycle found ") } else { // finished in at most n iterations let mut domains = IdMap::new(); for (k, d) in distances.dists.into_iter().enumerate() { if let (_, Some(label)) = &stn.variables[k] { domains.insert( *label, Dom { min: -d.forward, max: -d.backward, }, ) } } Result::Ok(domains) } } #[cfg(test)] mod tests { use super::*; #[test] fn test1() { let mut stn: STN<usize, i32> = STN::new(); stn.add_node(1, 0, 10); stn.add_node(2, 0, 10); assert!(domains(&stn).is_ok()); stn.record_constraint(1, 2, -15, true); assert!(domains(&stn).is_err()); } }
//! Tests for `#[derive(ScalarValue)]` macro. use juniper::{DefaultScalarValue, ScalarValue}; use serde::{Deserialize, Serialize}; mod trivial { use super::*; #[derive(Clone, Debug, Deserialize, PartialEq, ScalarValue, Serialize)] #[serde(untagged)] pub enum CustomScalarValue { #[value(as_float, as_int)] Int(i32), #[value(as_float)] Float(f64), #[value(as_str, as_string, into_string)] String(String), #[value(as_bool)] Boolean(bool), } #[test] fn into_another() { assert!(CustomScalarValue::from(5) .into_another::<DefaultScalarValue>() .is_type::<i32>()); assert!(CustomScalarValue::from(0.5_f64) .into_another::<DefaultScalarValue>() .is_type::<f64>()); assert!(CustomScalarValue::from("str".to_owned()) .into_another::<DefaultScalarValue>() .is_type::<String>()); assert!(CustomScalarValue::from(true) .into_another::<DefaultScalarValue>() .is_type::<bool>()); } } mod named_fields { use super::*; #[derive(Clone, Debug, Deserialize, PartialEq, ScalarValue, Serialize)] #[serde(untagged)] pub enum CustomScalarValue { #[value(as_float, as_int)] Int { int: i32 }, #[value(as_float)] Float(f64), #[value(as_str, as_string, into_string)] String(String), #[value(as_bool)] Boolean { v: bool }, } #[test] fn into_another() { assert!(CustomScalarValue::from(5) .into_another::<DefaultScalarValue>() .is_type::<i32>()); assert!(CustomScalarValue::from(0.5_f64) .into_another::<DefaultScalarValue>() .is_type::<f64>()); assert!(CustomScalarValue::from("str".to_owned()) .into_another::<DefaultScalarValue>() .is_type::<String>()); assert!(CustomScalarValue::from(true) .into_another::<DefaultScalarValue>() .is_type::<bool>()); } } mod custom_fn { use super::*; #[derive(Clone, Debug, Deserialize, PartialEq, ScalarValue, Serialize)] #[serde(untagged)] pub enum CustomScalarValue { #[value(as_float, as_int)] Int(i32), #[value(as_float)] Float(f64), #[value( as_str, as_string = str::to_owned, into_string = std::convert::identity, )] String(String), #[value(as_bool)] Boolean(bool), } #[test] fn into_another() { assert!(CustomScalarValue::from(5) .into_another::<DefaultScalarValue>() .is_type::<i32>()); assert!(CustomScalarValue::from(0.5_f64) .into_another::<DefaultScalarValue>() .is_type::<f64>()); assert!(CustomScalarValue::from("str".to_owned()) .into_another::<DefaultScalarValue>() .is_type::<String>()); assert!(CustomScalarValue::from(true) .into_another::<DefaultScalarValue>() .is_type::<bool>()); } } mod allow_missing_attributes { use super::*; #[derive(Clone, Debug, Deserialize, PartialEq, ScalarValue, Serialize)] #[serde(untagged)] #[value(allow_missing_attributes)] pub enum CustomScalarValue { Int(i32), #[value(as_float)] Float(f64), #[value(as_str, as_string, into_string)] String(String), #[value(as_bool)] Boolean(bool), } #[test] fn into_another() { assert!(CustomScalarValue::Int(5).as_int().is_none()); assert!(CustomScalarValue::from(0.5_f64) .into_another::<DefaultScalarValue>() .is_type::<f64>()); assert!(CustomScalarValue::from("str".to_owned()) .into_another::<DefaultScalarValue>() .is_type::<String>()); assert!(CustomScalarValue::from(true) .into_another::<DefaultScalarValue>() .is_type::<bool>()); } }
use super::constants; use rlua::{Lua, Result, Table}; pub struct ClassProxyBuilder<'lua>(&'lua Lua, Table<'lua>); impl<'lua> ClassProxyBuilder<'lua> { pub fn create(lua: &'lua Lua, table: Table<'lua>) -> ClassProxyBuilder<'lua> { return ClassProxyBuilder(lua, table); } pub fn build(self, mt: Table) -> Result<Table<'lua>> { self.1.set(constants::metamethod::INDEX, mt)?; self.1 .set_metatable(Some(self.1.get::<_, Table>(constants::metamethod::INDEX)?)); let new = self.0 .create_function(|lua, (this, o): (Table, Option<Table>)| { let object = o.unwrap_or(lua.create_table()?); object.set_metatable(Some(this)); Ok(object) }) .unwrap(); self.1.set("new", new)?; return Ok(self.1); } } #[cfg(test)] mod tests { use super::*; use float_cmp::ApproxEq; use std::f32; #[test] fn test_constructor() { let lua = Lua::new(); create_vector_class(&lua); let result = lua.exec::<Table>( r#" local v = Vector:new() v.x = 1 v.y = 2 return v "#, None, ).unwrap(); assert_eq!(1, result.get::<_, i32>("x").unwrap()); assert_eq!(2, result.get::<_, i32>("y").unwrap()); } #[test] fn test_base_not_changed() { let lua = Lua::new(); create_vector_class(&lua); let result = lua.exec::<Table>( r#" local v = Vector:new() v.x = 1 v.y = 2 return Vector:new() "#, None, ).unwrap(); assert_eq!(0, result.get::<_, i32>("x").unwrap()); assert_eq!(0, result.get::<_, i32>("y").unwrap()); } #[test] fn test_method_call() { let lua = Lua::new(); create_vector_class(&lua); let result = lua.exec::<f32>( r#" local v = Vector:new() v.x = 1 v.y = 2 return v:magnitude() "#, None, ).unwrap(); let expected = (1.0f32 * 1.0f32 + 2.0f32 * 2.0f32).sqrt(); assert!(expected.approx_eq(&result, 2.0 * f32::EPSILON, 2)); } #[test] fn test_reload() { let lua = Lua::new(); let vector_class = create_vector_class(&lua); let mt = lua.exec::<Table>( r#" local mt = {x = 0, y = 0} function mt:magnitude() return math.sqrt(self.x * self.x + self.y * self.y) end function mt:some_function() return self.x + self.y; end return mt "#, None, ).unwrap(); // reload ClassProxyBuilder::create(&lua, vector_class) .build(mt) .unwrap(); let result = lua.exec::<i32>( r#" local v = Vector:new() v.x = 1 v.y = 2 return v:some_function() "#, None, ).unwrap(); assert_eq!(3, result); } #[test] fn test_reload_existing_instance() { let lua = Lua::new(); let vector_class = create_vector_class(&lua); lua.eval::<()>( r#" v = Vector:new() v.x = 1 v.y = 2 "#, None, ); let mt = lua.exec::<Table>( r#" local mt = {x = 0, y = 0} function mt:magnitude() return math.sqrt(self.x * self.x + self.y * self.y) end function mt:some_function() return self.x + self.y; end return mt "#, None, ).unwrap(); // reload ClassProxyBuilder::create(&lua, vector_class) .build(mt) .unwrap(); let result = lua.exec::<i32>( r#" return v:some_function() "#, None, ).unwrap(); assert_eq!(3, result); } fn create_vector_class<'lua>(lua: &'lua Lua) -> Table<'lua> { return create_class( &lua, "Vector", r#" local mt = {x = 0, y = 0} function mt:magnitude() return math.sqrt(self.x * self.x + self.y * self.y) end return mt "#, ); } fn create_class<'lua>(lua: &'lua Lua, name: &str, body: &str) -> Table<'lua> { let globals = lua.globals(); let mt = lua.exec::<Table>(body, None).unwrap(); let wrapper = lua.create_table().unwrap(); let class = ClassProxyBuilder::create(&lua, wrapper).build(mt).unwrap(); globals.set(name.to_owned(), class); return globals.get::<_, Table>(name.to_owned()).unwrap(); } }
//! # my-pretty-failure //! //! [![Build Status](https://travis-ci.org/AlbanMinassian/my-pretty-failure.svg?branch=master)](https://travis-ci.org/AlbanMinassian/my-pretty-failure) //! [![codecov](https://codecov.io/gh/AlbanMinassian/my-pretty-failure/branch/master/graph/badge.svg)](https://codecov.io/gh/AlbanMinassian/my-pretty-failure) //! [![License:MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) //! [![my-pretty-failure Latest Version](https://img.shields.io/crates/v/my-pretty-failure.svg)](https://crates.io/crates/my-pretty-failure) //! //! my-pretty-failure display [failure](https://github.com/rust-lang-nursery/failure) (and context) in an elegant way //! //! ## Example n°1 //! //! With defaut option //! ```rust //! #[macro_use] extern crate failure; //! extern crate my_pretty_failure; //! use my_pretty_failure::myprettyfailure; //! use failure::Fail; //! fn main() { //! let err3 = format_err!("string error message 1"); //! let err2 = err3.context(format_err!("string error message 2")); //! let err1 = err2.context(format_err!("string error message 1")); //! println!("{}", myprettyfailure(&err1)); //! } //! ``` //! console output //! ```console //! 🔥 error //! --------------------------------------------------------- //! a long err1 //! --------------------------------------------------------- //! ▶ caused by: a very long err2 //! ▶ caused by: an another deep err3 //! --------------------------------------------------------- //! ``` //! //! ## Example n°2 //! //! With your options //! ```rust,ignore //! #[macro_use] extern crate failure; use failure::Fail; //! extern crate my_pretty_failure; use my_pretty_failure::{myprettyfailure_option, MyPrettyFailurePrint}; //! extern crate yansi; // or ansi_term, colored, term_painter ... //! fn main() { //! let err3 = format_err!("string error message 1"); //! let err2 = err3.context(format_err!("string error message 2")); //! let err1 = err2.context(format_err!("string error message 1")); //! println!("{}", myprettyfailure_option(MyPrettyFailurePrint { //! head: format!("🌈 my pretty {} catch an {}", yansi::Paint::white("superApp").bold(), yansi::Paint::red("error").bold()), //! separator: "****************************************".to_string(), //! causedby: "context".to_string(), //! }, &err1)); //! } //! ``` //! console output //! ```console //! 🔔 my pretty app catch an error //! - - - - - - - - - - - - - - - - - - - //! a long err1 //! - - - - - - - - - - - - - - - - - - - //! ▶ context: a very long err2 //! ▶ context: an another deep err3 //! - - - - - - - - - - - - - - - - - - - //! ``` //! //! ## Links //! //! github: [https://github.com/AlbanMinassian/my-pretty-failure](https://github.com/AlbanMinassian/my-pretty-failure) extern crate failure; use failure::{Fail}; // ------------------------------------------------------------------- // struct // ------------------------------------------------------------------- #[derive(Debug, Clone)] pub struct MyPrettyFailurePrint { pub head: String, pub separator: String, pub causedby: String, } // ------------------------------------------------------------------- // print pretty failure message with your options // ------------------------------------------------------------------- /// display [failure](https://github.com/rust-lang-nursery/failure) (and context) with *your* options in an elegant way // ------------------------------------------------------------------- pub fn myprettyfailure_option(option: MyPrettyFailurePrint, fail: &Fail) -> String { let mut count_context = 0; let mut _indent = " ".to_string(); let mut message: String = option.head; message.push_str("\n"); message.push_str(&option.separator); message.push_str("\n"); message.push_str(&fail.to_string()); // message.push_str(format!("- {:?} - ", cause).as_str()); // <=== HOW DISPLAY string struct "Error<Xxxxx>" ? (is possible ?) // message.push_str(format!("- {:?} - ", cause).as_str()); // <=== HOW DISPLAY string enum "Error<Xxxxx>Kind" ? (is possible ?) message.push_str("\n"); message.push_str(&option.separator); for cause in fail.iter_causes() { message.push_str("\n"); message.push_str(&_indent); _indent.push_str(&" ".to_string()); message.push_str("▶ "); // message.push_str(format!("- {:?} - ", cause).as_str()); // <=== HOW DISPLAY string struct "Error<Xxxxx>" ? (if exist ?, is possible ?) // message.push_str(format!("- {:?} - ", cause).as_str()); // <=== HOW DISPLAY string enum "Error<Xxxxx>Kind" ? (if not exist ?, is possible ?) message.push_str(&option.causedby); message.push_str(": "); message.push_str(&cause.to_string()); count_context = count_context + 1; } if count_context != 0 { message.push_str("\n"); message.push_str(&option.separator); } message } // ------------------------------------------------------------------- // print pretty failure message with default options // ------------------------------------------------------------------- /// display [failure](https://github.com/rust-lang-nursery/failure) (and context) with *default* options in an elegant way // ------------------------------------------------------------------- pub fn myprettyfailure(fail: &Fail) -> String { myprettyfailure_option(MyPrettyFailurePrint { head: "🔥 error".to_string(), separator: "---------------------------------------------------------".to_string(), causedby: "caused by".to_string()}, fail) }
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 4usize], #[doc = "0x04 - peripheral mode configuration register"] pub pmcr: PMCR, #[doc = "0x08 - external interrupt configuration register 1"] pub exticr1: EXTICR1, #[doc = "0x0c - external interrupt configuration register 2"] pub exticr2: EXTICR2, #[doc = "0x10 - external interrupt configuration register 3"] pub exticr3: EXTICR3, #[doc = "0x14 - external interrupt configuration register 4"] pub exticr4: EXTICR4, _reserved5: [u8; 8usize], #[doc = "0x20 - compensation cell control/status register"] pub cccsr: CCCSR, #[doc = "0x24 - SYSCFG compensation cell value register"] pub ccvr: CCVR, #[doc = "0x28 - SYSCFG compensation cell code register"] pub cccr: CCCR, _reserved8: [u8; 236usize], #[doc = "0x118 - SYSCFG timer break lockup register"] pub syscfg_brk_lockupr: SYSCFG_BRK_LOCKUPR, } #[doc = "peripheral mode configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pmcr](pmcr) module"] pub type PMCR = crate::Reg<u32, _PMCR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _PMCR; #[doc = "`read()` method returns [pmcr::R](pmcr::R) reader structure"] impl crate::Readable for PMCR {} #[doc = "`write(|w| ..)` method takes [pmcr::W](pmcr::W) writer structure"] impl crate::Writable for PMCR {} #[doc = "peripheral mode configuration register"] pub mod pmcr; #[doc = "external interrupt configuration register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [exticr1](exticr1) module"] pub type EXTICR1 = crate::Reg<u32, _EXTICR1>; #[allow(missing_docs)] #[doc(hidden)] pub struct _EXTICR1; #[doc = "`read()` method returns [exticr1::R](exticr1::R) reader structure"] impl crate::Readable for EXTICR1 {} #[doc = "`write(|w| ..)` method takes [exticr1::W](exticr1::W) writer structure"] impl crate::Writable for EXTICR1 {} #[doc = "external interrupt configuration register 1"] pub mod exticr1; #[doc = "external interrupt configuration register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [exticr2](exticr2) module"] pub type EXTICR2 = crate::Reg<u32, _EXTICR2>; #[allow(missing_docs)] #[doc(hidden)] pub struct _EXTICR2; #[doc = "`read()` method returns [exticr2::R](exticr2::R) reader structure"] impl crate::Readable for EXTICR2 {} #[doc = "`write(|w| ..)` method takes [exticr2::W](exticr2::W) writer structure"] impl crate::Writable for EXTICR2 {} #[doc = "external interrupt configuration register 2"] pub mod exticr2; #[doc = "external interrupt configuration register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [exticr3](exticr3) module"] pub type EXTICR3 = crate::Reg<u32, _EXTICR3>; #[allow(missing_docs)] #[doc(hidden)] pub struct _EXTICR3; #[doc = "`read()` method returns [exticr3::R](exticr3::R) reader structure"] impl crate::Readable for EXTICR3 {} #[doc = "`write(|w| ..)` method takes [exticr3::W](exticr3::W) writer structure"] impl crate::Writable for EXTICR3 {} #[doc = "external interrupt configuration register 3"] pub mod exticr3; #[doc = "external interrupt configuration register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [exticr4](exticr4) module"] pub type EXTICR4 = crate::Reg<u32, _EXTICR4>; #[allow(missing_docs)] #[doc(hidden)] pub struct _EXTICR4; #[doc = "`read()` method returns [exticr4::R](exticr4::R) reader structure"] impl crate::Readable for EXTICR4 {} #[doc = "`write(|w| ..)` method takes [exticr4::W](exticr4::W) writer structure"] impl crate::Writable for EXTICR4 {} #[doc = "external interrupt configuration register 4"] pub mod exticr4; #[doc = "compensation cell control/status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cccsr](cccsr) module"] pub type CCCSR = crate::Reg<u32, _CCCSR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CCCSR; #[doc = "`read()` method returns [cccsr::R](cccsr::R) reader structure"] impl crate::Readable for CCCSR {} #[doc = "`write(|w| ..)` method takes [cccsr::W](cccsr::W) writer structure"] impl crate::Writable for CCCSR {} #[doc = "compensation cell control/status register"] pub mod cccsr; #[doc = "SYSCFG compensation cell value register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ccvr](ccvr) module"] pub type CCVR = crate::Reg<u32, _CCVR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CCVR; #[doc = "`read()` method returns [ccvr::R](ccvr::R) reader structure"] impl crate::Readable for CCVR {} #[doc = "SYSCFG compensation cell value register"] pub mod ccvr; #[doc = "SYSCFG compensation cell code register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cccr](cccr) module"] pub type CCCR = crate::Reg<u32, _CCCR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CCCR; #[doc = "`read()` method returns [cccr::R](cccr::R) reader structure"] impl crate::Readable for CCCR {} #[doc = "`write(|w| ..)` method takes [cccr::W](cccr::W) writer structure"] impl crate::Writable for CCCR {} #[doc = "SYSCFG compensation cell code register"] pub mod cccr; #[doc = "SYSCFG timer break lockup register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [syscfg_brk_lockupr](syscfg_brk_lockupr) module"] pub type SYSCFG_BRK_LOCKUPR = crate::Reg<u32, _SYSCFG_BRK_LOCKUPR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SYSCFG_BRK_LOCKUPR; #[doc = "`read()` method returns [syscfg_brk_lockupr::R](syscfg_brk_lockupr::R) reader structure"] impl crate::Readable for SYSCFG_BRK_LOCKUPR {} #[doc = "`write(|w| ..)` method takes [syscfg_brk_lockupr::W](syscfg_brk_lockupr::W) writer structure"] impl crate::Writable for SYSCFG_BRK_LOCKUPR {} #[doc = "SYSCFG timer break lockup register"] pub mod syscfg_brk_lockupr;
// Copyright 2022 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::iter::repeat; use std::iter::TrustedLen; use std::sync::atomic::Ordering; use common_catalog::table_context::TableContext; use common_exception::ErrorCode; use common_exception::Result; use common_expression::types::BooleanType; use common_expression::types::DataType; use common_expression::DataBlock; use common_expression::Evaluator; use common_functions::BUILTIN_FUNCTIONS; use common_hashtable::HashtableEntryRefLike; use common_hashtable::HashtableLike; use crate::pipelines::processors::transforms::hash_join::desc::JOIN_MAX_BLOCK_SIZE; use crate::pipelines::processors::transforms::hash_join::row::RowPtr; use crate::pipelines::processors::transforms::hash_join::ProbeState; use crate::pipelines::processors::JoinHashTable; impl JoinHashTable { pub(crate) fn probe_inner_join<'a, H: HashtableLike<Value = Vec<RowPtr>>, IT>( &self, hash_table: &H, probe_state: &mut ProbeState, keys_iter: IT, input: &DataBlock, ) -> Result<Vec<DataBlock>> where IT: Iterator<Item = &'a H::Key> + TrustedLen, H::Key: 'a, { let valids = &probe_state.valids; // The inner join will return multiple data blocks of similar size let mut probed_blocks = vec![]; let mut probe_indexes = Vec::with_capacity(JOIN_MAX_BLOCK_SIZE); let mut build_indexes = Vec::with_capacity(JOIN_MAX_BLOCK_SIZE); for (i, key) in keys_iter.enumerate() { // If the join is derived from correlated subquery, then null equality is safe. let probe_result_ptr = if self.hash_join_desc.from_correlated_subquery { hash_table.entry(key) } else { self.probe_key(hash_table, key, valids, i) }; if let Some(v) = probe_result_ptr { let probed_rows = v.get(); if probe_indexes.len() + probed_rows.len() < probe_indexes.capacity() { build_indexes.extend_from_slice(probed_rows); probe_indexes.extend(repeat(i as u32).take(probed_rows.len())); } else { let mut index = 0_usize; let mut remain = probed_rows.len(); while index < probed_rows.len() { if probe_indexes.len() + remain < probe_indexes.capacity() { build_indexes.extend_from_slice(&probed_rows[index..]); probe_indexes.extend(std::iter::repeat(i as u32).take(remain)); index += remain; } else { if self.interrupt.load(Ordering::Relaxed) { return Err(ErrorCode::AbortedQuery( "Aborted query, because the server is shutting down or the query was killed.", )); } let addition = probe_indexes.capacity() - probe_indexes.len(); let new_index = index + addition; build_indexes.extend_from_slice(&probed_rows[index..new_index]); probe_indexes.extend(repeat(i as u32).take(addition)); probed_blocks.push(self.merge_eq_block( &self.row_space.gather(&build_indexes)?, &DataBlock::take(input, &probe_indexes)?, )?); index = new_index; remain -= addition; build_indexes.clear(); probe_indexes.clear(); } } } } } probed_blocks.push(self.merge_eq_block( &self.row_space.gather(&build_indexes)?, &DataBlock::take(input, &probe_indexes)?, )?); match &self.hash_join_desc.other_predicate { None => Ok(probed_blocks), Some(other_predicate) => { assert_eq!(other_predicate.data_type(), &DataType::Boolean); let func_ctx = self.ctx.get_function_context()?; let mut filtered_blocks = Vec::with_capacity(probed_blocks.len()); for probed_block in probed_blocks { if self.interrupt.load(Ordering::Relaxed) { return Err(ErrorCode::AbortedQuery( "Aborted query, because the server is shutting down or the query was killed.", )); } let evaluator = Evaluator::new(&probed_block, func_ctx, &BUILTIN_FUNCTIONS); let predicate = evaluator .run(other_predicate)? .try_downcast::<BooleanType>() .unwrap(); let res = probed_block.filter_boolean_value(&predicate)?; if !res.is_empty() { filtered_blocks.push(res); } } Ok(filtered_blocks) } } } }
//! Field guards use crate::{Context, Result}; /// Field guard /// /// Guard is a pre-condition for a field that is resolved if `Ok(())` is /// returned, otherwise an error is returned. #[async_trait::async_trait] pub trait Guard { /// Check whether the guard will allow access to the field. async fn check(&self, ctx: &Context<'_>) -> Result<()>; } #[async_trait::async_trait] impl<T> Guard for T where T: Fn(&Context<'_>) -> Result<()> + Send + Sync + 'static, { async fn check(&self, ctx: &Context<'_>) -> Result<()> { self(ctx) } } /// An extension trait for `Guard`. pub trait GuardExt: Guard + Sized { /// Perform `and` operator on two rules fn and<R: Guard>(self, other: R) -> And<Self, R> { And(self, other) } /// Perform `or` operator on two rules fn or<R: Guard>(self, other: R) -> Or<Self, R> { Or(self, other) } } impl<T: Guard> GuardExt for T {} /// Guard for [`GuardExt::and`](trait.GuardExt.html#method.and). pub struct And<A: Guard, B: Guard>(A, B); #[async_trait::async_trait] impl<A: Guard + Send + Sync, B: Guard + Send + Sync> Guard for And<A, B> { async fn check(&self, ctx: &Context<'_>) -> Result<()> { self.0.check(ctx).await?; self.1.check(ctx).await } } /// Guard for [`GuardExt::or`](trait.GuardExt.html#method.or). pub struct Or<A: Guard, B: Guard>(A, B); #[async_trait::async_trait] impl<A: Guard + Send + Sync, B: Guard + Send + Sync> Guard for Or<A, B> { async fn check(&self, ctx: &Context<'_>) -> Result<()> { if self.0.check(ctx).await.is_ok() { return Ok(()); } self.1.check(ctx).await } }
//! # Documentation //! //! This module contains markdown conversions of the long-form PDF documentation //! available on <https://www.openexr.com>, giving tutorial- and white-paper- //! style articles on all aspects of the OpenEXR library. //! //! * [Reading and Writing Image Files](crate::doc::reading_and_writing_image_files) - A //! tutorial-style guide to the main image reading and writing interfaces. //! * [Technical Introduction](crate::doc::technical_introduction) - A technical overview of the //! OpenEXR format and its related concepts. //! * [Interpreting Deep Pixels](crate::doc::interpreting_deep_pixels) - An in-depth look at how //! deep pixels are stored and how to manipulate their samples. //! * [Multi-View OpenEXR](crate::doc::multi_view_open_exr) - Representation of multi-view images //! in OpenEXR files. //! #[cfg(feature = "long-form-docs")] use embed_doc_image::embed_doc_image; cfg_if::cfg_if! { if #[cfg(feature = "long-form-docs")] { #[doc = include_str!("reading_and_writing_image_files.md")] #[embed_doc_image("env_latlong", "src/doc/images/rawif_env_latlong.png")] #[embed_doc_image("env_cubemap", "src/doc/images/rawif_env_cubemap.png")] pub mod reading_and_writing_image_files {} #[doc = include_str!("technical_introduction.md")] #[embed_doc_image("ti_windows", "src/doc/images/ti_windows.png")] #[embed_doc_image("ti_windows2", "src/doc/images/ti_windows2.png")] #[embed_doc_image("ti_image3", "src/doc/images/ti_image3.png")] #[embed_doc_image("ti_image4", "src/doc/images/ti_image4.png")] pub mod technical_introduction {} pub mod open_exr_file_layout {} #[doc = include_str!("interpreting_deep_pixels.md")] #[embed_doc_image("point_sample", "src/doc/images/idi_point_sample.png")] #[embed_doc_image("volume_sample", "src/doc/images/idi_volume_sample.png")] #[embed_doc_image( "alpha_and_colour", "src/doc/images/idi_alpha_and_colour.png" )] #[embed_doc_image( "opaque_volume_samples", "src/doc/images/idi_opaque_volume_samples.png" )] #[embed_doc_image("tidy1a", "src/doc/images/idi_tidy1a.png")] #[embed_doc_image("tidy1b", "src/doc/images/idi_tidy1b.png")] #[embed_doc_image("tidy2a", "src/doc/images/idi_tidy2a.png")] #[embed_doc_image("tidy3", "src/doc/images/idi_tidy3.png")] #[embed_doc_image("whole_pixel", "src/doc/images/idi_whole_pixel.png")] pub mod interpreting_deep_pixels {} pub mod multi_view_open_exr; } }
use advent::helpers; use anyhow::{Context, Result}; use itertools::Itertools; fn parse_bus_id_and_minutes(s: &str) -> (u64, Vec<Option<u64>>) { let mut lines = s.trim().lines(); let target_timestamp = lines .next() .expect("No first line") .parse::<u64>() .expect("Invalid initial timestamp"); let ids = lines .next() .expect("No bus ids") .split(',') .map(|id| { if id == "x" { None } else { Some(id.parse::<u64>().expect("Invalid bus id")) } }) .collect_vec(); (target_timestamp, ids) } fn find_bus_id_and_minutes(s: &str) -> u64 { let (target_timestamp, bus_ids) = parse_bus_id_and_minutes(s); let bus_ids = bus_ids.into_iter().filter_map(|i| i).collect_vec(); let bus_period_ids_and_departure_times = bus_ids .iter() .map(|bus_id| { let (period_id, rem) = num_integer::div_rem(target_timestamp, *bus_id); let period_id = if rem > 0 { period_id + 1 } else { period_id }; let departure_time = period_id * bus_id; (*bus_id, period_id, departure_time) }) .collect_vec(); let (min_bus_id, _bus_period_id, departure_time) = bus_period_ids_and_departure_times .iter() .min_by(|x, y| x.2.cmp(&y.2)) .expect("No minimum bus id"); (departure_time - target_timestamp) * min_bus_id } fn find_earliest_magic_timestamp(s: &str, start_min_timestamp: u64) -> u64 { let (_, buses) = parse_bus_id_and_minutes(s); let buses = buses .into_iter() .enumerate() .filter_map(|(delta, maybe_id)| maybe_id.map(|frequency| (delta, frequency))) .collect_vec(); println!("buses {:?}", buses); let mut timestamp: u64 = start_min_timestamp; let mut repeating_bus_period_so_far = buses[0].1; for (t_delta, bus_frequency) in buses.iter().skip(1) { loop { let possible_bus_departure_ts = timestamp + *t_delta as u64; if possible_bus_departure_ts % bus_frequency == 0 { break; } timestamp += repeating_bus_period_so_far; } repeating_bus_period_so_far *= bus_frequency; } timestamp } fn solve_p1() -> Result<()> { let input = helpers::get_data_from_file_res("d13").context("Coudn't read file contents.")?; let result = find_bus_id_and_minutes(&input); println!( "The bus id multiplied by the number of minutes is: {}", result ); Ok(()) } fn solve_p2() -> Result<()> { let input = helpers::get_data_from_file_res("d13").context("Coudn't read file contents.")?; let result = find_earliest_magic_timestamp(&input, 100000000000000); println!( "The earliest timestamp with the magic property is: {}", result ); Ok(()) } fn main() -> Result<()> { solve_p1().ok(); solve_p2() } #[cfg(test)] mod tests { use super::*; #[test] fn test_p1() { let input = "939 7,13,x,x,59,x,31,19"; let result = find_bus_id_and_minutes(input); assert_eq!(result, 295); } #[test] fn test_p2() { let input = "939\n7,13,x,x,59,x,31,19"; let result = find_earliest_magic_timestamp(input, 0); assert_eq!(result, 1068781); let input = "939\n67,7,59,61"; let result = find_earliest_magic_timestamp(input, 0); assert_eq!(result, 754018); let input = "939\n67,x,7,59,61"; let result = find_earliest_magic_timestamp(input, 0); assert_eq!(result, 779210); let input = "939\n67,7,x,59,61"; let result = find_earliest_magic_timestamp(input, 0); assert_eq!(result, 1261476); let input = "939\n1789,37,47,1889"; let result = find_earliest_magic_timestamp(input, 0); assert_eq!(result, 1202161486); } }
#![warn( // Harden built-in lints missing_copy_implementations, missing_debug_implementations, // Harden clippy lints clippy::cargo_common_metadata, clippy::clone_on_ref_ptr, clippy::dbg_macro, clippy::decimal_literal_representation, clippy::float_cmp_const, clippy::get_unwrap, clippy::integer_division, )] use std::{fs, rc::Rc, time::Duration}; use log::{trace, warn}; use nix::sys::wait; use structopt::StructOpt; use tokio::{ signal::unix::{signal, SignalKind}, sync::mpsc, }; use xidlehook_core::{ modules::{StopAt, Xcb}, Module, Xidlehook, }; mod socket; mod timers; use self::timers::CmdTimer; struct Defer<F: FnMut()>(F); impl<F: FnMut()> Drop for Defer<F> { fn drop(&mut self) { (self.0)(); } } #[derive(StructOpt, Debug)] pub struct Opt { /// Print the idle time to standard output. This is similar to xprintidle. #[structopt(long)] pub print: bool, /// Exit after the whole chain of timer commands have been invoked /// once #[structopt(long, conflicts_with("print"))] pub once: bool, /// Don't invoke the timer when the current application is /// fullscreen. Useful for preventing a lockscreen when watching /// videos. #[structopt(long, conflicts_with("print"))] pub not_when_fullscreen: bool, /// Detect when the system wakes up from a suspend and reset the idle timer #[structopt(long, conflicts_with("print"))] pub detect_sleep: bool, /// The duration is the number of seconds of inactivity which /// should trigger this timer. /// /// The command is what is invoked when the idle duration is /// reached. It's passed through \"/bin/sh -c\". /// /// The canceller is what is invoked when the user becomes active /// after the timer has gone off, but before the next timer (if /// any). Pass an empty string to not have one. #[structopt(long, conflicts_with("print"), required_unless("print"), value_names = &["duration", "command", "canceller"])] pub timer: Vec<String>, /// Listen to a unix socket at this address for events. /// Each event is one line of JSON data. #[structopt(long, conflicts_with("print"))] pub socket: Option<String>, /// Don't invoke the timer when any audio is playing (PulseAudio specific) #[cfg(feature = "pulse")] #[structopt(long, conflicts_with("print"))] pub not_when_audio: bool, } #[tokio::main(flavor = "current_thread")] async fn main() -> xidlehook_core::Result<()> { env_logger::init(); let opt = Opt::from_args(); let xcb = Rc::new(Xcb::new()?); if opt.print { let idle = xcb.get_idle()?; println!("{}", idle.as_millis()); return Ok(()); } let mut timers = Vec::new(); let mut iter = opt.timer.iter().peekable(); while iter.peek().is_some() { // clap-rs will ensure there are always a multiple of 3 arguments let duration: u64 = match iter.next().unwrap().parse() { Ok(duration) => duration, Err(err) => { eprintln!("error: failed to parse duration as number: {}", err); return Ok(()); }, }; timers.push(CmdTimer::from_shell( Duration::from_secs(duration), iter.next().unwrap().into(), iter.next().unwrap().into(), String::new(), )); } let mut modules: Vec<Box<dyn Module>> = Vec::new(); if opt.once { modules.push(Box::new(StopAt::completion())); } if opt.not_when_fullscreen { modules.push(Box::new(Rc::clone(&xcb).not_when_fullscreen())); } #[cfg(feature = "pulse")] { if opt.not_when_audio { modules.push(Box::new(xidlehook_core::modules::NotWhenAudio::new()?)) } } let xidlehook = Xidlehook::new(timers) .register(modules) .with_detect_sleep(opt.detect_sleep); App { opt, xcb, xidlehook, } .main_loop() .await } struct App { opt: Opt, xcb: Rc<Xcb>, xidlehook: Xidlehook<CmdTimer, ((), Vec<Box<dyn Module>>)>, } impl App { async fn main_loop(&mut self) -> xidlehook_core::Result<()> { let (socket_tx, socket_rx) = mpsc::channel(4); let _scope = if let Some(address) = self.opt.socket.clone() { { let address = address.clone(); tokio::spawn(async move { if let Err(err) = socket::main_loop(&address, socket_tx).await { warn!("Socket handling errored: {}", err); } }); } Some(Defer(move || { trace!("Removing unix socket {}", address); let _ = fs::remove_file(&address); })) } else { None }; let mut socket_rx = Some(socket_rx); let mut sigint = signal(SignalKind::interrupt())?; let mut sigchld = signal(SignalKind::child())?; loop { let socket_msg = async { if let Some(ref mut rx) = socket_rx { rx.recv().await } else { std::future::pending::<()>().await; unreachable!(); } }; tokio::select! { data = socket_msg => { if let Some((msg, reply)) = data { trace!("Got command over socket: {:#?}", msg); let response = match self.handle_socket(msg)? { Some(response) => response, None => break, }; let _ = reply.send(response); } else { socket_rx = None; } }, res = self.xidlehook.main_async(&self.xcb) => { res?; break; }, _ = sigint.recv() => { trace!("SIGINT received"); break; }, _ = sigchld.recv() => { trace!("Waiting for child process"); let _ = wait::waitpid(None, Some(wait::WaitPidFlag::WNOHANG)); }, } } Ok(()) } }
#[doc = "Reader of register MACATSNR"] pub type R = crate::R<u32, super::MACATSNR>; #[doc = "Reader of field `AUXTSLO`"] pub type AUXTSLO_R = crate::R<u32, u32>; impl R { #[doc = "Bits 0:30 - Auxiliary Timestamp"] #[inline(always)] pub fn auxtslo(&self) -> AUXTSLO_R { AUXTSLO_R::new((self.bits & 0x7fff_ffff) as u32) } }
use std::collections::HashMap; use petgraph::Graph; use petgraph::graph::NodeIndex; use super::graph::{Node, Edge}; mod longest_path; pub trait RankingModule { fn call(&self, graph: &Graph<Node, Edge>) -> HashMap<NodeIndex, usize>; } pub struct LongetPathRanking {} impl LongetPathRanking { pub fn new() -> LongetPathRanking { LongetPathRanking {} } } impl RankingModule for LongetPathRanking { fn call(&self, graph: &Graph<Node, Edge>) -> HashMap<NodeIndex, usize> { longest_path::longest_path(&graph) } }
use crate::nibbles::Nibbles; use std::mem; #[derive(Debug, Clone, Eq, PartialEq)] pub enum Node { Empty, Leaf(LeafNode), Extension(ExtensionNode), Branch(BranchNode), Hash(HashNode), } impl Node { pub fn swap(&mut self, mut n: Node) -> Node { mem::swap(self, &mut n); n } pub fn take(&mut self) -> Node { self.swap(Node::Empty) } } #[test] fn test_swap() { let mut node = Node::Leaf(LeafNode::new( Nibbles::from_raw(b"123", true), b"123".to_vec(), )); let cp = node.clone(); assert_eq!(node.take(), cp); assert_eq!(node, Node::Empty); } #[derive(Debug, Clone, Eq, PartialEq, Default)] pub struct LeafNode { pub(crate) key: Nibbles, pub(crate) value: Vec<u8>, } impl LeafNode { pub fn new(key: Nibbles, value: Vec<u8>) -> Self { LeafNode { key, value } } pub fn get_value(&self) -> &[u8] { &self.value } pub fn get_key(&self) -> &Nibbles { &self.key } pub fn into_node(self) -> Node { Node::Leaf(self) } } #[derive(Debug, Clone, Eq, PartialEq)] pub struct BranchNode { children: Box<[Node; 16]>, value: Option<Vec<u8>>, } impl BranchNode { pub fn new() -> Self { BranchNode { children: Box::new([ Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, Node::Empty, ]), value: None, } } pub fn at_children(&self, i: usize) -> &Node { &self.children[i] } pub fn child_mut(&mut self, i: usize) -> &mut Node { &mut self.children[i] } pub fn insert(&mut self, i: usize, n: Node) { if i == 16 { match n { Node::Leaf(leaf) => { self.value = Some(leaf.value); } _ => panic!("The n must be leaf node"), } } else { self.children[i] = n } } pub fn get_value(&self) -> Option<&[u8]> { match &self.value { Some(v) => Some(v), None => None, } } pub fn set_value(&mut self, value: Option<Vec<u8>>) { self.value = value } pub fn into_node(self) -> Node { Node::Branch(self) } } #[derive(Debug, Clone, Eq, PartialEq)] pub struct ExtensionNode { pub(crate) prefix: Nibbles, pub(crate) node: Box<Node>, } impl ExtensionNode { pub fn new(prefix: Nibbles, node: Node) -> Self { ExtensionNode { prefix, node: Box::new(node), } } pub fn get_prefix(&self) -> &Nibbles { &self.prefix } pub fn get_node(&self) -> &Node { &self.node } pub fn set_node(&mut self, n: Node) { self.node = Box::new(n) } pub fn into_node(self) -> Node { Node::Extension(self) } } #[derive(Debug, Clone, Eq, PartialEq, Default)] pub struct HashNode { hash: Vec<u8>, } impl HashNode { pub fn new(hash: &[u8]) -> Self { HashNode { hash: hash.to_vec(), } } pub fn get_hash(&self) -> &[u8] { &self.hash } pub fn into_node(self) -> Node { Node::Hash(self) } }
use material; use ray::Ray; use vec3::Vec3; //#[derive(Copy,Clone)] pub struct HitRecord { pub t: f32, pub p: Vec3, pub normal: Vec3, pub material: Box<dyn material::Material>, } impl HitRecord { pub fn new() -> HitRecord { HitRecord { t: 0.0, p: Vec3::new(), normal: Vec3::new(), material: material::Lambertian::new(0.0, 0.0, 0.0), } } } impl Default for HitRecord { fn default() -> Self { Self::new() } } pub trait Hitable { fn hit(&self, r: &Ray, t_min: f32, t_max: f32, rec: &mut HitRecord) -> bool; }
#[doc = r"Value read from the register"] pub struct R { bits: u32, } impl super::_3_FLTSTAT1 { #[doc = r"Reads the contents of the register"] #[inline(always)] pub fn read(&self) -> R { R { bits: self.register.get(), } } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP0R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP0R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP1R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP1R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP2R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP2R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP3R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP3R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP4R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP4R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP5R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP5R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP6R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP6R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Value of the field"] pub struct PWM_3_FLTSTAT1_DCMP7R { bits: bool, } impl PWM_3_FLTSTAT1_DCMP7R { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } impl R { #[doc = r"Value of the register as raw bits"] #[inline(always)] pub fn bits(&self) -> u32 { self.bits } #[doc = "Bit 0 - Digital Comparator 0 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp0(&self) -> PWM_3_FLTSTAT1_DCMP0R { let bits = ((self.bits >> 0) & 1) != 0; PWM_3_FLTSTAT1_DCMP0R { bits } } #[doc = "Bit 1 - Digital Comparator 1 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp1(&self) -> PWM_3_FLTSTAT1_DCMP1R { let bits = ((self.bits >> 1) & 1) != 0; PWM_3_FLTSTAT1_DCMP1R { bits } } #[doc = "Bit 2 - Digital Comparator 2 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp2(&self) -> PWM_3_FLTSTAT1_DCMP2R { let bits = ((self.bits >> 2) & 1) != 0; PWM_3_FLTSTAT1_DCMP2R { bits } } #[doc = "Bit 3 - Digital Comparator 3 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp3(&self) -> PWM_3_FLTSTAT1_DCMP3R { let bits = ((self.bits >> 3) & 1) != 0; PWM_3_FLTSTAT1_DCMP3R { bits } } #[doc = "Bit 4 - Digital Comparator 4 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp4(&self) -> PWM_3_FLTSTAT1_DCMP4R { let bits = ((self.bits >> 4) & 1) != 0; PWM_3_FLTSTAT1_DCMP4R { bits } } #[doc = "Bit 5 - Digital Comparator 5 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp5(&self) -> PWM_3_FLTSTAT1_DCMP5R { let bits = ((self.bits >> 5) & 1) != 0; PWM_3_FLTSTAT1_DCMP5R { bits } } #[doc = "Bit 6 - Digital Comparator 6 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp6(&self) -> PWM_3_FLTSTAT1_DCMP6R { let bits = ((self.bits >> 6) & 1) != 0; PWM_3_FLTSTAT1_DCMP6R { bits } } #[doc = "Bit 7 - Digital Comparator 7 Trigger"] #[inline(always)] pub fn pwm_3_fltstat1_dcmp7(&self) -> PWM_3_FLTSTAT1_DCMP7R { let bits = ((self.bits >> 7) & 1) != 0; PWM_3_FLTSTAT1_DCMP7R { bits } } }
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::account::{Account, AccountContext}; use crate::common::AccountLifetime; use crate::inspect; use account_common::{AccountManagerError, LocalAccountId, ResultExt}; use failure::{format_err, ResultExt as _}; use fidl::endpoints::{ClientEnd, ServerEnd}; use fidl_fuchsia_auth::{AuthState, AuthStateSummary, AuthenticationContextProviderMarker}; use fidl_fuchsia_identity_account::{AccountMarker, Error as ApiError}; use fidl_fuchsia_identity_internal::{ AccountHandlerContextMarker, AccountHandlerContextProxy, AccountHandlerControlRequest, AccountHandlerControlRequestStream, }; use fuchsia_inspect::{Inspector, Node, Property}; use futures::prelude::*; use identity_common::TaskGroupError; use log::{error, info, warn}; use parking_lot::RwLock; use std::sync::Arc; /// The states of an AccountHandler. enum Lifecycle { /// An account has not yet been created or loaded. Uninitialized, /// An account is currently loaded and is available. Initialized { account: Arc<Account> }, /// There is no account present, and initialization is not possible. Finished, } /// The core state of the AccountHandler, i.e. the Account (once it is known) and references to /// the execution context and a TokenManager. pub struct AccountHandler { // An optional `Account` that we are handling. // // This will be Uninitialized until a particular Account is established over the control // channel. Then it will be initialized. When the AccountHandler is terminated, or its Account // is removed, it reaches its final state, Finished. account: RwLock<Lifecycle>, /// Lifetime for this account (ephemeral or persistent with a path). lifetime: AccountLifetime, /// Helper for outputting account handler information via fuchsia_inspect. inspect: inspect::AccountHandler, // TODO(jsankey): Add TokenManager and AccountHandlerContext. } impl AccountHandler { /// (Temporary) A fixed AuthState that is used for all accounts until authenticators are /// available. pub const DEFAULT_AUTH_STATE: AuthState = AuthState { summary: AuthStateSummary::Unknown }; /// Constructs a new AccountHandler. pub fn new(lifetime: AccountLifetime, inspector: &Inspector) -> AccountHandler { let inspect = inspect::AccountHandler::new(inspector.root(), "uninitialized"); Self { account: RwLock::new(Lifecycle::Uninitialized), lifetime, inspect } } /// Asynchronously handles the supplied stream of `AccountHandlerControlRequest` messages. pub async fn handle_requests_from_stream( &self, mut stream: AccountHandlerControlRequestStream, ) -> Result<(), failure::Error> { while let Some(req) = stream.try_next().await? { self.handle_request(req).await?; } Ok(()) } /// Dispatches an `AccountHandlerControlRequest` message to the appropriate handler method /// based on its type. pub async fn handle_request( &self, req: AccountHandlerControlRequest, ) -> Result<(), fidl::Error> { match req { AccountHandlerControlRequest::CreateAccount { context, id, responder } => { let mut response = self.create_account(id.into(), context).await; responder.send(&mut response)?; } AccountHandlerControlRequest::LoadAccount { context, id, responder } => { let mut response = self.load_account(id.into(), context).await; responder.send(&mut response)?; } AccountHandlerControlRequest::PrepareForAccountTransfer { responder } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::PerformAccountTransfer { responder, .. } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::FinalizeAccountTransfer { responder } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::EncryptAccountData { responder, .. } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::RemoveAccount { force, responder } => { let mut response = self.remove_account(force).await; responder.send(&mut response)?; } AccountHandlerControlRequest::GetAccount { auth_context_provider, account, responder, } => { let mut response = self.get_account(auth_context_provider, account).await; responder.send(&mut response)?; } AccountHandlerControlRequest::GetPublicKey { responder } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::GetGlobalIdHash { responder, .. } => { responder.send(&mut Err(ApiError::UnsupportedOperation))?; } AccountHandlerControlRequest::Terminate { control_handle } => { self.terminate().await; control_handle.shutdown(); } } Ok(()) } /// Helper method which constructs a new account using the supplied function and stores it in /// self.account. async fn init_account<'a, F, Fut>( &'a self, construct_account_fn: F, id: LocalAccountId, context: ClientEnd<AccountHandlerContextMarker>, ) -> Result<(), AccountManagerError> where F: FnOnce(LocalAccountId, AccountLifetime, AccountHandlerContextProxy, &'a Node) -> Fut, Fut: Future<Output = Result<Account, AccountManagerError>>, { let context_proxy = context .into_proxy() .context("Invalid AccountHandlerContext given") .account_manager_error(ApiError::InvalidRequest)?; // The function evaluation is front loaded because await is not allowed while holding the // lock. let account_result = construct_account_fn(id, self.lifetime.clone(), context_proxy, self.inspect.get_node()) .await; let mut account_lock = self.account.write(); match *account_lock { Lifecycle::Uninitialized => { *account_lock = Lifecycle::Initialized { account: Arc::new(account_result?) }; self.inspect.lifecycle.set("initialized"); Ok(()) } _ => Err(AccountManagerError::new(ApiError::Internal) .with_cause(format_err!("AccountHandler is already initialized"))), } } /// Creates a new Fuchsia account and attaches it to this handler. async fn create_account( &self, id: LocalAccountId, context: ClientEnd<AccountHandlerContextMarker>, ) -> Result<(), ApiError> { self.init_account(Account::create, id, context).await.map_err(|err| { warn!("Failed creating Fuchsia account: {:?}", err); err.into() }) } /// Loads an existing Fuchsia account and attaches it to this handler. async fn load_account( &self, id: LocalAccountId, context: ClientEnd<AccountHandlerContextMarker>, ) -> Result<(), ApiError> { self.init_account(Account::load, id, context).await.map_err(|err| { warn!("Failed loading Fuchsia account: {:?}", err); err.into() }) } /// Remove the active account. This method should not be retried on failure. // TODO(AUTH-212): Implement graceful account removal. async fn remove_account(&self, force: bool) -> Result<(), ApiError> { if force == false { warn!("Graceful (non-force) account removal not yet implemented."); return Err(ApiError::Internal); } let old_lifecycle = { let mut account_lock = self.account.write(); std::mem::replace(&mut *account_lock, Lifecycle::Finished) }; self.inspect.lifecycle.set("finished"); let account_arc = match old_lifecycle { Lifecycle::Initialized { account } => account, _ => { warn!("No account is initialized"); return Err(ApiError::InvalidRequest); } }; // TODO(AUTH-212): After this point, error recovery might include putting the account back // in the lock. if let Err(TaskGroupError::AlreadyCancelled) = account_arc.task_group().cancel().await { warn!("Task group was already cancelled prior to account removal."); } // At this point we have exclusive access to the account, so we move it out of the Arc to // destroy it. let account = Arc::try_unwrap(account_arc).map_err(|_| { warn!("Could not acquire exclusive access to account"); ApiError::Internal })?; let account_id = account.id().clone(); match account.remove() { Ok(()) => { info!("Deleted Fuchsia account {:?}", account_id); Ok(()) } Err((_account, err)) => { warn!("Could not remove account {:?}: {:?}", account_id, err); Err(err.into()) } } } async fn get_account( &self, auth_context_provider_client_end: ClientEnd<AuthenticationContextProviderMarker>, account_server_end: ServerEnd<AccountMarker>, ) -> Result<(), ApiError> { let account_arc = match &*self.account.read() { Lifecycle::Initialized { account } => Arc::clone(account), _ => { warn!("AccountHandler is not initialized"); return Err(ApiError::NotFound); } }; let acp = auth_context_provider_client_end.into_proxy().map_err(|err| { warn!("Error using AuthenticationContextProvider {:?}", err); ApiError::InvalidRequest })?; let context = AccountContext { auth_ui_context_provider: acp }; let stream = account_server_end.into_stream().map_err(|err| { warn!("Error opening Account channel {:?}", err); ApiError::Resource })?; let account_arc_clone = Arc::clone(&account_arc); account_arc .task_group() .spawn(|cancel| { async move { account_arc_clone .handle_requests_from_stream(&context, stream, cancel) .await .unwrap_or_else(|e| error!("Error handling Account channel {:?}", e)); } }) .await .map_err(|_| { // Since AccountHandler serves only one channel of requests in serial, this is an // inconsistent state rather than a conflict ApiError::Internal }) } async fn terminate(&self) { info!("Gracefully shutting down AccountHandler"); let old_lifecycle = { let mut account_lock = self.account.write(); std::mem::replace(&mut *account_lock, Lifecycle::Finished) }; if let Lifecycle::Initialized { account } = old_lifecycle { if account.task_group().cancel().await.is_err() { warn!("Task group cancelled but account is still initialized"); } } } } #[cfg(test)] mod tests { use super::*; use crate::test_util::*; use fidl::endpoints::create_endpoints; use fidl_fuchsia_identity_internal::{AccountHandlerControlMarker, AccountHandlerControlProxy}; use fuchsia_async as fasync; use fuchsia_inspect::testing::AnyProperty; use fuchsia_inspect::{assert_inspect_tree, Inspector}; use std::sync::Arc; const FORCE_REMOVE_ON: bool = true; const FORCE_REMOVE_OFF: bool = false; // Will not match a randomly generated account id with high probability. const WRONG_ACCOUNT_ID: u64 = 111111; /// An enum expressing unexpected errors that may occur during a test. #[derive(Debug)] enum AccountHandlerTestError { FidlError(fidl::Error), AccountError(ApiError), } impl From<fidl::Error> for AccountHandlerTestError { fn from(fidl_error: fidl::Error) -> Self { AccountHandlerTestError::FidlError(fidl_error) } } impl From<ApiError> for AccountHandlerTestError { fn from(err: ApiError) -> Self { AccountHandlerTestError::AccountError(err) } } fn request_stream_test<TestFn, Fut>( lifetime: AccountLifetime, inspector: Arc<Inspector>, test_fn: TestFn, ) where TestFn: FnOnce(AccountHandlerControlProxy, ClientEnd<AccountHandlerContextMarker>) -> Fut, Fut: Future<Output = Result<(), AccountHandlerTestError>>, { let mut executor = fasync::Executor::new().expect("Failed to create executor"); let test_object = AccountHandler::new(lifetime, &inspector); let fake_context = Arc::new(FakeAccountHandlerContext::new()); let ahc_client_end = spawn_context_channel(fake_context.clone()); let (client_end, server_end) = create_endpoints::<AccountHandlerControlMarker>().unwrap(); let proxy = client_end.into_proxy().unwrap(); let request_stream = server_end.into_stream().unwrap(); fasync::spawn(async move { test_object .handle_requests_from_stream(request_stream) .await .unwrap_or_else(|err| panic!("Fatal error handling test request: {:?}", err)); // Check that no more objects are lurking in inspect std::mem::drop(test_object); assert_inspect_tree!(inspector, root: {}); }); executor.run_singlethreaded(test_fn(proxy, ahc_client_end)).expect("Executor run failed.") } #[test] fn test_get_account_before_initialization() { let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, _| { async move { let (_, account_server_end) = create_endpoints().unwrap(); let (acp_client_end, _) = create_endpoints().unwrap(); assert_eq!( proxy.get_account(acp_client_end, account_server_end).await?, Err(ApiError::NotFound) ); Ok(()) } }, ); } #[test] fn test_double_initialize() { let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { proxy.create_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()).await??; let fake_context_2 = Arc::new(FakeAccountHandlerContext::new()); let ahc_client_end_2 = spawn_context_channel(fake_context_2.clone()); assert_eq!( proxy .create_account(ahc_client_end_2, TEST_ACCOUNT_ID.clone().into()) .await?, Err(ApiError::Internal) ); Ok(()) } }, ); } #[test] fn test_create_and_get_account() { let location = TempLocation::new(); let inspector = Arc::new(Inspector::new()); request_stream_test( location.to_persistent_lifetime(), Arc::clone(&inspector), |account_handler_proxy, ahc_client_end| { async move { account_handler_proxy .create_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()) .await??; assert_inspect_tree!(inspector, root: { account_handler: contains { account: contains { open_client_channels: 0u64, }, } }); let (account_client_end, account_server_end) = create_endpoints().unwrap(); let (acp_client_end, _) = create_endpoints().unwrap(); account_handler_proxy.get_account(acp_client_end, account_server_end).await??; assert_inspect_tree!(inspector, root: { account_handler: contains { account: contains { open_client_channels: 1u64, }, } }); // The account channel should now be usable. let account_proxy = account_client_end.into_proxy().unwrap(); assert_eq!( account_proxy.get_auth_state().await?, Ok(AccountHandler::DEFAULT_AUTH_STATE) ); Ok(()) } }, ); } #[test] fn test_create_and_load_account() { // Check that an account is persisted when account handlers are restarted let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { proxy.create_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()).await??; Ok(()) } }, ); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { proxy.load_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()).await??; Ok(()) } }, ); } #[test] fn test_load_ephemeral_account_fails() { request_stream_test( AccountLifetime::Ephemeral, Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { let expected_id = TEST_ACCOUNT_ID.clone(); assert_eq!( proxy.load_account(ahc_client_end, expected_id.into()).await?, Err(ApiError::Internal) ); Ok(()) } }, ); } #[test] fn test_remove_account() { let location = TempLocation::new(); let inspector = Arc::new(Inspector::new()); request_stream_test( location.to_persistent_lifetime(), Arc::clone(&inspector), |proxy, ahc_client_end| { async move { assert_inspect_tree!(inspector, root: { account_handler: { lifecycle: "uninitialized", } }); proxy.create_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()).await??; assert_inspect_tree!(inspector, root: { account_handler: { lifecycle: "initialized", account: { local_account_id: TEST_ACCOUNT_ID_UINT, open_client_channels: 0u64, }, default_persona: { local_persona_id: AnyProperty, open_client_channels: 0u64, }, } }); // Keep an open channel to an account. let (account_client_end, account_server_end) = create_endpoints().unwrap(); let (acp_client_end, _) = create_endpoints().unwrap(); proxy.get_account(acp_client_end, account_server_end).await??; let account_proxy = account_client_end.into_proxy().unwrap(); // Simple check that non-force account removal returns error due to not implemented. assert_eq!( proxy.remove_account(FORCE_REMOVE_OFF).await?, Err(ApiError::Internal) ); // Make sure remove_account() can make progress with an open channel. proxy.remove_account(FORCE_REMOVE_ON).await??; assert_inspect_tree!(inspector, root: { account_handler: { lifecycle: "finished", } }); // Make sure that the channel is in fact closed. assert!(account_proxy.get_auth_state().await.is_err()); // We cannot remove twice. assert_eq!( proxy.remove_account(FORCE_REMOVE_ON).await?, Err(ApiError::InvalidRequest) ); Ok(()) } }, ); } #[test] fn test_remove_account_before_initialization() { let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, _| { async move { assert_eq!( proxy.remove_account(FORCE_REMOVE_ON).await?, Err(ApiError::InvalidRequest) ); Ok(()) } }, ); } #[test] fn test_terminate() { let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { proxy.create_account(ahc_client_end, TEST_ACCOUNT_ID.clone().into()).await??; // Keep an open channel to an account. let (account_client_end, account_server_end) = create_endpoints().unwrap(); let (acp_client_end, _) = create_endpoints().unwrap(); proxy.get_account(acp_client_end, account_server_end).await??; let account_proxy = account_client_end.into_proxy().unwrap(); // Terminate the handler proxy.terminate()?; // Check that further operations fail assert!(proxy.remove_account(FORCE_REMOVE_ON).await.is_err()); assert!(proxy.terminate().is_err()); // Make sure that the channel closed too. assert!(account_proxy.get_auth_state().await.is_err()); Ok(()) } }, ); } #[test] fn test_load_account_not_found() { let location = TempLocation::new(); request_stream_test( location.to_persistent_lifetime(), Arc::new(Inspector::new()), |proxy, ahc_client_end| { async move { assert_eq!( proxy.load_account(ahc_client_end, WRONG_ACCOUNT_ID).await?, Err(ApiError::NotFound) ); Ok(()) } }, ); } }
use maat_graphics::math; use crate::{GenericObject, CollisionInfo}; pub fn collide_dynamic_with_dynamic(dyn_objects_a: &mut Vec<Box<dyn GenericObject>>, dyn_objects_b: &mut Vec<Box<dyn GenericObject>>) { for i in 0..dyn_objects_a.len() { for j in 0..dyn_objects_b.len() { let player_collision_data = dyn_objects_a[i].collision_data(); let static_collision_data = dyn_objects_b[j].collision_data(); let did_collide; match player_collision_data { CollisionInfo::AABB(box_a_location, box_a_size, _box_a_rotation) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::intersect_AABB(box_a_location.to_cgmath(), box_a_size.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::sphere_intersect_AABB(sphere_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_AABB(point_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, } }, CollisionInfo::Sphere(sphere_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::sphere_intersect_AABB(sphere_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::intersect_sphere(sphere_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_sphere(point_b.to_cgmath(), sphere_a.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, } }, CollisionInfo::Point(point_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::is_point_inside_AABB(point_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::is_point_inside_sphere(point_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, CollisionInfo::Point(point_b) => { did_collide = point_a == point_b; if did_collide { dyn_objects_b[j].collided_with_dynamic_object(&mut dyn_objects_a[i]); } }, } }, } } } } pub fn collide_static_with_dynamic(static_objects: &mut Vec<Box<dyn GenericObject>>, dyn_objects: &mut Vec<Box<dyn GenericObject>>) { for i in 0..dyn_objects.len() { for j in 0..static_objects.len() { let player_collision_data = dyn_objects[i].collision_data(); let static_collision_data = static_objects[j].collision_data(); let did_collide; match player_collision_data { CollisionInfo::AABB(box_a_location, box_a_size, _box_a_rotation) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::intersect_AABB(box_a_location.to_cgmath(), box_a_size.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::sphere_intersect_AABB(sphere_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_AABB(point_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, } }, CollisionInfo::Sphere(sphere_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::sphere_intersect_AABB(sphere_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::intersect_sphere(sphere_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_sphere(point_b.to_cgmath(), sphere_a.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, } }, CollisionInfo::Point(point_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::is_point_inside_AABB(point_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::is_point_inside_sphere(point_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, CollisionInfo::Point(point_b) => { did_collide = point_a == point_b; if did_collide { static_objects[j].collided_with_dynamic_object(&mut dyn_objects[i]); } }, } }, } } } } pub fn collide_dynamic_with_static(dyn_objects: &mut Vec<Box<dyn GenericObject>>, static_objects: &mut Vec<Box<dyn GenericObject>>) { for i in 0..dyn_objects.len() { for j in 0..static_objects.len() { let dyn_collision_data = dyn_objects[i].collision_data(); let static_collision_data = static_objects[j].collision_data(); let did_collide; match dyn_collision_data { CollisionInfo::AABB(box_a_location, box_a_size, _box_a_rotation) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::intersect_AABB(box_a_location.to_cgmath(), box_a_size.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::sphere_intersect_AABB(sphere_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_AABB(point_b.to_cgmath(), box_a_location.to_cgmath(), box_a_size.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, } }, CollisionInfo::Sphere(sphere_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::sphere_intersect_AABB(sphere_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::intersect_sphere(sphere_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Point(point_b) => { did_collide = math::is_point_inside_sphere(point_b.to_cgmath(), sphere_a.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, } }, CollisionInfo::Point(point_a) => { match static_collision_data { CollisionInfo::AABB(box_b_location, box_b_size, _box_b_rotation) => { did_collide = math::is_point_inside_AABB(point_a.to_cgmath(), box_b_location.to_cgmath(), box_b_size.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Sphere(sphere_b) => { did_collide = math::is_point_inside_sphere(point_a.to_cgmath(), sphere_b.to_cgmath()); if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, CollisionInfo::Point(point_b) => { did_collide = point_a == point_b; if did_collide { dyn_objects[i].collided_with_static_object(&mut static_objects[j]); } }, } }, } } } } pub fn calculate_collisions(player_objects: &mut Vec<Box<dyn GenericObject>>,//dynamic_objects: &mut Vec<Box<dyn GenericObject>>, static_objects: &mut Vec<Box<dyn GenericObject>>, enemy_objects: &mut Vec<Box<dyn GenericObject>>, player_bullets: &mut Vec<Box<dyn GenericObject>>, enemy_bullets: &mut Vec<Box<dyn GenericObject>>) {//static_objects: &mut Vec<Box<dyn GenericObject>>) { // Dynamic vs Dynamic // bullet vs Static collide_dynamic_with_static(player_bullets, static_objects); collide_dynamic_with_static(enemy_bullets, static_objects); // Static vs Player collide_static_with_dynamic(static_objects, player_objects); collide_static_with_dynamic(static_objects, enemy_objects); collide_dynamic_with_dynamic(enemy_objects, player_bullets); collide_dynamic_with_dynamic(player_objects, enemy_bullets); }
#![cfg(test)] /// Constructs an [crate::expression::arithmetic::Expr::VarRef] expression. #[macro_export] macro_rules! var_ref { ($NAME: literal) => { $crate::expression::Expr::VarRef($crate::expression::VarRef { name: $NAME.into(), data_type: None, }) }; ($NAME: literal, $TYPE: ident) => { $crate::expression::Expr::VarRef($crate::expression::VarRef { name: $NAME.into(), data_type: Some($crate::expression::arithmetic::VarRefDataType::$TYPE), }) }; } /// Constructs a regular expression [crate::expression::arithmetic::Expr::Literal]. #[macro_export] macro_rules! regex { ($EXPR: expr) => { $crate::expression::arithmetic::Expr::Literal( $crate::literal::Literal::Regex($EXPR.into()).into(), ) }; } /// Constructs a [crate::expression::arithmetic::Expr::BindParameter] expression. #[macro_export] macro_rules! param { ($EXPR: expr) => { $crate::expression::arithmetic::Expr::BindParameter( $crate::parameter::BindParameter::new($EXPR.into()).into(), ) }; } /// Constructs a [crate::expression::conditional::ConditionalExpression::Grouped] expression. #[macro_export] macro_rules! grouped { ($EXPR: expr) => { <$crate::expression::conditional::ConditionalExpression as std::convert::Into< Box<$crate::expression::conditional::ConditionalExpression>, >>::into($crate::expression::conditional::ConditionalExpression::Grouped($EXPR.into())) }; } /// Constructs a [crate::expression::arithmetic::Expr::Nested] expression. #[macro_export] macro_rules! nested { ($EXPR: expr) => { <$crate::expression::arithmetic::Expr as std::convert::Into< Box<$crate::expression::arithmetic::Expr>, >>::into($crate::expression::arithmetic::Expr::Nested($EXPR.into())) }; } /// Constructs a [crate::expression::arithmetic::Expr::Call] expression. #[macro_export] macro_rules! call { ($NAME:literal) => { $crate::expression::Expr::Call($crate::expression::Call { name: $NAME.into(), args: vec![], }) }; ($NAME:literal, $( $ARG:expr ),+) => { $crate::expression::Expr::Call($crate::expression::Call { name: $NAME.into(), args: vec![$( $ARG ),+], }) }; } /// Constructs a [crate::expression::arithmetic::Expr::Distinct] expression. #[macro_export] macro_rules! distinct { ($IDENT:literal) => { $crate::expression::arithmetic::Expr::Distinct($IDENT.into()) }; } /// Constructs a [crate::expression::arithmetic::Expr::Wildcard] expression. #[macro_export] macro_rules! wildcard { () => { $crate::expression::arithmetic::Expr::Wildcard(None) }; (tag) => { $crate::expression::arithmetic::Expr::Wildcard(Some( $crate::expression::arithmetic::WildcardType::Tag, )) }; (field) => { $crate::expression::arithmetic::Expr::Wildcard(Some( $crate::expression::arithmetic::WildcardType::Field, )) }; } /// Constructs a [crate::expression::arithmetic::Expr::Binary] expression. #[macro_export] macro_rules! binary_op { ($LHS: expr, $OP: ident, $RHS: expr) => { $crate::expression::Expr::Binary($crate::expression::Binary { lhs: $LHS.into(), op: $crate::expression::BinaryOperator::$OP, rhs: $RHS.into(), }) }; } /// Constructs a [crate::expression::conditional::ConditionalExpression::Binary] expression. #[macro_export] macro_rules! cond_op { ($LHS: expr, $OP: ident, $RHS: expr) => { <$crate::expression::ConditionalExpression as std::convert::Into< Box<$crate::expression::ConditionalExpression>, >>::into($crate::expression::ConditionalExpression::Binary( $crate::expression::ConditionalBinary { lhs: $LHS.into(), op: $crate::expression::ConditionalOperator::$OP, rhs: $RHS.into(), }, )) }; }
use std::fmt; #[derive(Debug, PartialEq, Clone)] pub enum Token { Add, Subtract, Multiply, Divide, Caret, LeftParen, RightParen, Num(f64), EOF, } #[derive(Debug, PartialEq, PartialOrd)] /// Defines all the OperPrec levels, from lowest to highest. pub enum OperPrec { DefaultZero, AddSub, MulDiv, Power, Negative, } impl Token { pub fn get_oper_prec(&self) -> OperPrec { use self::OperPrec::*; use self::Token::*; match self { Add | Subtract => AddSub, Multiply | Divide => MulDiv, Caret => Power, _ => DefaultZero, } } } impl fmt::Display for Token { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Add => write!(f, "+"), Self::Subtract => write!(f, "-"), Self::Multiply => write!(f, "*"), Self::Divide => write!(f, "/"), Self::Caret => write!(f, "^"), Self::LeftParen => write!(f, "("), Self::RightParen => write!(f, ")"), Self::Num(n) => write!(f, "{}", n), Self::EOF => write!(f, "EOF"), } } }
pub fn heap_sort<T: PartialOrd>(v: &mut Vec<T>) -> &Vec<T> { if v.len() <= 1 { return v; } // build the binary heap from v for i in (0..v.len()/2).rev() { sink(v, i, v.len()) } // invariant: // [end+1..v.len()]: sorted; // [0..=end]: to be examined. let mut end = v.len()-1; while end > 0 { v.swap(0, end); sink(v, 0, end); end -= 1; } v } fn sink<T: PartialOrd>(v: &mut Vec<T>, start: usize, end: usize) { let mut i = start; while i < end/2 { let left = i*2+1; let right = i*2+2; let j = if right < end && v[right] > v[left] { right } else { left }; if v[i] >= v[j] { break; } v.swap(i, j); i = j; } }
use datafusion::common::tree_node::{TreeNode, TreeNodeRewriter}; use datafusion::error::Result as DataFusionResult; use datafusion::prelude::{lit, Expr}; use crate::ValueExpr; /// Rewrites an expression on `_value` as a boolean true literal, pushing any /// encountered expressions onto `value_exprs` so they can be moved onto column /// projections. pub(crate) fn rewrite_field_value_references( value_exprs: &mut Vec<ValueExpr>, expr: Expr, ) -> DataFusionResult<Expr> { let mut rewriter = FieldValueRewriter { value_exprs }; expr.rewrite(&mut rewriter) } struct FieldValueRewriter<'a> { value_exprs: &'a mut Vec<ValueExpr>, } impl<'a> TreeNodeRewriter for FieldValueRewriter<'a> { type N = Expr; fn mutate(&mut self, expr: Expr) -> DataFusionResult<Expr> { // try and convert Expr into a ValueExpr match expr.try_into() { // found a value expr. Save and replace with true Ok(value_expr) => { self.value_exprs.push(value_expr); Ok(lit(true)) } // not a ValueExpr, so leave the same Err(expr) => Ok(expr), } } } #[cfg(test)] mod tests { use super::*; use crate::rpc_predicate::VALUE_COLUMN_NAME; use datafusion::prelude::col; #[test] fn test_field_value_rewriter() { let mut rewriter = FieldValueRewriter { value_exprs: &mut vec![], }; let cases = vec![ (col("f1").eq(lit(1.82)), col("f1").eq(lit(1.82)), vec![]), (col("t2"), col("t2"), vec![]), ( col(VALUE_COLUMN_NAME).eq(lit(1.82)), // _value = 1.82 -> true lit(true), vec![ValueExpr { expr: col(VALUE_COLUMN_NAME).eq(lit(1.82)), }], ), ]; for (input, exp, mut value_exprs) in cases { let rewritten = input.rewrite(&mut rewriter).unwrap(); assert_eq!(rewritten, exp); assert_eq!(rewriter.value_exprs, &mut value_exprs); } // Test case with single field. let mut rewriter = FieldValueRewriter { value_exprs: &mut vec![], }; let input = col(VALUE_COLUMN_NAME).gt(lit(1.88)); let rewritten = input.clone().rewrite(&mut rewriter).unwrap(); assert_eq!(rewritten, lit(true)); assert_eq!(rewriter.value_exprs, &mut vec![ValueExpr { expr: input }]); } }
use reqwest; error_chain! { types { Error, ErrorKind, ResultExt, Result; } foreign_links { Another(reqwest::Error); Io(::std::io::Error); } errors { WaitTooLong(t: u32) { description("queue is too long") display("queue is too long: '{}'", t) } } }
use crate::Peek; use boolinator::Boolinator; use proc_macro::TokenStream; use proc_macro2::{Ident, TokenTree}; use quote::{quote, ToTokens}; use std::fmt; use syn::buffer::Cursor; use syn::parse::{Parse, ParseStream, Result as ParseResult}; use syn::{Expr, Token}; pub struct HtmlProp { pub label: HtmlPropLabel, pub value: Expr, } impl Peek<()> for HtmlProp { fn peek(mut cursor: Cursor) -> Option<()> { loop { let (_, c) = cursor.ident()?; let (punct, c) = c.punct()?; if punct.as_char() == '-' { cursor = c; continue; } return (punct.as_char() == '=').as_option(); } } } impl Parse for HtmlProp { fn parse(input: ParseStream) -> ParseResult<Self> { let label = input.parse::<HtmlPropLabel>()?; input.parse::<Token![=]>()?; let value = input.parse::<Expr>()?; // backwards compat let _ = input.parse::<Token![,]>(); Ok(HtmlProp { label, value }) } } pub struct HtmlPropSuffix { pub div: Option<Token![/]>, pub gt: Token![>], pub stream: TokenStream, } impl Parse for HtmlPropSuffix { fn parse(input: ParseStream) -> ParseResult<Self> { let mut trees: Vec<TokenTree> = vec![]; let mut div: Option<Token![/]> = None; let mut angle_count = 1; let gt: Option<Token![>]>; loop { let next = input.parse()?; if let TokenTree::Punct(punct) = &next { match punct.as_char() { '>' => { angle_count -= 1; if angle_count == 0 { gt = Some(syn::token::Gt { spans: [punct.span()], }); break; } } '<' => angle_count += 1, '/' => { if angle_count == 1 && input.peek(Token![>]) { div = Some(syn::token::Div { spans: [punct.span()], }); gt = Some(input.parse()?); break; } } _ => {} }; } trees.push(next); } let gt: Token![>] = gt.ok_or_else(|| input.error("missing tag close"))?; let stream: proc_macro2::TokenStream = trees.into_iter().collect(); let stream = TokenStream::from(stream); Ok(HtmlPropSuffix { div, gt, stream }) } } pub struct HtmlPropLabel { pub name: Ident, pub extended: Vec<(Token![-], Ident)>, } impl HtmlPropLabel { pub fn new(name: Ident) -> Self { HtmlPropLabel { name, extended: Vec::new(), } } } impl fmt::Display for HtmlPropLabel { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.name)?; for (_, ident) in &self.extended { write!(f, "-{}", ident)?; } Ok(()) } } impl Parse for HtmlPropLabel { fn parse(input: ParseStream) -> ParseResult<Self> { let name = if let Ok(token) = input.parse::<Token![type]>() { Ident::new("type", token.span).into() } else if let Ok(token) = input.parse::<Token![for]>() { Ident::new("for", token.span).into() } else { input.parse::<Ident>()?.into() }; let mut extended = Vec::new(); while input.peek(Token![-]) { extended.push((input.parse::<Token![-]>()?, input.parse::<Ident>()?)); } Ok(HtmlPropLabel { name, extended }) } } impl ToTokens for HtmlPropLabel { fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { let HtmlPropLabel { name, extended } = self; let dashes = extended.iter().map(|(dash, _)| quote! {#dash}); let idents = extended.iter().map(|(_, ident)| quote! {#ident}); let extended = quote! { #(#dashes#idents)* }; tokens.extend(quote! {#name#extended}); } }
// Copyright 2019 The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the // following disclaimer in the documentation and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote // products derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. use blake2::{ digest::{Input, VariableOutput}, VarBlake2b, }; use derive_error::Error; use serde::{de, Deserialize, Deserializer, Serialize}; use std::{ cmp::Ordering, convert::{TryFrom, TryInto}, fmt, hash::{Hash, Hasher}, marker::PhantomData, }; use tari_crypto::tari_utilities::{ hex::{to_hex, Hex}, ByteArray, ByteArrayError, }; const NODE_ID_ARRAY_SIZE: usize = 13; // 104-bit as per RFC-0151 type NodeIdArray = [u8; NODE_ID_ARRAY_SIZE]; #[derive(Debug, Error, Clone)] pub enum NodeIdError { IncorrectByteCount, OutOfBounds, DigestError, } /// Hold the XOR distance calculated between two NodeId's. This is used for DHT-style routing. #[derive(Clone, Debug, Eq, PartialOrd, Ord, Default)] pub struct NodeDistance(NodeIdArray); impl NodeDistance { /// Construct a new zero distance pub fn new() -> NodeDistance { NodeDistance([0; NODE_ID_ARRAY_SIZE]) } /// Calculate the distance between two node ids using the XOR metric pub fn from_node_ids(x: &NodeId, y: &NodeId) -> NodeDistance { let mut nd = NodeDistance::new(); for i in 0..nd.0.len() { nd.0[i] = x.0[i] ^ y.0[i]; } nd } pub const fn max_distance() -> NodeDistance { NodeDistance([255; NODE_ID_ARRAY_SIZE]) } } impl PartialEq for NodeDistance { fn eq(&self, nd: &NodeDistance) -> bool { self.0 == nd.0 } } impl TryFrom<&[u8]> for NodeDistance { type Error = NodeIdError; /// Construct a node distance from 32 bytes fn try_from(elements: &[u8]) -> Result<Self, Self::Error> { if elements.len() >= NODE_ID_ARRAY_SIZE { let mut bytes = [0; NODE_ID_ARRAY_SIZE]; bytes.copy_from_slice(&elements[0..NODE_ID_ARRAY_SIZE]); Ok(NodeDistance(bytes)) } else { Err(NodeIdError::IncorrectByteCount) } } } impl ByteArray for NodeDistance { /// Try and convert the given byte array to a NodeDistance. Any failures (incorrect array length, /// implementation-specific checks, etc) return a [ByteArrayError](enum.ByteArrayError.html). fn from_bytes(bytes: &[u8]) -> Result<Self, ByteArrayError> { bytes .try_into() .map_err(|err| ByteArrayError::ConversionError(format!("{:?}", err))) } /// Return the NodeDistance as a byte array fn as_bytes(&self) -> &[u8] { self.0.as_ref() } } impl fmt::Display for NodeDistance { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", to_hex(&self.0)) } } /// A Node Identity is used as a unique identifier for a node in the Tari communications network. #[derive(Clone, Eq, Deserialize, Serialize, Default)] pub struct NodeId(NodeIdArray); impl NodeId { /// Construct a new node id on the origin pub fn new() -> Self { Self([0; NODE_ID_ARRAY_SIZE]) } /// Derive a node id from a public key: node_id=hash(public_key) pub fn from_key<K: ByteArray>(key: &K) -> Result<Self, NodeIdError> { let bytes = key.as_bytes(); let mut hasher = VarBlake2b::new(NODE_ID_ARRAY_SIZE).map_err(|_| NodeIdError::DigestError)?; hasher.input(bytes); let v = hasher.vec_result(); Self::try_from(v.as_slice()) } /// Generate a node id from a base layer registration using the block hash and public key // pub fn from_baselayer_registration<?>(......) -> NodeId { // TODO: NodeId=hash(blockhash(with block_height),public key?) // } /// Calculate the distance between the current node id and the provided node id using the XOR metric pub fn distance(&self, node_id: &NodeId) -> NodeDistance { NodeDistance::from_node_ids(&self, &node_id) } /// Find and return the indices of the K nearest neighbours from the provided node id list pub fn closest_indices(&self, node_ids: &[NodeId], k: usize) -> Result<Vec<usize>, NodeIdError> { if k > node_ids.len() { return Err(NodeIdError::OutOfBounds); } let mut indices: Vec<usize> = Vec::with_capacity(node_ids.len()); let mut dists: Vec<NodeDistance> = Vec::with_capacity(node_ids.len()); for (i, node_id) in node_ids.iter().enumerate() { indices.push(i); dists.push(self.distance(node_id)) } // Perform partial sort of elements only up to K elements let mut nearest_node_indices: Vec<usize> = Vec::with_capacity(k); for i in 0..k { for j in i + 1..node_ids.len() { if dists[i] > dists[j] { dists.swap(i, j); indices.swap(i, j); } } nearest_node_indices.push(indices[i]); } Ok(nearest_node_indices) } /// Find and return the node ids of the K nearest neighbours from the provided node id list pub fn closest(&self, node_ids: &[NodeId], k: usize) -> Result<Vec<NodeId>, NodeIdError> { let nearest_node_indices = self.closest_indices(&node_ids.to_vec(), k)?; let mut nearest_node_ids: Vec<NodeId> = Vec::with_capacity(nearest_node_indices.len()); for nearest in nearest_node_indices { nearest_node_ids.push(node_ids[nearest].clone()); } Ok(nearest_node_ids) } pub fn into_inner(self) -> NodeIdArray { self.0 } pub fn short_str(&self) -> String { to_hex(&self.0[..8]) } } impl ByteArray for NodeId { /// Try and convert the given byte array to a NodeId. Any failures (incorrect array length, /// implementation-specific checks, etc) return a [ByteArrayError](enum.ByteArrayError.html). fn from_bytes(bytes: &[u8]) -> Result<Self, ByteArrayError> { bytes .try_into() .map_err(|err| ByteArrayError::ConversionError(format!("{:?}", err))) } /// Return the NodeId as a byte array fn as_bytes(&self) -> &[u8] { self.0.as_ref() } } impl ByteArray for Box<NodeId> { /// Try and convert the given byte array to a NodeId. Any failures (incorrect array length, /// implementation-specific checks, etc) return a [ByteArrayError](enum.ByteArrayError.html). fn from_bytes(bytes: &[u8]) -> Result<Self, ByteArrayError> { let node_id = NodeId::try_from(bytes).map_err(|err| ByteArrayError::ConversionError(format!("{:?}", err)))?; Ok(Box::new(node_id)) } /// Return the NodeId as a byte array fn as_bytes(&self) -> &[u8] { &self.as_ref().0 } } impl PartialEq for NodeId { fn eq(&self, nid: &NodeId) -> bool { self.0 == nid.0 } } impl PartialOrd<NodeId> for NodeId { fn partial_cmp(&self, other: &NodeId) -> Option<Ordering> { self.0.partial_cmp(&other.0) } } impl Ord for NodeId { fn cmp(&self, other: &Self) -> Ordering { self.0.cmp(&other.0) } } impl TryFrom<&[u8]> for NodeId { type Error = NodeIdError; /// Construct a node id from 32 bytes fn try_from(elements: &[u8]) -> Result<Self, Self::Error> { if elements.len() >= NODE_ID_ARRAY_SIZE { let mut bytes = [0; NODE_ID_ARRAY_SIZE]; bytes.copy_from_slice(&elements[0..NODE_ID_ARRAY_SIZE]); Ok(NodeId(bytes)) } else { Err(NodeIdError::IncorrectByteCount) } } } impl Hash for NodeId { /// Require the implementation of the Hash trait for Hashmaps fn hash<H: Hasher>(&self, state: &mut H) { self.0.hash(state); } } impl AsRef<[u8]> for NodeId { fn as_ref(&self) -> &[u8] { &self.0 } } impl fmt::Display for NodeId { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", to_hex(&self.0)) } } impl fmt::Debug for NodeId { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "NodeId({})", to_hex(&self.0)) } } pub fn deserialize_node_id_from_hex<'de, D>(des: D) -> Result<NodeId, D::Error> where D: Deserializer<'de> { struct KeyStringVisitor<K> { marker: PhantomData<K>, }; impl<'de> de::Visitor<'de> for KeyStringVisitor<NodeId> { type Value = NodeId; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { formatter.write_str("a node id in hex format") } fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> where E: de::Error { NodeId::from_hex(v).map_err(E::custom) } } des.deserialize_str(KeyStringVisitor { marker: PhantomData }) } #[cfg(test)] mod test { use super::*; use crate::types::{CommsPublicKey, CommsSecretKey}; use tari_crypto::{ keys::{PublicKey, SecretKey}, tari_utilities::byte_array::ByteArray, }; #[test] fn display() { let node_id = NodeId::try_from(&[144u8, 28, 106, 112, 220, 197, 216, 119, 9, 217, 42, 77, 159, 211, 53][..]).unwrap(); let result = format!("{}", node_id); assert_eq!("901c6a70dcc5d87709d92a4d9f", result); } #[test] fn test_from_public_key() { let mut rng = rand::rngs::OsRng; let sk = CommsSecretKey::random(&mut rng); let pk = CommsPublicKey::from_secret_key(&sk); let node_id = NodeId::from_key(&pk).unwrap(); assert_ne!(node_id.0.to_vec(), NodeId::new().0.to_vec()); // Ensure node id is different to original public key let mut pk_array: [u8; 32] = [0; 32]; pk_array.copy_from_slice(&pk.as_bytes()); assert_ne!(node_id.0.to_vec(), pk_array.to_vec()); } #[test] fn test_distance_and_ordering() { let node_id1 = NodeId::try_from( [ 144, 28, 106, 112, 220, 197, 216, 119, 9, 217, 42, 77, 159, 211, 53, 207, 0, 157, 5, 55, 235, 247, 160, 195, 240, 48, 146, 168, 119, 15, 241, 54, ] .as_bytes(), ) .unwrap(); let node_id2 = NodeId::try_from( [ 186, 43, 62, 14, 60, 214, 9, 180, 145, 122, 55, 160, 83, 83, 45, 185, 219, 206, 226, 128, 5, 26, 20, 0, 192, 121, 216, 178, 134, 212, 51, 131, ] .as_bytes(), ) .unwrap(); let node_id3 = NodeId::try_from( [ 60, 32, 246, 39, 108, 201, 214, 91, 30, 230, 3, 126, 31, 46, 66, 203, 27, 51, 240, 177, 230, 22, 118, 102, 201, 55, 211, 147, 229, 26, 116, 103, ] .as_bytes(), ) .unwrap(); assert!(node_id1.0 < node_id2.0); assert!(node_id1.0 > node_id3.0); let desired_n1_to_n2_dist = NodeDistance::try_from( [ 42, 55, 84, 126, 224, 19, 209, 195, 152, 163, 29, 237, 204, 128, 24, 118, 219, 83, 231, 183, 238, 237, 180, 195, 48, 73, 74, 26, 241, 219, 194, 181, ] .as_bytes(), ) .unwrap(); let desired_n1_to_n3_dist = NodeDistance::try_from( [ 172, 60, 156, 87, 176, 12, 14, 44, 23, 63, 41, 51, 128, 253, 119, 4, 27, 174, 245, 134, 13, 225, 214, 165, 57, 7, 65, 59, 146, 21, 133, 81, ] .as_bytes(), ) .unwrap(); let n1_to_n2_dist = node_id1.distance(&node_id2); let n1_to_n3_dist = node_id1.distance(&node_id3); assert!(n1_to_n2_dist < n1_to_n3_dist); assert_eq!(n1_to_n2_dist, desired_n1_to_n2_dist); assert_eq!(n1_to_n3_dist, desired_n1_to_n3_dist); // Commutative let n1_to_n2_dist = node_id1.distance(&node_id2); let n2_to_n1_dist = node_id2.distance(&node_id1); assert_eq!(n1_to_n2_dist, n2_to_n1_dist); } #[test] fn test_closest() { let mut node_ids: Vec<NodeId> = Vec::new(); node_ids.push(NodeId::try_from(&[144, 28, 106, 112, 220, 197, 216, 119, 9, 217, 42, 77, 159][..]).unwrap()); node_ids.push(NodeId::try_from(&[75, 249, 102, 1, 2, 166, 155, 37, 22, 54, 84, 98, 56][..]).unwrap()); node_ids.push(NodeId::try_from(&[60, 32, 246, 39, 108, 201, 214, 91, 30, 230, 3, 126, 31][..]).unwrap()); node_ids.push(NodeId::try_from(&[134, 116, 78, 53, 246, 206, 200, 147, 126, 96, 54, 113, 67][..]).unwrap()); node_ids.push(NodeId::try_from(&[75, 146, 162, 130, 22, 63, 247, 182, 156, 103, 174, 32, 134][..]).unwrap()); node_ids.push(NodeId::try_from(&[186, 43, 62, 14, 60, 214, 9, 180, 145, 122, 55, 160, 83][..]).unwrap()); node_ids.push(NodeId::try_from(&[143, 189, 32, 210, 30, 231, 82, 5, 86, 85, 28, 82, 154][..]).unwrap()); node_ids.push(NodeId::try_from(&[155, 210, 214, 160, 153, 70, 172, 234, 177, 178, 62, 82, 166][..]).unwrap()); node_ids.push(NodeId::try_from(&[173, 218, 34, 188, 211, 173, 235, 82, 18, 159, 55, 47, 242][..]).unwrap()); let node_id = NodeId::try_from(&[169, 125, 200, 137, 210, 73, 241, 238, 25, 108, 8, 48, 66][..]).unwrap(); let k = 3; match node_id.closest(&node_ids, k) { Ok(knn_node_ids) => { println!(" KNN = {:?}", knn_node_ids); assert_eq!(knn_node_ids.len(), k); assert_eq!(knn_node_ids[0].0, [ 173, 218, 34, 188, 211, 173, 235, 82, 18, 159, 55, 47, 242 ]); assert_eq!(knn_node_ids[1].0, [ 186, 43, 62, 14, 60, 214, 9, 180, 145, 122, 55, 160, 83 ]); assert_eq!(knn_node_ids[2].0, [ 143, 189, 32, 210, 30, 231, 82, 5, 86, 85, 28, 82, 154 ]); }, Err(_e) => assert!(false), }; assert!(node_id.closest(&node_ids, node_ids.len() + 1).is_err()); } #[test] fn partial_eq() { let bytes = [ 173, 218, 34, 188, 211, 173, 235, 82, 18, 159, 55, 47, 242, 24, 95, 60, 208, 53, 97, 51, 43, 71, 149, 89, 123, 150, 162, 67, 240, 208, 67, 56, ] .as_bytes(); let nid1 = NodeId::try_from(bytes.clone()).unwrap(); let nid2 = NodeId::try_from(bytes.clone()).unwrap(); assert_eq!(nid1, nid2); } }
use matrix::Matrix4; use super::test::{Bencher, black_box}; #[test] fn matrix_equality() { let identity_1 = Matrix4::identity(); let mut identity_2 = Matrix4::identity(); assert!(identity_1 == identity_1); // self equality assert!(identity_1 == identity_2); // two identity matrices identity_2[0][0] = 5.0; assert!(identity_1 != identity_2); } #[test] #[should_panic(expected = "assertion failed")] fn matrix_index_bounds() { let matrix = Matrix4::identity(); matrix[4][4]; } #[test] #[should_panic(expected = "assertion failed")] fn matrix_mut_index_bounds() { let mut _matrix = Matrix4::identity(); _matrix[4][4]; } #[test] fn matrix_identity() { let identity = Matrix4::identity(); assert!(identity[0][0] == 1.0); assert!(identity[1][1] == 1.0); assert!(identity[2][2] == 1.0); assert!(identity[3][3] == 1.0); } #[test] fn matrix_translation() { let identity = Matrix4::identity(); let translation_1 = Matrix4::translation(0.0, 0.0, 0.0); let translation_2 = Matrix4::translation(1.0, 2.0, 3.0); let translation_3 = Matrix4::translation(1.0, 2.0, 3.0); assert!(identity == translation_1); // no translation equals identity assert!(identity != translation_2); // translation not equals identity assert!(translation_2 == translation_3); // same translations are equal // check values directly assert!(translation_2[0][3] == 1.0); assert!(translation_2[1][3] == 2.0); assert!(translation_2[2][3] == 3.0); assert!(translation_2[3][3] == 1.0); } #[bench] fn bench_multiply(bencher: &mut Bencher) { let first = Matrix4::identity(); let second = Matrix4::identity(); bencher.iter(|| { black_box(first * second); }); }
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; #[derive( BorshSerialize, BorshDeserialize, Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Default, )] pub struct BlockHeight(pub u64); impl From<u64> for BlockHeight { fn from(value: u64) -> Self { Self(value) } } impl BlockHeight { pub fn value(&self) -> u64 { self.0 } } impl From<BlockHeight> for u64 { fn from(value: BlockHeight) -> Self { value.0 } }
// cli program arguments for main.rs pub mod cli; mod macros; mod command; mod commands; mod config; mod error; mod fs;
use utopia_core::math::Size; use nannou::{prelude::*, wgpu::Texture}; use utopia_nannou::{ interface::NannouInterface, widgets::{Flex, Image, LensExt, WidgetExt}, }; use utopia_text::widgets::text::Text; fn main() { NannouInterface::run(model) } struct MyState { text: &'static str, texture: Texture, } fn model(app: &App) -> NannouInterface<MyState> { let rect = app.window_rect(); let size = Size::new(rect.w(), rect.h()); let lens_img = utopia_core::lens!(MyState, texture); let lens_text = utopia_core::lens!(MyState, text); let assets = app.assets_path().unwrap(); let widget = Flex::column() .add(Image::new().lens(lens_img).centered()) .add(Text::new().lens(lens_text).centered()) .centered(); let state = MyState { texture: Texture::from_path(app, assets.join("texture.png")) .expect("Failed to load texture"), text: "Hello world", }; NannouInterface::new(widget, state, size) }
#[cfg(not(feature = "const_generics"))] use crate::Array; use crate::SmallVec; use core::{fmt, marker::PhantomData}; use serde::de::{Deserialize, SeqAccess, Visitor}; macro_rules! create_with_parts { ( <$($({$s_impl_ty_prefix:ident})? $s_impl_ty:ident$(: $s_impl_ty_bound:ident)?),*>, <$s_decl_ty:ident$(, {$s_decl_const_ty:ident})?>, $array_item:ty ) => { #[cfg(feature = "serde")] pub struct SmallVecVisitor<$($($s_impl_ty_prefix)? $s_impl_ty$(: $s_impl_ty_bound)?),*> { pub(crate) phantom: PhantomData<$s_decl_ty>, } #[cfg(feature = "serde")] impl<'de, $($($s_impl_ty_prefix)? $s_impl_ty$(: $s_impl_ty_bound)?),*> Visitor<'de> for SmallVecVisitor<$s_decl_ty$(, {$s_decl_const_ty})?> where $array_item: Deserialize<'de>, { type Value = SmallVec<$s_decl_ty$(, {$s_decl_const_ty})?>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { formatter.write_str("a sequence") } fn visit_seq<B>(self, mut seq: B) -> Result<Self::Value, B::Error> where B: SeqAccess<'de>, { let len = seq.size_hint().unwrap_or(0); let mut values = SmallVec::with_capacity(len); while let Some(value) = seq.next_element()? { values.push(value); } Ok(values) } } } } #[cfg(feature = "const_generics")] create_with_parts!(<T, {const} N: usize>, <T, {N}>, T); #[cfg(not(feature = "const_generics"))] create_with_parts!(<A: Array>, <A>, A::Item);
fn main() { let s = String::from("hello world"); let word = first_word(&s); // word will get the value 5 //s.clear(); // this empties the String, making it equal to "" println!("The first word is: {}", word); let my_string_literal = "hello world"; // first_word works on slices of string literals let word = first_word(&my_string_literal[..]); println!("The first word is: {}", word); // Because string literals *are* string slices already, // this works too, without the slice syntax! let word = first_word(my_string_literal); println!("The first word is: {}", word); let s2 = String::from("hello world"); let _hello = &s2[0..5]; let _world = &s2[6..11]; } fn first_word(s: &str) -> &str { let bytes = s.as_bytes(); for (i, &item) in bytes.iter().enumerate() { if item == b' ' { return &s[0..i]; } } &s[..] }
extern crate tokio; fn on_message(message: &str) { println!("> {}", message.to_string()); } #[tokio::main] async fn main() { let result = twitch_ts::start_instance("#battlechicken", on_message).await; if let Err(error) = result { println!("Exited with error: {}", error.to_string()); } }
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - "] pub reset: RESET, _reserved1: [u8; 3usize], #[doc = "0x04 - Bits 24-31 of `CTRL_SCRATCH`."] pub scratch3: SCRATCH3, _reserved2: [u8; 3usize], #[doc = "0x08 - Bits 16-23 of `CTRL_SCRATCH`."] pub scratch2: SCRATCH2, _reserved3: [u8; 3usize], #[doc = "0x0c - Bits 8-15 of `CTRL_SCRATCH`."] pub scratch1: SCRATCH1, _reserved4: [u8; 3usize], #[doc = "0x10 - Bits 0-7 of `CTRL_SCRATCH`."] pub scratch0: SCRATCH0, _reserved5: [u8; 3usize], #[doc = "0x14 - Bits 24-31 of `CTRL_BUS_ERRORS`."] pub bus_errors3: BUS_ERRORS3, _reserved6: [u8; 3usize], #[doc = "0x18 - Bits 16-23 of `CTRL_BUS_ERRORS`."] pub bus_errors2: BUS_ERRORS2, _reserved7: [u8; 3usize], #[doc = "0x1c - Bits 8-15 of `CTRL_BUS_ERRORS`."] pub bus_errors1: BUS_ERRORS1, _reserved8: [u8; 3usize], #[doc = "0x20 - Bits 0-7 of `CTRL_BUS_ERRORS`."] pub bus_errors0: BUS_ERRORS0, } #[doc = "\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [reset](reset) module"] pub type RESET = crate::Reg<u8, _RESET>; #[allow(missing_docs)] #[doc(hidden)] pub struct _RESET; #[doc = "`read()` method returns [reset::R](reset::R) reader structure"] impl crate::Readable for RESET {} #[doc = "`write(|w| ..)` method takes [reset::W](reset::W) writer structure"] impl crate::Writable for RESET {} #[doc = ""] pub mod reset; #[doc = "Bits 24-31 of `CTRL_SCRATCH`.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scratch3](scratch3) module"] pub type SCRATCH3 = crate::Reg<u8, _SCRATCH3>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SCRATCH3; #[doc = "`read()` method returns [scratch3::R](scratch3::R) reader structure"] impl crate::Readable for SCRATCH3 {} #[doc = "`write(|w| ..)` method takes [scratch3::W](scratch3::W) writer structure"] impl crate::Writable for SCRATCH3 {} #[doc = "Bits 24-31 of `CTRL_SCRATCH`."] pub mod scratch3; #[doc = "Bits 16-23 of `CTRL_SCRATCH`.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scratch2](scratch2) module"] pub type SCRATCH2 = crate::Reg<u8, _SCRATCH2>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SCRATCH2; #[doc = "`read()` method returns [scratch2::R](scratch2::R) reader structure"] impl crate::Readable for SCRATCH2 {} #[doc = "`write(|w| ..)` method takes [scratch2::W](scratch2::W) writer structure"] impl crate::Writable for SCRATCH2 {} #[doc = "Bits 16-23 of `CTRL_SCRATCH`."] pub mod scratch2; #[doc = "Bits 8-15 of `CTRL_SCRATCH`.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scratch1](scratch1) module"] pub type SCRATCH1 = crate::Reg<u8, _SCRATCH1>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SCRATCH1; #[doc = "`read()` method returns [scratch1::R](scratch1::R) reader structure"] impl crate::Readable for SCRATCH1 {} #[doc = "`write(|w| ..)` method takes [scratch1::W](scratch1::W) writer structure"] impl crate::Writable for SCRATCH1 {} #[doc = "Bits 8-15 of `CTRL_SCRATCH`."] pub mod scratch1; #[doc = "Bits 0-7 of `CTRL_SCRATCH`.\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [scratch0](scratch0) module"] pub type SCRATCH0 = crate::Reg<u8, _SCRATCH0>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SCRATCH0; #[doc = "`read()` method returns [scratch0::R](scratch0::R) reader structure"] impl crate::Readable for SCRATCH0 {} #[doc = "`write(|w| ..)` method takes [scratch0::W](scratch0::W) writer structure"] impl crate::Writable for SCRATCH0 {} #[doc = "Bits 0-7 of `CTRL_SCRATCH`."] pub mod scratch0; #[doc = "Bits 24-31 of `CTRL_BUS_ERRORS`.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bus_errors3](bus_errors3) module"] pub type BUS_ERRORS3 = crate::Reg<u8, _BUS_ERRORS3>; #[allow(missing_docs)] #[doc(hidden)] pub struct _BUS_ERRORS3; #[doc = "`read()` method returns [bus_errors3::R](bus_errors3::R) reader structure"] impl crate::Readable for BUS_ERRORS3 {} #[doc = "Bits 24-31 of `CTRL_BUS_ERRORS`."] pub mod bus_errors3; #[doc = "Bits 16-23 of `CTRL_BUS_ERRORS`.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bus_errors2](bus_errors2) module"] pub type BUS_ERRORS2 = crate::Reg<u8, _BUS_ERRORS2>; #[allow(missing_docs)] #[doc(hidden)] pub struct _BUS_ERRORS2; #[doc = "`read()` method returns [bus_errors2::R](bus_errors2::R) reader structure"] impl crate::Readable for BUS_ERRORS2 {} #[doc = "Bits 16-23 of `CTRL_BUS_ERRORS`."] pub mod bus_errors2; #[doc = "Bits 8-15 of `CTRL_BUS_ERRORS`.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bus_errors1](bus_errors1) module"] pub type BUS_ERRORS1 = crate::Reg<u8, _BUS_ERRORS1>; #[allow(missing_docs)] #[doc(hidden)] pub struct _BUS_ERRORS1; #[doc = "`read()` method returns [bus_errors1::R](bus_errors1::R) reader structure"] impl crate::Readable for BUS_ERRORS1 {} #[doc = "Bits 8-15 of `CTRL_BUS_ERRORS`."] pub mod bus_errors1; #[doc = "Bits 0-7 of `CTRL_BUS_ERRORS`.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bus_errors0](bus_errors0) module"] pub type BUS_ERRORS0 = crate::Reg<u8, _BUS_ERRORS0>; #[allow(missing_docs)] #[doc(hidden)] pub struct _BUS_ERRORS0; #[doc = "`read()` method returns [bus_errors0::R](bus_errors0::R) reader structure"] impl crate::Readable for BUS_ERRORS0 {} #[doc = "Bits 0-7 of `CTRL_BUS_ERRORS`."] pub mod bus_errors0;
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(feature = "UI_Composition_Core")] pub mod Core; #[cfg(feature = "UI_Composition_Desktop")] pub mod Desktop; #[cfg(feature = "UI_Composition_Diagnostics")] pub mod Diagnostics; #[cfg(feature = "UI_Composition_Effects")] pub mod Effects; #[cfg(feature = "UI_Composition_Interactions")] pub mod Interactions; #[cfg(feature = "UI_Composition_Scenes")] pub mod Scenes; #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AmbientLight(pub ::windows::core::IInspectable); impl AmbientLight { pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Intensity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IAmbientLight2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetIntensity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAmbientLight2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Targets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ExclusionsFromTargets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for AmbientLight { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.AmbientLight;{a48130a1-b7c4-46f7-b9bf-daf43a44e6ee})"); } unsafe impl ::windows::core::Interface for AmbientLight { type Vtable = IAmbientLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa48130a1_b7c4_46f7_b9bf_daf43a44e6ee); } impl ::windows::core::RuntimeName for AmbientLight { const NAME: &'static str = "Windows.UI.Composition.AmbientLight"; } impl ::core::convert::From<AmbientLight> for ::windows::core::IUnknown { fn from(value: AmbientLight) -> Self { value.0 .0 } } impl ::core::convert::From<&AmbientLight> for ::windows::core::IUnknown { fn from(value: &AmbientLight) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AmbientLight> for ::windows::core::IInspectable { fn from(value: AmbientLight) -> Self { value.0 } } impl ::core::convert::From<&AmbientLight> for ::windows::core::IInspectable { fn from(value: &AmbientLight) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AmbientLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: AmbientLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AmbientLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &AmbientLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<AmbientLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: AmbientLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&AmbientLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &AmbientLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AmbientLight> for CompositionLight { fn from(value: AmbientLight) -> Self { ::core::convert::Into::<CompositionLight>::into(&value) } } impl ::core::convert::From<&AmbientLight> for CompositionLight { fn from(value: &AmbientLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for &AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AmbientLight> for CompositionObject { fn from(value: AmbientLight) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&AmbientLight> for CompositionObject { fn from(value: &AmbientLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &AmbientLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AmbientLight {} unsafe impl ::core::marker::Sync for AmbientLight {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AnimationController(pub ::windows::core::IInspectable); impl AnimationController { pub fn PlaybackRate(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetPlaybackRate(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Progress(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetProgress(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn ProgressBehavior(&self) -> ::windows::core::Result<AnimationControllerProgressBehavior> { let this = self; unsafe { let mut result__: AnimationControllerProgressBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationControllerProgressBehavior>(result__) } } pub fn SetProgressBehavior(&self, value: AnimationControllerProgressBehavior) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn Pause(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } pub fn Resume(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this)).ok() } } pub fn MaxPlaybackRate() -> ::windows::core::Result<f32> { Self::IAnimationControllerStatics(|this| unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) }) } pub fn MinPlaybackRate() -> ::windows::core::Result<f32> { Self::IAnimationControllerStatics(|this| unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) }) } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IAnimationControllerStatics<R, F: FnOnce(&IAnimationControllerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AnimationController, IAnimationControllerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AnimationController { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.AnimationController;{c934efd2-0722-4f5f-a4e2-9510f3d43bf7})"); } unsafe impl ::windows::core::Interface for AnimationController { type Vtable = IAnimationController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc934efd2_0722_4f5f_a4e2_9510f3d43bf7); } impl ::windows::core::RuntimeName for AnimationController { const NAME: &'static str = "Windows.UI.Composition.AnimationController"; } impl ::core::convert::From<AnimationController> for ::windows::core::IUnknown { fn from(value: AnimationController) -> Self { value.0 .0 } } impl ::core::convert::From<&AnimationController> for ::windows::core::IUnknown { fn from(value: &AnimationController) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AnimationController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AnimationController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AnimationController> for ::windows::core::IInspectable { fn from(value: AnimationController) -> Self { value.0 } } impl ::core::convert::From<&AnimationController> for ::windows::core::IInspectable { fn from(value: &AnimationController) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AnimationController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AnimationController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AnimationController> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: AnimationController) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AnimationController> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &AnimationController) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for AnimationController { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &AnimationController { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<AnimationController> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: AnimationController) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&AnimationController> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &AnimationController) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for AnimationController { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &AnimationController { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AnimationController> for CompositionObject { fn from(value: AnimationController) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&AnimationController> for CompositionObject { fn from(value: &AnimationController) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for AnimationController { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &AnimationController { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AnimationController {} unsafe impl ::core::marker::Sync for AnimationController {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationControllerProgressBehavior(pub i32); impl AnimationControllerProgressBehavior { pub const Default: AnimationControllerProgressBehavior = AnimationControllerProgressBehavior(0i32); pub const IncludesDelayTime: AnimationControllerProgressBehavior = AnimationControllerProgressBehavior(1i32); } impl ::core::convert::From<i32> for AnimationControllerProgressBehavior { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationControllerProgressBehavior { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationControllerProgressBehavior { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationControllerProgressBehavior;i4)"); } impl ::windows::core::DefaultType for AnimationControllerProgressBehavior { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationDelayBehavior(pub i32); impl AnimationDelayBehavior { pub const SetInitialValueAfterDelay: AnimationDelayBehavior = AnimationDelayBehavior(0i32); pub const SetInitialValueBeforeDelay: AnimationDelayBehavior = AnimationDelayBehavior(1i32); } impl ::core::convert::From<i32> for AnimationDelayBehavior { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationDelayBehavior { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationDelayBehavior { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationDelayBehavior;i4)"); } impl ::windows::core::DefaultType for AnimationDelayBehavior { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationDirection(pub i32); impl AnimationDirection { pub const Normal: AnimationDirection = AnimationDirection(0i32); pub const Reverse: AnimationDirection = AnimationDirection(1i32); pub const Alternate: AnimationDirection = AnimationDirection(2i32); pub const AlternateReverse: AnimationDirection = AnimationDirection(3i32); } impl ::core::convert::From<i32> for AnimationDirection { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationDirection { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationDirection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationDirection;i4)"); } impl ::windows::core::DefaultType for AnimationDirection { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationIterationBehavior(pub i32); impl AnimationIterationBehavior { pub const Count: AnimationIterationBehavior = AnimationIterationBehavior(0i32); pub const Forever: AnimationIterationBehavior = AnimationIterationBehavior(1i32); } impl ::core::convert::From<i32> for AnimationIterationBehavior { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationIterationBehavior { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationIterationBehavior { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationIterationBehavior;i4)"); } impl ::windows::core::DefaultType for AnimationIterationBehavior { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationPropertyAccessMode(pub i32); impl AnimationPropertyAccessMode { pub const None: AnimationPropertyAccessMode = AnimationPropertyAccessMode(0i32); pub const ReadOnly: AnimationPropertyAccessMode = AnimationPropertyAccessMode(1i32); pub const WriteOnly: AnimationPropertyAccessMode = AnimationPropertyAccessMode(2i32); pub const ReadWrite: AnimationPropertyAccessMode = AnimationPropertyAccessMode(3i32); } impl ::core::convert::From<i32> for AnimationPropertyAccessMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationPropertyAccessMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationPropertyAccessMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationPropertyAccessMode;i4)"); } impl ::windows::core::DefaultType for AnimationPropertyAccessMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AnimationPropertyInfo(pub ::windows::core::IInspectable); impl AnimationPropertyInfo { pub fn AccessMode(&self) -> ::windows::core::Result<AnimationPropertyAccessMode> { let this = self; unsafe { let mut result__: AnimationPropertyAccessMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationPropertyAccessMode>(result__) } } pub fn SetAccessMode(&self, value: AnimationPropertyAccessMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn GetResolvedCompositionObject(&self) -> ::windows::core::Result<CompositionObject> { let this = &::windows::core::Interface::cast::<IAnimationPropertyInfo2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionObject>(result__) } } pub fn GetResolvedCompositionObjectProperty(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IAnimationPropertyInfo2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for AnimationPropertyInfo { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.AnimationPropertyInfo;{f4716f05-ed77-4e3c-b328-5c3985b3738f})"); } unsafe impl ::windows::core::Interface for AnimationPropertyInfo { type Vtable = IAnimationPropertyInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf4716f05_ed77_4e3c_b328_5c3985b3738f); } impl ::windows::core::RuntimeName for AnimationPropertyInfo { const NAME: &'static str = "Windows.UI.Composition.AnimationPropertyInfo"; } impl ::core::convert::From<AnimationPropertyInfo> for ::windows::core::IUnknown { fn from(value: AnimationPropertyInfo) -> Self { value.0 .0 } } impl ::core::convert::From<&AnimationPropertyInfo> for ::windows::core::IUnknown { fn from(value: &AnimationPropertyInfo) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AnimationPropertyInfo> for ::windows::core::IInspectable { fn from(value: AnimationPropertyInfo) -> Self { value.0 } } impl ::core::convert::From<&AnimationPropertyInfo> for ::windows::core::IInspectable { fn from(value: &AnimationPropertyInfo) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AnimationPropertyInfo> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: AnimationPropertyInfo) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AnimationPropertyInfo> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &AnimationPropertyInfo) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<AnimationPropertyInfo> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: AnimationPropertyInfo) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&AnimationPropertyInfo> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &AnimationPropertyInfo) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AnimationPropertyInfo> for CompositionObject { fn from(value: AnimationPropertyInfo) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&AnimationPropertyInfo> for CompositionObject { fn from(value: &AnimationPropertyInfo) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &AnimationPropertyInfo { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AnimationPropertyInfo {} unsafe impl ::core::marker::Sync for AnimationPropertyInfo {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AnimationStopBehavior(pub i32); impl AnimationStopBehavior { pub const LeaveCurrentValue: AnimationStopBehavior = AnimationStopBehavior(0i32); pub const SetToInitialValue: AnimationStopBehavior = AnimationStopBehavior(1i32); pub const SetToFinalValue: AnimationStopBehavior = AnimationStopBehavior(2i32); } impl ::core::convert::From<i32> for AnimationStopBehavior { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AnimationStopBehavior { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AnimationStopBehavior { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.AnimationStopBehavior;i4)"); } impl ::windows::core::DefaultType for AnimationStopBehavior { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BackEasingFunction(pub ::windows::core::IInspectable); impl BackEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } pub fn Amplitude(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BackEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BackEasingFunction;{b8560da4-5e3c-545d-b263-7987a2bd27cb})"); } unsafe impl ::windows::core::Interface for BackEasingFunction { type Vtable = IBackEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8560da4_5e3c_545d_b263_7987a2bd27cb); } impl ::windows::core::RuntimeName for BackEasingFunction { const NAME: &'static str = "Windows.UI.Composition.BackEasingFunction"; } impl ::core::convert::From<BackEasingFunction> for ::windows::core::IUnknown { fn from(value: BackEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&BackEasingFunction> for ::windows::core::IUnknown { fn from(value: &BackEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BackEasingFunction> for ::windows::core::IInspectable { fn from(value: BackEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&BackEasingFunction> for ::windows::core::IInspectable { fn from(value: &BackEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BackEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BackEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BackEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BackEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BackEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BackEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BackEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BackEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BackEasingFunction> for CompositionEasingFunction { fn from(value: BackEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&BackEasingFunction> for CompositionEasingFunction { fn from(value: &BackEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BackEasingFunction> for CompositionObject { fn from(value: BackEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BackEasingFunction> for CompositionObject { fn from(value: &BackEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BackEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BackEasingFunction {} unsafe impl ::core::marker::Sync for BackEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BooleanKeyFrameAnimation(pub ::windows::core::IInspectable); impl BooleanKeyFrameAnimation { pub fn InsertKeyFrame(&self, normalizedprogresskey: f32, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BooleanKeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BooleanKeyFrameAnimation;{95e23a08-d1f4-4972-9770-3efe68d82e14})"); } unsafe impl ::windows::core::Interface for BooleanKeyFrameAnimation { type Vtable = IBooleanKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x95e23a08_d1f4_4972_9770_3efe68d82e14); } impl ::windows::core::RuntimeName for BooleanKeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.BooleanKeyFrameAnimation"; } impl ::core::convert::From<BooleanKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: BooleanKeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&BooleanKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &BooleanKeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BooleanKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: BooleanKeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&BooleanKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &BooleanKeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BooleanKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BooleanKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BooleanKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BooleanKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BooleanKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BooleanKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BooleanKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BooleanKeyFrameAnimation> for KeyFrameAnimation { fn from(value: BooleanKeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&BooleanKeyFrameAnimation> for KeyFrameAnimation { fn from(value: &BooleanKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BooleanKeyFrameAnimation> for CompositionAnimation { fn from(value: BooleanKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&BooleanKeyFrameAnimation> for CompositionAnimation { fn from(value: &BooleanKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BooleanKeyFrameAnimation> for CompositionObject { fn from(value: BooleanKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BooleanKeyFrameAnimation> for CompositionObject { fn from(value: &BooleanKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BooleanKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BooleanKeyFrameAnimation {} unsafe impl ::core::marker::Sync for BooleanKeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BounceEasingFunction(pub ::windows::core::IInspectable); impl BounceEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } pub fn Bounces(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn Bounciness(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BounceEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BounceEasingFunction;{e7fdb44b-aad5-5174-9421-eef8b75a6a43})"); } unsafe impl ::windows::core::Interface for BounceEasingFunction { type Vtable = IBounceEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe7fdb44b_aad5_5174_9421_eef8b75a6a43); } impl ::windows::core::RuntimeName for BounceEasingFunction { const NAME: &'static str = "Windows.UI.Composition.BounceEasingFunction"; } impl ::core::convert::From<BounceEasingFunction> for ::windows::core::IUnknown { fn from(value: BounceEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&BounceEasingFunction> for ::windows::core::IUnknown { fn from(value: &BounceEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BounceEasingFunction> for ::windows::core::IInspectable { fn from(value: BounceEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&BounceEasingFunction> for ::windows::core::IInspectable { fn from(value: &BounceEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BounceEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BounceEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BounceEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BounceEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BounceEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BounceEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BounceEasingFunction> for CompositionEasingFunction { fn from(value: BounceEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&BounceEasingFunction> for CompositionEasingFunction { fn from(value: &BounceEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceEasingFunction> for CompositionObject { fn from(value: BounceEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BounceEasingFunction> for CompositionObject { fn from(value: &BounceEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BounceEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BounceEasingFunction {} unsafe impl ::core::marker::Sync for BounceEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BounceScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); impl BounceScalarNaturalMotionAnimation { pub fn Acceleration(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetAcceleration(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Restitution(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRestitution(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn InitialVelocity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInitialVelocity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BounceScalarNaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BounceScalarNaturalMotionAnimation;{baa30dcc-a633-4618-9b06-7f7c72c87cff})"); } unsafe impl ::windows::core::Interface for BounceScalarNaturalMotionAnimation { type Vtable = IBounceScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbaa30dcc_a633_4618_9b06_7f7c72c87cff); } impl ::windows::core::RuntimeName for BounceScalarNaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.BounceScalarNaturalMotionAnimation"; } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BounceScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BounceScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BounceScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for ScalarNaturalMotionAnimation { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<ScalarNaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for ScalarNaturalMotionAnimation { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ScalarNaturalMotionAnimation> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ScalarNaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<ScalarNaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ScalarNaturalMotionAnimation> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ScalarNaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<ScalarNaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceScalarNaturalMotionAnimation> for CompositionObject { fn from(value: BounceScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BounceScalarNaturalMotionAnimation> for CompositionObject { fn from(value: &BounceScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BounceScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BounceScalarNaturalMotionAnimation {} unsafe impl ::core::marker::Sync for BounceScalarNaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BounceVector2NaturalMotionAnimation(pub ::windows::core::IInspectable); impl BounceVector2NaturalMotionAnimation { pub fn Acceleration(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetAcceleration(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Restitution(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRestitution(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BounceVector2NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BounceVector2NaturalMotionAnimation;{da344196-2154-4b3c-88aa-47361204eccd})"); } unsafe impl ::windows::core::Interface for BounceVector2NaturalMotionAnimation { type Vtable = IBounceVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda344196_2154_4b3c_88aa_47361204eccd); } impl ::windows::core::RuntimeName for BounceVector2NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.BounceVector2NaturalMotionAnimation"; } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BounceVector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BounceVector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceVector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceVector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceVector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceVector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BounceVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for Vector2NaturalMotionAnimation { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<Vector2NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for Vector2NaturalMotionAnimation { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Vector2NaturalMotionAnimation> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector2NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector2NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Vector2NaturalMotionAnimation> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector2NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector2NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector2NaturalMotionAnimation> for CompositionObject { fn from(value: BounceVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BounceVector2NaturalMotionAnimation> for CompositionObject { fn from(value: &BounceVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BounceVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BounceVector2NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for BounceVector2NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BounceVector3NaturalMotionAnimation(pub ::windows::core::IInspectable); impl BounceVector3NaturalMotionAnimation { pub fn Acceleration(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetAcceleration(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Restitution(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRestitution(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for BounceVector3NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.BounceVector3NaturalMotionAnimation;{47dabc31-10d3-4518-86f1-09caf742d113})"); } unsafe impl ::windows::core::Interface for BounceVector3NaturalMotionAnimation { type Vtable = IBounceVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x47dabc31_10d3_4518_86f1_09caf742d113); } impl ::windows::core::RuntimeName for BounceVector3NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.BounceVector3NaturalMotionAnimation"; } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BounceVector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BounceVector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceVector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceVector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<BounceVector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&BounceVector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &BounceVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for Vector3NaturalMotionAnimation { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<Vector3NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for Vector3NaturalMotionAnimation { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Vector3NaturalMotionAnimation> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector3NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector3NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Vector3NaturalMotionAnimation> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector3NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector3NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<BounceVector3NaturalMotionAnimation> for CompositionObject { fn from(value: BounceVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&BounceVector3NaturalMotionAnimation> for CompositionObject { fn from(value: &BounceVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &BounceVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for BounceVector3NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for BounceVector3NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CircleEasingFunction(pub ::windows::core::IInspectable); impl CircleEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CircleEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CircleEasingFunction;{1e07222a-6f82-5a28-8748-2e92fc46ee2b})"); } unsafe impl ::windows::core::Interface for CircleEasingFunction { type Vtable = ICircleEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e07222a_6f82_5a28_8748_2e92fc46ee2b); } impl ::windows::core::RuntimeName for CircleEasingFunction { const NAME: &'static str = "Windows.UI.Composition.CircleEasingFunction"; } impl ::core::convert::From<CircleEasingFunction> for ::windows::core::IUnknown { fn from(value: CircleEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&CircleEasingFunction> for ::windows::core::IUnknown { fn from(value: &CircleEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CircleEasingFunction> for ::windows::core::IInspectable { fn from(value: CircleEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&CircleEasingFunction> for ::windows::core::IInspectable { fn from(value: &CircleEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CircleEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CircleEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CircleEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CircleEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CircleEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CircleEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CircleEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CircleEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CircleEasingFunction> for CompositionEasingFunction { fn from(value: CircleEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&CircleEasingFunction> for CompositionEasingFunction { fn from(value: &CircleEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CircleEasingFunction> for CompositionObject { fn from(value: CircleEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CircleEasingFunction> for CompositionObject { fn from(value: &CircleEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CircleEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CircleEasingFunction {} unsafe impl ::core::marker::Sync for CircleEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ColorKeyFrameAnimation(pub ::windows::core::IInspectable); impl ColorKeyFrameAnimation { pub fn InterpolationColorSpace(&self) -> ::windows::core::Result<CompositionColorSpace> { let this = self; unsafe { let mut result__: CompositionColorSpace = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorSpace>(result__) } } pub fn SetInterpolationColorSpace(&self, value: CompositionColorSpace) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, super::Color>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ColorKeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ColorKeyFrameAnimation;{93adb5e9-8e05-4593-84a3-dca152781e56})"); } unsafe impl ::windows::core::Interface for ColorKeyFrameAnimation { type Vtable = IColorKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93adb5e9_8e05_4593_84a3_dca152781e56); } impl ::windows::core::RuntimeName for ColorKeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.ColorKeyFrameAnimation"; } impl ::core::convert::From<ColorKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: ColorKeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&ColorKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &ColorKeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ColorKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: ColorKeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&ColorKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &ColorKeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ColorKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ColorKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ColorKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ColorKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ColorKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ColorKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ColorKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ColorKeyFrameAnimation> for KeyFrameAnimation { fn from(value: ColorKeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&ColorKeyFrameAnimation> for KeyFrameAnimation { fn from(value: &ColorKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorKeyFrameAnimation> for CompositionAnimation { fn from(value: ColorKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&ColorKeyFrameAnimation> for CompositionAnimation { fn from(value: &ColorKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorKeyFrameAnimation> for CompositionObject { fn from(value: ColorKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ColorKeyFrameAnimation> for CompositionObject { fn from(value: &ColorKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ColorKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ColorKeyFrameAnimation {} unsafe impl ::core::marker::Sync for ColorKeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionAnimation(pub ::windows::core::IInspectable); impl CompositionAnimation { pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionAnimation;{464c4c2c-1caa-4061-9b40-e13fde1503ca})"); } unsafe impl ::windows::core::Interface for CompositionAnimation { type Vtable = ICompositionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x464c4c2c_1caa_4061_9b40_e13fde1503ca); } impl ::windows::core::RuntimeName for CompositionAnimation { const NAME: &'static str = "Windows.UI.Composition.CompositionAnimation"; } impl ::core::convert::From<CompositionAnimation> for ::windows::core::IUnknown { fn from(value: CompositionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionAnimation> for ::windows::core::IUnknown { fn from(value: &CompositionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionAnimation> for ::windows::core::IInspectable { fn from(value: CompositionAnimation) -> Self { value.0 } } impl ::core::convert::From<&CompositionAnimation> for ::windows::core::IInspectable { fn from(value: &CompositionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<CompositionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionAnimation> for CompositionObject { fn from(value: CompositionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionAnimation> for CompositionObject { fn from(value: &CompositionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionAnimation {} unsafe impl ::core::marker::Sync for CompositionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionAnimationGroup(pub ::windows::core::IInspectable); impl CompositionAnimationGroup { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<CompositionAnimation>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<CompositionAnimation>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<CompositionAnimation>>(result__) } } pub fn Count(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn Add<'a, Param0: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionAnimationGroup { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionAnimationGroup;{5e7cc90c-cd14-4e07-8a55-c72527aabdac})"); } unsafe impl ::windows::core::Interface for CompositionAnimationGroup { type Vtable = ICompositionAnimationGroup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e7cc90c_cd14_4e07_8a55_c72527aabdac); } impl ::windows::core::RuntimeName for CompositionAnimationGroup { const NAME: &'static str = "Windows.UI.Composition.CompositionAnimationGroup"; } impl ::core::convert::From<CompositionAnimationGroup> for ::windows::core::IUnknown { fn from(value: CompositionAnimationGroup) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionAnimationGroup> for ::windows::core::IUnknown { fn from(value: &CompositionAnimationGroup) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionAnimationGroup> for ::windows::core::IInspectable { fn from(value: CompositionAnimationGroup) -> Self { value.0 } } impl ::core::convert::From<&CompositionAnimationGroup> for ::windows::core::IInspectable { fn from(value: &CompositionAnimationGroup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionAnimationGroup> for super::super::Foundation::Collections::IIterable<CompositionAnimation> { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionAnimationGroup> for super::super::Foundation::Collections::IIterable<CompositionAnimation> { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionAnimation>> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionAnimation>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionAnimation>> for &CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionAnimation>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<CompositionAnimation>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionAnimationGroup> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionAnimationGroup> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionAnimationGroup> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionAnimationGroup> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionAnimationGroup> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionAnimationGroup> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionAnimationGroup) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionAnimationGroup> for CompositionObject { fn from(value: CompositionAnimationGroup) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionAnimationGroup> for CompositionObject { fn from(value: &CompositionAnimationGroup) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionAnimationGroup { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionAnimationGroup {} unsafe impl ::core::marker::Sync for CompositionAnimationGroup {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionAnimationGroup { type Item = CompositionAnimation; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionAnimationGroup { type Item = CompositionAnimation; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionBackdropBrush(pub ::windows::core::IInspectable); impl CompositionBackdropBrush { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionBackdropBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionBackdropBrush;{c5acae58-3898-499e-8d7f-224e91286a5d})"); } unsafe impl ::windows::core::Interface for CompositionBackdropBrush { type Vtable = ICompositionBackdropBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc5acae58_3898_499e_8d7f_224e91286a5d); } impl ::windows::core::RuntimeName for CompositionBackdropBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionBackdropBrush"; } impl ::core::convert::From<CompositionBackdropBrush> for ::windows::core::IUnknown { fn from(value: CompositionBackdropBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionBackdropBrush> for ::windows::core::IUnknown { fn from(value: &CompositionBackdropBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionBackdropBrush> for ::windows::core::IInspectable { fn from(value: CompositionBackdropBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionBackdropBrush> for ::windows::core::IInspectable { fn from(value: &CompositionBackdropBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionBackdropBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionBackdropBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionBackdropBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionBackdropBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionBackdropBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionBackdropBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionBackdropBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionBackdropBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionBackdropBrush> for CompositionBrush { fn from(value: CompositionBackdropBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionBackdropBrush> for CompositionBrush { fn from(value: &CompositionBackdropBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionBackdropBrush> for CompositionObject { fn from(value: CompositionBackdropBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionBackdropBrush> for CompositionObject { fn from(value: &CompositionBackdropBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionBackdropBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionBackdropBrush {} unsafe impl ::core::marker::Sync for CompositionBackdropBrush {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionBackfaceVisibility(pub i32); impl CompositionBackfaceVisibility { pub const Inherit: CompositionBackfaceVisibility = CompositionBackfaceVisibility(0i32); pub const Visible: CompositionBackfaceVisibility = CompositionBackfaceVisibility(1i32); pub const Hidden: CompositionBackfaceVisibility = CompositionBackfaceVisibility(2i32); } impl ::core::convert::From<i32> for CompositionBackfaceVisibility { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionBackfaceVisibility { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionBackfaceVisibility { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionBackfaceVisibility;i4)"); } impl ::windows::core::DefaultType for CompositionBackfaceVisibility { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionBatchCompletedEventArgs(pub ::windows::core::IInspectable); impl CompositionBatchCompletedEventArgs { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionBatchCompletedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionBatchCompletedEventArgs;{0d00dad0-9464-450a-a562-2e2698b0a812})"); } unsafe impl ::windows::core::Interface for CompositionBatchCompletedEventArgs { type Vtable = ICompositionBatchCompletedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_9464_450a_a562_2e2698b0a812); } impl ::windows::core::RuntimeName for CompositionBatchCompletedEventArgs { const NAME: &'static str = "Windows.UI.Composition.CompositionBatchCompletedEventArgs"; } impl ::core::convert::From<CompositionBatchCompletedEventArgs> for ::windows::core::IUnknown { fn from(value: CompositionBatchCompletedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionBatchCompletedEventArgs> for ::windows::core::IUnknown { fn from(value: &CompositionBatchCompletedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionBatchCompletedEventArgs> for ::windows::core::IInspectable { fn from(value: CompositionBatchCompletedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&CompositionBatchCompletedEventArgs> for ::windows::core::IInspectable { fn from(value: &CompositionBatchCompletedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionBatchCompletedEventArgs> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionBatchCompletedEventArgs) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionBatchCompletedEventArgs> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionBatchCompletedEventArgs) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionBatchCompletedEventArgs> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionBatchCompletedEventArgs) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionBatchCompletedEventArgs> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionBatchCompletedEventArgs) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionBatchCompletedEventArgs> for CompositionObject { fn from(value: CompositionBatchCompletedEventArgs) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionBatchCompletedEventArgs> for CompositionObject { fn from(value: &CompositionBatchCompletedEventArgs) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionBatchCompletedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionBatchCompletedEventArgs {} unsafe impl ::core::marker::Sync for CompositionBatchCompletedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionBatchTypes(pub u32); impl CompositionBatchTypes { pub const None: CompositionBatchTypes = CompositionBatchTypes(0u32); pub const Animation: CompositionBatchTypes = CompositionBatchTypes(1u32); pub const Effect: CompositionBatchTypes = CompositionBatchTypes(2u32); pub const InfiniteAnimation: CompositionBatchTypes = CompositionBatchTypes(4u32); pub const AllAnimations: CompositionBatchTypes = CompositionBatchTypes(5u32); } impl ::core::convert::From<u32> for CompositionBatchTypes { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionBatchTypes { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionBatchTypes { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionBatchTypes;u4)"); } impl ::windows::core::DefaultType for CompositionBatchTypes { type DefaultType = Self; } impl ::core::ops::BitOr for CompositionBatchTypes { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CompositionBatchTypes { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CompositionBatchTypes { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CompositionBatchTypes { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CompositionBatchTypes { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionBitmapInterpolationMode(pub i32); impl CompositionBitmapInterpolationMode { pub const NearestNeighbor: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(0i32); pub const Linear: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(1i32); pub const MagLinearMinLinearMipLinear: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(2i32); pub const MagLinearMinLinearMipNearest: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(3i32); pub const MagLinearMinNearestMipLinear: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(4i32); pub const MagLinearMinNearestMipNearest: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(5i32); pub const MagNearestMinLinearMipLinear: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(6i32); pub const MagNearestMinLinearMipNearest: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(7i32); pub const MagNearestMinNearestMipLinear: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(8i32); pub const MagNearestMinNearestMipNearest: CompositionBitmapInterpolationMode = CompositionBitmapInterpolationMode(9i32); } impl ::core::convert::From<i32> for CompositionBitmapInterpolationMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionBitmapInterpolationMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionBitmapInterpolationMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionBitmapInterpolationMode;i4)"); } impl ::windows::core::DefaultType for CompositionBitmapInterpolationMode { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionBorderMode(pub i32); impl CompositionBorderMode { pub const Inherit: CompositionBorderMode = CompositionBorderMode(0i32); pub const Soft: CompositionBorderMode = CompositionBorderMode(1i32); pub const Hard: CompositionBorderMode = CompositionBorderMode(2i32); } impl ::core::convert::From<i32> for CompositionBorderMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionBorderMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionBorderMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionBorderMode;i4)"); } impl ::windows::core::DefaultType for CompositionBorderMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionBrush(pub ::windows::core::IInspectable); impl CompositionBrush { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionBrush;{ab0d7608-30c0-40e9-b568-b60a6bd1fb46})"); } unsafe impl ::windows::core::Interface for CompositionBrush { type Vtable = ICompositionBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab0d7608_30c0_40e9_b568_b60a6bd1fb46); } impl ::windows::core::RuntimeName for CompositionBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionBrush"; } impl ::core::convert::From<CompositionBrush> for ::windows::core::IUnknown { fn from(value: CompositionBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionBrush> for ::windows::core::IUnknown { fn from(value: &CompositionBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionBrush> for ::windows::core::IInspectable { fn from(value: CompositionBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionBrush> for ::windows::core::IInspectable { fn from(value: &CompositionBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionBrush> for CompositionObject { fn from(value: CompositionBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionBrush> for CompositionObject { fn from(value: &CompositionBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionBrush {} unsafe impl ::core::marker::Sync for CompositionBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionCapabilities(pub ::windows::core::IInspectable); impl CompositionCapabilities { pub fn AreEffectsSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn AreEffectsFast(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn Changed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CompositionCapabilities, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } pub fn GetForCurrentView() -> ::windows::core::Result<CompositionCapabilities> { Self::ICompositionCapabilitiesStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCapabilities>(result__) }) } pub fn ICompositionCapabilitiesStatics<R, F: FnOnce(&ICompositionCapabilitiesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionCapabilities, ICompositionCapabilitiesStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionCapabilities;{8253353e-b517-48bc-b1e8-4b3561a2e181})"); } unsafe impl ::windows::core::Interface for CompositionCapabilities { type Vtable = ICompositionCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8253353e_b517_48bc_b1e8_4b3561a2e181); } impl ::windows::core::RuntimeName for CompositionCapabilities { const NAME: &'static str = "Windows.UI.Composition.CompositionCapabilities"; } impl ::core::convert::From<CompositionCapabilities> for ::windows::core::IUnknown { fn from(value: CompositionCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionCapabilities> for ::windows::core::IUnknown { fn from(value: &CompositionCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionCapabilities> for ::windows::core::IInspectable { fn from(value: CompositionCapabilities) -> Self { value.0 } } impl ::core::convert::From<&CompositionCapabilities> for ::windows::core::IInspectable { fn from(value: &CompositionCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CompositionCapabilities {} unsafe impl ::core::marker::Sync for CompositionCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionClip(pub ::windows::core::IInspectable); impl CompositionClip { #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionClip { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionClip;{1ccd2a52-cfc7-4ace-9983-146bb8eb6a3c})"); } unsafe impl ::windows::core::Interface for CompositionClip { type Vtable = ICompositionClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1ccd2a52_cfc7_4ace_9983_146bb8eb6a3c); } impl ::windows::core::RuntimeName for CompositionClip { const NAME: &'static str = "Windows.UI.Composition.CompositionClip"; } impl ::core::convert::From<CompositionClip> for ::windows::core::IUnknown { fn from(value: CompositionClip) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionClip> for ::windows::core::IUnknown { fn from(value: &CompositionClip) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionClip> for ::windows::core::IInspectable { fn from(value: CompositionClip) -> Self { value.0 } } impl ::core::convert::From<&CompositionClip> for ::windows::core::IInspectable { fn from(value: &CompositionClip) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionClip> for CompositionObject { fn from(value: CompositionClip) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionClip> for CompositionObject { fn from(value: &CompositionClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionClip {} unsafe impl ::core::marker::Sync for CompositionClip {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionColorBrush(pub ::windows::core::IInspectable); impl CompositionColorBrush { pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionColorBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionColorBrush;{2b264c5e-bf35-4831-8642-cf70c20fff2f})"); } unsafe impl ::windows::core::Interface for CompositionColorBrush { type Vtable = ICompositionColorBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2b264c5e_bf35_4831_8642_cf70c20fff2f); } impl ::windows::core::RuntimeName for CompositionColorBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionColorBrush"; } impl ::core::convert::From<CompositionColorBrush> for ::windows::core::IUnknown { fn from(value: CompositionColorBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionColorBrush> for ::windows::core::IUnknown { fn from(value: &CompositionColorBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionColorBrush> for ::windows::core::IInspectable { fn from(value: CompositionColorBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionColorBrush> for ::windows::core::IInspectable { fn from(value: &CompositionColorBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionColorBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionColorBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionColorBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionColorBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionColorBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionColorBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionColorBrush> for CompositionBrush { fn from(value: CompositionColorBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionColorBrush> for CompositionBrush { fn from(value: &CompositionColorBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionColorBrush> for CompositionObject { fn from(value: CompositionColorBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionColorBrush> for CompositionObject { fn from(value: &CompositionColorBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionColorBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionColorBrush {} unsafe impl ::core::marker::Sync for CompositionColorBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionColorGradientStop(pub ::windows::core::IInspectable); impl CompositionColorGradientStop { pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Offset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionColorGradientStop { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionColorGradientStop;{6f00ca92-c801-4e41-9a8f-a53e20f57778})"); } unsafe impl ::windows::core::Interface for CompositionColorGradientStop { type Vtable = ICompositionColorGradientStop_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6f00ca92_c801_4e41_9a8f_a53e20f57778); } impl ::windows::core::RuntimeName for CompositionColorGradientStop { const NAME: &'static str = "Windows.UI.Composition.CompositionColorGradientStop"; } impl ::core::convert::From<CompositionColorGradientStop> for ::windows::core::IUnknown { fn from(value: CompositionColorGradientStop) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionColorGradientStop> for ::windows::core::IUnknown { fn from(value: &CompositionColorGradientStop) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionColorGradientStop> for ::windows::core::IInspectable { fn from(value: CompositionColorGradientStop) -> Self { value.0 } } impl ::core::convert::From<&CompositionColorGradientStop> for ::windows::core::IInspectable { fn from(value: &CompositionColorGradientStop) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionColorGradientStop> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionColorGradientStop) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionColorGradientStop> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorGradientStop) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionColorGradientStop> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionColorGradientStop) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionColorGradientStop> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorGradientStop) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionColorGradientStop> for CompositionObject { fn from(value: CompositionColorGradientStop) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionColorGradientStop> for CompositionObject { fn from(value: &CompositionColorGradientStop) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionColorGradientStop { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionColorGradientStop {} unsafe impl ::core::marker::Sync for CompositionColorGradientStop {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionColorGradientStopCollection(pub ::windows::core::IInspectable); impl CompositionColorGradientStopCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<CompositionColorGradientStop>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<CompositionColorGradientStop>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetAt(&self, index: u32) -> ::windows::core::Result<CompositionColorGradientStop> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<CompositionColorGradientStop>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Size(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetView(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<CompositionColorGradientStop>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<CompositionColorGradientStop>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn IndexOf<'a, Param0: ::windows::core::IntoParam<'a, CompositionColorGradientStop>>(&self, value: Param0, index: &mut u32) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SetAt<'a, Param1: ::windows::core::IntoParam<'a, CompositionColorGradientStop>>(&self, index: u32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), index, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InsertAt<'a, Param1: ::windows::core::IntoParam<'a, CompositionColorGradientStop>>(&self, index: u32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), index, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAt(&self, index: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), index).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Append<'a, Param0: ::windows::core::IntoParam<'a, CompositionColorGradientStop>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAtEnd(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Clear(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn GetMany(&self, startindex: u32, items: &mut [<CompositionColorGradientStop as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[<CompositionColorGradientStop as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionColorGradientStopCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionColorGradientStopCollection;{9f1d20ec-7b04-4b1d-90bc-9fa32c0cfd26})"); } unsafe impl ::windows::core::Interface for CompositionColorGradientStopCollection { type Vtable = ICompositionColorGradientStopCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f1d20ec_7b04_4b1d_90bc_9fa32c0cfd26); } impl ::windows::core::RuntimeName for CompositionColorGradientStopCollection { const NAME: &'static str = "Windows.UI.Composition.CompositionColorGradientStopCollection"; } impl ::core::convert::From<CompositionColorGradientStopCollection> for ::windows::core::IUnknown { fn from(value: CompositionColorGradientStopCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionColorGradientStopCollection> for ::windows::core::IUnknown { fn from(value: &CompositionColorGradientStopCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionColorGradientStopCollection> for ::windows::core::IInspectable { fn from(value: CompositionColorGradientStopCollection) -> Self { value.0 } } impl ::core::convert::From<&CompositionColorGradientStopCollection> for ::windows::core::IInspectable { fn from(value: &CompositionColorGradientStopCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionColorGradientStopCollection> for super::super::Foundation::Collections::IIterable<CompositionColorGradientStop> { type Error = ::windows::core::Error; fn try_from(value: CompositionColorGradientStopCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionColorGradientStopCollection> for super::super::Foundation::Collections::IIterable<CompositionColorGradientStop> { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorGradientStopCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>> for CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>> for &CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<CompositionColorGradientStop>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionColorGradientStopCollection> for super::super::Foundation::Collections::IVector<CompositionColorGradientStop> { type Error = ::windows::core::Error; fn try_from(value: CompositionColorGradientStopCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionColorGradientStopCollection> for super::super::Foundation::Collections::IVector<CompositionColorGradientStop> { type Error = ::windows::core::Error; fn try_from(value: &CompositionColorGradientStopCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<CompositionColorGradientStop>> for CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<CompositionColorGradientStop>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<CompositionColorGradientStop>> for &CompositionColorGradientStopCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<CompositionColorGradientStop>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IVector<CompositionColorGradientStop>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for CompositionColorGradientStopCollection {} unsafe impl ::core::marker::Sync for CompositionColorGradientStopCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionColorGradientStopCollection { type Item = CompositionColorGradientStop; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionColorGradientStopCollection { type Item = CompositionColorGradientStop; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { super::super::Foundation::Collections::VectorIterator::new(::core::convert::TryInto::try_into(self).ok()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionColorSpace(pub i32); impl CompositionColorSpace { pub const Auto: CompositionColorSpace = CompositionColorSpace(0i32); pub const Hsl: CompositionColorSpace = CompositionColorSpace(1i32); pub const Rgb: CompositionColorSpace = CompositionColorSpace(2i32); pub const HslLinear: CompositionColorSpace = CompositionColorSpace(3i32); pub const RgbLinear: CompositionColorSpace = CompositionColorSpace(4i32); } impl ::core::convert::From<i32> for CompositionColorSpace { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionColorSpace { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionColorSpace { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionColorSpace;i4)"); } impl ::windows::core::DefaultType for CompositionColorSpace { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionCommitBatch(pub ::windows::core::IInspectable); impl CompositionCommitBatch { pub fn IsActive(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsEnded(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn Completed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionCommitBatch { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionCommitBatch;{0d00dad0-ca07-4400-8c8e-cb5db08559cc})"); } unsafe impl ::windows::core::Interface for CompositionCommitBatch { type Vtable = ICompositionCommitBatch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_ca07_4400_8c8e_cb5db08559cc); } impl ::windows::core::RuntimeName for CompositionCommitBatch { const NAME: &'static str = "Windows.UI.Composition.CompositionCommitBatch"; } impl ::core::convert::From<CompositionCommitBatch> for ::windows::core::IUnknown { fn from(value: CompositionCommitBatch) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionCommitBatch> for ::windows::core::IUnknown { fn from(value: &CompositionCommitBatch) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionCommitBatch> for ::windows::core::IInspectable { fn from(value: CompositionCommitBatch) -> Self { value.0 } } impl ::core::convert::From<&CompositionCommitBatch> for ::windows::core::IInspectable { fn from(value: &CompositionCommitBatch) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionCommitBatch> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionCommitBatch) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionCommitBatch> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionCommitBatch) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionCommitBatch> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionCommitBatch) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionCommitBatch> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionCommitBatch) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionCommitBatch> for CompositionObject { fn from(value: CompositionCommitBatch) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionCommitBatch> for CompositionObject { fn from(value: &CompositionCommitBatch) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionCommitBatch { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionCommitBatch {} unsafe impl ::core::marker::Sync for CompositionCommitBatch {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionCompositeMode(pub i32); impl CompositionCompositeMode { pub const Inherit: CompositionCompositeMode = CompositionCompositeMode(0i32); pub const SourceOver: CompositionCompositeMode = CompositionCompositeMode(1i32); pub const DestinationInvert: CompositionCompositeMode = CompositionCompositeMode(2i32); pub const MinBlend: CompositionCompositeMode = CompositionCompositeMode(3i32); } impl ::core::convert::From<i32> for CompositionCompositeMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionCompositeMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionCompositeMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionCompositeMode;i4)"); } impl ::windows::core::DefaultType for CompositionCompositeMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionContainerShape(pub ::windows::core::IInspectable); impl CompositionContainerShape { #[cfg(feature = "Foundation_Collections")] pub fn Shapes(&self) -> ::windows::core::Result<CompositionShapeCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionShapeCollection>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionContainerShape { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionContainerShape;{4f5e859b-2e5b-44a8-982c-aa0f69c16059})"); } unsafe impl ::windows::core::Interface for CompositionContainerShape { type Vtable = ICompositionContainerShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4f5e859b_2e5b_44a8_982c_aa0f69c16059); } impl ::windows::core::RuntimeName for CompositionContainerShape { const NAME: &'static str = "Windows.UI.Composition.CompositionContainerShape"; } impl ::core::convert::From<CompositionContainerShape> for ::windows::core::IUnknown { fn from(value: CompositionContainerShape) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionContainerShape> for ::windows::core::IUnknown { fn from(value: &CompositionContainerShape) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionContainerShape> for ::windows::core::IInspectable { fn from(value: CompositionContainerShape) -> Self { value.0 } } impl ::core::convert::From<&CompositionContainerShape> for ::windows::core::IInspectable { fn from(value: &CompositionContainerShape) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionContainerShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionContainerShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionContainerShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionContainerShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionContainerShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionContainerShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionContainerShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionContainerShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionContainerShape> for CompositionShape { fn from(value: CompositionContainerShape) -> Self { ::core::convert::Into::<CompositionShape>::into(&value) } } impl ::core::convert::From<&CompositionContainerShape> for CompositionShape { fn from(value: &CompositionContainerShape) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionShape> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionShape> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShape>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionShape> for &CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionShape> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShape>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionContainerShape> for CompositionObject { fn from(value: CompositionContainerShape) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionContainerShape> for CompositionObject { fn from(value: &CompositionContainerShape) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionContainerShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionContainerShape {} unsafe impl ::core::marker::Sync for CompositionContainerShape {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionDrawingSurface(pub ::windows::core::IInspectable); impl CompositionDrawingSurface { #[cfg(feature = "Graphics_DirectX")] pub fn AlphaMode(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXAlphaMode> { let this = self; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXAlphaMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXAlphaMode>(result__) } } #[cfg(feature = "Graphics_DirectX")] pub fn PixelFormat(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXPixelFormat> { let this = self; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXPixelFormat = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXPixelFormat>(result__) } } #[cfg(feature = "Foundation")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Size> { let this = self; unsafe { let mut result__: super::super::Foundation::Size = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Graphics")] pub fn SizeInt32(&self) -> ::windows::core::Result<super::super::Graphics::SizeInt32> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { let mut result__: super::super::Graphics::SizeInt32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::SizeInt32>(result__) } } #[cfg(feature = "Graphics")] pub fn Resize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, sizepixels: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), sizepixels.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn Scroll<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>>(&self, offset: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), offset.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollRect<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, scrollrect: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), offset.into_param().abi(), scrollrect.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollWithClip<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, cliprect: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), offset.into_param().abi(), cliprect.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollRectWithClip<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>, Param2: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, cliprect: Param1, scrollrect: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), offset.into_param().abi(), cliprect.into_param().abi(), scrollrect.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionDrawingSurface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionDrawingSurface;{a166c300-fad0-4d11-9e67-e433162ff49e})"); } unsafe impl ::windows::core::Interface for CompositionDrawingSurface { type Vtable = ICompositionDrawingSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa166c300_fad0_4d11_9e67_e433162ff49e); } impl ::windows::core::RuntimeName for CompositionDrawingSurface { const NAME: &'static str = "Windows.UI.Composition.CompositionDrawingSurface"; } impl ::core::convert::From<CompositionDrawingSurface> for ::windows::core::IUnknown { fn from(value: CompositionDrawingSurface) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionDrawingSurface> for ::windows::core::IUnknown { fn from(value: &CompositionDrawingSurface) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionDrawingSurface> for ::windows::core::IInspectable { fn from(value: CompositionDrawingSurface) -> Self { value.0 } } impl ::core::convert::From<&CompositionDrawingSurface> for ::windows::core::IInspectable { fn from(value: &CompositionDrawingSurface) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<CompositionDrawingSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionDrawingSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: &CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for &CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::core::convert::TryInto::<ICompositionSurface>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionDrawingSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionDrawingSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionDrawingSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionDrawingSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionDrawingSurface> for CompositionObject { fn from(value: CompositionDrawingSurface) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionDrawingSurface> for CompositionObject { fn from(value: &CompositionDrawingSurface) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionDrawingSurface {} unsafe impl ::core::marker::Sync for CompositionDrawingSurface {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionDropShadowSourcePolicy(pub i32); impl CompositionDropShadowSourcePolicy { pub const Default: CompositionDropShadowSourcePolicy = CompositionDropShadowSourcePolicy(0i32); pub const InheritFromVisualContent: CompositionDropShadowSourcePolicy = CompositionDropShadowSourcePolicy(1i32); } impl ::core::convert::From<i32> for CompositionDropShadowSourcePolicy { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionDropShadowSourcePolicy { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionDropShadowSourcePolicy { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionDropShadowSourcePolicy;i4)"); } impl ::windows::core::DefaultType for CompositionDropShadowSourcePolicy { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionEasingFunction(pub ::windows::core::IInspectable); impl CompositionEasingFunction { #[cfg(feature = "Foundation_Numerics")] pub fn CreateCubicBezierEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(owner: Param0, controlpoint1: Param1, controlpoint2: Param2) -> ::windows::core::Result<CubicBezierEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), owner.into_param().abi(), controlpoint1.into_param().abi(), controlpoint2.into_param().abi(), &mut result__).from_abi::<CubicBezierEasingFunction>(result__) }) } pub fn CreateLinearEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0) -> ::windows::core::Result<LinearEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), owner.into_param().abi(), &mut result__).from_abi::<LinearEasingFunction>(result__) }) } pub fn CreateStepEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0) -> ::windows::core::Result<StepEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), owner.into_param().abi(), &mut result__).from_abi::<StepEasingFunction>(result__) }) } pub fn CreateStepEasingFunctionWithStepCount<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, stepcount: i32) -> ::windows::core::Result<StepEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), owner.into_param().abi(), stepcount, &mut result__).from_abi::<StepEasingFunction>(result__) }) } pub fn CreateBackEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode, amplitude: f32) -> ::windows::core::Result<BackEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, amplitude, &mut result__).from_abi::<BackEasingFunction>(result__) }) } pub fn CreateBounceEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode, bounces: i32, bounciness: f32) -> ::windows::core::Result<BounceEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, bounces, bounciness, &mut result__).from_abi::<BounceEasingFunction>(result__) }) } pub fn CreateCircleEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode) -> ::windows::core::Result<CircleEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, &mut result__).from_abi::<CircleEasingFunction>(result__) }) } pub fn CreateElasticEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32) -> ::windows::core::Result<ElasticEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, oscillations, springiness, &mut result__).from_abi::<ElasticEasingFunction>(result__) }) } pub fn CreateExponentialEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode, exponent: f32) -> ::windows::core::Result<ExponentialEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, exponent, &mut result__).from_abi::<ExponentialEasingFunction>(result__) }) } pub fn CreatePowerEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode, power: f32) -> ::windows::core::Result<PowerEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, power, &mut result__).from_abi::<PowerEasingFunction>(result__) }) } pub fn CreateSineEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(owner: Param0, mode: CompositionEasingFunctionMode) -> ::windows::core::Result<SineEasingFunction> { Self::ICompositionEasingFunctionStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), owner.into_param().abi(), mode, &mut result__).from_abi::<SineEasingFunction>(result__) }) } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn ICompositionEasingFunctionStatics<R, F: FnOnce(&ICompositionEasingFunctionStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionEasingFunction, ICompositionEasingFunctionStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionEasingFunction;{5145e356-bf79-4ea8-8cc2-6b5b472e6c9a})"); } unsafe impl ::windows::core::Interface for CompositionEasingFunction { type Vtable = ICompositionEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5145e356_bf79_4ea8_8cc2_6b5b472e6c9a); } impl ::windows::core::RuntimeName for CompositionEasingFunction { const NAME: &'static str = "Windows.UI.Composition.CompositionEasingFunction"; } impl ::core::convert::From<CompositionEasingFunction> for ::windows::core::IUnknown { fn from(value: CompositionEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionEasingFunction> for ::windows::core::IUnknown { fn from(value: &CompositionEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionEasingFunction> for ::windows::core::IInspectable { fn from(value: CompositionEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&CompositionEasingFunction> for ::windows::core::IInspectable { fn from(value: &CompositionEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionEasingFunction> for CompositionObject { fn from(value: CompositionEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionEasingFunction> for CompositionObject { fn from(value: &CompositionEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionEasingFunction {} unsafe impl ::core::marker::Sync for CompositionEasingFunction {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionEasingFunctionMode(pub i32); impl CompositionEasingFunctionMode { pub const In: CompositionEasingFunctionMode = CompositionEasingFunctionMode(0i32); pub const Out: CompositionEasingFunctionMode = CompositionEasingFunctionMode(1i32); pub const InOut: CompositionEasingFunctionMode = CompositionEasingFunctionMode(2i32); } impl ::core::convert::From<i32> for CompositionEasingFunctionMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionEasingFunctionMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionEasingFunctionMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionEasingFunctionMode;i4)"); } impl ::windows::core::DefaultType for CompositionEasingFunctionMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionEffectBrush(pub ::windows::core::IInspectable); impl CompositionEffectBrush { pub fn GetSourceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), name.into_param().abi(), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetSourceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, name: Param0, source: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), name.into_param().abi(), source.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionEffectBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionEffectBrush;{bf7f795e-83cc-44bf-a447-3e3c071789ec})"); } unsafe impl ::windows::core::Interface for CompositionEffectBrush { type Vtable = ICompositionEffectBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbf7f795e_83cc_44bf_a447_3e3c071789ec); } impl ::windows::core::RuntimeName for CompositionEffectBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionEffectBrush"; } impl ::core::convert::From<CompositionEffectBrush> for ::windows::core::IUnknown { fn from(value: CompositionEffectBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionEffectBrush> for ::windows::core::IUnknown { fn from(value: &CompositionEffectBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionEffectBrush> for ::windows::core::IInspectable { fn from(value: CompositionEffectBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionEffectBrush> for ::windows::core::IInspectable { fn from(value: &CompositionEffectBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionEffectBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionEffectBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionEffectBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionEffectBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionEffectBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionEffectBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionEffectBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionEffectBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionEffectBrush> for CompositionBrush { fn from(value: CompositionEffectBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionEffectBrush> for CompositionBrush { fn from(value: &CompositionEffectBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionEffectBrush> for CompositionObject { fn from(value: CompositionEffectBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionEffectBrush> for CompositionObject { fn from(value: &CompositionEffectBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionEffectBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionEffectBrush {} unsafe impl ::core::marker::Sync for CompositionEffectBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionEffectFactory(pub ::windows::core::IInspectable); impl CompositionEffectFactory { pub fn CreateBrush(&self) -> ::windows::core::Result<CompositionEffectBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEffectBrush>(result__) } } pub fn ExtendedError(&self) -> ::windows::core::Result<::windows::core::HRESULT> { let this = self; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HRESULT>(result__) } } pub fn LoadStatus(&self) -> ::windows::core::Result<CompositionEffectFactoryLoadStatus> { let this = self; unsafe { let mut result__: CompositionEffectFactoryLoadStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEffectFactoryLoadStatus>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionEffectFactory { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionEffectFactory;{be5624af-ba7e-4510-9850-41c0b4ff74df})"); } unsafe impl ::windows::core::Interface for CompositionEffectFactory { type Vtable = ICompositionEffectFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe5624af_ba7e_4510_9850_41c0b4ff74df); } impl ::windows::core::RuntimeName for CompositionEffectFactory { const NAME: &'static str = "Windows.UI.Composition.CompositionEffectFactory"; } impl ::core::convert::From<CompositionEffectFactory> for ::windows::core::IUnknown { fn from(value: CompositionEffectFactory) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionEffectFactory> for ::windows::core::IUnknown { fn from(value: &CompositionEffectFactory) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionEffectFactory> for ::windows::core::IInspectable { fn from(value: CompositionEffectFactory) -> Self { value.0 } } impl ::core::convert::From<&CompositionEffectFactory> for ::windows::core::IInspectable { fn from(value: &CompositionEffectFactory) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionEffectFactory> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionEffectFactory) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionEffectFactory> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionEffectFactory) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionEffectFactory> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionEffectFactory) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionEffectFactory> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionEffectFactory) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionEffectFactory> for CompositionObject { fn from(value: CompositionEffectFactory) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionEffectFactory> for CompositionObject { fn from(value: &CompositionEffectFactory) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionEffectFactory { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionEffectFactory {} unsafe impl ::core::marker::Sync for CompositionEffectFactory {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionEffectFactoryLoadStatus(pub i32); impl CompositionEffectFactoryLoadStatus { pub const Success: CompositionEffectFactoryLoadStatus = CompositionEffectFactoryLoadStatus(0i32); pub const EffectTooComplex: CompositionEffectFactoryLoadStatus = CompositionEffectFactoryLoadStatus(1i32); pub const Pending: CompositionEffectFactoryLoadStatus = CompositionEffectFactoryLoadStatus(2i32); pub const Other: CompositionEffectFactoryLoadStatus = CompositionEffectFactoryLoadStatus(-1i32); } impl ::core::convert::From<i32> for CompositionEffectFactoryLoadStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionEffectFactoryLoadStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionEffectFactoryLoadStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionEffectFactoryLoadStatus;i4)"); } impl ::windows::core::DefaultType for CompositionEffectFactoryLoadStatus { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionEffectSourceParameter(pub ::windows::core::IInspectable); impl CompositionEffectSourceParameter { pub fn Name(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Create<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(name: Param0) -> ::windows::core::Result<CompositionEffectSourceParameter> { Self::ICompositionEffectSourceParameterFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), name.into_param().abi(), &mut result__).from_abi::<CompositionEffectSourceParameter>(result__) }) } pub fn ICompositionEffectSourceParameterFactory<R, F: FnOnce(&ICompositionEffectSourceParameterFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionEffectSourceParameter, ICompositionEffectSourceParameterFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionEffectSourceParameter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionEffectSourceParameter;{858ab13a-3292-4e4e-b3bb-2b6c6544a6ee})"); } unsafe impl ::windows::core::Interface for CompositionEffectSourceParameter { type Vtable = ICompositionEffectSourceParameter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x858ab13a_3292_4e4e_b3bb_2b6c6544a6ee); } impl ::windows::core::RuntimeName for CompositionEffectSourceParameter { const NAME: &'static str = "Windows.UI.Composition.CompositionEffectSourceParameter"; } impl ::core::convert::From<CompositionEffectSourceParameter> for ::windows::core::IUnknown { fn from(value: CompositionEffectSourceParameter) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionEffectSourceParameter> for ::windows::core::IUnknown { fn from(value: &CompositionEffectSourceParameter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionEffectSourceParameter> for ::windows::core::IInspectable { fn from(value: CompositionEffectSourceParameter) -> Self { value.0 } } impl ::core::convert::From<&CompositionEffectSourceParameter> for ::windows::core::IInspectable { fn from(value: &CompositionEffectSourceParameter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Graphics_Effects")] impl ::core::convert::TryFrom<CompositionEffectSourceParameter> for super::super::Graphics::Effects::IGraphicsEffectSource { type Error = ::windows::core::Error; fn try_from(value: CompositionEffectSourceParameter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Graphics_Effects")] impl ::core::convert::TryFrom<&CompositionEffectSourceParameter> for super::super::Graphics::Effects::IGraphicsEffectSource { type Error = ::windows::core::Error; fn try_from(value: &CompositionEffectSourceParameter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Graphics_Effects")] impl<'a> ::windows::core::IntoParam<'a, super::super::Graphics::Effects::IGraphicsEffectSource> for CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, super::super::Graphics::Effects::IGraphicsEffectSource> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Graphics_Effects")] impl<'a> ::windows::core::IntoParam<'a, super::super::Graphics::Effects::IGraphicsEffectSource> for &CompositionEffectSourceParameter { fn into_param(self) -> ::windows::core::Param<'a, super::super::Graphics::Effects::IGraphicsEffectSource> { ::core::convert::TryInto::<super::super::Graphics::Effects::IGraphicsEffectSource>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for CompositionEffectSourceParameter {} unsafe impl ::core::marker::Sync for CompositionEffectSourceParameter {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionEllipseGeometry(pub ::windows::core::IInspectable); impl CompositionEllipseGeometry { #[cfg(feature = "Foundation_Numerics")] pub fn Center(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenter<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Radius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionEllipseGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionEllipseGeometry;{4801f884-f6ad-4b93-afa9-897b64e57b1f})"); } unsafe impl ::windows::core::Interface for CompositionEllipseGeometry { type Vtable = ICompositionEllipseGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4801f884_f6ad_4b93_afa9_897b64e57b1f); } impl ::windows::core::RuntimeName for CompositionEllipseGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionEllipseGeometry"; } impl ::core::convert::From<CompositionEllipseGeometry> for ::windows::core::IUnknown { fn from(value: CompositionEllipseGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionEllipseGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionEllipseGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionEllipseGeometry> for ::windows::core::IInspectable { fn from(value: CompositionEllipseGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionEllipseGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionEllipseGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionEllipseGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionEllipseGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionEllipseGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionEllipseGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionEllipseGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionEllipseGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionEllipseGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionEllipseGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionEllipseGeometry> for CompositionGeometry { fn from(value: CompositionEllipseGeometry) -> Self { ::core::convert::Into::<CompositionGeometry>::into(&value) } } impl ::core::convert::From<&CompositionEllipseGeometry> for CompositionGeometry { fn from(value: &CompositionEllipseGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for &CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionEllipseGeometry> for CompositionObject { fn from(value: CompositionEllipseGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionEllipseGeometry> for CompositionObject { fn from(value: &CompositionEllipseGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionEllipseGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionEllipseGeometry {} unsafe impl ::core::marker::Sync for CompositionEllipseGeometry {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionGeometricClip(pub ::windows::core::IInspectable); impl CompositionGeometricClip { pub fn Geometry(&self) -> ::windows::core::Result<CompositionGeometry> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGeometry>(result__) } } pub fn SetGeometry<'a, Param0: ::windows::core::IntoParam<'a, CompositionGeometry>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ViewBox(&self) -> ::windows::core::Result<CompositionViewBox> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionViewBox>(result__) } } pub fn SetViewBox<'a, Param0: ::windows::core::IntoParam<'a, CompositionViewBox>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionGeometricClip { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionGeometricClip;{c840b581-81c9-4444-a2c1-ccaece3a50e5})"); } unsafe impl ::windows::core::Interface for CompositionGeometricClip { type Vtable = ICompositionGeometricClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc840b581_81c9_4444_a2c1_ccaece3a50e5); } impl ::windows::core::RuntimeName for CompositionGeometricClip { const NAME: &'static str = "Windows.UI.Composition.CompositionGeometricClip"; } impl ::core::convert::From<CompositionGeometricClip> for ::windows::core::IUnknown { fn from(value: CompositionGeometricClip) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionGeometricClip> for ::windows::core::IUnknown { fn from(value: &CompositionGeometricClip) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionGeometricClip> for ::windows::core::IInspectable { fn from(value: CompositionGeometricClip) -> Self { value.0 } } impl ::core::convert::From<&CompositionGeometricClip> for ::windows::core::IInspectable { fn from(value: &CompositionGeometricClip) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionGeometricClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionGeometricClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionGeometricClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionGeometricClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionGeometricClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionGeometricClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionGeometricClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionGeometricClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionGeometricClip> for CompositionClip { fn from(value: CompositionGeometricClip) -> Self { ::core::convert::Into::<CompositionClip>::into(&value) } } impl ::core::convert::From<&CompositionGeometricClip> for CompositionClip { fn from(value: &CompositionGeometricClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for &CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionGeometricClip> for CompositionObject { fn from(value: CompositionGeometricClip) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionGeometricClip> for CompositionObject { fn from(value: &CompositionGeometricClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionGeometricClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionGeometricClip {} unsafe impl ::core::marker::Sync for CompositionGeometricClip {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionGeometry(pub ::windows::core::IInspectable); impl CompositionGeometry { pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionGeometry;{e985217c-6a17-4207-abd8-5fd3dd612a9d})"); } unsafe impl ::windows::core::Interface for CompositionGeometry { type Vtable = ICompositionGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe985217c_6a17_4207_abd8_5fd3dd612a9d); } impl ::windows::core::RuntimeName for CompositionGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionGeometry"; } impl ::core::convert::From<CompositionGeometry> for ::windows::core::IUnknown { fn from(value: CompositionGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionGeometry> for ::windows::core::IInspectable { fn from(value: CompositionGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionGeometry> for CompositionObject { fn from(value: CompositionGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionGeometry> for CompositionObject { fn from(value: &CompositionGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionGeometry {} unsafe impl ::core::marker::Sync for CompositionGeometry {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionGetValueStatus(pub i32); impl CompositionGetValueStatus { pub const Succeeded: CompositionGetValueStatus = CompositionGetValueStatus(0i32); pub const TypeMismatch: CompositionGetValueStatus = CompositionGetValueStatus(1i32); pub const NotFound: CompositionGetValueStatus = CompositionGetValueStatus(2i32); } impl ::core::convert::From<i32> for CompositionGetValueStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionGetValueStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionGetValueStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionGetValueStatus;i4)"); } impl ::windows::core::DefaultType for CompositionGetValueStatus { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionGradientBrush(pub ::windows::core::IInspectable); impl CompositionGradientBrush { #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ColorStops(&self) -> ::windows::core::Result<CompositionColorGradientStopCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorGradientStopCollection>(result__) } } pub fn ExtendMode(&self) -> ::windows::core::Result<CompositionGradientExtendMode> { let this = self; unsafe { let mut result__: CompositionGradientExtendMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGradientExtendMode>(result__) } } pub fn SetExtendMode(&self, value: CompositionGradientExtendMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } pub fn InterpolationSpace(&self) -> ::windows::core::Result<CompositionColorSpace> { let this = self; unsafe { let mut result__: CompositionColorSpace = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorSpace>(result__) } } pub fn SetInterpolationSpace(&self, value: CompositionColorSpace) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn MappingMode(&self) -> ::windows::core::Result<CompositionMappingMode> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { let mut result__: CompositionMappingMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionMappingMode>(result__) } } pub fn SetMappingMode(&self, value: CompositionMappingMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionGradientBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionGradientBrush;{1d9709e0-ffc6-4c0e-a9ab-34144d4c9098})"); } unsafe impl ::windows::core::Interface for CompositionGradientBrush { type Vtable = ICompositionGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1d9709e0_ffc6_4c0e_a9ab_34144d4c9098); } impl ::windows::core::RuntimeName for CompositionGradientBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionGradientBrush"; } impl ::core::convert::From<CompositionGradientBrush> for ::windows::core::IUnknown { fn from(value: CompositionGradientBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionGradientBrush> for ::windows::core::IUnknown { fn from(value: &CompositionGradientBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionGradientBrush> for ::windows::core::IInspectable { fn from(value: CompositionGradientBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionGradientBrush> for ::windows::core::IInspectable { fn from(value: &CompositionGradientBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionGradientBrush> for CompositionBrush { fn from(value: CompositionGradientBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionGradientBrush> for CompositionBrush { fn from(value: &CompositionGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionGradientBrush> for CompositionObject { fn from(value: CompositionGradientBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionGradientBrush> for CompositionObject { fn from(value: &CompositionGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionGradientBrush {} unsafe impl ::core::marker::Sync for CompositionGradientBrush {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionGradientExtendMode(pub i32); impl CompositionGradientExtendMode { pub const Clamp: CompositionGradientExtendMode = CompositionGradientExtendMode(0i32); pub const Wrap: CompositionGradientExtendMode = CompositionGradientExtendMode(1i32); pub const Mirror: CompositionGradientExtendMode = CompositionGradientExtendMode(2i32); } impl ::core::convert::From<i32> for CompositionGradientExtendMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionGradientExtendMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionGradientExtendMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionGradientExtendMode;i4)"); } impl ::windows::core::DefaultType for CompositionGradientExtendMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionGraphicsDevice(pub ::windows::core::IInspectable); impl CompositionGraphicsDevice { #[cfg(all(feature = "Foundation", feature = "Graphics_DirectX"))] pub fn CreateDrawingSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Size>>(&self, sizepixels: Param0, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::Result<CompositionDrawingSurface> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), sizepixels.into_param().abi(), pixelformat, alphamode, &mut result__).from_abi::<CompositionDrawingSurface>(result__) } } #[cfg(feature = "Foundation")] pub fn RenderingDeviceReplaced<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CompositionGraphicsDevice, RenderingDeviceReplacedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveRenderingDeviceReplaced<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub fn CreateDrawingSurface2<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, sizepixels: Param0, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::Result<CompositionDrawingSurface> { let this = &::windows::core::Interface::cast::<ICompositionGraphicsDevice2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), sizepixels.into_param().abi(), pixelformat, alphamode, &mut result__).from_abi::<CompositionDrawingSurface>(result__) } } #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub fn CreateVirtualDrawingSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, sizepixels: Param0, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::Result<CompositionVirtualDrawingSurface> { let this = &::windows::core::Interface::cast::<ICompositionGraphicsDevice2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), sizepixels.into_param().abi(), pixelformat, alphamode, &mut result__).from_abi::<CompositionVirtualDrawingSurface>(result__) } } #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub fn CreateMipmapSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, sizepixels: Param0, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::Result<CompositionMipmapSurface> { let this = &::windows::core::Interface::cast::<ICompositionGraphicsDevice3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), sizepixels.into_param().abi(), pixelformat, alphamode, &mut result__).from_abi::<CompositionMipmapSurface>(result__) } } pub fn Trim(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGraphicsDevice3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(all(feature = "Foundation", feature = "Graphics", feature = "Graphics_DirectX"))] pub fn CaptureAsync<'a, Param0: ::windows::core::IntoParam<'a, Visual>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, capturevisual: Param0, size: Param1, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, sdrboost: f32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ICompositionSurface>> { let this = &::windows::core::Interface::cast::<ICompositionGraphicsDevice4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), capturevisual.into_param().abi(), size.into_param().abi(), pixelformat, alphamode, sdrboost, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<ICompositionSurface>>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionGraphicsDevice { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionGraphicsDevice;{fb22c6e1-80a2-4667-9936-dbeaf6eefe95})"); } unsafe impl ::windows::core::Interface for CompositionGraphicsDevice { type Vtable = ICompositionGraphicsDevice_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfb22c6e1_80a2_4667_9936_dbeaf6eefe95); } impl ::windows::core::RuntimeName for CompositionGraphicsDevice { const NAME: &'static str = "Windows.UI.Composition.CompositionGraphicsDevice"; } impl ::core::convert::From<CompositionGraphicsDevice> for ::windows::core::IUnknown { fn from(value: CompositionGraphicsDevice) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionGraphicsDevice> for ::windows::core::IUnknown { fn from(value: &CompositionGraphicsDevice) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionGraphicsDevice> for ::windows::core::IInspectable { fn from(value: CompositionGraphicsDevice) -> Self { value.0 } } impl ::core::convert::From<&CompositionGraphicsDevice> for ::windows::core::IInspectable { fn from(value: &CompositionGraphicsDevice) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionGraphicsDevice> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionGraphicsDevice) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionGraphicsDevice> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionGraphicsDevice) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionGraphicsDevice> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionGraphicsDevice) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionGraphicsDevice> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionGraphicsDevice) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionGraphicsDevice> for CompositionObject { fn from(value: CompositionGraphicsDevice) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionGraphicsDevice> for CompositionObject { fn from(value: &CompositionGraphicsDevice) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionGraphicsDevice { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionGraphicsDevice {} unsafe impl ::core::marker::Sync for CompositionGraphicsDevice {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionLight(pub ::windows::core::IInspectable); impl CompositionLight { pub fn Targets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn ExclusionsFromTargets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionLight { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionLight;{41a6d7c2-2e5d-4bc1-b09e-8f0a03e3d8d3})"); } unsafe impl ::windows::core::Interface for CompositionLight { type Vtable = ICompositionLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x41a6d7c2_2e5d_4bc1_b09e_8f0a03e3d8d3); } impl ::windows::core::RuntimeName for CompositionLight { const NAME: &'static str = "Windows.UI.Composition.CompositionLight"; } impl ::core::convert::From<CompositionLight> for ::windows::core::IUnknown { fn from(value: CompositionLight) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionLight> for ::windows::core::IUnknown { fn from(value: &CompositionLight) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionLight> for ::windows::core::IInspectable { fn from(value: CompositionLight) -> Self { value.0 } } impl ::core::convert::From<&CompositionLight> for ::windows::core::IInspectable { fn from(value: &CompositionLight) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionLight> for CompositionObject { fn from(value: CompositionLight) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionLight> for CompositionObject { fn from(value: &CompositionLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionLight {} unsafe impl ::core::marker::Sync for CompositionLight {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionLineGeometry(pub ::windows::core::IInspectable); impl CompositionLineGeometry { #[cfg(feature = "Foundation_Numerics")] pub fn Start(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetStart<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn End(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetEnd<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionLineGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionLineGeometry;{dd7615a4-0c9a-4b67-8dce-440a5bf9cdec})"); } unsafe impl ::windows::core::Interface for CompositionLineGeometry { type Vtable = ICompositionLineGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdd7615a4_0c9a_4b67_8dce_440a5bf9cdec); } impl ::windows::core::RuntimeName for CompositionLineGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionLineGeometry"; } impl ::core::convert::From<CompositionLineGeometry> for ::windows::core::IUnknown { fn from(value: CompositionLineGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionLineGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionLineGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionLineGeometry> for ::windows::core::IInspectable { fn from(value: CompositionLineGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionLineGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionLineGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionLineGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionLineGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionLineGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionLineGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionLineGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionLineGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionLineGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionLineGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionLineGeometry> for CompositionGeometry { fn from(value: CompositionLineGeometry) -> Self { ::core::convert::Into::<CompositionGeometry>::into(&value) } } impl ::core::convert::From<&CompositionLineGeometry> for CompositionGeometry { fn from(value: &CompositionLineGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for &CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionLineGeometry> for CompositionObject { fn from(value: CompositionLineGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionLineGeometry> for CompositionObject { fn from(value: &CompositionLineGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionLineGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionLineGeometry {} unsafe impl ::core::marker::Sync for CompositionLineGeometry {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionLinearGradientBrush(pub ::windows::core::IInspectable); impl CompositionLinearGradientBrush { #[cfg(feature = "Foundation_Numerics")] pub fn EndPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetEndPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn StartPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetStartPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ColorStops(&self) -> ::windows::core::Result<CompositionColorGradientStopCollection> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorGradientStopCollection>(result__) } } pub fn ExtendMode(&self) -> ::windows::core::Result<CompositionGradientExtendMode> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: CompositionGradientExtendMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGradientExtendMode>(result__) } } pub fn SetExtendMode(&self, value: CompositionGradientExtendMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } pub fn InterpolationSpace(&self) -> ::windows::core::Result<CompositionColorSpace> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: CompositionColorSpace = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorSpace>(result__) } } pub fn SetInterpolationSpace(&self, value: CompositionColorSpace) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn MappingMode(&self) -> ::windows::core::Result<CompositionMappingMode> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { let mut result__: CompositionMappingMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionMappingMode>(result__) } } pub fn SetMappingMode(&self, value: CompositionMappingMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionLinearGradientBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionLinearGradientBrush;{983bc519-a9db-413c-a2d8-2a9056fc525e})"); } unsafe impl ::windows::core::Interface for CompositionLinearGradientBrush { type Vtable = ICompositionLinearGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x983bc519_a9db_413c_a2d8_2a9056fc525e); } impl ::windows::core::RuntimeName for CompositionLinearGradientBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionLinearGradientBrush"; } impl ::core::convert::From<CompositionLinearGradientBrush> for ::windows::core::IUnknown { fn from(value: CompositionLinearGradientBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionLinearGradientBrush> for ::windows::core::IUnknown { fn from(value: &CompositionLinearGradientBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionLinearGradientBrush> for ::windows::core::IInspectable { fn from(value: CompositionLinearGradientBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionLinearGradientBrush> for ::windows::core::IInspectable { fn from(value: &CompositionLinearGradientBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionLinearGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionLinearGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionLinearGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionLinearGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionLinearGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionLinearGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionLinearGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionLinearGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionLinearGradientBrush> for CompositionGradientBrush { fn from(value: CompositionLinearGradientBrush) -> Self { ::core::convert::Into::<CompositionGradientBrush>::into(&value) } } impl ::core::convert::From<&CompositionLinearGradientBrush> for CompositionGradientBrush { fn from(value: &CompositionLinearGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGradientBrush> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionGradientBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGradientBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGradientBrush> for &CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionGradientBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGradientBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionLinearGradientBrush> for CompositionBrush { fn from(value: CompositionLinearGradientBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionLinearGradientBrush> for CompositionBrush { fn from(value: &CompositionLinearGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionLinearGradientBrush> for CompositionObject { fn from(value: CompositionLinearGradientBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionLinearGradientBrush> for CompositionObject { fn from(value: &CompositionLinearGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionLinearGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionLinearGradientBrush {} unsafe impl ::core::marker::Sync for CompositionLinearGradientBrush {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionMappingMode(pub i32); impl CompositionMappingMode { pub const Absolute: CompositionMappingMode = CompositionMappingMode(0i32); pub const Relative: CompositionMappingMode = CompositionMappingMode(1i32); } impl ::core::convert::From<i32> for CompositionMappingMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionMappingMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionMappingMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionMappingMode;i4)"); } impl ::windows::core::DefaultType for CompositionMappingMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionMaskBrush(pub ::windows::core::IInspectable); impl CompositionMaskBrush { pub fn Mask(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetMask<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Source(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetSource<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionMaskBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionMaskBrush;{522cf09e-be6b-4f41-be49-f9226d471b4a})"); } unsafe impl ::windows::core::Interface for CompositionMaskBrush { type Vtable = ICompositionMaskBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x522cf09e_be6b_4f41_be49_f9226d471b4a); } impl ::windows::core::RuntimeName for CompositionMaskBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionMaskBrush"; } impl ::core::convert::From<CompositionMaskBrush> for ::windows::core::IUnknown { fn from(value: CompositionMaskBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionMaskBrush> for ::windows::core::IUnknown { fn from(value: &CompositionMaskBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionMaskBrush> for ::windows::core::IInspectable { fn from(value: CompositionMaskBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionMaskBrush> for ::windows::core::IInspectable { fn from(value: &CompositionMaskBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionMaskBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionMaskBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionMaskBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionMaskBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionMaskBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionMaskBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionMaskBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionMaskBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionMaskBrush> for CompositionBrush { fn from(value: CompositionMaskBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionMaskBrush> for CompositionBrush { fn from(value: &CompositionMaskBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionMaskBrush> for CompositionObject { fn from(value: CompositionMaskBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionMaskBrush> for CompositionObject { fn from(value: &CompositionMaskBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionMaskBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionMaskBrush {} unsafe impl ::core::marker::Sync for CompositionMaskBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionMipmapSurface(pub ::windows::core::IInspectable); impl CompositionMipmapSurface { pub fn LevelCount(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Graphics_DirectX")] pub fn AlphaMode(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXAlphaMode> { let this = self; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXAlphaMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXAlphaMode>(result__) } } #[cfg(feature = "Graphics_DirectX")] pub fn PixelFormat(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXPixelFormat> { let this = self; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXPixelFormat = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXPixelFormat>(result__) } } #[cfg(feature = "Graphics")] pub fn SizeInt32(&self) -> ::windows::core::Result<super::super::Graphics::SizeInt32> { let this = self; unsafe { let mut result__: super::super::Graphics::SizeInt32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::SizeInt32>(result__) } } pub fn GetDrawingSurfaceForLevel(&self, level: u32) -> ::windows::core::Result<CompositionDrawingSurface> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), level, &mut result__).from_abi::<CompositionDrawingSurface>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionMipmapSurface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionMipmapSurface;{4863675c-cf4a-4b1c-9ece-c5ec0c2b2fe6})"); } unsafe impl ::windows::core::Interface for CompositionMipmapSurface { type Vtable = ICompositionMipmapSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4863675c_cf4a_4b1c_9ece_c5ec0c2b2fe6); } impl ::windows::core::RuntimeName for CompositionMipmapSurface { const NAME: &'static str = "Windows.UI.Composition.CompositionMipmapSurface"; } impl ::core::convert::From<CompositionMipmapSurface> for ::windows::core::IUnknown { fn from(value: CompositionMipmapSurface) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionMipmapSurface> for ::windows::core::IUnknown { fn from(value: &CompositionMipmapSurface) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionMipmapSurface> for ::windows::core::IInspectable { fn from(value: CompositionMipmapSurface) -> Self { value.0 } } impl ::core::convert::From<&CompositionMipmapSurface> for ::windows::core::IInspectable { fn from(value: &CompositionMipmapSurface) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<CompositionMipmapSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionMipmapSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: &CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for &CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::core::convert::TryInto::<ICompositionSurface>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionMipmapSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionMipmapSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionMipmapSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionMipmapSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionMipmapSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionMipmapSurface> for CompositionObject { fn from(value: CompositionMipmapSurface) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionMipmapSurface> for CompositionObject { fn from(value: &CompositionMipmapSurface) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionMipmapSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionMipmapSurface {} unsafe impl ::core::marker::Sync for CompositionMipmapSurface {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionNineGridBrush(pub ::windows::core::IInspectable); impl CompositionNineGridBrush { pub fn BottomInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBottomInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn BottomInsetScale(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBottomInsetScale(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsCenterHollow(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsCenterHollow(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn LeftInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLeftInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn LeftInsetScale(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLeftInsetScale(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn RightInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRightInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn RightInsetScale(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRightInsetScale(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } pub fn Source(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetSource<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TopInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTopInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } pub fn TopInsetScale(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTopInsetScale(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value).ok() } } pub fn SetInsets(&self, inset: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), inset).ok() } } pub fn SetInsetsWithValues(&self, left: f32, top: f32, right: f32, bottom: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), left, top, right, bottom).ok() } } pub fn SetInsetScales(&self, scale: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), scale).ok() } } pub fn SetInsetScalesWithValues(&self, left: f32, top: f32, right: f32, bottom: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), left, top, right, bottom).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionNineGridBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionNineGridBrush;{f25154e4-bc8c-4be7-b80f-8685b83c0186})"); } unsafe impl ::windows::core::Interface for CompositionNineGridBrush { type Vtable = ICompositionNineGridBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf25154e4_bc8c_4be7_b80f_8685b83c0186); } impl ::windows::core::RuntimeName for CompositionNineGridBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionNineGridBrush"; } impl ::core::convert::From<CompositionNineGridBrush> for ::windows::core::IUnknown { fn from(value: CompositionNineGridBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionNineGridBrush> for ::windows::core::IUnknown { fn from(value: &CompositionNineGridBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionNineGridBrush> for ::windows::core::IInspectable { fn from(value: CompositionNineGridBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionNineGridBrush> for ::windows::core::IInspectable { fn from(value: &CompositionNineGridBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionNineGridBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionNineGridBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionNineGridBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionNineGridBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionNineGridBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionNineGridBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionNineGridBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionNineGridBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionNineGridBrush> for CompositionBrush { fn from(value: CompositionNineGridBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionNineGridBrush> for CompositionBrush { fn from(value: &CompositionNineGridBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionNineGridBrush> for CompositionObject { fn from(value: CompositionNineGridBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionNineGridBrush> for CompositionObject { fn from(value: &CompositionNineGridBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionNineGridBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionNineGridBrush {} unsafe impl ::core::marker::Sync for CompositionNineGridBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionObject(pub ::windows::core::IInspectable); impl CompositionObject { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn StartAnimationWithIAnimationObject<'a, Param0: ::windows::core::IntoParam<'a, IAnimationObject>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionAnimation>>(target: Param0, propertyname: Param1, animation: Param2) -> ::windows::core::Result<()> { Self::ICompositionObjectStatics(|this| unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), target.into_param().abi(), propertyname.into_param().abi(), animation.into_param().abi()).ok() }) } pub fn StartAnimationGroupWithIAnimationObject<'a, Param0: ::windows::core::IntoParam<'a, IAnimationObject>, Param1: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(target: Param0, animation: Param1) -> ::windows::core::Result<()> { Self::ICompositionObjectStatics(|this| unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), target.into_param().abi(), animation.into_param().abi()).ok() }) } pub fn ICompositionObjectStatics<R, F: FnOnce(&ICompositionObjectStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionObject, ICompositionObjectStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionObject { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionObject;{bcb4ad45-7609-4550-934f-16002a68fded})"); } unsafe impl ::windows::core::Interface for CompositionObject { type Vtable = ICompositionObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbcb4ad45_7609_4550_934f_16002a68fded); } impl ::windows::core::RuntimeName for CompositionObject { const NAME: &'static str = "Windows.UI.Composition.CompositionObject"; } impl ::core::convert::From<CompositionObject> for ::windows::core::IUnknown { fn from(value: CompositionObject) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionObject> for ::windows::core::IUnknown { fn from(value: &CompositionObject) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionObject> for ::windows::core::IInspectable { fn from(value: CompositionObject) -> Self { value.0 } } impl ::core::convert::From<&CompositionObject> for ::windows::core::IInspectable { fn from(value: &CompositionObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionObject> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionObject) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionObject> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionObject) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionObject> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionObject) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionObject> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionObject) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionObject { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for CompositionObject {} unsafe impl ::core::marker::Sync for CompositionObject {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionPath(pub ::windows::core::IInspectable); impl CompositionPath { #[cfg(feature = "Graphics")] pub fn Create<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::IGeometrySource2D>>(source: Param0) -> ::windows::core::Result<CompositionPath> { Self::ICompositionPathFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), source.into_param().abi(), &mut result__).from_abi::<CompositionPath>(result__) }) } pub fn ICompositionPathFactory<R, F: FnOnce(&ICompositionPathFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionPath, ICompositionPathFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionPath { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionPath;{66da1d5f-2e10-4f22-8a06-0a8151919e60})"); } unsafe impl ::windows::core::Interface for CompositionPath { type Vtable = ICompositionPath_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66da1d5f_2e10_4f22_8a06_0a8151919e60); } impl ::windows::core::RuntimeName for CompositionPath { const NAME: &'static str = "Windows.UI.Composition.CompositionPath"; } impl ::core::convert::From<CompositionPath> for ::windows::core::IUnknown { fn from(value: CompositionPath) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionPath> for ::windows::core::IUnknown { fn from(value: &CompositionPath) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionPath> for ::windows::core::IInspectable { fn from(value: CompositionPath) -> Self { value.0 } } impl ::core::convert::From<&CompositionPath> for ::windows::core::IInspectable { fn from(value: &CompositionPath) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Graphics")] impl ::core::convert::TryFrom<CompositionPath> for super::super::Graphics::IGeometrySource2D { type Error = ::windows::core::Error; fn try_from(value: CompositionPath) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Graphics")] impl ::core::convert::TryFrom<&CompositionPath> for super::super::Graphics::IGeometrySource2D { type Error = ::windows::core::Error; fn try_from(value: &CompositionPath) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Graphics")] impl<'a> ::windows::core::IntoParam<'a, super::super::Graphics::IGeometrySource2D> for CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, super::super::Graphics::IGeometrySource2D> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Graphics")] impl<'a> ::windows::core::IntoParam<'a, super::super::Graphics::IGeometrySource2D> for &CompositionPath { fn into_param(self) -> ::windows::core::Param<'a, super::super::Graphics::IGeometrySource2D> { ::core::convert::TryInto::<super::super::Graphics::IGeometrySource2D>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for CompositionPath {} unsafe impl ::core::marker::Sync for CompositionPath {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionPathGeometry(pub ::windows::core::IInspectable); impl CompositionPathGeometry { pub fn Path(&self) -> ::windows::core::Result<CompositionPath> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPath>(result__) } } pub fn SetPath<'a, Param0: ::windows::core::IntoParam<'a, CompositionPath>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionPathGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionPathGeometry;{0b6a417e-2c77-4c23-af5e-6304c147bb61})"); } unsafe impl ::windows::core::Interface for CompositionPathGeometry { type Vtable = ICompositionPathGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0b6a417e_2c77_4c23_af5e_6304c147bb61); } impl ::windows::core::RuntimeName for CompositionPathGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionPathGeometry"; } impl ::core::convert::From<CompositionPathGeometry> for ::windows::core::IUnknown { fn from(value: CompositionPathGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionPathGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionPathGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionPathGeometry> for ::windows::core::IInspectable { fn from(value: CompositionPathGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionPathGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionPathGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionPathGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionPathGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionPathGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionPathGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionPathGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionPathGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionPathGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionPathGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionPathGeometry> for CompositionGeometry { fn from(value: CompositionPathGeometry) -> Self { ::core::convert::Into::<CompositionGeometry>::into(&value) } } impl ::core::convert::From<&CompositionPathGeometry> for CompositionGeometry { fn from(value: &CompositionPathGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for &CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionPathGeometry> for CompositionObject { fn from(value: CompositionPathGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionPathGeometry> for CompositionObject { fn from(value: &CompositionPathGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionPathGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionPathGeometry {} unsafe impl ::core::marker::Sync for CompositionPathGeometry {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionProjectedShadow(pub ::windows::core::IInspectable); impl CompositionProjectedShadow { pub fn BlurRadiusMultiplier(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBlurRadiusMultiplier(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Casters(&self) -> ::windows::core::Result<CompositionProjectedShadowCasterCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionProjectedShadowCasterCollection>(result__) } } pub fn LightSource(&self) -> ::windows::core::Result<CompositionLight> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionLight>(result__) } } pub fn SetLightSource<'a, Param0: ::windows::core::IntoParam<'a, CompositionLight>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn MaxBlurRadius(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMaxBlurRadius(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } pub fn MinBlurRadius(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMinBlurRadius(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } pub fn Receivers(&self) -> ::windows::core::Result<CompositionProjectedShadowReceiverUnorderedCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionProjectedShadowReceiverUnorderedCollection>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionProjectedShadow { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionProjectedShadow;{285b8e72-4328-523f-bcf2-5557c52c3b25})"); } unsafe impl ::windows::core::Interface for CompositionProjectedShadow { type Vtable = ICompositionProjectedShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x285b8e72_4328_523f_bcf2_5557c52c3b25); } impl ::windows::core::RuntimeName for CompositionProjectedShadow { const NAME: &'static str = "Windows.UI.Composition.CompositionProjectedShadow"; } impl ::core::convert::From<CompositionProjectedShadow> for ::windows::core::IUnknown { fn from(value: CompositionProjectedShadow) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionProjectedShadow> for ::windows::core::IUnknown { fn from(value: &CompositionProjectedShadow) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionProjectedShadow> for ::windows::core::IInspectable { fn from(value: CompositionProjectedShadow) -> Self { value.0 } } impl ::core::convert::From<&CompositionProjectedShadow> for ::windows::core::IInspectable { fn from(value: &CompositionProjectedShadow) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionProjectedShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionProjectedShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionProjectedShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionProjectedShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionProjectedShadow> for CompositionObject { fn from(value: CompositionProjectedShadow) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionProjectedShadow> for CompositionObject { fn from(value: &CompositionProjectedShadow) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionProjectedShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionProjectedShadow {} unsafe impl ::core::marker::Sync for CompositionProjectedShadow {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionProjectedShadowCaster(pub ::windows::core::IInspectable); impl CompositionProjectedShadowCaster { pub fn Brush(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetBrush<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CastingVisual(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetCastingVisual<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionProjectedShadowCaster { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionProjectedShadowCaster;{b1d7d426-1e36-5a62-be56-a16112fdd148})"); } unsafe impl ::windows::core::Interface for CompositionProjectedShadowCaster { type Vtable = ICompositionProjectedShadowCaster_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1d7d426_1e36_5a62_be56_a16112fdd148); } impl ::windows::core::RuntimeName for CompositionProjectedShadowCaster { const NAME: &'static str = "Windows.UI.Composition.CompositionProjectedShadowCaster"; } impl ::core::convert::From<CompositionProjectedShadowCaster> for ::windows::core::IUnknown { fn from(value: CompositionProjectedShadowCaster) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionProjectedShadowCaster> for ::windows::core::IUnknown { fn from(value: &CompositionProjectedShadowCaster) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionProjectedShadowCaster> for ::windows::core::IInspectable { fn from(value: CompositionProjectedShadowCaster) -> Self { value.0 } } impl ::core::convert::From<&CompositionProjectedShadowCaster> for ::windows::core::IInspectable { fn from(value: &CompositionProjectedShadowCaster) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionProjectedShadowCaster> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowCaster) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionProjectedShadowCaster> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowCaster) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionProjectedShadowCaster> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowCaster) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionProjectedShadowCaster> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowCaster) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionProjectedShadowCaster> for CompositionObject { fn from(value: CompositionProjectedShadowCaster) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionProjectedShadowCaster> for CompositionObject { fn from(value: &CompositionProjectedShadowCaster) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionProjectedShadowCaster { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionProjectedShadowCaster {} unsafe impl ::core::marker::Sync for CompositionProjectedShadowCaster {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionProjectedShadowCasterCollection(pub ::windows::core::IInspectable); impl CompositionProjectedShadowCasterCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<CompositionProjectedShadowCaster>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<CompositionProjectedShadowCaster>>(result__) } } pub fn Count(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn InsertAbove<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>, Param1: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>>(&self, newcaster: Param0, reference: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), newcaster.into_param().abi(), reference.into_param().abi()).ok() } } pub fn InsertAtBottom<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>>(&self, newcaster: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), newcaster.into_param().abi()).ok() } } pub fn InsertAtTop<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>>(&self, newcaster: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), newcaster.into_param().abi()).ok() } } pub fn InsertBelow<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>, Param1: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>>(&self, newcaster: Param0, reference: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), newcaster.into_param().abi(), reference.into_param().abi()).ok() } } pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowCaster>>(&self, caster: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), caster.into_param().abi()).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } pub fn MaxRespectedCasters() -> ::windows::core::Result<i32> { Self::ICompositionProjectedShadowCasterCollectionStatics(|this| unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) }) } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn ICompositionProjectedShadowCasterCollectionStatics<R, F: FnOnce(&ICompositionProjectedShadowCasterCollectionStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CompositionProjectedShadowCasterCollection, ICompositionProjectedShadowCasterCollectionStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CompositionProjectedShadowCasterCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionProjectedShadowCasterCollection;{d2525c0c-e07f-58a3-ac91-37f73ee91740})"); } unsafe impl ::windows::core::Interface for CompositionProjectedShadowCasterCollection { type Vtable = ICompositionProjectedShadowCasterCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd2525c0c_e07f_58a3_ac91_37f73ee91740); } impl ::windows::core::RuntimeName for CompositionProjectedShadowCasterCollection { const NAME: &'static str = "Windows.UI.Composition.CompositionProjectedShadowCasterCollection"; } impl ::core::convert::From<CompositionProjectedShadowCasterCollection> for ::windows::core::IUnknown { fn from(value: CompositionProjectedShadowCasterCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionProjectedShadowCasterCollection> for ::windows::core::IUnknown { fn from(value: &CompositionProjectedShadowCasterCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionProjectedShadowCasterCollection> for ::windows::core::IInspectable { fn from(value: CompositionProjectedShadowCasterCollection) -> Self { value.0 } } impl ::core::convert::From<&CompositionProjectedShadowCasterCollection> for ::windows::core::IInspectable { fn from(value: &CompositionProjectedShadowCasterCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionProjectedShadowCasterCollection> for super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster> { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionProjectedShadowCasterCollection> for super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster> { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>> for &CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<CompositionProjectedShadowCaster>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionProjectedShadowCasterCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionProjectedShadowCasterCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionProjectedShadowCasterCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionProjectedShadowCasterCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowCasterCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionProjectedShadowCasterCollection> for CompositionObject { fn from(value: CompositionProjectedShadowCasterCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionProjectedShadowCasterCollection> for CompositionObject { fn from(value: &CompositionProjectedShadowCasterCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionProjectedShadowCasterCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionProjectedShadowCasterCollection {} unsafe impl ::core::marker::Sync for CompositionProjectedShadowCasterCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionProjectedShadowCasterCollection { type Item = CompositionProjectedShadowCaster; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionProjectedShadowCasterCollection { type Item = CompositionProjectedShadowCaster; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionProjectedShadowReceiver(pub ::windows::core::IInspectable); impl CompositionProjectedShadowReceiver { pub fn ReceivingVisual(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetReceivingVisual<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionProjectedShadowReceiver { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionProjectedShadowReceiver;{1377985a-6a49-536a-9be4-a96a8e5298a9})"); } unsafe impl ::windows::core::Interface for CompositionProjectedShadowReceiver { type Vtable = ICompositionProjectedShadowReceiver_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1377985a_6a49_536a_9be4_a96a8e5298a9); } impl ::windows::core::RuntimeName for CompositionProjectedShadowReceiver { const NAME: &'static str = "Windows.UI.Composition.CompositionProjectedShadowReceiver"; } impl ::core::convert::From<CompositionProjectedShadowReceiver> for ::windows::core::IUnknown { fn from(value: CompositionProjectedShadowReceiver) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionProjectedShadowReceiver> for ::windows::core::IUnknown { fn from(value: &CompositionProjectedShadowReceiver) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionProjectedShadowReceiver> for ::windows::core::IInspectable { fn from(value: CompositionProjectedShadowReceiver) -> Self { value.0 } } impl ::core::convert::From<&CompositionProjectedShadowReceiver> for ::windows::core::IInspectable { fn from(value: &CompositionProjectedShadowReceiver) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionProjectedShadowReceiver> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowReceiver) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionProjectedShadowReceiver> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowReceiver) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionProjectedShadowReceiver> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowReceiver) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionProjectedShadowReceiver> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowReceiver) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionProjectedShadowReceiver> for CompositionObject { fn from(value: CompositionProjectedShadowReceiver) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionProjectedShadowReceiver> for CompositionObject { fn from(value: &CompositionProjectedShadowReceiver) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionProjectedShadowReceiver { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionProjectedShadowReceiver {} unsafe impl ::core::marker::Sync for CompositionProjectedShadowReceiver {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionProjectedShadowReceiverUnorderedCollection(pub ::windows::core::IInspectable); impl CompositionProjectedShadowReceiverUnorderedCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<CompositionProjectedShadowReceiver>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<CompositionProjectedShadowReceiver>>(result__) } } pub fn Add<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowReceiver>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Count(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, CompositionProjectedShadowReceiver>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionProjectedShadowReceiverUnorderedCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionProjectedShadowReceiverUnorderedCollection;{02b3e3b7-27d2-599f-ac4b-ab787cdde6fd})"); } unsafe impl ::windows::core::Interface for CompositionProjectedShadowReceiverUnorderedCollection { type Vtable = ICompositionProjectedShadowReceiverUnorderedCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02b3e3b7_27d2_599f_ac4b_ab787cdde6fd); } impl ::windows::core::RuntimeName for CompositionProjectedShadowReceiverUnorderedCollection { const NAME: &'static str = "Windows.UI.Composition.CompositionProjectedShadowReceiverUnorderedCollection"; } impl ::core::convert::From<CompositionProjectedShadowReceiverUnorderedCollection> for ::windows::core::IUnknown { fn from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionProjectedShadowReceiverUnorderedCollection> for ::windows::core::IUnknown { fn from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionProjectedShadowReceiverUnorderedCollection> for ::windows::core::IInspectable { fn from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> Self { value.0 } } impl ::core::convert::From<&CompositionProjectedShadowReceiverUnorderedCollection> for ::windows::core::IInspectable { fn from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionProjectedShadowReceiverUnorderedCollection> for super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver> { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionProjectedShadowReceiverUnorderedCollection> for super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver> { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>> for &CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<CompositionProjectedShadowReceiver>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionProjectedShadowReceiverUnorderedCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionProjectedShadowReceiverUnorderedCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionProjectedShadowReceiverUnorderedCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionProjectedShadowReceiverUnorderedCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionProjectedShadowReceiverUnorderedCollection> for CompositionObject { fn from(value: CompositionProjectedShadowReceiverUnorderedCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionProjectedShadowReceiverUnorderedCollection> for CompositionObject { fn from(value: &CompositionProjectedShadowReceiverUnorderedCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionProjectedShadowReceiverUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionProjectedShadowReceiverUnorderedCollection {} unsafe impl ::core::marker::Sync for CompositionProjectedShadowReceiverUnorderedCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionProjectedShadowReceiverUnorderedCollection { type Item = CompositionProjectedShadowReceiver; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionProjectedShadowReceiverUnorderedCollection { type Item = CompositionProjectedShadowReceiver; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionPropertySet(pub ::windows::core::IInspectable); impl CompositionPropertySet { pub fn InsertColor<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertMatrix3x2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertMatrix4x4<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertQuaternion<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } pub fn InsertScalar<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertVector2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertVector3<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertVector4<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, propertyname: Param0, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value.into_param().abi()).ok() } } pub fn TryGetColor<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::Color) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetMatrix3x2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetMatrix4x4<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Matrix4x4) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetQuaternion<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Quaternion) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } pub fn TryGetScalar<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut f32) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetVector2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetVector3<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn TryGetVector4<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut super::super::Foundation::Numerics::Vector4) -> ::windows::core::Result<CompositionGetValueStatus> { let this = self; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } pub fn InsertBoolean<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionPropertySet2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value).ok() } } pub fn TryGetBoolean<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0, value: &mut bool) -> ::windows::core::Result<CompositionGetValueStatus> { let this = &::windows::core::Interface::cast::<ICompositionPropertySet2>(self)?; unsafe { let mut result__: CompositionGetValueStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), value, &mut result__).from_abi::<CompositionGetValueStatus>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionPropertySet { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionPropertySet;{c9d6d202-5f67-4453-9117-9eadd430d3c2})"); } unsafe impl ::windows::core::Interface for CompositionPropertySet { type Vtable = ICompositionPropertySet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc9d6d202_5f67_4453_9117_9eadd430d3c2); } impl ::windows::core::RuntimeName for CompositionPropertySet { const NAME: &'static str = "Windows.UI.Composition.CompositionPropertySet"; } impl ::core::convert::From<CompositionPropertySet> for ::windows::core::IUnknown { fn from(value: CompositionPropertySet) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionPropertySet> for ::windows::core::IUnknown { fn from(value: &CompositionPropertySet) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionPropertySet> for ::windows::core::IInspectable { fn from(value: CompositionPropertySet) -> Self { value.0 } } impl ::core::convert::From<&CompositionPropertySet> for ::windows::core::IInspectable { fn from(value: &CompositionPropertySet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionPropertySet> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionPropertySet) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionPropertySet> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionPropertySet) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionPropertySet> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionPropertySet) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionPropertySet> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionPropertySet) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionPropertySet> for CompositionObject { fn from(value: CompositionPropertySet) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionPropertySet> for CompositionObject { fn from(value: &CompositionPropertySet) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionPropertySet { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionPropertySet {} unsafe impl ::core::marker::Sync for CompositionPropertySet {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionRadialGradientBrush(pub ::windows::core::IInspectable); impl CompositionRadialGradientBrush { #[cfg(feature = "Foundation_Numerics")] pub fn EllipseCenter(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetEllipseCenter<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn EllipseRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetEllipseRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn GradientOriginOffset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetGradientOriginOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ColorStops(&self) -> ::windows::core::Result<CompositionColorGradientStopCollection> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorGradientStopCollection>(result__) } } pub fn ExtendMode(&self) -> ::windows::core::Result<CompositionGradientExtendMode> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: CompositionGradientExtendMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGradientExtendMode>(result__) } } pub fn SetExtendMode(&self, value: CompositionGradientExtendMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } pub fn InterpolationSpace(&self) -> ::windows::core::Result<CompositionColorSpace> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: CompositionColorSpace = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorSpace>(result__) } } pub fn SetInterpolationSpace(&self, value: CompositionColorSpace) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush>(self)?; unsafe { (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn MappingMode(&self) -> ::windows::core::Result<CompositionMappingMode> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { let mut result__: CompositionMappingMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionMappingMode>(result__) } } pub fn SetMappingMode(&self, value: CompositionMappingMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGradientBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionRadialGradientBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionRadialGradientBrush;{3d3b50c5-e3fa-4ce2-b9fc-3ee12561788f})"); } unsafe impl ::windows::core::Interface for CompositionRadialGradientBrush { type Vtable = ICompositionRadialGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d3b50c5_e3fa_4ce2_b9fc_3ee12561788f); } impl ::windows::core::RuntimeName for CompositionRadialGradientBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionRadialGradientBrush"; } impl ::core::convert::From<CompositionRadialGradientBrush> for ::windows::core::IUnknown { fn from(value: CompositionRadialGradientBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionRadialGradientBrush> for ::windows::core::IUnknown { fn from(value: &CompositionRadialGradientBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionRadialGradientBrush> for ::windows::core::IInspectable { fn from(value: CompositionRadialGradientBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionRadialGradientBrush> for ::windows::core::IInspectable { fn from(value: &CompositionRadialGradientBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionRadialGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionRadialGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionRadialGradientBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionRadialGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionRadialGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionRadialGradientBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionRadialGradientBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionRadialGradientBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionRadialGradientBrush> for CompositionGradientBrush { fn from(value: CompositionRadialGradientBrush) -> Self { ::core::convert::Into::<CompositionGradientBrush>::into(&value) } } impl ::core::convert::From<&CompositionRadialGradientBrush> for CompositionGradientBrush { fn from(value: &CompositionRadialGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGradientBrush> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionGradientBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGradientBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGradientBrush> for &CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionGradientBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGradientBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionRadialGradientBrush> for CompositionBrush { fn from(value: CompositionRadialGradientBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionRadialGradientBrush> for CompositionBrush { fn from(value: &CompositionRadialGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionRadialGradientBrush> for CompositionObject { fn from(value: CompositionRadialGradientBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionRadialGradientBrush> for CompositionObject { fn from(value: &CompositionRadialGradientBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionRadialGradientBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionRadialGradientBrush {} unsafe impl ::core::marker::Sync for CompositionRadialGradientBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionRectangleGeometry(pub ::windows::core::IInspectable); impl CompositionRectangleGeometry { #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionRectangleGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionRectangleGeometry;{0cd51428-5356-4246-aecf-7a0b76975400})"); } unsafe impl ::windows::core::Interface for CompositionRectangleGeometry { type Vtable = ICompositionRectangleGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cd51428_5356_4246_aecf_7a0b76975400); } impl ::windows::core::RuntimeName for CompositionRectangleGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionRectangleGeometry"; } impl ::core::convert::From<CompositionRectangleGeometry> for ::windows::core::IUnknown { fn from(value: CompositionRectangleGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionRectangleGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionRectangleGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionRectangleGeometry> for ::windows::core::IInspectable { fn from(value: CompositionRectangleGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionRectangleGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionRectangleGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionRectangleGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionRectangleGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionRectangleGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionRectangleGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionRectangleGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionRectangleGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionRectangleGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionRectangleGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionRectangleGeometry> for CompositionGeometry { fn from(value: CompositionRectangleGeometry) -> Self { ::core::convert::Into::<CompositionGeometry>::into(&value) } } impl ::core::convert::From<&CompositionRectangleGeometry> for CompositionGeometry { fn from(value: &CompositionRectangleGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for &CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionRectangleGeometry> for CompositionObject { fn from(value: CompositionRectangleGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionRectangleGeometry> for CompositionObject { fn from(value: &CompositionRectangleGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionRectangleGeometry {} unsafe impl ::core::marker::Sync for CompositionRectangleGeometry {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionRoundedRectangleGeometry(pub ::windows::core::IInspectable); impl CompositionRoundedRectangleGeometry { #[cfg(feature = "Foundation_Numerics")] pub fn CornerRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCornerRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TrimEnd(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimEnd(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimOffset(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn TrimStart(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTrimStart(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionGeometry>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionRoundedRectangleGeometry { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionRoundedRectangleGeometry;{8770c822-1d50-4b8b-b013-7c9a0e46935f})"); } unsafe impl ::windows::core::Interface for CompositionRoundedRectangleGeometry { type Vtable = ICompositionRoundedRectangleGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8770c822_1d50_4b8b_b013_7c9a0e46935f); } impl ::windows::core::RuntimeName for CompositionRoundedRectangleGeometry { const NAME: &'static str = "Windows.UI.Composition.CompositionRoundedRectangleGeometry"; } impl ::core::convert::From<CompositionRoundedRectangleGeometry> for ::windows::core::IUnknown { fn from(value: CompositionRoundedRectangleGeometry) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionRoundedRectangleGeometry> for ::windows::core::IUnknown { fn from(value: &CompositionRoundedRectangleGeometry) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionRoundedRectangleGeometry> for ::windows::core::IInspectable { fn from(value: CompositionRoundedRectangleGeometry) -> Self { value.0 } } impl ::core::convert::From<&CompositionRoundedRectangleGeometry> for ::windows::core::IInspectable { fn from(value: &CompositionRoundedRectangleGeometry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionRoundedRectangleGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionRoundedRectangleGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionRoundedRectangleGeometry> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionRoundedRectangleGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionRoundedRectangleGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionRoundedRectangleGeometry) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionRoundedRectangleGeometry> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionRoundedRectangleGeometry) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionRoundedRectangleGeometry> for CompositionGeometry { fn from(value: CompositionRoundedRectangleGeometry) -> Self { ::core::convert::Into::<CompositionGeometry>::into(&value) } } impl ::core::convert::From<&CompositionRoundedRectangleGeometry> for CompositionGeometry { fn from(value: &CompositionRoundedRectangleGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionGeometry> for &CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionGeometry> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionGeometry>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionRoundedRectangleGeometry> for CompositionObject { fn from(value: CompositionRoundedRectangleGeometry) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionRoundedRectangleGeometry> for CompositionObject { fn from(value: &CompositionRoundedRectangleGeometry) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionRoundedRectangleGeometry { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionRoundedRectangleGeometry {} unsafe impl ::core::marker::Sync for CompositionRoundedRectangleGeometry {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionScopedBatch(pub ::windows::core::IInspectable); impl CompositionScopedBatch { pub fn IsActive(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsEnded(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn End(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } pub fn Resume(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } pub fn Suspend(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Completed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, CompositionBatchCompletedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionScopedBatch { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionScopedBatch;{0d00dad0-fb07-46fd-8c72-6280d1a3d1dd})"); } unsafe impl ::windows::core::Interface for CompositionScopedBatch { type Vtable = ICompositionScopedBatch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_fb07_46fd_8c72_6280d1a3d1dd); } impl ::windows::core::RuntimeName for CompositionScopedBatch { const NAME: &'static str = "Windows.UI.Composition.CompositionScopedBatch"; } impl ::core::convert::From<CompositionScopedBatch> for ::windows::core::IUnknown { fn from(value: CompositionScopedBatch) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionScopedBatch> for ::windows::core::IUnknown { fn from(value: &CompositionScopedBatch) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionScopedBatch> for ::windows::core::IInspectable { fn from(value: CompositionScopedBatch) -> Self { value.0 } } impl ::core::convert::From<&CompositionScopedBatch> for ::windows::core::IInspectable { fn from(value: &CompositionScopedBatch) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionScopedBatch> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionScopedBatch) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionScopedBatch> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionScopedBatch) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionScopedBatch> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionScopedBatch) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionScopedBatch> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionScopedBatch) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionScopedBatch> for CompositionObject { fn from(value: CompositionScopedBatch) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionScopedBatch> for CompositionObject { fn from(value: &CompositionScopedBatch) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionScopedBatch { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionScopedBatch {} unsafe impl ::core::marker::Sync for CompositionScopedBatch {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionShadow(pub ::windows::core::IInspectable); impl CompositionShadow { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionShadow { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionShadow;{329e52e2-4335-49cc-b14a-37782d10f0c4})"); } unsafe impl ::windows::core::Interface for CompositionShadow { type Vtable = ICompositionShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x329e52e2_4335_49cc_b14a_37782d10f0c4); } impl ::windows::core::RuntimeName for CompositionShadow { const NAME: &'static str = "Windows.UI.Composition.CompositionShadow"; } impl ::core::convert::From<CompositionShadow> for ::windows::core::IUnknown { fn from(value: CompositionShadow) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionShadow> for ::windows::core::IUnknown { fn from(value: &CompositionShadow) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionShadow> for ::windows::core::IInspectable { fn from(value: CompositionShadow) -> Self { value.0 } } impl ::core::convert::From<&CompositionShadow> for ::windows::core::IInspectable { fn from(value: &CompositionShadow) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionShadow> for CompositionObject { fn from(value: CompositionShadow) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionShadow> for CompositionObject { fn from(value: &CompositionShadow) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionShadow {} unsafe impl ::core::marker::Sync for CompositionShadow {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionShape(pub ::windows::core::IInspectable); impl CompositionShape { #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionShape { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionShape;{b47ce2f7-9a88-42c4-9e87-2e500ca8688c})"); } unsafe impl ::windows::core::Interface for CompositionShape { type Vtable = ICompositionShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb47ce2f7_9a88_42c4_9e87_2e500ca8688c); } impl ::windows::core::RuntimeName for CompositionShape { const NAME: &'static str = "Windows.UI.Composition.CompositionShape"; } impl ::core::convert::From<CompositionShape> for ::windows::core::IUnknown { fn from(value: CompositionShape) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionShape> for ::windows::core::IUnknown { fn from(value: &CompositionShape) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionShape> for ::windows::core::IInspectable { fn from(value: CompositionShape) -> Self { value.0 } } impl ::core::convert::From<&CompositionShape> for ::windows::core::IInspectable { fn from(value: &CompositionShape) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionShape> for CompositionObject { fn from(value: CompositionShape) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionShape> for CompositionObject { fn from(value: &CompositionShape) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionShape {} unsafe impl ::core::marker::Sync for CompositionShape {} #[cfg(feature = "Foundation_Collections")] #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionShapeCollection(pub ::windows::core::IInspectable); #[cfg(feature = "Foundation_Collections")] impl CompositionShapeCollection { #[cfg(feature = "Foundation_Collections")] pub fn GetAt(&self, index: u32) -> ::windows::core::Result<CompositionShape> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<CompositionShape>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Size(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetView(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<CompositionShape>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<CompositionShape>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn IndexOf<'a, Param0: ::windows::core::IntoParam<'a, CompositionShape>>(&self, value: Param0, index: &mut u32) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SetAt<'a, Param1: ::windows::core::IntoParam<'a, CompositionShape>>(&self, index: u32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), index, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InsertAt<'a, Param1: ::windows::core::IntoParam<'a, CompositionShape>>(&self, index: u32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), index, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAt(&self, index: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), index).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Append<'a, Param0: ::windows::core::IntoParam<'a, CompositionShape>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAtEnd(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn GetMany(&self, startindex: u32, items: &mut [<CompositionShape as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[<CompositionShape as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<CompositionShape>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<CompositionShape>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<CompositionShape>>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::RuntimeType for CompositionShapeCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionShapeCollection;pinterface({913337e9-11a1-4345-a3a2-4e7f956e222d};rc(Windows.UI.Composition.CompositionShape;{b47ce2f7-9a88-42c4-9e87-2e500ca8688c})))"); } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::Interface for CompositionShapeCollection { type Vtable = super::super::Foundation::Collections::IVector_abi<CompositionShape>; const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IVector<CompositionShape> as ::windows::core::RuntimeType>::SIGNATURE); } #[cfg(feature = "Foundation_Collections")] impl ::windows::core::RuntimeName for CompositionShapeCollection { const NAME: &'static str = "Windows.UI.Composition.CompositionShapeCollection"; } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionShapeCollection> for ::windows::core::IUnknown { fn from(value: CompositionShapeCollection) -> Self { value.0 .0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionShapeCollection> for ::windows::core::IUnknown { fn from(value: &CompositionShapeCollection) -> Self { value.0 .0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionShapeCollection> for ::windows::core::IInspectable { fn from(value: CompositionShapeCollection) -> Self { value.0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionShapeCollection> for ::windows::core::IInspectable { fn from(value: &CompositionShapeCollection) -> Self { value.0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionShapeCollection> for super::super::Foundation::Collections::IVector<CompositionShape> { fn from(value: CompositionShapeCollection) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionShapeCollection> for super::super::Foundation::Collections::IVector<CompositionShape> { fn from(value: &CompositionShapeCollection) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<CompositionShape>> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<CompositionShape>> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<CompositionShape>> for &CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<CompositionShape>> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionShapeCollection> for super::super::Foundation::Collections::IIterable<CompositionShape> { type Error = ::windows::core::Error; fn try_from(value: CompositionShapeCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionShapeCollection> for super::super::Foundation::Collections::IIterable<CompositionShape> { type Error = ::windows::core::Error; fn try_from(value: &CompositionShapeCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionShape>> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionShape>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<CompositionShape>> for &CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<CompositionShape>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<CompositionShape>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<CompositionShapeCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionShapeCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<&CompositionShapeCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionShapeCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionShapeCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionShapeCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionShapeCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionShapeCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionShapeCollection> for CompositionObject { fn from(value: CompositionShapeCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionShapeCollection> for CompositionObject { fn from(value: &CompositionShapeCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionShapeCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Send for CompositionShapeCollection {} #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Sync for CompositionShapeCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionShapeCollection { type Item = CompositionShape; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionShapeCollection { type Item = CompositionShape; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { super::super::Foundation::Collections::VectorIterator::new(::core::convert::TryInto::try_into(self).ok()) } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionSpriteShape(pub ::windows::core::IInspectable); impl CompositionSpriteShape { pub fn FillBrush(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetFillBrush<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Geometry(&self) -> ::windows::core::Result<CompositionGeometry> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGeometry>(result__) } } pub fn SetGeometry<'a, Param0: ::windows::core::IntoParam<'a, CompositionGeometry>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IsStrokeNonScaling(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsStrokeNonScaling(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeBrush(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetStrokeBrush<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn StrokeDashArray(&self) -> ::windows::core::Result<CompositionStrokeDashArray> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStrokeDashArray>(result__) } } pub fn StrokeDashCap(&self) -> ::windows::core::Result<CompositionStrokeCap> { let this = self; unsafe { let mut result__: CompositionStrokeCap = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStrokeCap>(result__) } } pub fn SetStrokeDashCap(&self, value: CompositionStrokeCap) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeDashOffset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetStrokeDashOffset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeEndCap(&self) -> ::windows::core::Result<CompositionStrokeCap> { let this = self; unsafe { let mut result__: CompositionStrokeCap = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStrokeCap>(result__) } } pub fn SetStrokeEndCap(&self, value: CompositionStrokeCap) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeLineJoin(&self) -> ::windows::core::Result<CompositionStrokeLineJoin> { let this = self; unsafe { let mut result__: CompositionStrokeLineJoin = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStrokeLineJoin>(result__) } } pub fn SetStrokeLineJoin(&self, value: CompositionStrokeLineJoin) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeMiterLimit(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetStrokeMiterLimit(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeStartCap(&self) -> ::windows::core::Result<CompositionStrokeCap> { let this = self; unsafe { let mut result__: CompositionStrokeCap = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStrokeCap>(result__) } } pub fn SetStrokeStartCap(&self, value: CompositionStrokeCap) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), value).ok() } } pub fn StrokeThickness(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetStrokeThickness(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionShape>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionSpriteShape { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionSpriteShape;{401b61bb-0007-4363-b1f3-6bcc003fb83e})"); } unsafe impl ::windows::core::Interface for CompositionSpriteShape { type Vtable = ICompositionSpriteShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x401b61bb_0007_4363_b1f3_6bcc003fb83e); } impl ::windows::core::RuntimeName for CompositionSpriteShape { const NAME: &'static str = "Windows.UI.Composition.CompositionSpriteShape"; } impl ::core::convert::From<CompositionSpriteShape> for ::windows::core::IUnknown { fn from(value: CompositionSpriteShape) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionSpriteShape> for ::windows::core::IUnknown { fn from(value: &CompositionSpriteShape) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionSpriteShape> for ::windows::core::IInspectable { fn from(value: CompositionSpriteShape) -> Self { value.0 } } impl ::core::convert::From<&CompositionSpriteShape> for ::windows::core::IInspectable { fn from(value: &CompositionSpriteShape) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionSpriteShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionSpriteShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionSpriteShape> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionSpriteShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionSpriteShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionSpriteShape) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionSpriteShape> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionSpriteShape) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionSpriteShape> for CompositionShape { fn from(value: CompositionSpriteShape) -> Self { ::core::convert::Into::<CompositionShape>::into(&value) } } impl ::core::convert::From<&CompositionSpriteShape> for CompositionShape { fn from(value: &CompositionSpriteShape) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionShape> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionShape> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShape>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionShape> for &CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionShape> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShape>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionSpriteShape> for CompositionObject { fn from(value: CompositionSpriteShape) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionSpriteShape> for CompositionObject { fn from(value: &CompositionSpriteShape) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionSpriteShape { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionSpriteShape {} unsafe impl ::core::marker::Sync for CompositionSpriteShape {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionStretch(pub i32); impl CompositionStretch { pub const None: CompositionStretch = CompositionStretch(0i32); pub const Fill: CompositionStretch = CompositionStretch(1i32); pub const Uniform: CompositionStretch = CompositionStretch(2i32); pub const UniformToFill: CompositionStretch = CompositionStretch(3i32); } impl ::core::convert::From<i32> for CompositionStretch { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionStretch { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionStretch { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionStretch;i4)"); } impl ::windows::core::DefaultType for CompositionStretch { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionStrokeCap(pub i32); impl CompositionStrokeCap { pub const Flat: CompositionStrokeCap = CompositionStrokeCap(0i32); pub const Square: CompositionStrokeCap = CompositionStrokeCap(1i32); pub const Round: CompositionStrokeCap = CompositionStrokeCap(2i32); pub const Triangle: CompositionStrokeCap = CompositionStrokeCap(3i32); } impl ::core::convert::From<i32> for CompositionStrokeCap { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionStrokeCap { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionStrokeCap { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionStrokeCap;i4)"); } impl ::windows::core::DefaultType for CompositionStrokeCap { type DefaultType = Self; } #[cfg(feature = "Foundation_Collections")] #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionStrokeDashArray(pub ::windows::core::IInspectable); #[cfg(feature = "Foundation_Collections")] impl CompositionStrokeDashArray { #[cfg(feature = "Foundation_Collections")] pub fn GetAt(&self, index: u32) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Size(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetView(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<f32>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<f32>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn IndexOf(&self, value: f32, index: &mut u32) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value, index, &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SetAt(&self, index: u32, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), index, value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InsertAt(&self, index: u32, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), index, value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAt(&self, index: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), index).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Append(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RemoveAtEnd(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn GetMany(&self, startindex: u32, items: &mut [<f32 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[<f32 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<f32>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<f32>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::RuntimeType for CompositionStrokeDashArray { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionStrokeDashArray;pinterface({913337e9-11a1-4345-a3a2-4e7f956e222d};f4))"); } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::Interface for CompositionStrokeDashArray { type Vtable = super::super::Foundation::Collections::IVector_abi<f32>; const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IVector<f32> as ::windows::core::RuntimeType>::SIGNATURE); } #[cfg(feature = "Foundation_Collections")] impl ::windows::core::RuntimeName for CompositionStrokeDashArray { const NAME: &'static str = "Windows.UI.Composition.CompositionStrokeDashArray"; } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionStrokeDashArray> for ::windows::core::IUnknown { fn from(value: CompositionStrokeDashArray) -> Self { value.0 .0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionStrokeDashArray> for ::windows::core::IUnknown { fn from(value: &CompositionStrokeDashArray) -> Self { value.0 .0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionStrokeDashArray> for ::windows::core::IInspectable { fn from(value: CompositionStrokeDashArray) -> Self { value.0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionStrokeDashArray> for ::windows::core::IInspectable { fn from(value: &CompositionStrokeDashArray) -> Self { value.0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionStrokeDashArray> for super::super::Foundation::Collections::IVector<f32> { fn from(value: CompositionStrokeDashArray) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionStrokeDashArray> for super::super::Foundation::Collections::IVector<f32> { fn from(value: &CompositionStrokeDashArray) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<f32>> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<f32>> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVector<f32>> for &CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVector<f32>> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionStrokeDashArray> for super::super::Foundation::Collections::IIterable<f32> { type Error = ::windows::core::Error; fn try_from(value: CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionStrokeDashArray> for super::super::Foundation::Collections::IIterable<f32> { type Error = ::windows::core::Error; fn try_from(value: &CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<f32>> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<f32>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<f32>> for &CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<f32>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<f32>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<CompositionStrokeDashArray> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<&CompositionStrokeDashArray> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<CompositionStrokeDashArray> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&CompositionStrokeDashArray> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionStrokeDashArray) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<CompositionStrokeDashArray> for CompositionObject { fn from(value: CompositionStrokeDashArray) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&CompositionStrokeDashArray> for CompositionObject { fn from(value: &CompositionStrokeDashArray) -> Self { ::windows::core::Interface::cast(value).unwrap() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionStrokeDashArray { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Send for CompositionStrokeDashArray {} #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Sync for CompositionStrokeDashArray {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for CompositionStrokeDashArray { type Item = f32; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &CompositionStrokeDashArray { type Item = f32; type IntoIter = super::super::Foundation::Collections::VectorIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { super::super::Foundation::Collections::VectorIterator::new(::core::convert::TryInto::try_into(self).ok()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CompositionStrokeLineJoin(pub i32); impl CompositionStrokeLineJoin { pub const Miter: CompositionStrokeLineJoin = CompositionStrokeLineJoin(0i32); pub const Bevel: CompositionStrokeLineJoin = CompositionStrokeLineJoin(1i32); pub const Round: CompositionStrokeLineJoin = CompositionStrokeLineJoin(2i32); pub const MiterOrBevel: CompositionStrokeLineJoin = CompositionStrokeLineJoin(3i32); } impl ::core::convert::From<i32> for CompositionStrokeLineJoin { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CompositionStrokeLineJoin { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CompositionStrokeLineJoin { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Composition.CompositionStrokeLineJoin;i4)"); } impl ::windows::core::DefaultType for CompositionStrokeLineJoin { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionSurfaceBrush(pub ::windows::core::IInspectable); impl CompositionSurfaceBrush { pub fn BitmapInterpolationMode(&self) -> ::windows::core::Result<CompositionBitmapInterpolationMode> { let this = self; unsafe { let mut result__: CompositionBitmapInterpolationMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBitmapInterpolationMode>(result__) } } pub fn SetBitmapInterpolationMode(&self, value: CompositionBitmapInterpolationMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn HorizontalAlignmentRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetHorizontalAlignmentRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn Stretch(&self) -> ::windows::core::Result<CompositionStretch> { let this = self; unsafe { let mut result__: CompositionStretch = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStretch>(result__) } } pub fn SetStretch(&self, value: CompositionStretch) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn Surface(&self) -> ::windows::core::Result<ICompositionSurface> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ICompositionSurface>(result__) } } pub fn SetSurface<'a, Param0: ::windows::core::IntoParam<'a, ICompositionSurface>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn VerticalAlignmentRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetVerticalAlignmentRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush2>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn SnapToPixels(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetSnapToPixels(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionSurfaceBrush3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionSurfaceBrush { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionSurfaceBrush;{ad016d79-1e4c-4c0d-9c29-83338c87c162})"); } unsafe impl ::windows::core::Interface for CompositionSurfaceBrush { type Vtable = ICompositionSurfaceBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xad016d79_1e4c_4c0d_9c29_83338c87c162); } impl ::windows::core::RuntimeName for CompositionSurfaceBrush { const NAME: &'static str = "Windows.UI.Composition.CompositionSurfaceBrush"; } impl ::core::convert::From<CompositionSurfaceBrush> for ::windows::core::IUnknown { fn from(value: CompositionSurfaceBrush) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionSurfaceBrush> for ::windows::core::IUnknown { fn from(value: &CompositionSurfaceBrush) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionSurfaceBrush> for ::windows::core::IInspectable { fn from(value: CompositionSurfaceBrush) -> Self { value.0 } } impl ::core::convert::From<&CompositionSurfaceBrush> for ::windows::core::IInspectable { fn from(value: &CompositionSurfaceBrush) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionSurfaceBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionSurfaceBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionSurfaceBrush> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionSurfaceBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionSurfaceBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionSurfaceBrush) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionSurfaceBrush> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionSurfaceBrush) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionSurfaceBrush> for CompositionBrush { fn from(value: CompositionSurfaceBrush) -> Self { ::core::convert::Into::<CompositionBrush>::into(&value) } } impl ::core::convert::From<&CompositionSurfaceBrush> for CompositionBrush { fn from(value: &CompositionSurfaceBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionBrush> for &CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionBrush> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionBrush>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionSurfaceBrush> for CompositionObject { fn from(value: CompositionSurfaceBrush) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionSurfaceBrush> for CompositionObject { fn from(value: &CompositionSurfaceBrush) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionSurfaceBrush { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionSurfaceBrush {} unsafe impl ::core::marker::Sync for CompositionSurfaceBrush {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionTarget(pub ::windows::core::IInspectable); impl CompositionTarget { pub fn Root(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetRoot<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionTarget { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionTarget;{a1bea8ba-d726-4663-8129-6b5e7927ffa6})"); } unsafe impl ::windows::core::Interface for CompositionTarget { type Vtable = ICompositionTarget_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1bea8ba_d726_4663_8129_6b5e7927ffa6); } impl ::windows::core::RuntimeName for CompositionTarget { const NAME: &'static str = "Windows.UI.Composition.CompositionTarget"; } impl ::core::convert::From<CompositionTarget> for ::windows::core::IUnknown { fn from(value: CompositionTarget) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionTarget> for ::windows::core::IUnknown { fn from(value: &CompositionTarget) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionTarget> for ::windows::core::IInspectable { fn from(value: CompositionTarget) -> Self { value.0 } } impl ::core::convert::From<&CompositionTarget> for ::windows::core::IInspectable { fn from(value: &CompositionTarget) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionTarget> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionTarget) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionTarget> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionTarget) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionTarget> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionTarget) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionTarget> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionTarget) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionTarget> for CompositionObject { fn from(value: CompositionTarget) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionTarget> for CompositionObject { fn from(value: &CompositionTarget) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionTarget { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionTarget {} unsafe impl ::core::marker::Sync for CompositionTarget {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionTransform(pub ::windows::core::IInspectable); impl CompositionTransform { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionTransform { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionTransform;{7cd54529-fbed-4112-abc5-185906dd927c})"); } unsafe impl ::windows::core::Interface for CompositionTransform { type Vtable = ICompositionTransform_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cd54529_fbed_4112_abc5_185906dd927c); } impl ::windows::core::RuntimeName for CompositionTransform { const NAME: &'static str = "Windows.UI.Composition.CompositionTransform"; } impl ::core::convert::From<CompositionTransform> for ::windows::core::IUnknown { fn from(value: CompositionTransform) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionTransform> for ::windows::core::IUnknown { fn from(value: &CompositionTransform) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionTransform> for ::windows::core::IInspectable { fn from(value: CompositionTransform) -> Self { value.0 } } impl ::core::convert::From<&CompositionTransform> for ::windows::core::IInspectable { fn from(value: &CompositionTransform) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionTransform> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionTransform) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionTransform> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionTransform) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionTransform> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionTransform) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionTransform> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionTransform) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionTransform> for CompositionObject { fn from(value: CompositionTransform) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionTransform> for CompositionObject { fn from(value: &CompositionTransform) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionTransform { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionTransform {} unsafe impl ::core::marker::Sync for CompositionTransform {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionViewBox(pub ::windows::core::IInspectable); impl CompositionViewBox { pub fn HorizontalAlignmentRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetHorizontalAlignmentRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Stretch(&self) -> ::windows::core::Result<CompositionStretch> { let this = self; unsafe { let mut result__: CompositionStretch = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionStretch>(result__) } } pub fn SetStretch(&self, value: CompositionStretch) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn VerticalAlignmentRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetVerticalAlignmentRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionViewBox { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionViewBox;{b440bf07-068f-4537-84c6-4ecbe019e1f4})"); } unsafe impl ::windows::core::Interface for CompositionViewBox { type Vtable = ICompositionViewBox_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb440bf07_068f_4537_84c6_4ecbe019e1f4); } impl ::windows::core::RuntimeName for CompositionViewBox { const NAME: &'static str = "Windows.UI.Composition.CompositionViewBox"; } impl ::core::convert::From<CompositionViewBox> for ::windows::core::IUnknown { fn from(value: CompositionViewBox) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionViewBox> for ::windows::core::IUnknown { fn from(value: &CompositionViewBox) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionViewBox> for ::windows::core::IInspectable { fn from(value: CompositionViewBox) -> Self { value.0 } } impl ::core::convert::From<&CompositionViewBox> for ::windows::core::IInspectable { fn from(value: &CompositionViewBox) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionViewBox> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionViewBox) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionViewBox> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionViewBox) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionViewBox> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionViewBox) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionViewBox> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionViewBox) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionViewBox> for CompositionObject { fn from(value: CompositionViewBox) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionViewBox> for CompositionObject { fn from(value: &CompositionViewBox) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionViewBox { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionViewBox {} unsafe impl ::core::marker::Sync for CompositionViewBox {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionVirtualDrawingSurface(pub ::windows::core::IInspectable); impl CompositionVirtualDrawingSurface { #[cfg(feature = "Graphics")] pub fn Trim(&self, rects: &[<super::super::Graphics::RectInt32 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), rects.len() as u32, ::core::mem::transmute(rects.as_ptr())).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Graphics_DirectX")] pub fn AlphaMode(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXAlphaMode> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface>(self)?; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXAlphaMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXAlphaMode>(result__) } } #[cfg(feature = "Graphics_DirectX")] pub fn PixelFormat(&self) -> ::windows::core::Result<super::super::Graphics::DirectX::DirectXPixelFormat> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface>(self)?; unsafe { let mut result__: super::super::Graphics::DirectX::DirectXPixelFormat = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::DirectX::DirectXPixelFormat>(result__) } } #[cfg(feature = "Foundation")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Size> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface>(self)?; unsafe { let mut result__: super::super::Foundation::Size = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn SizeInt32(&self) -> ::windows::core::Result<super::super::Graphics::SizeInt32> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { let mut result__: super::super::Graphics::SizeInt32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Graphics::SizeInt32>(result__) } } #[cfg(feature = "Graphics")] pub fn Resize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::SizeInt32>>(&self, sizepixels: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), sizepixels.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn Scroll<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>>(&self, offset: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), offset.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollRect<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, scrollrect: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), offset.into_param().abi(), scrollrect.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollWithClip<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, cliprect: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), offset.into_param().abi(), cliprect.into_param().abi()).ok() } } #[cfg(feature = "Graphics")] pub fn ScrollRectWithClip<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::PointInt32>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>, Param2: ::windows::core::IntoParam<'a, super::super::Graphics::RectInt32>>(&self, offset: Param0, cliprect: Param1, scrollrect: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionDrawingSurface2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), offset.into_param().abi(), cliprect.into_param().abi(), scrollrect.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionVirtualDrawingSurface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionVirtualDrawingSurface;{a9c384db-8740-4f94-8b9d-b68521e7863d})"); } unsafe impl ::windows::core::Interface for CompositionVirtualDrawingSurface { type Vtable = ICompositionVirtualDrawingSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa9c384db_8740_4f94_8b9d_b68521e7863d); } impl ::windows::core::RuntimeName for CompositionVirtualDrawingSurface { const NAME: &'static str = "Windows.UI.Composition.CompositionVirtualDrawingSurface"; } impl ::core::convert::From<CompositionVirtualDrawingSurface> for ::windows::core::IUnknown { fn from(value: CompositionVirtualDrawingSurface) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionVirtualDrawingSurface> for ::windows::core::IUnknown { fn from(value: &CompositionVirtualDrawingSurface) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionVirtualDrawingSurface> for ::windows::core::IInspectable { fn from(value: CompositionVirtualDrawingSurface) -> Self { value.0 } } impl ::core::convert::From<&CompositionVirtualDrawingSurface> for ::windows::core::IInspectable { fn from(value: &CompositionVirtualDrawingSurface) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionVirtualDrawingSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionVirtualDrawingSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionVirtualDrawingSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionVirtualDrawingSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: &CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for &CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::core::convert::TryInto::<ICompositionSurface>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionVirtualDrawingSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionVirtualDrawingSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionVirtualDrawingSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionVirtualDrawingSurface> for CompositionDrawingSurface { fn from(value: CompositionVirtualDrawingSurface) -> Self { ::core::convert::Into::<CompositionDrawingSurface>::into(&value) } } impl ::core::convert::From<&CompositionVirtualDrawingSurface> for CompositionDrawingSurface { fn from(value: &CompositionVirtualDrawingSurface) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionDrawingSurface> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionDrawingSurface> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionDrawingSurface>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionDrawingSurface> for &CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionDrawingSurface> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionDrawingSurface>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CompositionVirtualDrawingSurface> for CompositionObject { fn from(value: CompositionVirtualDrawingSurface) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionVirtualDrawingSurface> for CompositionObject { fn from(value: &CompositionVirtualDrawingSurface) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionVirtualDrawingSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionVirtualDrawingSurface {} unsafe impl ::core::marker::Sync for CompositionVirtualDrawingSurface {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CompositionVisualSurface(pub ::windows::core::IInspectable); impl CompositionVisualSurface { pub fn SourceVisual(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetSourceVisual<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SourceOffset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSourceOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SourceSize(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSourceSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CompositionVisualSurface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CompositionVisualSurface;{b224d803-4f6e-4a3f-8cae-3dc1cda74fc6})"); } unsafe impl ::windows::core::Interface for CompositionVisualSurface { type Vtable = ICompositionVisualSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb224d803_4f6e_4a3f_8cae_3dc1cda74fc6); } impl ::windows::core::RuntimeName for CompositionVisualSurface { const NAME: &'static str = "Windows.UI.Composition.CompositionVisualSurface"; } impl ::core::convert::From<CompositionVisualSurface> for ::windows::core::IUnknown { fn from(value: CompositionVisualSurface) -> Self { value.0 .0 } } impl ::core::convert::From<&CompositionVisualSurface> for ::windows::core::IUnknown { fn from(value: &CompositionVisualSurface) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CompositionVisualSurface> for ::windows::core::IInspectable { fn from(value: CompositionVisualSurface) -> Self { value.0 } } impl ::core::convert::From<&CompositionVisualSurface> for ::windows::core::IInspectable { fn from(value: &CompositionVisualSurface) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<CompositionVisualSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: CompositionVisualSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionVisualSurface> for ICompositionSurface { type Error = ::windows::core::Error; fn try_from(value: &CompositionVisualSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionSurface> for &CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, ICompositionSurface> { ::core::convert::TryInto::<ICompositionSurface>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CompositionVisualSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CompositionVisualSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CompositionVisualSurface> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CompositionVisualSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CompositionVisualSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CompositionVisualSurface) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CompositionVisualSurface> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CompositionVisualSurface) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CompositionVisualSurface> for CompositionObject { fn from(value: CompositionVisualSurface) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CompositionVisualSurface> for CompositionObject { fn from(value: &CompositionVisualSurface) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CompositionVisualSurface { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CompositionVisualSurface {} unsafe impl ::core::marker::Sync for CompositionVisualSurface {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Compositor(pub ::windows::core::IInspectable); impl Compositor { pub fn new() -> ::windows::core::Result<Self> { Self::IActivationFactory(|f| f.activate_instance::<Self>()) } fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<Compositor, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateColorKeyFrameAnimation(&self) -> ::windows::core::Result<ColorKeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ColorKeyFrameAnimation>(result__) } } pub fn CreateColorBrush(&self) -> ::windows::core::Result<CompositionColorBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorBrush>(result__) } } pub fn CreateColorBrushWithColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, color: Param0) -> ::windows::core::Result<CompositionColorBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), color.into_param().abi(), &mut result__).from_abi::<CompositionColorBrush>(result__) } } pub fn CreateContainerVisual(&self) -> ::windows::core::Result<ContainerVisual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn CreateCubicBezierEasingFunction<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, controlpoint1: Param0, controlpoint2: Param1) -> ::windows::core::Result<CubicBezierEasingFunction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), controlpoint1.into_param().abi(), controlpoint2.into_param().abi(), &mut result__).from_abi::<CubicBezierEasingFunction>(result__) } } #[cfg(feature = "Graphics_Effects")] pub fn CreateEffectFactory<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Effects::IGraphicsEffect>>(&self, graphicseffect: Param0) -> ::windows::core::Result<CompositionEffectFactory> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), graphicseffect.into_param().abi(), &mut result__).from_abi::<CompositionEffectFactory>(result__) } } #[cfg(all(feature = "Foundation_Collections", feature = "Graphics_Effects"))] pub fn CreateEffectFactoryWithProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Effects::IGraphicsEffect>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, graphicseffect: Param0, animatableproperties: Param1) -> ::windows::core::Result<CompositionEffectFactory> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), graphicseffect.into_param().abi(), animatableproperties.into_param().abi(), &mut result__).from_abi::<CompositionEffectFactory>(result__) } } pub fn CreateExpressionAnimation(&self) -> ::windows::core::Result<ExpressionAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ExpressionAnimation>(result__) } } pub fn CreateExpressionAnimationWithExpression<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, expression: Param0) -> ::windows::core::Result<ExpressionAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), expression.into_param().abi(), &mut result__).from_abi::<ExpressionAnimation>(result__) } } pub fn CreateInsetClip(&self) -> ::windows::core::Result<InsetClip> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InsetClip>(result__) } } pub fn CreateInsetClipWithInsets(&self, leftinset: f32, topinset: f32, rightinset: f32, bottominset: f32) -> ::windows::core::Result<InsetClip> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), leftinset, topinset, rightinset, bottominset, &mut result__).from_abi::<InsetClip>(result__) } } pub fn CreateLinearEasingFunction(&self) -> ::windows::core::Result<LinearEasingFunction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LinearEasingFunction>(result__) } } pub fn CreatePropertySet(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn CreateQuaternionKeyFrameAnimation(&self) -> ::windows::core::Result<QuaternionKeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<QuaternionKeyFrameAnimation>(result__) } } pub fn CreateScalarKeyFrameAnimation(&self) -> ::windows::core::Result<ScalarKeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ScalarKeyFrameAnimation>(result__) } } pub fn CreateScopedBatch(&self, batchtype: CompositionBatchTypes) -> ::windows::core::Result<CompositionScopedBatch> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), batchtype, &mut result__).from_abi::<CompositionScopedBatch>(result__) } } pub fn CreateSpriteVisual(&self) -> ::windows::core::Result<SpriteVisual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpriteVisual>(result__) } } pub fn CreateSurfaceBrush(&self) -> ::windows::core::Result<CompositionSurfaceBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionSurfaceBrush>(result__) } } pub fn CreateSurfaceBrushWithSurface<'a, Param0: ::windows::core::IntoParam<'a, ICompositionSurface>>(&self, surface: Param0) -> ::windows::core::Result<CompositionSurfaceBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), surface.into_param().abi(), &mut result__).from_abi::<CompositionSurfaceBrush>(result__) } } pub fn CreateTargetForCurrentView(&self) -> ::windows::core::Result<CompositionTarget> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionTarget>(result__) } } pub fn CreateVector2KeyFrameAnimation(&self) -> ::windows::core::Result<Vector2KeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Vector2KeyFrameAnimation>(result__) } } pub fn CreateVector3KeyFrameAnimation(&self) -> ::windows::core::Result<Vector3KeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Vector3KeyFrameAnimation>(result__) } } pub fn CreateVector4KeyFrameAnimation(&self) -> ::windows::core::Result<Vector4KeyFrameAnimation> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Vector4KeyFrameAnimation>(result__) } } pub fn GetCommitBatch(&self, batchtype: CompositionBatchTypes) -> ::windows::core::Result<CompositionCommitBatch> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), batchtype, &mut result__).from_abi::<CompositionCommitBatch>(result__) } } pub fn CreateAmbientLight(&self) -> ::windows::core::Result<AmbientLight> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AmbientLight>(result__) } } pub fn CreateAnimationGroup(&self) -> ::windows::core::Result<CompositionAnimationGroup> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionAnimationGroup>(result__) } } pub fn CreateBackdropBrush(&self) -> ::windows::core::Result<CompositionBackdropBrush> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackdropBrush>(result__) } } pub fn CreateDistantLight(&self) -> ::windows::core::Result<DistantLight> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<DistantLight>(result__) } } pub fn CreateDropShadow(&self) -> ::windows::core::Result<DropShadow> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<DropShadow>(result__) } } pub fn CreateImplicitAnimationCollection(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn CreateLayerVisual(&self) -> ::windows::core::Result<LayerVisual> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LayerVisual>(result__) } } pub fn CreateMaskBrush(&self) -> ::windows::core::Result<CompositionMaskBrush> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionMaskBrush>(result__) } } pub fn CreateNineGridBrush(&self) -> ::windows::core::Result<CompositionNineGridBrush> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionNineGridBrush>(result__) } } pub fn CreatePointLight(&self) -> ::windows::core::Result<PointLight> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PointLight>(result__) } } pub fn CreateSpotLight(&self) -> ::windows::core::Result<SpotLight> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpotLight>(result__) } } pub fn CreateStepEasingFunction(&self) -> ::windows::core::Result<StepEasingFunction> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<StepEasingFunction>(result__) } } pub fn CreateStepEasingFunctionWithStepCount(&self, stepcount: i32) -> ::windows::core::Result<StepEasingFunction> { let this = &::windows::core::Interface::cast::<ICompositor2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), stepcount, &mut result__).from_abi::<StepEasingFunction>(result__) } } pub fn CreateHostBackdropBrush(&self) -> ::windows::core::Result<CompositionBackdropBrush> { let this = &::windows::core::Interface::cast::<ICompositor3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackdropBrush>(result__) } } pub fn CreateColorGradientStop(&self) -> ::windows::core::Result<CompositionColorGradientStop> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionColorGradientStop>(result__) } } pub fn CreateColorGradientStopWithOffsetAndColor<'a, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, offset: f32, color: Param1) -> ::windows::core::Result<CompositionColorGradientStop> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), offset, color.into_param().abi(), &mut result__).from_abi::<CompositionColorGradientStop>(result__) } } pub fn CreateLinearGradientBrush(&self) -> ::windows::core::Result<CompositionLinearGradientBrush> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionLinearGradientBrush>(result__) } } pub fn CreateSpringScalarAnimation(&self) -> ::windows::core::Result<SpringScalarNaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpringScalarNaturalMotionAnimation>(result__) } } pub fn CreateSpringVector2Animation(&self) -> ::windows::core::Result<SpringVector2NaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpringVector2NaturalMotionAnimation>(result__) } } pub fn CreateSpringVector3Animation(&self) -> ::windows::core::Result<SpringVector3NaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpringVector3NaturalMotionAnimation>(result__) } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn GlobalPlaybackRate(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetGlobalPlaybackRate(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn CreateBounceScalarAnimation(&self) -> ::windows::core::Result<BounceScalarNaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BounceScalarNaturalMotionAnimation>(result__) } } pub fn CreateBounceVector2Animation(&self) -> ::windows::core::Result<BounceVector2NaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BounceVector2NaturalMotionAnimation>(result__) } } pub fn CreateBounceVector3Animation(&self) -> ::windows::core::Result<BounceVector3NaturalMotionAnimation> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BounceVector3NaturalMotionAnimation>(result__) } } pub fn CreateContainerShape(&self) -> ::windows::core::Result<CompositionContainerShape> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionContainerShape>(result__) } } pub fn CreateEllipseGeometry(&self) -> ::windows::core::Result<CompositionEllipseGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEllipseGeometry>(result__) } } pub fn CreateLineGeometry(&self) -> ::windows::core::Result<CompositionLineGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionLineGeometry>(result__) } } pub fn CreatePathGeometry(&self) -> ::windows::core::Result<CompositionPathGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPathGeometry>(result__) } } pub fn CreatePathGeometryWithPath<'a, Param0: ::windows::core::IntoParam<'a, CompositionPath>>(&self, path: Param0) -> ::windows::core::Result<CompositionPathGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), path.into_param().abi(), &mut result__).from_abi::<CompositionPathGeometry>(result__) } } pub fn CreatePathKeyFrameAnimation(&self) -> ::windows::core::Result<PathKeyFrameAnimation> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PathKeyFrameAnimation>(result__) } } pub fn CreateRectangleGeometry(&self) -> ::windows::core::Result<CompositionRectangleGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionRectangleGeometry>(result__) } } pub fn CreateRoundedRectangleGeometry(&self) -> ::windows::core::Result<CompositionRoundedRectangleGeometry> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionRoundedRectangleGeometry>(result__) } } pub fn CreateShapeVisual(&self) -> ::windows::core::Result<ShapeVisual> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ShapeVisual>(result__) } } pub fn CreateSpriteShape(&self) -> ::windows::core::Result<CompositionSpriteShape> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionSpriteShape>(result__) } } pub fn CreateSpriteShapeWithGeometry<'a, Param0: ::windows::core::IntoParam<'a, CompositionGeometry>>(&self, geometry: Param0) -> ::windows::core::Result<CompositionSpriteShape> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), geometry.into_param().abi(), &mut result__).from_abi::<CompositionSpriteShape>(result__) } } pub fn CreateViewBox(&self) -> ::windows::core::Result<CompositionViewBox> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionViewBox>(result__) } } #[cfg(feature = "Foundation")] pub fn RequestCommitAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = &::windows::core::Interface::cast::<ICompositor5>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } pub fn MaxGlobalPlaybackRate() -> ::windows::core::Result<f32> { Self::ICompositorStatics(|this| unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) }) } pub fn MinGlobalPlaybackRate() -> ::windows::core::Result<f32> { Self::ICompositorStatics(|this| unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) }) } pub fn CreateGeometricClip(&self) -> ::windows::core::Result<CompositionGeometricClip> { let this = &::windows::core::Interface::cast::<ICompositor6>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGeometricClip>(result__) } } pub fn CreateGeometricClipWithGeometry<'a, Param0: ::windows::core::IntoParam<'a, CompositionGeometry>>(&self, geometry: Param0) -> ::windows::core::Result<CompositionGeometricClip> { let this = &::windows::core::Interface::cast::<ICompositor6>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), geometry.into_param().abi(), &mut result__).from_abi::<CompositionGeometricClip>(result__) } } pub fn CreateRedirectVisual(&self) -> ::windows::core::Result<RedirectVisual> { let this = &::windows::core::Interface::cast::<ICompositor6>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<RedirectVisual>(result__) } } pub fn CreateRedirectVisualWithSourceVisual<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, source: Param0) -> ::windows::core::Result<RedirectVisual> { let this = &::windows::core::Interface::cast::<ICompositor6>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), source.into_param().abi(), &mut result__).from_abi::<RedirectVisual>(result__) } } pub fn CreateBooleanKeyFrameAnimation(&self) -> ::windows::core::Result<BooleanKeyFrameAnimation> { let this = &::windows::core::Interface::cast::<ICompositor6>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BooleanKeyFrameAnimation>(result__) } } pub fn CreateProjectedShadowCaster(&self) -> ::windows::core::Result<CompositionProjectedShadowCaster> { let this = &::windows::core::Interface::cast::<ICompositorWithProjectedShadow>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionProjectedShadowCaster>(result__) } } pub fn CreateProjectedShadow(&self) -> ::windows::core::Result<CompositionProjectedShadow> { let this = &::windows::core::Interface::cast::<ICompositorWithProjectedShadow>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionProjectedShadow>(result__) } } pub fn CreateProjectedShadowReceiver(&self) -> ::windows::core::Result<CompositionProjectedShadowReceiver> { let this = &::windows::core::Interface::cast::<ICompositorWithProjectedShadow>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionProjectedShadowReceiver>(result__) } } pub fn CreateRadialGradientBrush(&self) -> ::windows::core::Result<CompositionRadialGradientBrush> { let this = &::windows::core::Interface::cast::<ICompositorWithRadialGradient>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionRadialGradientBrush>(result__) } } pub fn CreateVisualSurface(&self) -> ::windows::core::Result<CompositionVisualSurface> { let this = &::windows::core::Interface::cast::<ICompositorWithVisualSurface>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionVisualSurface>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositor7>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn CreateAnimationPropertyInfo(&self) -> ::windows::core::Result<AnimationPropertyInfo> { let this = &::windows::core::Interface::cast::<ICompositor7>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationPropertyInfo>(result__) } } pub fn CreateRectangleClip(&self) -> ::windows::core::Result<RectangleClip> { let this = &::windows::core::Interface::cast::<ICompositor7>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<RectangleClip>(result__) } } pub fn CreateRectangleClipWithSides(&self, left: f32, top: f32, right: f32, bottom: f32) -> ::windows::core::Result<RectangleClip> { let this = &::windows::core::Interface::cast::<ICompositor7>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), left, top, right, bottom, &mut result__).from_abi::<RectangleClip>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn CreateRectangleClipWithSidesAndRadius<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>( &self, left: f32, top: f32, right: f32, bottom: f32, topleftradius: Param4, toprightradius: Param5, bottomrightradius: Param6, bottomleftradius: Param7, ) -> ::windows::core::Result<RectangleClip> { let this = &::windows::core::Interface::cast::<ICompositor7>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), left, top, right, bottom, topleftradius.into_param().abi(), toprightradius.into_param().abi(), bottomrightradius.into_param().abi(), bottomleftradius.into_param().abi(), &mut result__).from_abi::<RectangleClip>(result__) } } pub fn TryCreateBlurredWallpaperBackdropBrush(&self) -> ::windows::core::Result<CompositionBackdropBrush> { let this = &::windows::core::Interface::cast::<ICompositorWithBlurredWallpaperBackdropBrush>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackdropBrush>(result__) } } pub fn ICompositorStatics<R, F: FnOnce(&ICompositorStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<Compositor, ICompositorStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for Compositor { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Compositor;{b403ca50-7f8c-4e83-985f-cc45060036d8})"); } unsafe impl ::windows::core::Interface for Compositor { type Vtable = ICompositor_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb403ca50_7f8c_4e83_985f_cc45060036d8); } impl ::windows::core::RuntimeName for Compositor { const NAME: &'static str = "Windows.UI.Composition.Compositor"; } impl ::core::convert::From<Compositor> for ::windows::core::IUnknown { fn from(value: Compositor) -> Self { value.0 .0 } } impl ::core::convert::From<&Compositor> for ::windows::core::IUnknown { fn from(value: &Compositor) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Compositor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Compositor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Compositor> for ::windows::core::IInspectable { fn from(value: Compositor) -> Self { value.0 } } impl ::core::convert::From<&Compositor> for ::windows::core::IInspectable { fn from(value: &Compositor) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Compositor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Compositor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Compositor> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Compositor) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Compositor> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Compositor) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Compositor { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Compositor { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for Compositor {} unsafe impl ::core::marker::Sync for Compositor {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ContainerVisual(pub ::windows::core::IInspectable); impl ContainerVisual { pub fn Children(&self) -> ::windows::core::Result<VisualCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualCollection>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for ContainerVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ContainerVisual;{02f6bc74-ed20-4773-afe6-d49b4a93db32})"); } unsafe impl ::windows::core::Interface for ContainerVisual { type Vtable = IContainerVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02f6bc74_ed20_4773_afe6_d49b4a93db32); } impl ::windows::core::RuntimeName for ContainerVisual { const NAME: &'static str = "Windows.UI.Composition.ContainerVisual"; } impl ::core::convert::From<ContainerVisual> for ::windows::core::IUnknown { fn from(value: ContainerVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&ContainerVisual> for ::windows::core::IUnknown { fn from(value: &ContainerVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ContainerVisual> for ::windows::core::IInspectable { fn from(value: ContainerVisual) -> Self { value.0 } } impl ::core::convert::From<&ContainerVisual> for ::windows::core::IInspectable { fn from(value: &ContainerVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ContainerVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ContainerVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ContainerVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ContainerVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ContainerVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ContainerVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ContainerVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ContainerVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ContainerVisual> for Visual { fn from(value: ContainerVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&ContainerVisual> for Visual { fn from(value: &ContainerVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ContainerVisual> for CompositionObject { fn from(value: ContainerVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ContainerVisual> for CompositionObject { fn from(value: &ContainerVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ContainerVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ContainerVisual {} unsafe impl ::core::marker::Sync for ContainerVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CubicBezierEasingFunction(pub ::windows::core::IInspectable); impl CubicBezierEasingFunction { #[cfg(feature = "Foundation_Numerics")] pub fn ControlPoint1(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn ControlPoint2(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for CubicBezierEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.CubicBezierEasingFunction;{32350666-c1e8-44f9-96b8-c98acf0ae698})"); } unsafe impl ::windows::core::Interface for CubicBezierEasingFunction { type Vtable = ICubicBezierEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x32350666_c1e8_44f9_96b8_c98acf0ae698); } impl ::windows::core::RuntimeName for CubicBezierEasingFunction { const NAME: &'static str = "Windows.UI.Composition.CubicBezierEasingFunction"; } impl ::core::convert::From<CubicBezierEasingFunction> for ::windows::core::IUnknown { fn from(value: CubicBezierEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&CubicBezierEasingFunction> for ::windows::core::IUnknown { fn from(value: &CubicBezierEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CubicBezierEasingFunction> for ::windows::core::IInspectable { fn from(value: CubicBezierEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&CubicBezierEasingFunction> for ::windows::core::IInspectable { fn from(value: &CubicBezierEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CubicBezierEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CubicBezierEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CubicBezierEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CubicBezierEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<CubicBezierEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: CubicBezierEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&CubicBezierEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &CubicBezierEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CubicBezierEasingFunction> for CompositionEasingFunction { fn from(value: CubicBezierEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&CubicBezierEasingFunction> for CompositionEasingFunction { fn from(value: &CubicBezierEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CubicBezierEasingFunction> for CompositionObject { fn from(value: CubicBezierEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&CubicBezierEasingFunction> for CompositionObject { fn from(value: &CubicBezierEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &CubicBezierEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CubicBezierEasingFunction {} unsafe impl ::core::marker::Sync for CubicBezierEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct DelegatedInkTrailVisual(pub ::windows::core::IInspectable); impl DelegatedInkTrailVisual { #[cfg(feature = "Foundation")] pub fn AddTrailPoints(&self, inkpoints: &[<InkTrailPoint as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), inkpoints.len() as u32, ::core::mem::transmute(inkpoints.as_ptr()), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation")] pub fn AddTrailPointsWithPrediction(&self, inkpoints: &[<InkTrailPoint as ::windows::core::DefaultType>::DefaultType], predictedinkpoints: &[<InkTrailPoint as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), inkpoints.len() as u32, ::core::mem::transmute(inkpoints.as_ptr()), predictedinkpoints.len() as u32, ::core::mem::transmute(predictedinkpoints.as_ptr()), &mut result__).from_abi::<u32>(result__) } } pub fn RemoveTrailPoints(&self, generationid: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), generationid).ok() } } pub fn StartNewTrail<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, color: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), color.into_param().abi()).ok() } } pub fn Create<'a, Param0: ::windows::core::IntoParam<'a, Compositor>>(compositor: Param0) -> ::windows::core::Result<DelegatedInkTrailVisual> { Self::IDelegatedInkTrailVisualStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), compositor.into_param().abi(), &mut result__).from_abi::<DelegatedInkTrailVisual>(result__) }) } pub fn CreateForSwapChain<'a, Param0: ::windows::core::IntoParam<'a, Compositor>, Param1: ::windows::core::IntoParam<'a, ICompositionSurface>>(compositor: Param0, swapchain: Param1) -> ::windows::core::Result<DelegatedInkTrailVisual> { Self::IDelegatedInkTrailVisualStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), compositor.into_param().abi(), swapchain.into_param().abi(), &mut result__).from_abi::<DelegatedInkTrailVisual>(result__) }) } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IDelegatedInkTrailVisualStatics<R, F: FnOnce(&IDelegatedInkTrailVisualStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<DelegatedInkTrailVisual, IDelegatedInkTrailVisualStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for DelegatedInkTrailVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.DelegatedInkTrailVisual;{856e60b1-e1ab-5b23-8e3d-d513f221c998})"); } unsafe impl ::windows::core::Interface for DelegatedInkTrailVisual { type Vtable = IDelegatedInkTrailVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x856e60b1_e1ab_5b23_8e3d_d513f221c998); } impl ::windows::core::RuntimeName for DelegatedInkTrailVisual { const NAME: &'static str = "Windows.UI.Composition.DelegatedInkTrailVisual"; } impl ::core::convert::From<DelegatedInkTrailVisual> for ::windows::core::IUnknown { fn from(value: DelegatedInkTrailVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&DelegatedInkTrailVisual> for ::windows::core::IUnknown { fn from(value: &DelegatedInkTrailVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<DelegatedInkTrailVisual> for ::windows::core::IInspectable { fn from(value: DelegatedInkTrailVisual) -> Self { value.0 } } impl ::core::convert::From<&DelegatedInkTrailVisual> for ::windows::core::IInspectable { fn from(value: &DelegatedInkTrailVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<DelegatedInkTrailVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: DelegatedInkTrailVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&DelegatedInkTrailVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &DelegatedInkTrailVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<DelegatedInkTrailVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: DelegatedInkTrailVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&DelegatedInkTrailVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &DelegatedInkTrailVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<DelegatedInkTrailVisual> for Visual { fn from(value: DelegatedInkTrailVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&DelegatedInkTrailVisual> for Visual { fn from(value: &DelegatedInkTrailVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DelegatedInkTrailVisual> for CompositionObject { fn from(value: DelegatedInkTrailVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&DelegatedInkTrailVisual> for CompositionObject { fn from(value: &DelegatedInkTrailVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &DelegatedInkTrailVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for DelegatedInkTrailVisual {} unsafe impl ::core::marker::Sync for DelegatedInkTrailVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct DistantLight(pub ::windows::core::IInspectable); impl DistantLight { pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CoordinateSpace(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetCoordinateSpace<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Direction(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetDirection<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Intensity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IDistantLight2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetIntensity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IDistantLight2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Targets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ExclusionsFromTargets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for DistantLight { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.DistantLight;{318cfafc-5ce3-4b55-ab5d-07a00353ac99})"); } unsafe impl ::windows::core::Interface for DistantLight { type Vtable = IDistantLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x318cfafc_5ce3_4b55_ab5d_07a00353ac99); } impl ::windows::core::RuntimeName for DistantLight { const NAME: &'static str = "Windows.UI.Composition.DistantLight"; } impl ::core::convert::From<DistantLight> for ::windows::core::IUnknown { fn from(value: DistantLight) -> Self { value.0 .0 } } impl ::core::convert::From<&DistantLight> for ::windows::core::IUnknown { fn from(value: &DistantLight) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a DistantLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<DistantLight> for ::windows::core::IInspectable { fn from(value: DistantLight) -> Self { value.0 } } impl ::core::convert::From<&DistantLight> for ::windows::core::IInspectable { fn from(value: &DistantLight) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a DistantLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<DistantLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: DistantLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&DistantLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &DistantLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &DistantLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<DistantLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: DistantLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&DistantLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &DistantLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &DistantLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<DistantLight> for CompositionLight { fn from(value: DistantLight) -> Self { ::core::convert::Into::<CompositionLight>::into(&value) } } impl ::core::convert::From<&DistantLight> for CompositionLight { fn from(value: &DistantLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for &DistantLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DistantLight> for CompositionObject { fn from(value: DistantLight) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&DistantLight> for CompositionObject { fn from(value: &DistantLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for DistantLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &DistantLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for DistantLight {} unsafe impl ::core::marker::Sync for DistantLight {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct DropShadow(pub ::windows::core::IInspectable); impl DropShadow { pub fn BlurRadius(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBlurRadius(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Mask(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetMask<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn SourcePolicy(&self) -> ::windows::core::Result<CompositionDropShadowSourcePolicy> { let this = &::windows::core::Interface::cast::<IDropShadow2>(self)?; unsafe { let mut result__: CompositionDropShadowSourcePolicy = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionDropShadowSourcePolicy>(result__) } } pub fn SetSourcePolicy(&self, value: CompositionDropShadowSourcePolicy) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IDropShadow2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for DropShadow { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.DropShadow;{cb977c07-a154-4851-85e7-a8924c84fad8})"); } unsafe impl ::windows::core::Interface for DropShadow { type Vtable = IDropShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcb977c07_a154_4851_85e7_a8924c84fad8); } impl ::windows::core::RuntimeName for DropShadow { const NAME: &'static str = "Windows.UI.Composition.DropShadow"; } impl ::core::convert::From<DropShadow> for ::windows::core::IUnknown { fn from(value: DropShadow) -> Self { value.0 .0 } } impl ::core::convert::From<&DropShadow> for ::windows::core::IUnknown { fn from(value: &DropShadow) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a DropShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<DropShadow> for ::windows::core::IInspectable { fn from(value: DropShadow) -> Self { value.0 } } impl ::core::convert::From<&DropShadow> for ::windows::core::IInspectable { fn from(value: &DropShadow) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a DropShadow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<DropShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: DropShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&DropShadow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &DropShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &DropShadow { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<DropShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: DropShadow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&DropShadow> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &DropShadow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &DropShadow { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<DropShadow> for CompositionShadow { fn from(value: DropShadow) -> Self { ::core::convert::Into::<CompositionShadow>::into(&value) } } impl ::core::convert::From<&DropShadow> for CompositionShadow { fn from(value: &DropShadow) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionShadow> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionShadow> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShadow>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionShadow> for &DropShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionShadow> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionShadow>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DropShadow> for CompositionObject { fn from(value: DropShadow) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&DropShadow> for CompositionObject { fn from(value: &DropShadow) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for DropShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &DropShadow { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for DropShadow {} unsafe impl ::core::marker::Sync for DropShadow {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ElasticEasingFunction(pub ::windows::core::IInspectable); impl ElasticEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } pub fn Oscillations(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn Springiness(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ElasticEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ElasticEasingFunction;{66de6285-054e-5594-8475-c22cb51f1bd5})"); } unsafe impl ::windows::core::Interface for ElasticEasingFunction { type Vtable = IElasticEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66de6285_054e_5594_8475_c22cb51f1bd5); } impl ::windows::core::RuntimeName for ElasticEasingFunction { const NAME: &'static str = "Windows.UI.Composition.ElasticEasingFunction"; } impl ::core::convert::From<ElasticEasingFunction> for ::windows::core::IUnknown { fn from(value: ElasticEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&ElasticEasingFunction> for ::windows::core::IUnknown { fn from(value: &ElasticEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ElasticEasingFunction> for ::windows::core::IInspectable { fn from(value: ElasticEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&ElasticEasingFunction> for ::windows::core::IInspectable { fn from(value: &ElasticEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ElasticEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ElasticEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ElasticEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ElasticEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ElasticEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ElasticEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ElasticEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ElasticEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ElasticEasingFunction> for CompositionEasingFunction { fn from(value: ElasticEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&ElasticEasingFunction> for CompositionEasingFunction { fn from(value: &ElasticEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ElasticEasingFunction> for CompositionObject { fn from(value: ElasticEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ElasticEasingFunction> for CompositionObject { fn from(value: &ElasticEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ElasticEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ElasticEasingFunction {} unsafe impl ::core::marker::Sync for ElasticEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ExponentialEasingFunction(pub ::windows::core::IInspectable); impl ExponentialEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } pub fn Exponent(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ExponentialEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ExponentialEasingFunction;{6f7d1a51-98d2-5638-a34a-00486554c750})"); } unsafe impl ::windows::core::Interface for ExponentialEasingFunction { type Vtable = IExponentialEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6f7d1a51_98d2_5638_a34a_00486554c750); } impl ::windows::core::RuntimeName for ExponentialEasingFunction { const NAME: &'static str = "Windows.UI.Composition.ExponentialEasingFunction"; } impl ::core::convert::From<ExponentialEasingFunction> for ::windows::core::IUnknown { fn from(value: ExponentialEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&ExponentialEasingFunction> for ::windows::core::IUnknown { fn from(value: &ExponentialEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ExponentialEasingFunction> for ::windows::core::IInspectable { fn from(value: ExponentialEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&ExponentialEasingFunction> for ::windows::core::IInspectable { fn from(value: &ExponentialEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ExponentialEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ExponentialEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ExponentialEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ExponentialEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ExponentialEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ExponentialEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ExponentialEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ExponentialEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ExponentialEasingFunction> for CompositionEasingFunction { fn from(value: ExponentialEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&ExponentialEasingFunction> for CompositionEasingFunction { fn from(value: &ExponentialEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ExponentialEasingFunction> for CompositionObject { fn from(value: ExponentialEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ExponentialEasingFunction> for CompositionObject { fn from(value: &ExponentialEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ExponentialEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ExponentialEasingFunction {} unsafe impl ::core::marker::Sync for ExponentialEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ExpressionAnimation(pub ::windows::core::IInspectable); impl ExpressionAnimation { pub fn Expression(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetExpression<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ExpressionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ExpressionAnimation;{6acc5431-7d3d-4bf3-abb6-f44bdc4888c1})"); } unsafe impl ::windows::core::Interface for ExpressionAnimation { type Vtable = IExpressionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6acc5431_7d3d_4bf3_abb6_f44bdc4888c1); } impl ::windows::core::RuntimeName for ExpressionAnimation { const NAME: &'static str = "Windows.UI.Composition.ExpressionAnimation"; } impl ::core::convert::From<ExpressionAnimation> for ::windows::core::IUnknown { fn from(value: ExpressionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&ExpressionAnimation> for ::windows::core::IUnknown { fn from(value: &ExpressionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ExpressionAnimation> for ::windows::core::IInspectable { fn from(value: ExpressionAnimation) -> Self { value.0 } } impl ::core::convert::From<&ExpressionAnimation> for ::windows::core::IInspectable { fn from(value: &ExpressionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ExpressionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ExpressionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ExpressionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ExpressionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ExpressionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: ExpressionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ExpressionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &ExpressionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ExpressionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ExpressionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ExpressionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ExpressionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ExpressionAnimation> for CompositionAnimation { fn from(value: ExpressionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&ExpressionAnimation> for CompositionAnimation { fn from(value: &ExpressionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ExpressionAnimation> for CompositionObject { fn from(value: ExpressionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ExpressionAnimation> for CompositionObject { fn from(value: &ExpressionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ExpressionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ExpressionAnimation {} unsafe impl ::core::marker::Sync for ExpressionAnimation {} #[repr(transparent)] #[doc(hidden)] pub struct IAmbientLight(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAmbientLight { type Vtable = IAmbientLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa48130a1_b7c4_46f7_b9bf_daf43a44e6ee); } #[repr(C)] #[doc(hidden)] pub struct IAmbientLight_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAmbientLight2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAmbientLight2 { type Vtable = IAmbientLight2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3b64a6bf_5f97_4c94_86e5_042dd386b27d); } #[repr(C)] #[doc(hidden)] pub struct IAmbientLight2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAnimationController(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAnimationController { type Vtable = IAnimationController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc934efd2_0722_4f5f_a4e2_9510f3d43bf7); } #[repr(C)] #[doc(hidden)] pub struct IAnimationController_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationControllerProgressBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationControllerProgressBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAnimationControllerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAnimationControllerStatics { type Vtable = IAnimationControllerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe71164df_651b_4800_b9e5_6a3bcfed3365); } #[repr(C)] #[doc(hidden)] pub struct IAnimationControllerStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IAnimationObject(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAnimationObject { type Vtable = IAnimationObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe7141e0a_04b8_4fc5_a4dc_195392e57807); } impl IAnimationObject { pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for IAnimationObject { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{e7141e0a-04b8-4fc5-a4dc-195392e57807}"); } impl ::core::convert::From<IAnimationObject> for ::windows::core::IUnknown { fn from(value: IAnimationObject) -> Self { value.0 .0 } } impl ::core::convert::From<&IAnimationObject> for ::windows::core::IUnknown { fn from(value: &IAnimationObject) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IAnimationObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IAnimationObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IAnimationObject> for ::windows::core::IInspectable { fn from(value: IAnimationObject) -> Self { value.0 } } impl ::core::convert::From<&IAnimationObject> for ::windows::core::IInspectable { fn from(value: &IAnimationObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IAnimationObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IAnimationObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IAnimationObject_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, propertyinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAnimationPropertyInfo(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAnimationPropertyInfo { type Vtable = IAnimationPropertyInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf4716f05_ed77_4e3c_b328_5c3985b3738f); } #[repr(C)] #[doc(hidden)] pub struct IAnimationPropertyInfo_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationPropertyAccessMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationPropertyAccessMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAnimationPropertyInfo2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAnimationPropertyInfo2 { type Vtable = IAnimationPropertyInfo2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x591720b4_7472_5218_8b39_dffe615ae6da); } #[repr(C)] #[doc(hidden)] pub struct IAnimationPropertyInfo2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBackEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBackEasingFunction { type Vtable = IBackEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8560da4_5e3c_545d_b263_7987a2bd27cb); } #[repr(C)] #[doc(hidden)] pub struct IBackEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBooleanKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBooleanKeyFrameAnimation { type Vtable = IBooleanKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x95e23a08_d1f4_4972_9770_3efe68d82e14); } #[repr(C)] #[doc(hidden)] pub struct IBooleanKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBounceEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBounceEasingFunction { type Vtable = IBounceEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe7fdb44b_aad5_5174_9421_eef8b75a6a43); } #[repr(C)] #[doc(hidden)] pub struct IBounceEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBounceScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBounceScalarNaturalMotionAnimation { type Vtable = IBounceScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbaa30dcc_a633_4618_9b06_7f7c72c87cff); } #[repr(C)] #[doc(hidden)] pub struct IBounceScalarNaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBounceVector2NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBounceVector2NaturalMotionAnimation { type Vtable = IBounceVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda344196_2154_4b3c_88aa_47361204eccd); } #[repr(C)] #[doc(hidden)] pub struct IBounceVector2NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBounceVector3NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBounceVector3NaturalMotionAnimation { type Vtable = IBounceVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x47dabc31_10d3_4518_86f1_09caf742d113); } #[repr(C)] #[doc(hidden)] pub struct IBounceVector3NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICircleEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICircleEasingFunction { type Vtable = ICircleEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e07222a_6f82_5a28_8748_2e92fc46ee2b); } #[repr(C)] #[doc(hidden)] pub struct ICircleEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IColorKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IColorKeyFrameAnimation { type Vtable = IColorKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93adb5e9_8e05_4593_84a3_dca152781e56); } #[repr(C)] #[doc(hidden)] pub struct IColorKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionColorSpace) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionColorSpace) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::Color, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimation { type Vtable = ICompositionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x464c4c2c_1caa_4061_9b40_e13fde1503ca); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::Color) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Matrix4x4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, compositionobject: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimation2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimation2 { type Vtable = ICompositionAnimation2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x369b603e_a80f_4948_93e3_ed23fb38c6cb); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimation2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimation3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimation3 { type Vtable = ICompositionAnimation3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd51e030d_7da4_4bd7_bc2d_f4517529f43a); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimation3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimation4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimation4 { type Vtable = ICompositionAnimation4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x770137be_76bc_4e23_bfed_fe9cc20f6ec9); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimation4_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, parametername: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICompositionAnimationBase(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimationBase { type Vtable = ICompositionAnimationBase_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1c2c2999_e818_48d3_a6dd_d78c82f8ace9); } impl ICompositionAnimationBase {} unsafe impl ::windows::core::RuntimeType for ICompositionAnimationBase { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{1c2c2999-e818-48d3-a6dd-d78c82f8ace9}"); } impl ::core::convert::From<ICompositionAnimationBase> for ::windows::core::IUnknown { fn from(value: ICompositionAnimationBase) -> Self { value.0 .0 } } impl ::core::convert::From<&ICompositionAnimationBase> for ::windows::core::IUnknown { fn from(value: &ICompositionAnimationBase) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICompositionAnimationBase { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICompositionAnimationBase { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICompositionAnimationBase> for ::windows::core::IInspectable { fn from(value: ICompositionAnimationBase) -> Self { value.0 } } impl ::core::convert::From<&ICompositionAnimationBase> for ::windows::core::IInspectable { fn from(value: &ICompositionAnimationBase) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICompositionAnimationBase { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ICompositionAnimationBase { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimationBase_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimationFactory { type Vtable = ICompositionAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x10f6c4fb_6e51_4c25_bbd3_586a9bec3ef4); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionAnimationGroup(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionAnimationGroup { type Vtable = ICompositionAnimationGroup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e7cc90c_cd14_4e07_8a55_c72527aabdac); } #[repr(C)] #[doc(hidden)] pub struct ICompositionAnimationGroup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionBackdropBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionBackdropBrush { type Vtable = ICompositionBackdropBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc5acae58_3898_499e_8d7f_224e91286a5d); } #[repr(C)] #[doc(hidden)] pub struct ICompositionBackdropBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionBatchCompletedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionBatchCompletedEventArgs { type Vtable = ICompositionBatchCompletedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_9464_450a_a562_2e2698b0a812); } #[repr(C)] #[doc(hidden)] pub struct ICompositionBatchCompletedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionBrush { type Vtable = ICompositionBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab0d7608_30c0_40e9_b568_b60a6bd1fb46); } #[repr(C)] #[doc(hidden)] pub struct ICompositionBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionBrushFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionBrushFactory { type Vtable = ICompositionBrushFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda53fb4c_4650_47c4_ad76_765379607ed6); } #[repr(C)] #[doc(hidden)] pub struct ICompositionBrushFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionCapabilities { type Vtable = ICompositionCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8253353e_b517_48bc_b1e8_4b3561a2e181); } #[repr(C)] #[doc(hidden)] pub struct ICompositionCapabilities_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionCapabilitiesStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionCapabilitiesStatics { type Vtable = ICompositionCapabilitiesStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf7b7a86e_6416_49e5_8ddf_afe949e20562); } #[repr(C)] #[doc(hidden)] pub struct ICompositionCapabilitiesStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionClip(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionClip { type Vtable = ICompositionClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1ccd2a52_cfc7_4ace_9983_146bb8eb6a3c); } #[repr(C)] #[doc(hidden)] pub struct ICompositionClip_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionClip2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionClip2 { type Vtable = ICompositionClip2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5893e069_3516_40e1_89e0_5ba924927235); } #[repr(C)] #[doc(hidden)] pub struct ICompositionClip2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionClipFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionClipFactory { type Vtable = ICompositionClipFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9484caf_20c7_4aed_ac4a_9c78ba1302cf); } #[repr(C)] #[doc(hidden)] pub struct ICompositionClipFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionColorBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionColorBrush { type Vtable = ICompositionColorBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2b264c5e_bf35_4831_8642_cf70c20fff2f); } #[repr(C)] #[doc(hidden)] pub struct ICompositionColorBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionColorGradientStop(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionColorGradientStop { type Vtable = ICompositionColorGradientStop_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6f00ca92_c801_4e41_9a8f_a53e20f57778); } #[repr(C)] #[doc(hidden)] pub struct ICompositionColorGradientStop_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionColorGradientStopCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionColorGradientStopCollection { type Vtable = ICompositionColorGradientStopCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f1d20ec_7b04_4b1d_90bc_9fa32c0cfd26); } #[repr(C)] #[doc(hidden)] pub struct ICompositionColorGradientStopCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionCommitBatch(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionCommitBatch { type Vtable = ICompositionCommitBatch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_ca07_4400_8c8e_cb5db08559cc); } #[repr(C)] #[doc(hidden)] pub struct ICompositionCommitBatch_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionContainerShape(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionContainerShape { type Vtable = ICompositionContainerShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4f5e859b_2e5b_44a8_982c_aa0f69c16059); } #[repr(C)] #[doc(hidden)] pub struct ICompositionContainerShape_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionDrawingSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionDrawingSurface { type Vtable = ICompositionDrawingSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa166c300_fad0_4d11_9e67_e433162ff49e); } #[repr(C)] #[doc(hidden)] pub struct ICompositionDrawingSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_DirectX")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX"))] usize, #[cfg(feature = "Graphics_DirectX")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::DirectX::DirectXPixelFormat) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Size) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionDrawingSurface2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionDrawingSurface2 { type Vtable = ICompositionDrawingSurface2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfad0e88b_e354_44e8_8e3d_c4880d5a213f); } #[repr(C)] #[doc(hidden)] pub struct ICompositionDrawingSurface2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::SizeInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sizepixels: super::super::Graphics::SizeInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, offset: super::super::Graphics::PointInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, offset: super::super::Graphics::PointInt32, scrollrect: super::super::Graphics::RectInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, offset: super::super::Graphics::PointInt32, cliprect: super::super::Graphics::RectInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, offset: super::super::Graphics::PointInt32, cliprect: super::super::Graphics::RectInt32, scrollrect: super::super::Graphics::RectInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionDrawingSurfaceFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionDrawingSurfaceFactory { type Vtable = ICompositionDrawingSurfaceFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9497b00a_312d_46b9_9db3_412fd79464c8); } #[repr(C)] #[doc(hidden)] pub struct ICompositionDrawingSurfaceFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEasingFunction { type Vtable = ICompositionEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5145e356_bf79_4ea8_8cc2_6b5b472e6c9a); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEasingFunctionFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEasingFunctionFactory { type Vtable = ICompositionEasingFunctionFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x60840774_3da0_4949_8200_7206c00190a0); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEasingFunctionFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEasingFunctionStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEasingFunctionStatics { type Vtable = ICompositionEasingFunctionStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x17a766b6_2936_53ea_b5af_c642f4a61083); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEasingFunctionStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, controlpoint1: super::super::Foundation::Numerics::Vector2, controlpoint2: super::super::Foundation::Numerics::Vector2, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, stepcount: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, amplitude: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, bounces: i32, bounciness: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, exponent: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, power: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, mode: CompositionEasingFunctionMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEffectBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEffectBrush { type Vtable = ICompositionEffectBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbf7f795e_83cc_44bf_a447_3e3c071789ec); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEffectBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEffectFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEffectFactory { type Vtable = ICompositionEffectFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe5624af_ba7e_4510_9850_41c0b4ff74df); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEffectFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEffectFactoryLoadStatus) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEffectSourceParameter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEffectSourceParameter { type Vtable = ICompositionEffectSourceParameter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x858ab13a_3292_4e4e_b3bb_2b6c6544a6ee); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEffectSourceParameter_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEffectSourceParameterFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEffectSourceParameterFactory { type Vtable = ICompositionEffectSourceParameterFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3d9f276_aba3_4724_acf3_d0397464db1c); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEffectSourceParameterFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionEllipseGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionEllipseGeometry { type Vtable = ICompositionEllipseGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4801f884_f6ad_4b93_afa9_897b64e57b1f); } #[repr(C)] #[doc(hidden)] pub struct ICompositionEllipseGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGeometricClip(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGeometricClip { type Vtable = ICompositionGeometricClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc840b581_81c9_4444_a2c1_ccaece3a50e5); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGeometricClip_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGeometry { type Vtable = ICompositionGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe985217c_6a17_4207_abd8_5fd3dd612a9d); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGeometryFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGeometryFactory { type Vtable = ICompositionGeometryFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbffebfe1_8c25_480b_9f56_fed6b288055d); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGeometryFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGradientBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGradientBrush { type Vtable = ICompositionGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1d9709e0_ffc6_4c0e_a9ab_34144d4c9098); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGradientBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionGradientExtendMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionGradientExtendMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionColorSpace) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionColorSpace) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGradientBrush2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGradientBrush2 { type Vtable = ICompositionGradientBrush2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x899dd5a1_b4c7_4b33_a1b6_264addc26d10); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGradientBrush2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionMappingMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionMappingMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGradientBrushFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGradientBrushFactory { type Vtable = ICompositionGradientBrushFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56d765d7_f189_48c9_9c8d_94daf1bec010); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGradientBrushFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGraphicsDevice(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGraphicsDevice { type Vtable = ICompositionGraphicsDevice_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfb22c6e1_80a2_4667_9936_dbeaf6eefe95); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGraphicsDevice_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Graphics_DirectX"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sizepixels: super::super::Foundation::Size, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Graphics_DirectX")))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGraphicsDevice2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGraphicsDevice2 { type Vtable = ICompositionGraphicsDevice2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0fb8bdf6_c0f0_4bcc_9fb8_084982490d7d); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGraphicsDevice2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sizepixels: super::super::Graphics::SizeInt32, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Graphics", feature = "Graphics_DirectX")))] usize, #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sizepixels: super::super::Graphics::SizeInt32, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Graphics", feature = "Graphics_DirectX")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGraphicsDevice3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGraphicsDevice3 { type Vtable = ICompositionGraphicsDevice3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x37f67514_d3ef_49d1_b69d_0d8eabeb3626); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGraphicsDevice3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Graphics", feature = "Graphics_DirectX"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sizepixels: super::super::Graphics::SizeInt32, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Graphics", feature = "Graphics_DirectX")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionGraphicsDevice4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionGraphicsDevice4 { type Vtable = ICompositionGraphicsDevice4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5a73bff9_a97f_4cf5_ba46_98ef358e71b1); } #[repr(C)] #[doc(hidden)] pub struct ICompositionGraphicsDevice4_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Graphics", feature = "Graphics_DirectX"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, capturevisual: ::windows::core::RawPtr, size: super::super::Graphics::SizeInt32, pixelformat: super::super::Graphics::DirectX::DirectXPixelFormat, alphamode: super::super::Graphics::DirectX::DirectXAlphaMode, sdrboost: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Graphics", feature = "Graphics_DirectX")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLight(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLight { type Vtable = ICompositionLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x41a6d7c2_2e5d_4bc1_b09e_8f0a03e3d8d3); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLight_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLight2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLight2 { type Vtable = ICompositionLight2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa7bcda72_f35d_425d_9b98_23f4205f6669); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLight2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLight3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLight3 { type Vtable = ICompositionLight3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b0b00e4_df07_4959_b7a4_4f7e4233f838); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLight3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLightFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLightFactory { type Vtable = ICompositionLightFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x069cf306_da3c_4b44_838a_5e03d51ace55); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLightFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLineGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLineGeometry { type Vtable = ICompositionLineGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdd7615a4_0c9a_4b67_8dce_440a5bf9cdec); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLineGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionLinearGradientBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionLinearGradientBrush { type Vtable = ICompositionLinearGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x983bc519_a9db_413c_a2d8_2a9056fc525e); } #[repr(C)] #[doc(hidden)] pub struct ICompositionLinearGradientBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionMaskBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionMaskBrush { type Vtable = ICompositionMaskBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x522cf09e_be6b_4f41_be49_f9226d471b4a); } #[repr(C)] #[doc(hidden)] pub struct ICompositionMaskBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionMipmapSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionMipmapSurface { type Vtable = ICompositionMipmapSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4863675c_cf4a_4b1c_9ece_c5ec0c2b2fe6); } #[repr(C)] #[doc(hidden)] pub struct ICompositionMipmapSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_DirectX")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX"))] usize, #[cfg(feature = "Graphics_DirectX")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::DirectX::DirectXPixelFormat) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX"))] usize, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Graphics::SizeInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, level: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionNineGridBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionNineGridBrush { type Vtable = ICompositionNineGridBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf25154e4_bc8c_4be7_b80f_8685b83c0186); } #[repr(C)] #[doc(hidden)] pub struct ICompositionNineGridBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, inset: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, left: f32, top: f32, right: f32, bottom: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, scale: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, left: f32, top: f32, right: f32, bottom: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObject(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObject { type Vtable = ICompositionObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbcb4ad45_7609_4550_934f_16002a68fded); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObject_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "UI_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Core"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, animation: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObject2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObject2 { type Vtable = ICompositionObject2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef874ea1_5cff_4b68_9e30_a1519d08ba03); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObject2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObject3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObject3 { type Vtable = ICompositionObject3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4bc27925_dacd_4cf2_98b1_986b76e7ebe6); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObject3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "System")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "System"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObject4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObject4 { type Vtable = ICompositionObject4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bb3784c_346b_4a7c_966b_7310966553d5); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObject4_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObjectFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObjectFactory { type Vtable = ICompositionObjectFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x51205c5e_558a_4f2a_8d39_37bfe1e20ddd); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObjectFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionObjectStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionObjectStatics { type Vtable = ICompositionObjectStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc1ed052f_1ba2_44ba_a904_6a882a0a5adb); } #[repr(C)] #[doc(hidden)] pub struct ICompositionObjectStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, target: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, animation: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, target: ::windows::core::RawPtr, animation: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionPath(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionPath { type Vtable = ICompositionPath_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66da1d5f_2e10_4f22_8a06_0a8151919e60); } #[repr(C)] #[doc(hidden)] pub struct ICompositionPath_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionPathFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionPathFactory { type Vtable = ICompositionPathFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9c1e8c6a_0f33_4751_9437_eb3fb9d3ab07); } #[repr(C)] #[doc(hidden)] pub struct ICompositionPathFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionPathGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionPathGeometry { type Vtable = ICompositionPathGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0b6a417e_2c77_4c23_af5e_6304c147bb61); } #[repr(C)] #[doc(hidden)] pub struct ICompositionPathGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadow(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadow { type Vtable = ICompositionProjectedShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x285b8e72_4328_523f_bcf2_5557c52c3b25); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadow_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadowCaster(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadowCaster { type Vtable = ICompositionProjectedShadowCaster_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1d7d426_1e36_5a62_be56_a16112fdd148); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadowCaster_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadowCasterCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadowCasterCollection { type Vtable = ICompositionProjectedShadowCasterCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd2525c0c_e07f_58a3_ac91_37f73ee91740); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadowCasterCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newcaster: ::windows::core::RawPtr, reference: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newcaster: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newcaster: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newcaster: ::windows::core::RawPtr, reference: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, caster: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadowCasterCollectionStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadowCasterCollectionStatics { type Vtable = ICompositionProjectedShadowCasterCollectionStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56fbb136_e94f_5299_ab5b_6e15e38bd899); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadowCasterCollectionStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadowReceiver(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadowReceiver { type Vtable = ICompositionProjectedShadowReceiver_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1377985a_6a49_536a_9be4_a96a8e5298a9); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadowReceiver_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionProjectedShadowReceiverUnorderedCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionProjectedShadowReceiverUnorderedCollection { type Vtable = ICompositionProjectedShadowReceiverUnorderedCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02b3e3b7_27d2_599f_ac4b_ab787cdde6fd); } #[repr(C)] #[doc(hidden)] pub struct ICompositionProjectedShadowReceiverUnorderedCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionPropertySet(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionPropertySet { type Vtable = ICompositionPropertySet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc9d6d202_5f67_4453_9117_9eadd430d3c2); } #[repr(C)] #[doc(hidden)] pub struct ICompositionPropertySet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::Color) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Matrix4x4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: super::super::Foundation::Numerics::Vector4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::Color, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Matrix3x2, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Matrix4x4, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Quaternion, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut f32, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Vector2, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Vector3, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut super::super::Foundation::Numerics::Vector4, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionPropertySet2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionPropertySet2 { type Vtable = ICompositionPropertySet2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xde80731e_a211_4455_8880_7d0f3f6a44fd); } #[repr(C)] #[doc(hidden)] pub struct ICompositionPropertySet2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: *mut bool, result__: *mut CompositionGetValueStatus) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionRadialGradientBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionRadialGradientBrush { type Vtable = ICompositionRadialGradientBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d3b50c5_e3fa_4ce2_b9fc_3ee12561788f); } #[repr(C)] #[doc(hidden)] pub struct ICompositionRadialGradientBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionRectangleGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionRectangleGeometry { type Vtable = ICompositionRectangleGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cd51428_5356_4246_aecf_7a0b76975400); } #[repr(C)] #[doc(hidden)] pub struct ICompositionRectangleGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionRoundedRectangleGeometry(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionRoundedRectangleGeometry { type Vtable = ICompositionRoundedRectangleGeometry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8770c822_1d50_4b8b_b013_7c9a0e46935f); } #[repr(C)] #[doc(hidden)] pub struct ICompositionRoundedRectangleGeometry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionScopedBatch(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionScopedBatch { type Vtable = ICompositionScopedBatch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d00dad0_fb07_46fd_8c72_6280d1a3d1dd); } #[repr(C)] #[doc(hidden)] pub struct ICompositionScopedBatch_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionShadow(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionShadow { type Vtable = ICompositionShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x329e52e2_4335_49cc_b14a_37782d10f0c4); } #[repr(C)] #[doc(hidden)] pub struct ICompositionShadow_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionShadowFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionShadowFactory { type Vtable = ICompositionShadowFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x221f492f_dcba_4b91_999e_1dc217a01530); } #[repr(C)] #[doc(hidden)] pub struct ICompositionShadowFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionShape(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionShape { type Vtable = ICompositionShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb47ce2f7_9a88_42c4_9e87_2e500ca8688c); } #[repr(C)] #[doc(hidden)] pub struct ICompositionShape_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionShapeFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionShapeFactory { type Vtable = ICompositionShapeFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1dfc36d0_b05a_44ef_82b0_12118bcd4cd0); } #[repr(C)] #[doc(hidden)] pub struct ICompositionShapeFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionSpriteShape(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSpriteShape { type Vtable = ICompositionSpriteShape_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x401b61bb_0007_4363_b1f3_6bcc003fb83e); } #[repr(C)] #[doc(hidden)] pub struct ICompositionSpriteShape_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStrokeLineJoin) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStrokeLineJoin) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStrokeCap) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICompositionSupportsSystemBackdrop(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSupportsSystemBackdrop { type Vtable = ICompositionSupportsSystemBackdrop_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x397dafe4_b6c2_5bb9_951d_f5707de8b7bc); } impl ICompositionSupportsSystemBackdrop { pub fn SystemBackdrop(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetSystemBackdrop<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ICompositionSupportsSystemBackdrop { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{397dafe4-b6c2-5bb9-951d-f5707de8b7bc}"); } impl ::core::convert::From<ICompositionSupportsSystemBackdrop> for ::windows::core::IUnknown { fn from(value: ICompositionSupportsSystemBackdrop) -> Self { value.0 .0 } } impl ::core::convert::From<&ICompositionSupportsSystemBackdrop> for ::windows::core::IUnknown { fn from(value: &ICompositionSupportsSystemBackdrop) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICompositionSupportsSystemBackdrop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICompositionSupportsSystemBackdrop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICompositionSupportsSystemBackdrop> for ::windows::core::IInspectable { fn from(value: ICompositionSupportsSystemBackdrop) -> Self { value.0 } } impl ::core::convert::From<&ICompositionSupportsSystemBackdrop> for ::windows::core::IInspectable { fn from(value: &ICompositionSupportsSystemBackdrop) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICompositionSupportsSystemBackdrop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ICompositionSupportsSystemBackdrop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICompositionSupportsSystemBackdrop_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICompositionSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSurface { type Vtable = ICompositionSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1527540d_42c7_47a6_a408_668f79a90dfb); } impl ICompositionSurface {} unsafe impl ::windows::core::RuntimeType for ICompositionSurface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{1527540d-42c7-47a6-a408-668f79a90dfb}"); } impl ::core::convert::From<ICompositionSurface> for ::windows::core::IUnknown { fn from(value: ICompositionSurface) -> Self { value.0 .0 } } impl ::core::convert::From<&ICompositionSurface> for ::windows::core::IUnknown { fn from(value: &ICompositionSurface) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICompositionSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICompositionSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICompositionSurface> for ::windows::core::IInspectable { fn from(value: ICompositionSurface) -> Self { value.0 } } impl ::core::convert::From<&ICompositionSurface> for ::windows::core::IInspectable { fn from(value: &ICompositionSurface) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICompositionSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ICompositionSurface { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICompositionSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionSurfaceBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSurfaceBrush { type Vtable = ICompositionSurfaceBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xad016d79_1e4c_4c0d_9c29_83338c87c162); } #[repr(C)] #[doc(hidden)] pub struct ICompositionSurfaceBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionBitmapInterpolationMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionBitmapInterpolationMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStretch) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStretch) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionSurfaceBrush2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSurfaceBrush2 { type Vtable = ICompositionSurfaceBrush2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd27174d5_64f5_4692_9dc7_71b61d7e5880); } #[repr(C)] #[doc(hidden)] pub struct ICompositionSurfaceBrush2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionSurfaceBrush3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSurfaceBrush3 { type Vtable = ICompositionSurfaceBrush3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x550bb289_1fe0_42e5_8195_1eefa87ff08e); } #[repr(C)] #[doc(hidden)] pub struct ICompositionSurfaceBrush3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICompositionSurfaceFacade(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionSurfaceFacade { type Vtable = ICompositionSurfaceFacade_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe01622c8_2332_55c7_8868_a7312c5c229d); } impl ICompositionSurfaceFacade { pub fn GetRealSurface(&self) -> ::windows::core::Result<ICompositionSurface> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ICompositionSurface>(result__) } } } unsafe impl ::windows::core::RuntimeType for ICompositionSurfaceFacade { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{e01622c8-2332-55c7-8868-a7312c5c229d}"); } impl ::core::convert::From<ICompositionSurfaceFacade> for ::windows::core::IUnknown { fn from(value: ICompositionSurfaceFacade) -> Self { value.0 .0 } } impl ::core::convert::From<&ICompositionSurfaceFacade> for ::windows::core::IUnknown { fn from(value: &ICompositionSurfaceFacade) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICompositionSurfaceFacade { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICompositionSurfaceFacade { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICompositionSurfaceFacade> for ::windows::core::IInspectable { fn from(value: ICompositionSurfaceFacade) -> Self { value.0 } } impl ::core::convert::From<&ICompositionSurfaceFacade> for ::windows::core::IInspectable { fn from(value: &ICompositionSurfaceFacade) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICompositionSurfaceFacade { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ICompositionSurfaceFacade { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICompositionSurfaceFacade_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionTarget(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionTarget { type Vtable = ICompositionTarget_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1bea8ba_d726_4663_8129_6b5e7927ffa6); } #[repr(C)] #[doc(hidden)] pub struct ICompositionTarget_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionTargetFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionTargetFactory { type Vtable = ICompositionTargetFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93cd9d2b_8516_4b14_a8ce_f49e2119ec42); } #[repr(C)] #[doc(hidden)] pub struct ICompositionTargetFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionTransform(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionTransform { type Vtable = ICompositionTransform_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cd54529_fbed_4112_abc5_185906dd927c); } #[repr(C)] #[doc(hidden)] pub struct ICompositionTransform_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionTransformFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionTransformFactory { type Vtable = ICompositionTransformFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaaaeca26_c149_517a_8f72_6bff7a65ce08); } #[repr(C)] #[doc(hidden)] pub struct ICompositionTransformFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionViewBox(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionViewBox { type Vtable = ICompositionViewBox_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb440bf07_068f_4537_84c6_4ecbe019e1f4); } #[repr(C)] #[doc(hidden)] pub struct ICompositionViewBox_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionStretch) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionStretch) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionVirtualDrawingSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionVirtualDrawingSurface { type Vtable = ICompositionVirtualDrawingSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa9c384db_8740_4f94_8b9d_b68521e7863d); } #[repr(C)] #[doc(hidden)] pub struct ICompositionVirtualDrawingSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rects_array_size: u32, rects: *const super::super::Graphics::RectInt32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionVirtualDrawingSurfaceFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionVirtualDrawingSurfaceFactory { type Vtable = ICompositionVirtualDrawingSurfaceFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6766106c_d56b_4a49_b1df_5076a0620768); } #[repr(C)] #[doc(hidden)] pub struct ICompositionVirtualDrawingSurfaceFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositionVisualSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositionVisualSurface { type Vtable = ICompositionVisualSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb224d803_4f6e_4a3f_8cae_3dc1cda74fc6); } #[repr(C)] #[doc(hidden)] pub struct ICompositionVisualSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor { type Vtable = ICompositor_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb403ca50_7f8c_4e83_985f_cc45060036d8); } #[repr(C)] #[doc(hidden)] pub struct ICompositor_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, color: super::Color, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, controlpoint1: super::super::Foundation::Numerics::Vector2, controlpoint2: super::super::Foundation::Numerics::Vector2, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Graphics_Effects")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, graphicseffect: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Effects"))] usize, #[cfg(all(feature = "Foundation_Collections", feature = "Graphics_Effects"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, graphicseffect: ::windows::core::RawPtr, animatableproperties: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation_Collections", feature = "Graphics_Effects")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, expression: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, leftinset: f32, topinset: f32, rightinset: f32, bottominset: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, batchtype: CompositionBatchTypes, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, surface: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, batchtype: CompositionBatchTypes, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor2 { type Vtable = ICompositor2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x735081dc_5e24_45da_a38f_e32cc349a9a0); } #[repr(C)] #[doc(hidden)] pub struct ICompositor2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, stepcount: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor3 { type Vtable = ICompositor3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc9dd8ef0_6eb1_4e3c_a658_675d9c64d4ab); } #[repr(C)] #[doc(hidden)] pub struct ICompositor3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor4 { type Vtable = ICompositor4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xae47e78a_7910_4425_a482_a05b758adce9); } #[repr(C)] #[doc(hidden)] pub struct ICompositor4_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, offset: f32, color: super::Color, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor5(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor5 { type Vtable = ICompositor5_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x48ea31ad_7fcd_4076_a79c_90cc4b852c9b); } #[repr(C)] #[doc(hidden)] pub struct ICompositor5_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, path: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, geometry: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor6(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor6 { type Vtable = ICompositor6_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7a38b2bd_cec8_4eeb_830f_d8d07aedebc3); } #[repr(C)] #[doc(hidden)] pub struct ICompositor6_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, geometry: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositor7(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositor7 { type Vtable = ICompositor7_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd3483fad_9a12_53ba_bfc8_88b7ff7977c6); } #[repr(C)] #[doc(hidden)] pub struct ICompositor7_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "System")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "System"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, left: f32, top: f32, right: f32, bottom: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, left: f32, top: f32, right: f32, bottom: f32, topleftradius: super::super::Foundation::Numerics::Vector2, toprightradius: super::super::Foundation::Numerics::Vector2, bottomrightradius: super::super::Foundation::Numerics::Vector2, bottomleftradius: super::super::Foundation::Numerics::Vector2, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositorStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositorStatics { type Vtable = ICompositorStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x080db93e_121e_4d97_8b74_1dfcf91987ea); } #[repr(C)] #[doc(hidden)] pub struct ICompositorStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositorWithBlurredWallpaperBackdropBrush(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositorWithBlurredWallpaperBackdropBrush { type Vtable = ICompositorWithBlurredWallpaperBackdropBrush_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d8fb190_f122_5b8d_9fdd_543b0d8eb7f3); } #[repr(C)] #[doc(hidden)] pub struct ICompositorWithBlurredWallpaperBackdropBrush_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositorWithProjectedShadow(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositorWithProjectedShadow { type Vtable = ICompositorWithProjectedShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa2e6330e_8a60_5a38_bb85_b44ea901677c); } #[repr(C)] #[doc(hidden)] pub struct ICompositorWithProjectedShadow_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositorWithRadialGradient(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositorWithRadialGradient { type Vtable = ICompositorWithRadialGradient_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x98b9c1a7_8e71_4b53_b4a8_69ba5d19dc5b); } #[repr(C)] #[doc(hidden)] pub struct ICompositorWithRadialGradient_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICompositorWithVisualSurface(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICompositorWithVisualSurface { type Vtable = ICompositorWithVisualSurface_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcfa1658b_0123_4551_8891_89bdcc40322b); } #[repr(C)] #[doc(hidden)] pub struct ICompositorWithVisualSurface_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IContainerVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IContainerVisual { type Vtable = IContainerVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02f6bc74_ed20_4773_afe6_d49b4a93db32); } #[repr(C)] #[doc(hidden)] pub struct IContainerVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IContainerVisualFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IContainerVisualFactory { type Vtable = IContainerVisualFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0363a65b_c7da_4d9a_95f4_69b5c8df670b); } #[repr(C)] #[doc(hidden)] pub struct IContainerVisualFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICubicBezierEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICubicBezierEasingFunction { type Vtable = ICubicBezierEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x32350666_c1e8_44f9_96b8_c98acf0ae698); } #[repr(C)] #[doc(hidden)] pub struct ICubicBezierEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IDelegatedInkTrailVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDelegatedInkTrailVisual { type Vtable = IDelegatedInkTrailVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x856e60b1_e1ab_5b23_8e3d_d513f221c998); } #[repr(C)] #[doc(hidden)] pub struct IDelegatedInkTrailVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, inkPoints_array_size: u32, inkpoints: *const InkTrailPoint, result__: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, inkPoints_array_size: u32, inkpoints: *const InkTrailPoint, predictedInkPoints_array_size: u32, predictedinkpoints: *const InkTrailPoint, result__: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, generationid: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, color: super::Color) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IDelegatedInkTrailVisualStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDelegatedInkTrailVisualStatics { type Vtable = IDelegatedInkTrailVisualStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0daf6bd5_42c6_555c_9267_e0ac663af836); } #[repr(C)] #[doc(hidden)] pub struct IDelegatedInkTrailVisualStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, compositor: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, compositor: ::windows::core::RawPtr, swapchain: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IDistantLight(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDistantLight { type Vtable = IDistantLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x318cfafc_5ce3_4b55_ab5d_07a00353ac99); } #[repr(C)] #[doc(hidden)] pub struct IDistantLight_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IDistantLight2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDistantLight2 { type Vtable = IDistantLight2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdbcdaa1c_294b_48d7_b60e_76df64aa392b); } #[repr(C)] #[doc(hidden)] pub struct IDistantLight2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IDropShadow(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDropShadow { type Vtable = IDropShadow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcb977c07_a154_4851_85e7_a8924c84fad8); } #[repr(C)] #[doc(hidden)] pub struct IDropShadow_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IDropShadow2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDropShadow2 { type Vtable = IDropShadow2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c4218bc_15b9_4c2d_8d4a_0767df11977a); } #[repr(C)] #[doc(hidden)] pub struct IDropShadow2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionDropShadowSourcePolicy) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionDropShadowSourcePolicy) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IElasticEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IElasticEasingFunction { type Vtable = IElasticEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66de6285_054e_5594_8475_c22cb51f1bd5); } #[repr(C)] #[doc(hidden)] pub struct IElasticEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IExponentialEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IExponentialEasingFunction { type Vtable = IExponentialEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6f7d1a51_98d2_5638_a34a_00486554c750); } #[repr(C)] #[doc(hidden)] pub struct IExponentialEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IExpressionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IExpressionAnimation { type Vtable = IExpressionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6acc5431_7d3d_4bf3_abb6_f44bdc4888c1); } #[repr(C)] #[doc(hidden)] pub struct IExpressionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IImplicitAnimationCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IImplicitAnimationCollection { type Vtable = IImplicitAnimationCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0598a3ff_0a92_4c9d_a427_b25519250dbf); } #[repr(C)] #[doc(hidden)] pub struct IImplicitAnimationCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IInsetClip(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IInsetClip { type Vtable = IInsetClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e73e647_84c7_477a_b474_5880e0442e15); } #[repr(C)] #[doc(hidden)] pub struct IInsetClip_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IKeyFrameAnimation { type Vtable = IKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x126e7f22_3ae9_4540_9a8a_deae8a4a4a84); } #[repr(C)] #[doc(hidden)] pub struct IKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationIterationBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationIterationBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationStopBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationStopBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IKeyFrameAnimation2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IKeyFrameAnimation2 { type Vtable = IKeyFrameAnimation2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf4b488bb_2940_4ec0_a41a_eb6d801a2f18); } #[repr(C)] #[doc(hidden)] pub struct IKeyFrameAnimation2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationDirection) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationDirection) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IKeyFrameAnimation3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IKeyFrameAnimation3 { type Vtable = IKeyFrameAnimation3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x845bf0b4_d8de_462f_8753_c80d43c6ff5a); } #[repr(C)] #[doc(hidden)] pub struct IKeyFrameAnimation3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationDelayBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationDelayBehavior) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IKeyFrameAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IKeyFrameAnimationFactory { type Vtable = IKeyFrameAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbf0803f8_712a_4fc1_8c87_970859ed8d2e); } #[repr(C)] #[doc(hidden)] pub struct IKeyFrameAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILayerVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILayerVisual { type Vtable = ILayerVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaf843985_0444_4887_8e83_b40b253f822c); } #[repr(C)] #[doc(hidden)] pub struct ILayerVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILayerVisual2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILayerVisual2 { type Vtable = ILayerVisual2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x98f9aeeb_6f23_49f1_90b1_1f59a14fbce3); } #[repr(C)] #[doc(hidden)] pub struct ILayerVisual2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILinearEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILinearEasingFunction { type Vtable = ILinearEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9400975a_c7a6_46b3_acf7_1a268a0a117d); } #[repr(C)] #[doc(hidden)] pub struct ILinearEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct INaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for INaturalMotionAnimation { type Vtable = INaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x438de12d_769b_4821_a949_284a6547e873); } #[repr(C)] #[doc(hidden)] pub struct INaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationDelayBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationDelayBehavior) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AnimationStopBehavior) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AnimationStopBehavior) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct INaturalMotionAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for INaturalMotionAnimationFactory { type Vtable = INaturalMotionAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf53acb06_cf6a_4387_a3fe_5221f3e7e0e0); } #[repr(C)] #[doc(hidden)] pub struct INaturalMotionAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPathKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPathKeyFrameAnimation { type Vtable = IPathKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9d0d18c9_1576_4b3f_be60_1d5031f5e71b); } #[repr(C)] #[doc(hidden)] pub struct IPathKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, path: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, path: ::windows::core::RawPtr, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPointLight(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPointLight { type Vtable = IPointLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb18545b3_0c5a_4ab0_bedc_4f3546948272); } #[repr(C)] #[doc(hidden)] pub struct IPointLight_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPointLight2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPointLight2 { type Vtable = IPointLight2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xefe98f2c_0678_4f69_b164_a810d995bcb7); } #[repr(C)] #[doc(hidden)] pub struct IPointLight2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPointLight3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPointLight3 { type Vtable = IPointLight3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4c0a8367_d4e9_468a_87ae_7ba43ab29485); } #[repr(C)] #[doc(hidden)] pub struct IPointLight3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPowerEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPowerEasingFunction { type Vtable = IPowerEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc3ff53d6_138b_5815_891a_b7f615ccc563); } #[repr(C)] #[doc(hidden)] pub struct IPowerEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IQuaternionKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IQuaternionKeyFrameAnimation { type Vtable = IQuaternionKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x404e5835_ecf6_4240_8520_671279cf36bc); } #[repr(C)] #[doc(hidden)] pub struct IQuaternionKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Quaternion, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRectangleClip(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRectangleClip { type Vtable = IRectangleClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3e7549e_00b4_5b53_8be8_353f6c433101); } #[repr(C)] #[doc(hidden)] pub struct IRectangleClip_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRedirectVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRedirectVisual { type Vtable = IRedirectVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cc6e340_8b75_5422_b06f_09ffe9f8617e); } #[repr(C)] #[doc(hidden)] pub struct IRedirectVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IRenderingDeviceReplacedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRenderingDeviceReplacedEventArgs { type Vtable = IRenderingDeviceReplacedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a31ac7d_28bf_4e7a_8524_71679d480f38); } #[repr(C)] #[doc(hidden)] pub struct IRenderingDeviceReplacedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IScalarKeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScalarKeyFrameAnimation { type Vtable = IScalarKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xae288fa9_252c_4b95_a725_bf85e38000a1); } #[repr(C)] #[doc(hidden)] pub struct IScalarKeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: f32, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScalarNaturalMotionAnimation { type Vtable = IScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x94a94581_bf92_495b_b5bd_d2c659430737); } #[repr(C)] #[doc(hidden)] pub struct IScalarNaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IScalarNaturalMotionAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScalarNaturalMotionAnimationFactory { type Vtable = IScalarNaturalMotionAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x835aa4fc_671c_41dd_af48_ae8def8b1529); } #[repr(C)] #[doc(hidden)] pub struct IScalarNaturalMotionAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IShapeVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IShapeVisual { type Vtable = IShapeVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2bd13c3_ba7e_4b0f_9126_ffb7536b8176); } #[repr(C)] #[doc(hidden)] pub struct IShapeVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISineEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISineEasingFunction { type Vtable = ISineEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf1b518bf_9563_5474_bd13_44b2df4b1d58); } #[repr(C)] #[doc(hidden)] pub struct ISineEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionEasingFunctionMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpotLight(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpotLight { type Vtable = ISpotLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5a9fe273_44a1_4f95_a422_8fa5116bdb44); } #[repr(C)] #[doc(hidden)] pub struct ISpotLight_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Color) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpotLight2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpotLight2 { type Vtable = ISpotLight2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x64ee615e_0686_4dea_a9e8_bc3a8c701459); } #[repr(C)] #[doc(hidden)] pub struct ISpotLight2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpotLight3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpotLight3 { type Vtable = ISpotLight3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe4d03eea_131f_480e_859e_b82705b74360); } #[repr(C)] #[doc(hidden)] pub struct ISpotLight3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpringScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpringScalarNaturalMotionAnimation { type Vtable = ISpringScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0572a95f_37f9_4fbe_b87b_5cd03a89501c); } #[repr(C)] #[doc(hidden)] pub struct ISpringScalarNaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpringVector2NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpringVector2NaturalMotionAnimation { type Vtable = ISpringVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x23f494b5_ee73_4f0f_a423_402b946df4b3); } #[repr(C)] #[doc(hidden)] pub struct ISpringVector2NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpringVector3NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpringVector3NaturalMotionAnimation { type Vtable = ISpringVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c8749df_d57b_4794_8e2d_cecb11e194e5); } #[repr(C)] #[doc(hidden)] pub struct ISpringVector3NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpriteVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpriteVisual { type Vtable = ISpriteVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08e05581_1ad1_4f97_9757_402d76e4233b); } #[repr(C)] #[doc(hidden)] pub struct ISpriteVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpriteVisual2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpriteVisual2 { type Vtable = ISpriteVisual2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x588c9664_997a_4850_91fe_53cb58f81ce9); } #[repr(C)] #[doc(hidden)] pub struct ISpriteVisual2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IStepEasingFunction(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IStepEasingFunction { type Vtable = IStepEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0caa74b_560c_4a0b_a5f6_206ca8c3ecd6); } #[repr(C)] #[doc(hidden)] pub struct IStepEasingFunction_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector2KeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector2KeyFrameAnimation { type Vtable = IVector2KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdf414515_4e29_4f11_b55e_bf2a6eb36294); } #[repr(C)] #[doc(hidden)] pub struct IVector2KeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector2, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector2NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector2NaturalMotionAnimation { type Vtable = IVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0f3e0b7d_e512_479d_a00c_77c93a30a395); } #[repr(C)] #[doc(hidden)] pub struct IVector2NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector2NaturalMotionAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector2NaturalMotionAnimationFactory { type Vtable = IVector2NaturalMotionAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8c74ff61_0761_48a2_bddb_6afcc52b89d8); } #[repr(C)] #[doc(hidden)] pub struct IVector2NaturalMotionAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector3KeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector3KeyFrameAnimation { type Vtable = IVector3KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8039daa_a281_43c2_a73d_b68e3c533c40); } #[repr(C)] #[doc(hidden)] pub struct IVector3KeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector3, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector3NaturalMotionAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector3NaturalMotionAnimation { type Vtable = IVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9c17042c_e2ca_45ad_969e_4e78b7b9ad41); } #[repr(C)] #[doc(hidden)] pub struct IVector3NaturalMotionAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector3NaturalMotionAnimationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector3NaturalMotionAnimationFactory { type Vtable = IVector3NaturalMotionAnimationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x21a81d2f_0880_457b_ac87_b609018c876d); } #[repr(C)] #[doc(hidden)] pub struct IVector3NaturalMotionAnimationFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVector4KeyFrameAnimation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVector4KeyFrameAnimation { type Vtable = IVector4KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2457945b_addd_4385_9606_b6a3d5e4e1b9); } #[repr(C)] #[doc(hidden)] pub struct IVector4KeyFrameAnimation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, normalizedprogresskey: f32, value: super::super::Foundation::Numerics::Vector4, easingfunction: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisual(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisual { type Vtable = IVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x117e202d_a859_4c89_873b_c2aa566788e3); } #[repr(C)] #[doc(hidden)] pub struct IVisual_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionBackfaceVisibility) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionBackfaceVisibility) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionBorderMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionBorderMode) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut CompositionCompositeMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: CompositionCompositeMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Matrix4x4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Matrix4x4) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisual2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisual2 { type Vtable = IVisual2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3052b611_56c3_4c3e_8bf3_f6e1ad473f06); } #[repr(C)] #[doc(hidden)] pub struct IVisual2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector3) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Vector2) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Numerics"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisual3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisual3 { type Vtable = IVisual3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30be580d_f4b6_4ab7_80dd_3738cbac9f2c); } #[repr(C)] #[doc(hidden)] pub struct IVisual3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisual4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisual4 { type Vtable = IVisual4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9476bf11_e24b_5bf9_9ebe_6274109b2711); } #[repr(C)] #[doc(hidden)] pub struct IVisual4_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisualCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisualCollection { type Vtable = IVisualCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8b745505_fd3e_4a98_84a8_e949468c6bcb); } #[repr(C)] #[doc(hidden)] pub struct IVisualCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newchild: ::windows::core::RawPtr, sibling: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newchild: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newchild: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newchild: ::windows::core::RawPtr, sibling: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, child: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IVisualElement(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisualElement { type Vtable = IVisualElement_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x01e64612_1d82_42f4_8e3f_a722ded33fc7); } impl IVisualElement {} unsafe impl ::windows::core::RuntimeType for IVisualElement { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{01e64612-1d82-42f4-8e3f-a722ded33fc7}"); } impl ::core::convert::From<IVisualElement> for ::windows::core::IUnknown { fn from(value: IVisualElement) -> Self { value.0 .0 } } impl ::core::convert::From<&IVisualElement> for ::windows::core::IUnknown { fn from(value: &IVisualElement) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IVisualElement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IVisualElement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IVisualElement> for ::windows::core::IInspectable { fn from(value: IVisualElement) -> Self { value.0 } } impl ::core::convert::From<&IVisualElement> for ::windows::core::IInspectable { fn from(value: &IVisualElement) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IVisualElement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IVisualElement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IVisualElement_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IVisualElement2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisualElement2 { type Vtable = IVisualElement2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x993ae8a0_6057_5e40_918c_e06e0b7e7c64); } impl IVisualElement2 { pub fn GetVisualInternal(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } } unsafe impl ::windows::core::RuntimeType for IVisualElement2 { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{993ae8a0-6057-5e40-918c-e06e0b7e7c64}"); } impl ::core::convert::From<IVisualElement2> for ::windows::core::IUnknown { fn from(value: IVisualElement2) -> Self { value.0 .0 } } impl ::core::convert::From<&IVisualElement2> for ::windows::core::IUnknown { fn from(value: &IVisualElement2) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IVisualElement2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IVisualElement2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IVisualElement2> for ::windows::core::IInspectable { fn from(value: IVisualElement2) -> Self { value.0 } } impl ::core::convert::From<&IVisualElement2> for ::windows::core::IInspectable { fn from(value: &IVisualElement2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IVisualElement2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IVisualElement2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IVisualElement2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisualFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisualFactory { type Vtable = IVisualFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xad0ff93e_b502_4eb5_87b4_9a38a71d0137); } #[repr(C)] #[doc(hidden)] pub struct IVisualFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVisualUnorderedCollection(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVisualUnorderedCollection { type Vtable = IVisualUnorderedCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x338faa70_54c8_40a7_8029_c9ceeb0aa250); } #[repr(C)] #[doc(hidden)] pub struct IVisualUnorderedCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newvisual: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, visual: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ImplicitAnimationCollection(pub ::windows::core::IInspectable); impl ImplicitAnimationCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Lookup<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<ICompositionAnimationBase> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<ICompositionAnimationBase>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Size(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn HasKey<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetView(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ICompositionAnimationBase>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ICompositionAnimationBase>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Insert<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Clear(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ImplicitAnimationCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ImplicitAnimationCollection;{0598a3ff-0a92-4c9d-a427-b25519250dbf})"); } unsafe impl ::windows::core::Interface for ImplicitAnimationCollection { type Vtable = IImplicitAnimationCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0598a3ff_0a92_4c9d_a427_b25519250dbf); } impl ::windows::core::RuntimeName for ImplicitAnimationCollection { const NAME: &'static str = "Windows.UI.Composition.ImplicitAnimationCollection"; } impl ::core::convert::From<ImplicitAnimationCollection> for ::windows::core::IUnknown { fn from(value: ImplicitAnimationCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&ImplicitAnimationCollection> for ::windows::core::IUnknown { fn from(value: &ImplicitAnimationCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ImplicitAnimationCollection> for ::windows::core::IInspectable { fn from(value: ImplicitAnimationCollection) -> Self { value.0 } } impl ::core::convert::From<&ImplicitAnimationCollection> for ::windows::core::IInspectable { fn from(value: &ImplicitAnimationCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<ImplicitAnimationCollection> for super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>> { type Error = ::windows::core::Error; fn try_from(value: ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&ImplicitAnimationCollection> for super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>> { type Error = ::windows::core::Error; fn try_from(value: &ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>> for &ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<ImplicitAnimationCollection> for super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase> { type Error = ::windows::core::Error; fn try_from(value: ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&ImplicitAnimationCollection> for super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase> { type Error = ::windows::core::Error; fn try_from(value: &ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>> for &ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ICompositionAnimationBase>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ImplicitAnimationCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ImplicitAnimationCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ImplicitAnimationCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ImplicitAnimationCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ImplicitAnimationCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ImplicitAnimationCollection> for CompositionObject { fn from(value: ImplicitAnimationCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ImplicitAnimationCollection> for CompositionObject { fn from(value: &ImplicitAnimationCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ImplicitAnimationCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ImplicitAnimationCollection {} unsafe impl ::core::marker::Sync for ImplicitAnimationCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for ImplicitAnimationCollection { type Item = super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &ImplicitAnimationCollection { type Item = super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ICompositionAnimationBase>; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[cfg(feature = "Foundation_Collections")] #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct InitialValueExpressionCollection(pub ::windows::core::IInspectable); #[cfg(feature = "Foundation_Collections")] impl InitialValueExpressionCollection { #[cfg(feature = "Foundation_Collections")] pub fn Lookup<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Size(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn HasKey<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetView(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Insert<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Clear(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::RuntimeType for InitialValueExpressionCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.InitialValueExpressionCollection;pinterface({3c2925fe-8519-45c1-aa79-197b6718c1c1};string;string))"); } #[cfg(feature = "Foundation_Collections")] unsafe impl ::windows::core::Interface for InitialValueExpressionCollection { type Vtable = super::super::Foundation::Collections::IMap_abi<::windows::core::HSTRING, ::windows::core::HSTRING>; const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING> as ::windows::core::RuntimeType>::SIGNATURE); } #[cfg(feature = "Foundation_Collections")] impl ::windows::core::RuntimeName for InitialValueExpressionCollection { const NAME: &'static str = "Windows.UI.Composition.InitialValueExpressionCollection"; } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<InitialValueExpressionCollection> for ::windows::core::IUnknown { fn from(value: InitialValueExpressionCollection) -> Self { value.0 .0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&InitialValueExpressionCollection> for ::windows::core::IUnknown { fn from(value: &InitialValueExpressionCollection) -> Self { value.0 .0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<InitialValueExpressionCollection> for ::windows::core::IInspectable { fn from(value: InitialValueExpressionCollection) -> Self { value.0 } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&InitialValueExpressionCollection> for ::windows::core::IInspectable { fn from(value: &InitialValueExpressionCollection) -> Self { value.0.clone() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<InitialValueExpressionCollection> for super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING> { fn from(value: InitialValueExpressionCollection) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&InitialValueExpressionCollection> for super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING> { fn from(value: &InitialValueExpressionCollection) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING>> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING>> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING>> for &InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IMap<::windows::core::HSTRING, ::windows::core::HSTRING>> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<InitialValueExpressionCollection> for super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>> { type Error = ::windows::core::Error; fn try_from(value: InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&InitialValueExpressionCollection> for super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>> { type Error = ::windows::core::Error; fn try_from(value: &InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>> for &InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<InitialValueExpressionCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl ::core::convert::TryFrom<&InitialValueExpressionCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<InitialValueExpressionCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&InitialValueExpressionCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &InitialValueExpressionCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<InitialValueExpressionCollection> for CompositionObject { fn from(value: InitialValueExpressionCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::From<&InitialValueExpressionCollection> for CompositionObject { fn from(value: &InitialValueExpressionCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &InitialValueExpressionCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Send for InitialValueExpressionCollection {} #[cfg(feature = "Foundation_Collections")] unsafe impl ::core::marker::Sync for InitialValueExpressionCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for InitialValueExpressionCollection { type Item = super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &InitialValueExpressionCollection { type Item = super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Foundation")] pub struct InkTrailPoint { pub Point: super::super::Foundation::Point, pub Radius: f32, } #[cfg(feature = "Foundation")] impl InkTrailPoint {} #[cfg(feature = "Foundation")] impl ::core::default::Default for InkTrailPoint { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Foundation")] impl ::core::fmt::Debug for InkTrailPoint { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("InkTrailPoint").field("Point", &self.Point).field("Radius", &self.Radius).finish() } } #[cfg(feature = "Foundation")] impl ::core::cmp::PartialEq for InkTrailPoint { fn eq(&self, other: &Self) -> bool { self.Point == other.Point && self.Radius == other.Radius } } #[cfg(feature = "Foundation")] impl ::core::cmp::Eq for InkTrailPoint {} #[cfg(feature = "Foundation")] unsafe impl ::windows::core::Abi for InkTrailPoint { type Abi = Self; } #[cfg(feature = "Foundation")] unsafe impl ::windows::core::RuntimeType for InkTrailPoint { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"struct(Windows.UI.Composition.InkTrailPoint;struct(Windows.Foundation.Point;f4;f4);f4)"); } #[cfg(feature = "Foundation")] impl ::windows::core::DefaultType for InkTrailPoint { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct InsetClip(pub ::windows::core::IInspectable); impl InsetClip { pub fn BottomInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBottomInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn LeftInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLeftInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn RightInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRightInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TopInset(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTopInset(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for InsetClip { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.InsetClip;{1e73e647-84c7-477a-b474-5880e0442e15})"); } unsafe impl ::windows::core::Interface for InsetClip { type Vtable = IInsetClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e73e647_84c7_477a_b474_5880e0442e15); } impl ::windows::core::RuntimeName for InsetClip { const NAME: &'static str = "Windows.UI.Composition.InsetClip"; } impl ::core::convert::From<InsetClip> for ::windows::core::IUnknown { fn from(value: InsetClip) -> Self { value.0 .0 } } impl ::core::convert::From<&InsetClip> for ::windows::core::IUnknown { fn from(value: &InsetClip) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a InsetClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<InsetClip> for ::windows::core::IInspectable { fn from(value: InsetClip) -> Self { value.0 } } impl ::core::convert::From<&InsetClip> for ::windows::core::IInspectable { fn from(value: &InsetClip) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a InsetClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<InsetClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: InsetClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&InsetClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &InsetClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &InsetClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<InsetClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: InsetClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&InsetClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &InsetClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &InsetClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<InsetClip> for CompositionClip { fn from(value: InsetClip) -> Self { ::core::convert::Into::<CompositionClip>::into(&value) } } impl ::core::convert::From<&InsetClip> for CompositionClip { fn from(value: &InsetClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for &InsetClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<InsetClip> for CompositionObject { fn from(value: InsetClip) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&InsetClip> for CompositionObject { fn from(value: &InsetClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for InsetClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &InsetClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for InsetClip {} unsafe impl ::core::marker::Sync for InsetClip {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct KeyFrameAnimation(pub ::windows::core::IInspectable); impl KeyFrameAnimation { #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = self; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = self; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for KeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.KeyFrameAnimation;{126e7f22-3ae9-4540-9a8a-deae8a4a4a84})"); } unsafe impl ::windows::core::Interface for KeyFrameAnimation { type Vtable = IKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x126e7f22_3ae9_4540_9a8a_deae8a4a4a84); } impl ::windows::core::RuntimeName for KeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.KeyFrameAnimation"; } impl ::core::convert::From<KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: KeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &KeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: KeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &KeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<KeyFrameAnimation> for CompositionAnimation { fn from(value: KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&KeyFrameAnimation> for CompositionAnimation { fn from(value: &KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<KeyFrameAnimation> for CompositionObject { fn from(value: KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&KeyFrameAnimation> for CompositionObject { fn from(value: &KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for KeyFrameAnimation {} unsafe impl ::core::marker::Sync for KeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LayerVisual(pub ::windows::core::IInspectable); impl LayerVisual { pub fn Effect(&self) -> ::windows::core::Result<CompositionEffectBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEffectBrush>(result__) } } pub fn SetEffect<'a, Param0: ::windows::core::IntoParam<'a, CompositionEffectBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Shadow(&self) -> ::windows::core::Result<CompositionShadow> { let this = &::windows::core::Interface::cast::<ILayerVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionShadow>(result__) } } pub fn SetShadow<'a, Param0: ::windows::core::IntoParam<'a, CompositionShadow>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ILayerVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Children(&self) -> ::windows::core::Result<VisualCollection> { let this = &::windows::core::Interface::cast::<IContainerVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualCollection>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for LayerVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.LayerVisual;{af843985-0444-4887-8e83-b40b253f822c})"); } unsafe impl ::windows::core::Interface for LayerVisual { type Vtable = ILayerVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaf843985_0444_4887_8e83_b40b253f822c); } impl ::windows::core::RuntimeName for LayerVisual { const NAME: &'static str = "Windows.UI.Composition.LayerVisual"; } impl ::core::convert::From<LayerVisual> for ::windows::core::IUnknown { fn from(value: LayerVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&LayerVisual> for ::windows::core::IUnknown { fn from(value: &LayerVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LayerVisual> for ::windows::core::IInspectable { fn from(value: LayerVisual) -> Self { value.0 } } impl ::core::convert::From<&LayerVisual> for ::windows::core::IInspectable { fn from(value: &LayerVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<LayerVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: LayerVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&LayerVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &LayerVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<LayerVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: LayerVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&LayerVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &LayerVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<LayerVisual> for ContainerVisual { fn from(value: LayerVisual) -> Self { ::core::convert::Into::<ContainerVisual>::into(&value) } } impl ::core::convert::From<&LayerVisual> for ContainerVisual { fn from(value: &LayerVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for &LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LayerVisual> for Visual { fn from(value: LayerVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&LayerVisual> for Visual { fn from(value: &LayerVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LayerVisual> for CompositionObject { fn from(value: LayerVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&LayerVisual> for CompositionObject { fn from(value: &LayerVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &LayerVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for LayerVisual {} unsafe impl ::core::marker::Sync for LayerVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LinearEasingFunction(pub ::windows::core::IInspectable); impl LinearEasingFunction { #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for LinearEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.LinearEasingFunction;{9400975a-c7a6-46b3-acf7-1a268a0a117d})"); } unsafe impl ::windows::core::Interface for LinearEasingFunction { type Vtable = ILinearEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9400975a_c7a6_46b3_acf7_1a268a0a117d); } impl ::windows::core::RuntimeName for LinearEasingFunction { const NAME: &'static str = "Windows.UI.Composition.LinearEasingFunction"; } impl ::core::convert::From<LinearEasingFunction> for ::windows::core::IUnknown { fn from(value: LinearEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&LinearEasingFunction> for ::windows::core::IUnknown { fn from(value: &LinearEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LinearEasingFunction> for ::windows::core::IInspectable { fn from(value: LinearEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&LinearEasingFunction> for ::windows::core::IInspectable { fn from(value: &LinearEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<LinearEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: LinearEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&LinearEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &LinearEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<LinearEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: LinearEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&LinearEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &LinearEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<LinearEasingFunction> for CompositionEasingFunction { fn from(value: LinearEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&LinearEasingFunction> for CompositionEasingFunction { fn from(value: &LinearEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LinearEasingFunction> for CompositionObject { fn from(value: LinearEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&LinearEasingFunction> for CompositionObject { fn from(value: &LinearEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &LinearEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for LinearEasingFunction {} unsafe impl ::core::marker::Sync for LinearEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct NaturalMotionAnimation(pub ::windows::core::IInspectable); impl NaturalMotionAnimation { pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = self; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = self; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.NaturalMotionAnimation;{438de12d-769b-4821-a949-284a6547e873})"); } unsafe impl ::windows::core::Interface for NaturalMotionAnimation { type Vtable = INaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x438de12d_769b_4821_a949_284a6547e873); } impl ::windows::core::RuntimeName for NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.NaturalMotionAnimation"; } impl ::core::convert::From<NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<NaturalMotionAnimation> for CompositionAnimation { fn from(value: NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&NaturalMotionAnimation> for CompositionAnimation { fn from(value: &NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<NaturalMotionAnimation> for CompositionObject { fn from(value: NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&NaturalMotionAnimation> for CompositionObject { fn from(value: &NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PathKeyFrameAnimation(pub ::windows::core::IInspectable); impl PathKeyFrameAnimation { pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, CompositionPath>>(&self, normalizedprogresskey: f32, path: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, path.into_param().abi()).ok() } } pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, CompositionPath>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, path: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, path.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for PathKeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.PathKeyFrameAnimation;{9d0d18c9-1576-4b3f-be60-1d5031f5e71b})"); } unsafe impl ::windows::core::Interface for PathKeyFrameAnimation { type Vtable = IPathKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9d0d18c9_1576_4b3f_be60_1d5031f5e71b); } impl ::windows::core::RuntimeName for PathKeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.PathKeyFrameAnimation"; } impl ::core::convert::From<PathKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: PathKeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&PathKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &PathKeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PathKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: PathKeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&PathKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &PathKeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<PathKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&PathKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<PathKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&PathKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<PathKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&PathKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &PathKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<PathKeyFrameAnimation> for KeyFrameAnimation { fn from(value: PathKeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&PathKeyFrameAnimation> for KeyFrameAnimation { fn from(value: &PathKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PathKeyFrameAnimation> for CompositionAnimation { fn from(value: PathKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&PathKeyFrameAnimation> for CompositionAnimation { fn from(value: &PathKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PathKeyFrameAnimation> for CompositionObject { fn from(value: PathKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&PathKeyFrameAnimation> for CompositionObject { fn from(value: &PathKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &PathKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PathKeyFrameAnimation {} unsafe impl ::core::marker::Sync for PathKeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PointLight(pub ::windows::core::IInspectable); impl PointLight { pub fn Color(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ConstantAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetConstantAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn CoordinateSpace(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetCoordinateSpace<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn LinearAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLinearAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn QuadraticAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetQuadraticAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn Intensity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IPointLight2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetIntensity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPointLight2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn MinAttenuationCutoff(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IPointLight3>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMinAttenuationCutoff(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPointLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn MaxAttenuationCutoff(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IPointLight3>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMaxAttenuationCutoff(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPointLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Targets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ExclusionsFromTargets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for PointLight { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.PointLight;{b18545b3-0c5a-4ab0-bedc-4f3546948272})"); } unsafe impl ::windows::core::Interface for PointLight { type Vtable = IPointLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb18545b3_0c5a_4ab0_bedc_4f3546948272); } impl ::windows::core::RuntimeName for PointLight { const NAME: &'static str = "Windows.UI.Composition.PointLight"; } impl ::core::convert::From<PointLight> for ::windows::core::IUnknown { fn from(value: PointLight) -> Self { value.0 .0 } } impl ::core::convert::From<&PointLight> for ::windows::core::IUnknown { fn from(value: &PointLight) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PointLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PointLight> for ::windows::core::IInspectable { fn from(value: PointLight) -> Self { value.0 } } impl ::core::convert::From<&PointLight> for ::windows::core::IInspectable { fn from(value: &PointLight) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PointLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<PointLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: PointLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&PointLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &PointLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &PointLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<PointLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: PointLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&PointLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &PointLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &PointLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<PointLight> for CompositionLight { fn from(value: PointLight) -> Self { ::core::convert::Into::<CompositionLight>::into(&value) } } impl ::core::convert::From<&PointLight> for CompositionLight { fn from(value: &PointLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for &PointLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PointLight> for CompositionObject { fn from(value: PointLight) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&PointLight> for CompositionObject { fn from(value: &PointLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for PointLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &PointLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PointLight {} unsafe impl ::core::marker::Sync for PointLight {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PowerEasingFunction(pub ::windows::core::IInspectable); impl PowerEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } pub fn Power(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for PowerEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.PowerEasingFunction;{c3ff53d6-138b-5815-891a-b7f615ccc563})"); } unsafe impl ::windows::core::Interface for PowerEasingFunction { type Vtable = IPowerEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc3ff53d6_138b_5815_891a_b7f615ccc563); } impl ::windows::core::RuntimeName for PowerEasingFunction { const NAME: &'static str = "Windows.UI.Composition.PowerEasingFunction"; } impl ::core::convert::From<PowerEasingFunction> for ::windows::core::IUnknown { fn from(value: PowerEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&PowerEasingFunction> for ::windows::core::IUnknown { fn from(value: &PowerEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PowerEasingFunction> for ::windows::core::IInspectable { fn from(value: PowerEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&PowerEasingFunction> for ::windows::core::IInspectable { fn from(value: &PowerEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<PowerEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: PowerEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&PowerEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &PowerEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<PowerEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: PowerEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&PowerEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &PowerEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<PowerEasingFunction> for CompositionEasingFunction { fn from(value: PowerEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&PowerEasingFunction> for CompositionEasingFunction { fn from(value: &PowerEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PowerEasingFunction> for CompositionObject { fn from(value: PowerEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&PowerEasingFunction> for CompositionObject { fn from(value: &PowerEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &PowerEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PowerEasingFunction {} unsafe impl ::core::marker::Sync for PowerEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct QuaternionKeyFrameAnimation(pub ::windows::core::IInspectable); impl QuaternionKeyFrameAnimation { #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for QuaternionKeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.QuaternionKeyFrameAnimation;{404e5835-ecf6-4240-8520-671279cf36bc})"); } unsafe impl ::windows::core::Interface for QuaternionKeyFrameAnimation { type Vtable = IQuaternionKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x404e5835_ecf6_4240_8520_671279cf36bc); } impl ::windows::core::RuntimeName for QuaternionKeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.QuaternionKeyFrameAnimation"; } impl ::core::convert::From<QuaternionKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: QuaternionKeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&QuaternionKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &QuaternionKeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<QuaternionKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: QuaternionKeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&QuaternionKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &QuaternionKeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<QuaternionKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&QuaternionKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<QuaternionKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&QuaternionKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<QuaternionKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&QuaternionKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &QuaternionKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<QuaternionKeyFrameAnimation> for KeyFrameAnimation { fn from(value: QuaternionKeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&QuaternionKeyFrameAnimation> for KeyFrameAnimation { fn from(value: &QuaternionKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<QuaternionKeyFrameAnimation> for CompositionAnimation { fn from(value: QuaternionKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&QuaternionKeyFrameAnimation> for CompositionAnimation { fn from(value: &QuaternionKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<QuaternionKeyFrameAnimation> for CompositionObject { fn from(value: QuaternionKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&QuaternionKeyFrameAnimation> for CompositionObject { fn from(value: &QuaternionKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &QuaternionKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for QuaternionKeyFrameAnimation {} unsafe impl ::core::marker::Sync for QuaternionKeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RectangleClip(pub ::windows::core::IInspectable); impl RectangleClip { pub fn Bottom(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetBottom(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn BottomLeftRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetBottomLeftRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn BottomRightRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetBottomRightRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Left(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLeft(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn Right(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRight(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn Top(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetTop(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TopLeftRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTopLeftRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TopRightRadius(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTopRightRadius<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix3x2> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix3x2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix3x2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionClip2>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for RectangleClip { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.RectangleClip;{b3e7549e-00b4-5b53-8be8-353f6c433101})"); } unsafe impl ::windows::core::Interface for RectangleClip { type Vtable = IRectangleClip_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3e7549e_00b4_5b53_8be8_353f6c433101); } impl ::windows::core::RuntimeName for RectangleClip { const NAME: &'static str = "Windows.UI.Composition.RectangleClip"; } impl ::core::convert::From<RectangleClip> for ::windows::core::IUnknown { fn from(value: RectangleClip) -> Self { value.0 .0 } } impl ::core::convert::From<&RectangleClip> for ::windows::core::IUnknown { fn from(value: &RectangleClip) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RectangleClip> for ::windows::core::IInspectable { fn from(value: RectangleClip) -> Self { value.0 } } impl ::core::convert::From<&RectangleClip> for ::windows::core::IInspectable { fn from(value: &RectangleClip) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<RectangleClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: RectangleClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&RectangleClip> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &RectangleClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<RectangleClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: RectangleClip) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&RectangleClip> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &RectangleClip) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RectangleClip> for CompositionClip { fn from(value: RectangleClip) -> Self { ::core::convert::Into::<CompositionClip>::into(&value) } } impl ::core::convert::From<&RectangleClip> for CompositionClip { fn from(value: &RectangleClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionClip> for &RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionClip> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionClip>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RectangleClip> for CompositionObject { fn from(value: RectangleClip) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&RectangleClip> for CompositionObject { fn from(value: &RectangleClip) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &RectangleClip { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RectangleClip {} unsafe impl ::core::marker::Sync for RectangleClip {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RedirectVisual(pub ::windows::core::IInspectable); impl RedirectVisual { pub fn Source(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetSource<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Children(&self) -> ::windows::core::Result<VisualCollection> { let this = &::windows::core::Interface::cast::<IContainerVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualCollection>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for RedirectVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.RedirectVisual;{8cc6e340-8b75-5422-b06f-09ffe9f8617e})"); } unsafe impl ::windows::core::Interface for RedirectVisual { type Vtable = IRedirectVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cc6e340_8b75_5422_b06f_09ffe9f8617e); } impl ::windows::core::RuntimeName for RedirectVisual { const NAME: &'static str = "Windows.UI.Composition.RedirectVisual"; } impl ::core::convert::From<RedirectVisual> for ::windows::core::IUnknown { fn from(value: RedirectVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&RedirectVisual> for ::windows::core::IUnknown { fn from(value: &RedirectVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RedirectVisual> for ::windows::core::IInspectable { fn from(value: RedirectVisual) -> Self { value.0 } } impl ::core::convert::From<&RedirectVisual> for ::windows::core::IInspectable { fn from(value: &RedirectVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<RedirectVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: RedirectVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&RedirectVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &RedirectVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<RedirectVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: RedirectVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&RedirectVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &RedirectVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RedirectVisual> for ContainerVisual { fn from(value: RedirectVisual) -> Self { ::core::convert::Into::<ContainerVisual>::into(&value) } } impl ::core::convert::From<&RedirectVisual> for ContainerVisual { fn from(value: &RedirectVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for &RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RedirectVisual> for Visual { fn from(value: RedirectVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&RedirectVisual> for Visual { fn from(value: &RedirectVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RedirectVisual> for CompositionObject { fn from(value: RedirectVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&RedirectVisual> for CompositionObject { fn from(value: &RedirectVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &RedirectVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RedirectVisual {} unsafe impl ::core::marker::Sync for RedirectVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RenderingDeviceReplacedEventArgs(pub ::windows::core::IInspectable); impl RenderingDeviceReplacedEventArgs { pub fn GraphicsDevice(&self) -> ::windows::core::Result<CompositionGraphicsDevice> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionGraphicsDevice>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for RenderingDeviceReplacedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.RenderingDeviceReplacedEventArgs;{3a31ac7d-28bf-4e7a-8524-71679d480f38})"); } unsafe impl ::windows::core::Interface for RenderingDeviceReplacedEventArgs { type Vtable = IRenderingDeviceReplacedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a31ac7d_28bf_4e7a_8524_71679d480f38); } impl ::windows::core::RuntimeName for RenderingDeviceReplacedEventArgs { const NAME: &'static str = "Windows.UI.Composition.RenderingDeviceReplacedEventArgs"; } impl ::core::convert::From<RenderingDeviceReplacedEventArgs> for ::windows::core::IUnknown { fn from(value: RenderingDeviceReplacedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&RenderingDeviceReplacedEventArgs> for ::windows::core::IUnknown { fn from(value: &RenderingDeviceReplacedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RenderingDeviceReplacedEventArgs> for ::windows::core::IInspectable { fn from(value: RenderingDeviceReplacedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&RenderingDeviceReplacedEventArgs> for ::windows::core::IInspectable { fn from(value: &RenderingDeviceReplacedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<RenderingDeviceReplacedEventArgs> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: RenderingDeviceReplacedEventArgs) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&RenderingDeviceReplacedEventArgs> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &RenderingDeviceReplacedEventArgs) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<RenderingDeviceReplacedEventArgs> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: RenderingDeviceReplacedEventArgs) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&RenderingDeviceReplacedEventArgs> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &RenderingDeviceReplacedEventArgs) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RenderingDeviceReplacedEventArgs> for CompositionObject { fn from(value: RenderingDeviceReplacedEventArgs) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&RenderingDeviceReplacedEventArgs> for CompositionObject { fn from(value: &RenderingDeviceReplacedEventArgs) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &RenderingDeviceReplacedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RenderingDeviceReplacedEventArgs {} unsafe impl ::core::marker::Sync for RenderingDeviceReplacedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ScalarKeyFrameAnimation(pub ::windows::core::IInspectable); impl ScalarKeyFrameAnimation { pub fn InsertKeyFrame(&self, normalizedprogresskey: f32, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value).ok() } } pub fn InsertKeyFrameWithEasingFunction<'a, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: f32, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, value, easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ScalarKeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ScalarKeyFrameAnimation;{ae288fa9-252c-4b95-a725-bf85e38000a1})"); } unsafe impl ::windows::core::Interface for ScalarKeyFrameAnimation { type Vtable = IScalarKeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xae288fa9_252c_4b95_a725_bf85e38000a1); } impl ::windows::core::RuntimeName for ScalarKeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.ScalarKeyFrameAnimation"; } impl ::core::convert::From<ScalarKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: ScalarKeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&ScalarKeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &ScalarKeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ScalarKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: ScalarKeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&ScalarKeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &ScalarKeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ScalarKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ScalarKeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ScalarKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ScalarKeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ScalarKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ScalarKeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ScalarKeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ScalarKeyFrameAnimation> for KeyFrameAnimation { fn from(value: ScalarKeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&ScalarKeyFrameAnimation> for KeyFrameAnimation { fn from(value: &ScalarKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScalarKeyFrameAnimation> for CompositionAnimation { fn from(value: ScalarKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&ScalarKeyFrameAnimation> for CompositionAnimation { fn from(value: &ScalarKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScalarKeyFrameAnimation> for CompositionObject { fn from(value: ScalarKeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ScalarKeyFrameAnimation> for CompositionObject { fn from(value: &ScalarKeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ScalarKeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ScalarKeyFrameAnimation {} unsafe impl ::core::marker::Sync for ScalarKeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); impl ScalarNaturalMotionAnimation { #[cfg(feature = "Foundation")] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn InitialVelocity(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInitialVelocity(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ScalarNaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ScalarNaturalMotionAnimation;{94a94581-bf92-495b-b5bd-d2c659430737})"); } unsafe impl ::windows::core::Interface for ScalarNaturalMotionAnimation { type Vtable = IScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x94a94581_bf92_495b_b5bd_d2c659430737); } impl ::windows::core::RuntimeName for ScalarNaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.ScalarNaturalMotionAnimation"; } impl ::core::convert::From<ScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: ScalarNaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&ScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &ScalarNaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: ScalarNaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&ScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &ScalarNaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: ScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&ScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &ScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: ScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&ScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: &ScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScalarNaturalMotionAnimation> for CompositionObject { fn from(value: ScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ScalarNaturalMotionAnimation> for CompositionObject { fn from(value: &ScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ScalarNaturalMotionAnimation {} unsafe impl ::core::marker::Sync for ScalarNaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ShapeVisual(pub ::windows::core::IInspectable); impl ShapeVisual { #[cfg(feature = "Foundation_Collections")] pub fn Shapes(&self) -> ::windows::core::Result<CompositionShapeCollection> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionShapeCollection>(result__) } } pub fn ViewBox(&self) -> ::windows::core::Result<CompositionViewBox> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionViewBox>(result__) } } pub fn SetViewBox<'a, Param0: ::windows::core::IntoParam<'a, CompositionViewBox>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Children(&self) -> ::windows::core::Result<VisualCollection> { let this = &::windows::core::Interface::cast::<IContainerVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualCollection>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for ShapeVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.ShapeVisual;{f2bd13c3-ba7e-4b0f-9126-ffb7536b8176})"); } unsafe impl ::windows::core::Interface for ShapeVisual { type Vtable = IShapeVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2bd13c3_ba7e_4b0f_9126_ffb7536b8176); } impl ::windows::core::RuntimeName for ShapeVisual { const NAME: &'static str = "Windows.UI.Composition.ShapeVisual"; } impl ::core::convert::From<ShapeVisual> for ::windows::core::IUnknown { fn from(value: ShapeVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&ShapeVisual> for ::windows::core::IUnknown { fn from(value: &ShapeVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ShapeVisual> for ::windows::core::IInspectable { fn from(value: ShapeVisual) -> Self { value.0 } } impl ::core::convert::From<&ShapeVisual> for ::windows::core::IInspectable { fn from(value: &ShapeVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ShapeVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ShapeVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ShapeVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ShapeVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ShapeVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: ShapeVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ShapeVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &ShapeVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ShapeVisual> for ContainerVisual { fn from(value: ShapeVisual) -> Self { ::core::convert::Into::<ContainerVisual>::into(&value) } } impl ::core::convert::From<&ShapeVisual> for ContainerVisual { fn from(value: &ShapeVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for &ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ShapeVisual> for Visual { fn from(value: ShapeVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&ShapeVisual> for Visual { fn from(value: &ShapeVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ShapeVisual> for CompositionObject { fn from(value: ShapeVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&ShapeVisual> for CompositionObject { fn from(value: &ShapeVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &ShapeVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ShapeVisual {} unsafe impl ::core::marker::Sync for ShapeVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SineEasingFunction(pub ::windows::core::IInspectable); impl SineEasingFunction { pub fn Mode(&self) -> ::windows::core::Result<CompositionEasingFunctionMode> { let this = self; unsafe { let mut result__: CompositionEasingFunctionMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionEasingFunctionMode>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SineEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SineEasingFunction;{f1b518bf-9563-5474-bd13-44b2df4b1d58})"); } unsafe impl ::windows::core::Interface for SineEasingFunction { type Vtable = ISineEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf1b518bf_9563_5474_bd13_44b2df4b1d58); } impl ::windows::core::RuntimeName for SineEasingFunction { const NAME: &'static str = "Windows.UI.Composition.SineEasingFunction"; } impl ::core::convert::From<SineEasingFunction> for ::windows::core::IUnknown { fn from(value: SineEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&SineEasingFunction> for ::windows::core::IUnknown { fn from(value: &SineEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SineEasingFunction> for ::windows::core::IInspectable { fn from(value: SineEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&SineEasingFunction> for ::windows::core::IInspectable { fn from(value: &SineEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SineEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SineEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SineEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SineEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SineEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SineEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SineEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SineEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SineEasingFunction> for CompositionEasingFunction { fn from(value: SineEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&SineEasingFunction> for CompositionEasingFunction { fn from(value: &SineEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SineEasingFunction> for CompositionObject { fn from(value: SineEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SineEasingFunction> for CompositionObject { fn from(value: &SineEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SineEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SineEasingFunction {} unsafe impl ::core::marker::Sync for SineEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpotLight(pub ::windows::core::IInspectable); impl SpotLight { pub fn ConstantAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetConstantAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn CoordinateSpace(&self) -> ::windows::core::Result<Visual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetCoordinateSpace<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Direction(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetDirection<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn InnerConeAngle(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInnerConeAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn InnerConeAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInnerConeAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn InnerConeColor(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetInnerConeColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn LinearAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetLinearAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn OuterConeAngle(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOuterConeAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } pub fn OuterConeAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOuterConeAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value).ok() } } pub fn OuterConeColor(&self) -> ::windows::core::Result<super::Color> { let this = self; unsafe { let mut result__: super::Color = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Color>(result__) } } pub fn SetOuterConeColor<'a, Param0: ::windows::core::IntoParam<'a, super::Color>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn QuadraticAttenuation(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetQuadraticAttenuation(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), value).ok() } } pub fn InnerConeIntensity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ISpotLight2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInnerConeIntensity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISpotLight2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn OuterConeIntensity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ISpotLight2>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOuterConeIntensity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISpotLight2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn MinAttenuationCutoff(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ISpotLight3>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMinAttenuationCutoff(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISpotLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn MaxAttenuationCutoff(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<ISpotLight3>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetMaxAttenuationCutoff(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISpotLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Targets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ExclusionsFromTargets(&self) -> ::windows::core::Result<VisualUnorderedCollection> { let this = &::windows::core::Interface::cast::<ICompositionLight2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualUnorderedCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionLight3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SpotLight { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SpotLight;{5a9fe273-44a1-4f95-a422-8fa5116bdb44})"); } unsafe impl ::windows::core::Interface for SpotLight { type Vtable = ISpotLight_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5a9fe273_44a1_4f95_a422_8fa5116bdb44); } impl ::windows::core::RuntimeName for SpotLight { const NAME: &'static str = "Windows.UI.Composition.SpotLight"; } impl ::core::convert::From<SpotLight> for ::windows::core::IUnknown { fn from(value: SpotLight) -> Self { value.0 .0 } } impl ::core::convert::From<&SpotLight> for ::windows::core::IUnknown { fn from(value: &SpotLight) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpotLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpotLight> for ::windows::core::IInspectable { fn from(value: SpotLight) -> Self { value.0 } } impl ::core::convert::From<&SpotLight> for ::windows::core::IInspectable { fn from(value: &SpotLight) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpotLight { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpotLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpotLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpotLight> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpotLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpotLight { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpotLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SpotLight) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpotLight> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SpotLight) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SpotLight { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SpotLight> for CompositionLight { fn from(value: SpotLight) -> Self { ::core::convert::Into::<CompositionLight>::into(&value) } } impl ::core::convert::From<&SpotLight> for CompositionLight { fn from(value: &SpotLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionLight> for &SpotLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionLight> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionLight>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpotLight> for CompositionObject { fn from(value: SpotLight) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SpotLight> for CompositionObject { fn from(value: &SpotLight) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SpotLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SpotLight { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SpotLight {} unsafe impl ::core::marker::Sync for SpotLight {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpringScalarNaturalMotionAnimation(pub ::windows::core::IInspectable); impl SpringScalarNaturalMotionAnimation { pub fn DampingRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetDampingRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Period(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPeriod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f32>> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<f32>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<f32>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn InitialVelocity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetInitialVelocity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IScalarNaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SpringScalarNaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SpringScalarNaturalMotionAnimation;{0572a95f-37f9-4fbe-b87b-5cd03a89501c})"); } unsafe impl ::windows::core::Interface for SpringScalarNaturalMotionAnimation { type Vtable = ISpringScalarNaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0572a95f_37f9_4fbe_b87b_5cd03a89501c); } impl ::windows::core::RuntimeName for SpringScalarNaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.SpringScalarNaturalMotionAnimation"; } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpringScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpringScalarNaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringScalarNaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringScalarNaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SpringScalarNaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for ScalarNaturalMotionAnimation { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<ScalarNaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for ScalarNaturalMotionAnimation { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ScalarNaturalMotionAnimation> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ScalarNaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<ScalarNaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ScalarNaturalMotionAnimation> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ScalarNaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<ScalarNaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for CompositionAnimation { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringScalarNaturalMotionAnimation> for CompositionObject { fn from(value: SpringScalarNaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SpringScalarNaturalMotionAnimation> for CompositionObject { fn from(value: &SpringScalarNaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SpringScalarNaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SpringScalarNaturalMotionAnimation {} unsafe impl ::core::marker::Sync for SpringScalarNaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpringVector2NaturalMotionAnimation(pub ::windows::core::IInspectable); impl SpringVector2NaturalMotionAnimation { pub fn DampingRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetDampingRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Period(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPeriod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector2NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SpringVector2NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SpringVector2NaturalMotionAnimation;{23f494b5-ee73-4f0f-a423-402b946df4b3})"); } unsafe impl ::windows::core::Interface for SpringVector2NaturalMotionAnimation { type Vtable = ISpringVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x23f494b5_ee73_4f0f_a423_402b946df4b3); } impl ::windows::core::RuntimeName for SpringVector2NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.SpringVector2NaturalMotionAnimation"; } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpringVector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpringVector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringVector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringVector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringVector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringVector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SpringVector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for Vector2NaturalMotionAnimation { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<Vector2NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for Vector2NaturalMotionAnimation { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Vector2NaturalMotionAnimation> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector2NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector2NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Vector2NaturalMotionAnimation> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector2NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector2NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector2NaturalMotionAnimation> for CompositionObject { fn from(value: SpringVector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SpringVector2NaturalMotionAnimation> for CompositionObject { fn from(value: &SpringVector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SpringVector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SpringVector2NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for SpringVector2NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpringVector3NaturalMotionAnimation(pub ::windows::core::IInspectable); impl SpringVector3NaturalMotionAnimation { pub fn DampingRatio(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetDampingRatio(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Period(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPeriod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVector3NaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SpringVector3NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SpringVector3NaturalMotionAnimation;{6c8749df-d57b-4794-8e2d-cecb11e194e5})"); } unsafe impl ::windows::core::Interface for SpringVector3NaturalMotionAnimation { type Vtable = ISpringVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c8749df_d57b_4794_8e2d_cecb11e194e5); } impl ::windows::core::RuntimeName for SpringVector3NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.SpringVector3NaturalMotionAnimation"; } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpringVector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpringVector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringVector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringVector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpringVector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpringVector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SpringVector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for Vector3NaturalMotionAnimation { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<Vector3NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for Vector3NaturalMotionAnimation { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Vector3NaturalMotionAnimation> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector3NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector3NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Vector3NaturalMotionAnimation> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, Vector3NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<Vector3NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpringVector3NaturalMotionAnimation> for CompositionObject { fn from(value: SpringVector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SpringVector3NaturalMotionAnimation> for CompositionObject { fn from(value: &SpringVector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SpringVector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SpringVector3NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for SpringVector3NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpriteVisual(pub ::windows::core::IInspectable); impl SpriteVisual { pub fn Brush(&self) -> ::windows::core::Result<CompositionBrush> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBrush>(result__) } } pub fn SetBrush<'a, Param0: ::windows::core::IntoParam<'a, CompositionBrush>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Shadow(&self) -> ::windows::core::Result<CompositionShadow> { let this = &::windows::core::Interface::cast::<ISpriteVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionShadow>(result__) } } pub fn SetShadow<'a, Param0: ::windows::core::IntoParam<'a, CompositionShadow>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISpriteVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Children(&self) -> ::windows::core::Result<VisualCollection> { let this = &::windows::core::Interface::cast::<IContainerVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VisualCollection>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual>(self)?; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for SpriteVisual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.SpriteVisual;{08e05581-1ad1-4f97-9757-402d76e4233b})"); } unsafe impl ::windows::core::Interface for SpriteVisual { type Vtable = ISpriteVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08e05581_1ad1_4f97_9757_402d76e4233b); } impl ::windows::core::RuntimeName for SpriteVisual { const NAME: &'static str = "Windows.UI.Composition.SpriteVisual"; } impl ::core::convert::From<SpriteVisual> for ::windows::core::IUnknown { fn from(value: SpriteVisual) -> Self { value.0 .0 } } impl ::core::convert::From<&SpriteVisual> for ::windows::core::IUnknown { fn from(value: &SpriteVisual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpriteVisual> for ::windows::core::IInspectable { fn from(value: SpriteVisual) -> Self { value.0 } } impl ::core::convert::From<&SpriteVisual> for ::windows::core::IInspectable { fn from(value: &SpriteVisual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpriteVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpriteVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpriteVisual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpriteVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SpriteVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: SpriteVisual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SpriteVisual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &SpriteVisual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SpriteVisual> for ContainerVisual { fn from(value: SpriteVisual) -> Self { ::core::convert::Into::<ContainerVisual>::into(&value) } } impl ::core::convert::From<&SpriteVisual> for ContainerVisual { fn from(value: &SpriteVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ContainerVisual> for &SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, ContainerVisual> { ::windows::core::Param::Owned(::core::convert::Into::<ContainerVisual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpriteVisual> for Visual { fn from(value: SpriteVisual) -> Self { ::core::convert::Into::<Visual>::into(&value) } } impl ::core::convert::From<&SpriteVisual> for Visual { fn from(value: &SpriteVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, Visual> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, Visual> for &SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, Visual> { ::windows::core::Param::Owned(::core::convert::Into::<Visual>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SpriteVisual> for CompositionObject { fn from(value: SpriteVisual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&SpriteVisual> for CompositionObject { fn from(value: &SpriteVisual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &SpriteVisual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SpriteVisual {} unsafe impl ::core::marker::Sync for SpriteVisual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct StepEasingFunction(pub ::windows::core::IInspectable); impl StepEasingFunction { pub fn FinalStep(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetFinalStep(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn InitialStep(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetInitialStep(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsFinalStepSingleFrame(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsFinalStepSingleFrame(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsInitialStepSingleFrame(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsInitialStepSingleFrame(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn StepCount(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetStepCount(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for StepEasingFunction { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.StepEasingFunction;{d0caa74b-560c-4a0b-a5f6-206ca8c3ecd6})"); } unsafe impl ::windows::core::Interface for StepEasingFunction { type Vtable = IStepEasingFunction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0caa74b_560c_4a0b_a5f6_206ca8c3ecd6); } impl ::windows::core::RuntimeName for StepEasingFunction { const NAME: &'static str = "Windows.UI.Composition.StepEasingFunction"; } impl ::core::convert::From<StepEasingFunction> for ::windows::core::IUnknown { fn from(value: StepEasingFunction) -> Self { value.0 .0 } } impl ::core::convert::From<&StepEasingFunction> for ::windows::core::IUnknown { fn from(value: &StepEasingFunction) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<StepEasingFunction> for ::windows::core::IInspectable { fn from(value: StepEasingFunction) -> Self { value.0 } } impl ::core::convert::From<&StepEasingFunction> for ::windows::core::IInspectable { fn from(value: &StepEasingFunction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<StepEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: StepEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&StepEasingFunction> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &StepEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<StepEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: StepEasingFunction) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&StepEasingFunction> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &StepEasingFunction) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<StepEasingFunction> for CompositionEasingFunction { fn from(value: StepEasingFunction) -> Self { ::core::convert::Into::<CompositionEasingFunction>::into(&value) } } impl ::core::convert::From<&StepEasingFunction> for CompositionEasingFunction { fn from(value: &StepEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionEasingFunction> for &StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionEasingFunction> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionEasingFunction>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<StepEasingFunction> for CompositionObject { fn from(value: StepEasingFunction) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&StepEasingFunction> for CompositionObject { fn from(value: &StepEasingFunction) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &StepEasingFunction { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for StepEasingFunction {} unsafe impl ::core::marker::Sync for StepEasingFunction {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Vector2KeyFrameAnimation(pub ::windows::core::IInspectable); impl Vector2KeyFrameAnimation { #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Vector2KeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Vector2KeyFrameAnimation;{df414515-4e29-4f11-b55e-bf2a6eb36294})"); } unsafe impl ::windows::core::Interface for Vector2KeyFrameAnimation { type Vtable = IVector2KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdf414515_4e29_4f11_b55e_bf2a6eb36294); } impl ::windows::core::RuntimeName for Vector2KeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.Vector2KeyFrameAnimation"; } impl ::core::convert::From<Vector2KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: Vector2KeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&Vector2KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &Vector2KeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Vector2KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: Vector2KeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&Vector2KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &Vector2KeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Vector2KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Vector2KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector2KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector2KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector2KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector2KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Vector2KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Vector2KeyFrameAnimation> for KeyFrameAnimation { fn from(value: Vector2KeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&Vector2KeyFrameAnimation> for KeyFrameAnimation { fn from(value: &Vector2KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector2KeyFrameAnimation> for CompositionAnimation { fn from(value: Vector2KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&Vector2KeyFrameAnimation> for CompositionAnimation { fn from(value: &Vector2KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector2KeyFrameAnimation> for CompositionObject { fn from(value: Vector2KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Vector2KeyFrameAnimation> for CompositionObject { fn from(value: &Vector2KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Vector2KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Vector2KeyFrameAnimation {} unsafe impl ::core::marker::Sync for Vector2KeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Vector2NaturalMotionAnimation(pub ::windows::core::IInspectable); impl Vector2NaturalMotionAnimation { #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector2>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Vector2NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Vector2NaturalMotionAnimation;{0f3e0b7d-e512-479d-a00c-77c93a30a395})"); } unsafe impl ::windows::core::Interface for Vector2NaturalMotionAnimation { type Vtable = IVector2NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0f3e0b7d_e512_479d_a00c_77c93a30a395); } impl ::windows::core::RuntimeName for Vector2NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.Vector2NaturalMotionAnimation"; } impl ::core::convert::From<Vector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: Vector2NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&Vector2NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &Vector2NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Vector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: Vector2NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&Vector2NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &Vector2NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Vector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Vector2NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector2NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector2NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Vector2NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Vector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: Vector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&Vector2NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &Vector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: Vector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&Vector2NaturalMotionAnimation> for CompositionAnimation { fn from(value: &Vector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector2NaturalMotionAnimation> for CompositionObject { fn from(value: Vector2NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Vector2NaturalMotionAnimation> for CompositionObject { fn from(value: &Vector2NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Vector2NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Vector2NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for Vector2NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Vector3KeyFrameAnimation(pub ::windows::core::IInspectable); impl Vector3KeyFrameAnimation { #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Vector3KeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Vector3KeyFrameAnimation;{c8039daa-a281-43c2-a73d-b68e3c533c40})"); } unsafe impl ::windows::core::Interface for Vector3KeyFrameAnimation { type Vtable = IVector3KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8039daa_a281_43c2_a73d_b68e3c533c40); } impl ::windows::core::RuntimeName for Vector3KeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.Vector3KeyFrameAnimation"; } impl ::core::convert::From<Vector3KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: Vector3KeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&Vector3KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &Vector3KeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Vector3KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: Vector3KeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&Vector3KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &Vector3KeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Vector3KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Vector3KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector3KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector3KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector3KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector3KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Vector3KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Vector3KeyFrameAnimation> for KeyFrameAnimation { fn from(value: Vector3KeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&Vector3KeyFrameAnimation> for KeyFrameAnimation { fn from(value: &Vector3KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector3KeyFrameAnimation> for CompositionAnimation { fn from(value: Vector3KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&Vector3KeyFrameAnimation> for CompositionAnimation { fn from(value: &Vector3KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector3KeyFrameAnimation> for CompositionObject { fn from(value: Vector3KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Vector3KeyFrameAnimation> for CompositionObject { fn from(value: &Vector3KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Vector3KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Vector3KeyFrameAnimation {} unsafe impl ::core::marker::Sync for Vector3KeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Vector3NaturalMotionAnimation(pub ::windows::core::IInspectable); impl Vector3NaturalMotionAnimation { #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn FinalValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetFinalValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn InitialValue(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub fn SetInitialValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::Numerics::Vector3>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InitialVelocity(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetInitialVelocity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<INaturalMotionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Vector3NaturalMotionAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Vector3NaturalMotionAnimation;{9c17042c-e2ca-45ad-969e-4e78b7b9ad41})"); } unsafe impl ::windows::core::Interface for Vector3NaturalMotionAnimation { type Vtable = IVector3NaturalMotionAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9c17042c_e2ca_45ad_969e_4e78b7b9ad41); } impl ::windows::core::RuntimeName for Vector3NaturalMotionAnimation { const NAME: &'static str = "Windows.UI.Composition.Vector3NaturalMotionAnimation"; } impl ::core::convert::From<Vector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: Vector3NaturalMotionAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&Vector3NaturalMotionAnimation> for ::windows::core::IUnknown { fn from(value: &Vector3NaturalMotionAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Vector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: Vector3NaturalMotionAnimation) -> Self { value.0 } } impl ::core::convert::From<&Vector3NaturalMotionAnimation> for ::windows::core::IInspectable { fn from(value: &Vector3NaturalMotionAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Vector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Vector3NaturalMotionAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector3NaturalMotionAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector3NaturalMotionAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Vector3NaturalMotionAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Vector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: Vector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<NaturalMotionAnimation>::into(&value) } } impl ::core::convert::From<&Vector3NaturalMotionAnimation> for NaturalMotionAnimation { fn from(value: &Vector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, NaturalMotionAnimation> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, NaturalMotionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<NaturalMotionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: Vector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&Vector3NaturalMotionAnimation> for CompositionAnimation { fn from(value: &Vector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector3NaturalMotionAnimation> for CompositionObject { fn from(value: Vector3NaturalMotionAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Vector3NaturalMotionAnimation> for CompositionObject { fn from(value: &Vector3NaturalMotionAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Vector3NaturalMotionAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Vector3NaturalMotionAnimation {} unsafe impl ::core::marker::Sync for Vector3NaturalMotionAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Vector4KeyFrameAnimation(pub ::windows::core::IInspectable); impl Vector4KeyFrameAnimation { #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn InsertKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearAllParameters(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn ClearParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), key.into_param().abi()).ok() } } pub fn SetColorParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::Color>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix3x2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix3x2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetMatrix4x4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetQuaternionParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn SetReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionObject>>(&self, key: Param0, compositionobject: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), key.into_param().abi(), compositionobject.into_param().abi()).ok() } } pub fn SetScalarParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: f32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector2Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector3Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn SetVector4Parameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector4>>(&self, key: Param0, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), key.into_param().abi(), value.into_param().abi()).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DelayTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDelayTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IterationBehavior(&self) -> ::windows::core::Result<AnimationIterationBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationIterationBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationIterationBehavior>(result__) } } pub fn SetIterationBehavior(&self, value: AnimationIterationBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IterationCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetIterationCount(&self, value: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn KeyFrameCount(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn StopBehavior(&self) -> ::windows::core::Result<AnimationStopBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { let mut result__: AnimationStopBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationStopBehavior>(result__) } } pub fn SetStopBehavior(&self, value: AnimationStopBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn InsertExpressionKeyFrame<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, normalizedprogresskey: f32, value: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi()).ok() } } pub fn InsertExpressionKeyFrameWithEasingFunction<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, CompositionEasingFunction>>(&self, normalizedprogresskey: f32, value: Param1, easingfunction: Param2) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), normalizedprogresskey, value.into_param().abi(), easingfunction.into_param().abi()).ok() } } pub fn SetBooleanParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), key.into_param().abi(), value).ok() } } pub fn Target(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTarget<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Direction(&self) -> ::windows::core::Result<AnimationDirection> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { let mut result__: AnimationDirection = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDirection>(result__) } } pub fn SetDirection(&self, value: AnimationDirection) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DelayBehavior(&self) -> ::windows::core::Result<AnimationDelayBehavior> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { let mut result__: AnimationDelayBehavior = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AnimationDelayBehavior>(result__) } } pub fn SetDelayBehavior(&self, value: AnimationDelayBehavior) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IKeyFrameAnimation3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn InitialValueExpressions(&self) -> ::windows::core::Result<InitialValueExpressionCollection> { let this = &::windows::core::Interface::cast::<ICompositionAnimation3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<InitialValueExpressionCollection>(result__) } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } pub fn SetExpressionReferenceParameter<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, IAnimationObject>>(&self, parametername: Param0, source: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionAnimation4>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), parametername.into_param().abi(), source.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Vector4KeyFrameAnimation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Vector4KeyFrameAnimation;{2457945b-addd-4385-9606-b6a3d5e4e1b9})"); } unsafe impl ::windows::core::Interface for Vector4KeyFrameAnimation { type Vtable = IVector4KeyFrameAnimation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2457945b_addd_4385_9606_b6a3d5e4e1b9); } impl ::windows::core::RuntimeName for Vector4KeyFrameAnimation { const NAME: &'static str = "Windows.UI.Composition.Vector4KeyFrameAnimation"; } impl ::core::convert::From<Vector4KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: Vector4KeyFrameAnimation) -> Self { value.0 .0 } } impl ::core::convert::From<&Vector4KeyFrameAnimation> for ::windows::core::IUnknown { fn from(value: &Vector4KeyFrameAnimation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Vector4KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: Vector4KeyFrameAnimation) -> Self { value.0 } } impl ::core::convert::From<&Vector4KeyFrameAnimation> for ::windows::core::IInspectable { fn from(value: &Vector4KeyFrameAnimation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Vector4KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Vector4KeyFrameAnimation> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector4KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector4KeyFrameAnimation> for ICompositionAnimationBase { type Error = ::windows::core::Error; fn try_from(value: &Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICompositionAnimationBase> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, ICompositionAnimationBase> { ::core::convert::TryInto::<ICompositionAnimationBase>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Vector4KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Vector4KeyFrameAnimation> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Vector4KeyFrameAnimation) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Vector4KeyFrameAnimation> for KeyFrameAnimation { fn from(value: Vector4KeyFrameAnimation) -> Self { ::core::convert::Into::<KeyFrameAnimation>::into(&value) } } impl ::core::convert::From<&Vector4KeyFrameAnimation> for KeyFrameAnimation { fn from(value: &Vector4KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, KeyFrameAnimation> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, KeyFrameAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<KeyFrameAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector4KeyFrameAnimation> for CompositionAnimation { fn from(value: Vector4KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionAnimation>::into(&value) } } impl ::core::convert::From<&Vector4KeyFrameAnimation> for CompositionAnimation { fn from(value: &Vector4KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionAnimation> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionAnimation> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionAnimation>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<Vector4KeyFrameAnimation> for CompositionObject { fn from(value: Vector4KeyFrameAnimation) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Vector4KeyFrameAnimation> for CompositionObject { fn from(value: &Vector4KeyFrameAnimation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Vector4KeyFrameAnimation { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Vector4KeyFrameAnimation {} unsafe impl ::core::marker::Sync for Vector4KeyFrameAnimation {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct Visual(pub ::windows::core::IInspectable); impl Visual { #[cfg(feature = "Foundation_Numerics")] pub fn AnchorPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetAnchorPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn BackfaceVisibility(&self) -> ::windows::core::Result<CompositionBackfaceVisibility> { let this = self; unsafe { let mut result__: CompositionBackfaceVisibility = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBackfaceVisibility>(result__) } } pub fn SetBackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn BorderMode(&self) -> ::windows::core::Result<CompositionBorderMode> { let this = self; unsafe { let mut result__: CompositionBorderMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionBorderMode>(result__) } } pub fn SetBorderMode(&self, value: CompositionBorderMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn CenterPoint(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetCenterPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Clip(&self) -> ::windows::core::Result<CompositionClip> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionClip>(result__) } } pub fn SetClip<'a, Param0: ::windows::core::IntoParam<'a, CompositionClip>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn CompositeMode(&self) -> ::windows::core::Result<CompositionCompositeMode> { let this = self; unsafe { let mut result__: CompositionCompositeMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionCompositeMode>(result__) } } pub fn SetCompositeMode(&self, value: CompositionCompositeMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVisible(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Offset(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Opacity(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetOpacity(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Orientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Parent(&self) -> ::windows::core::Result<ContainerVisual> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ContainerVisual>(result__) } } pub fn RotationAngle(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngle(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), value).ok() } } pub fn RotationAngleInDegrees(&self) -> ::windows::core::Result<f32> { let this = self; unsafe { let mut result__: f32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f32>(result__) } } pub fn SetRotationAngleInDegrees(&self, value: f32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RotationAxis(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRotationAxis<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Scale(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetScale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn Size(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn TransformMatrix(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Matrix4x4> { let this = self; unsafe { let mut result__: super::super::Foundation::Numerics::Matrix4x4 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Matrix4x4>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetTransformMatrix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Matrix4x4>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ParentForTransform(&self) -> ::windows::core::Result<Visual> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Visual>(result__) } } pub fn SetParentForTransform<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeOffsetAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector3> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector3 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector3>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeOffsetAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector3>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Numerics")] pub fn RelativeSizeAdjustment(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Vector2> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { let mut result__: super::super::Foundation::Numerics::Vector2 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Vector2>(result__) } } #[cfg(feature = "Foundation_Numerics")] pub fn SetRelativeSizeAdjustment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Vector2>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IsHitTestVisible(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsHitTestVisible(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPixelSnappingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPixelSnappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IVisual4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for Visual { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.Visual;{117e202d-a859-4c89-873b-c2aa566788e3})"); } unsafe impl ::windows::core::Interface for Visual { type Vtable = IVisual_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x117e202d_a859_4c89_873b_c2aa566788e3); } impl ::windows::core::RuntimeName for Visual { const NAME: &'static str = "Windows.UI.Composition.Visual"; } impl ::core::convert::From<Visual> for ::windows::core::IUnknown { fn from(value: Visual) -> Self { value.0 .0 } } impl ::core::convert::From<&Visual> for ::windows::core::IUnknown { fn from(value: &Visual) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for Visual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a Visual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<Visual> for ::windows::core::IInspectable { fn from(value: Visual) -> Self { value.0 } } impl ::core::convert::From<&Visual> for ::windows::core::IInspectable { fn from(value: &Visual) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for Visual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a Visual { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<Visual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: Visual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&Visual> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &Visual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for Visual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &Visual { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<Visual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: Visual) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&Visual> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &Visual) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for Visual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &Visual { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<Visual> for CompositionObject { fn from(value: Visual) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&Visual> for CompositionObject { fn from(value: &Visual) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for Visual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &Visual { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for Visual {} unsafe impl ::core::marker::Sync for Visual {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct VisualCollection(pub ::windows::core::IInspectable); impl VisualCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<Visual>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<Visual>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<Visual>>(result__) } } pub fn Count(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn InsertAbove<'a, Param0: ::windows::core::IntoParam<'a, Visual>, Param1: ::windows::core::IntoParam<'a, Visual>>(&self, newchild: Param0, sibling: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), newchild.into_param().abi(), sibling.into_param().abi()).ok() } } pub fn InsertAtBottom<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, newchild: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), newchild.into_param().abi()).ok() } } pub fn InsertAtTop<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, newchild: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), newchild.into_param().abi()).ok() } } pub fn InsertBelow<'a, Param0: ::windows::core::IntoParam<'a, Visual>, Param1: ::windows::core::IntoParam<'a, Visual>>(&self, newchild: Param0, sibling: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), newchild.into_param().abi(), sibling.into_param().abi()).ok() } } pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, child: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), child.into_param().abi()).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for VisualCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.VisualCollection;{8b745505-fd3e-4a98-84a8-e949468c6bcb})"); } unsafe impl ::windows::core::Interface for VisualCollection { type Vtable = IVisualCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8b745505_fd3e_4a98_84a8_e949468c6bcb); } impl ::windows::core::RuntimeName for VisualCollection { const NAME: &'static str = "Windows.UI.Composition.VisualCollection"; } impl ::core::convert::From<VisualCollection> for ::windows::core::IUnknown { fn from(value: VisualCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&VisualCollection> for ::windows::core::IUnknown { fn from(value: &VisualCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<VisualCollection> for ::windows::core::IInspectable { fn from(value: VisualCollection) -> Self { value.0 } } impl ::core::convert::From<&VisualCollection> for ::windows::core::IInspectable { fn from(value: &VisualCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<VisualCollection> for super::super::Foundation::Collections::IIterable<Visual> { type Error = ::windows::core::Error; fn try_from(value: VisualCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&VisualCollection> for super::super::Foundation::Collections::IIterable<Visual> { type Error = ::windows::core::Error; fn try_from(value: &VisualCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<Visual>> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<Visual>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<Visual>> for &VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<Visual>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<Visual>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<VisualCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: VisualCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&VisualCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &VisualCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<VisualCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: VisualCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&VisualCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &VisualCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<VisualCollection> for CompositionObject { fn from(value: VisualCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&VisualCollection> for CompositionObject { fn from(value: &VisualCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &VisualCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for VisualCollection {} unsafe impl ::core::marker::Sync for VisualCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for VisualCollection { type Item = Visual; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &VisualCollection { type Item = Visual; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct VisualUnorderedCollection(pub ::windows::core::IInspectable); impl VisualUnorderedCollection { #[cfg(feature = "Foundation_Collections")] pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<Visual>> { let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<Visual>>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<Visual>>(result__) } } pub fn Count(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn Add<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, newvisual: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), newvisual.into_param().abi()).ok() } } pub fn Remove<'a, Param0: ::windows::core::IntoParam<'a, Visual>>(&self, visual: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), visual.into_param().abi()).ok() } } pub fn RemoveAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Compositor(&self) -> ::windows::core::Result<Compositor> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<Compositor>(result__) } } #[cfg(feature = "UI_Core")] pub fn Dispatcher(&self) -> ::windows::core::Result<super::Core::CoreDispatcher> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::CoreDispatcher>(result__) } } pub fn Properties(&self) -> ::windows::core::Result<CompositionPropertySet> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CompositionPropertySet>(result__) } } pub fn StartAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, CompositionAnimation>>(&self, propertyname: Param0, animation: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), animation.into_param().abi()).ok() } } pub fn StopAnimation<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), propertyname.into_param().abi()).ok() } } pub fn Comment(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetComment<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ImplicitAnimations(&self) -> ::windows::core::Result<ImplicitAnimationCollection> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImplicitAnimationCollection>(result__) } } pub fn SetImplicitAnimations<'a, Param0: ::windows::core::IntoParam<'a, ImplicitAnimationCollection>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StartAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn StopAnimationGroup<'a, Param0: ::windows::core::IntoParam<'a, ICompositionAnimationBase>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICompositionObject2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "System")] pub fn DispatcherQueue(&self) -> ::windows::core::Result<super::super::System::DispatcherQueue> { let this = &::windows::core::Interface::cast::<ICompositionObject3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::System::DispatcherQueue>(result__) } } pub fn TryGetAnimationController<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, propertyname: Param0) -> ::windows::core::Result<AnimationController> { let this = &::windows::core::Interface::cast::<ICompositionObject4>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), &mut result__).from_abi::<AnimationController>(result__) } } pub fn PopulatePropertyInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, AnimationPropertyInfo>>(&self, propertyname: Param0, propertyinfo: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAnimationObject>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), propertyname.into_param().abi(), propertyinfo.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for VisualUnorderedCollection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Composition.VisualUnorderedCollection;{338faa70-54c8-40a7-8029-c9ceeb0aa250})"); } unsafe impl ::windows::core::Interface for VisualUnorderedCollection { type Vtable = IVisualUnorderedCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x338faa70_54c8_40a7_8029_c9ceeb0aa250); } impl ::windows::core::RuntimeName for VisualUnorderedCollection { const NAME: &'static str = "Windows.UI.Composition.VisualUnorderedCollection"; } impl ::core::convert::From<VisualUnorderedCollection> for ::windows::core::IUnknown { fn from(value: VisualUnorderedCollection) -> Self { value.0 .0 } } impl ::core::convert::From<&VisualUnorderedCollection> for ::windows::core::IUnknown { fn from(value: &VisualUnorderedCollection) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<VisualUnorderedCollection> for ::windows::core::IInspectable { fn from(value: VisualUnorderedCollection) -> Self { value.0 } } impl ::core::convert::From<&VisualUnorderedCollection> for ::windows::core::IInspectable { fn from(value: &VisualUnorderedCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<VisualUnorderedCollection> for super::super::Foundation::Collections::IIterable<Visual> { type Error = ::windows::core::Error; fn try_from(value: VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation_Collections")] impl ::core::convert::TryFrom<&VisualUnorderedCollection> for super::super::Foundation::Collections::IIterable<Visual> { type Error = ::windows::core::Error; fn try_from(value: &VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<Visual>> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<Visual>> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation_Collections")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<Visual>> for &VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<Visual>> { ::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<Visual>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<VisualUnorderedCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&VisualUnorderedCollection> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<VisualUnorderedCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&VisualUnorderedCollection> for IAnimationObject { type Error = ::windows::core::Error; fn try_from(value: &VisualUnorderedCollection) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IAnimationObject> for &VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, IAnimationObject> { ::core::convert::TryInto::<IAnimationObject>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<VisualUnorderedCollection> for CompositionObject { fn from(value: VisualUnorderedCollection) -> Self { ::core::convert::Into::<CompositionObject>::into(&value) } } impl ::core::convert::From<&VisualUnorderedCollection> for CompositionObject { fn from(value: &VisualUnorderedCollection) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, CompositionObject> for &VisualUnorderedCollection { fn into_param(self) -> ::windows::core::Param<'a, CompositionObject> { ::windows::core::Param::Owned(::core::convert::Into::<CompositionObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for VisualUnorderedCollection {} unsafe impl ::core::marker::Sync for VisualUnorderedCollection {} #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for VisualUnorderedCollection { type Item = Visual; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { ::core::iter::IntoIterator::into_iter(&self) } } #[cfg(all(feature = "Foundation_Collections"))] impl ::core::iter::IntoIterator for &VisualUnorderedCollection { type Item = Visual; type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>; fn into_iter(self) -> Self::IntoIter { self.First().unwrap() } }
// Copyright 2021 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::sync::Arc; use common_exception::Result; use common_expression::types::number::UInt64Type; use common_expression::types::NumberDataType; use common_expression::types::StringType; use common_expression::types::TimestampType; use common_expression::DataBlock; use common_expression::FromData; use common_expression::FromOptData; use common_expression::TableDataType; use common_expression::TableField; use common_expression::TableSchema; use common_expression::TableSchemaRefExt; use storages_common_table_meta::meta::TableSnapshotLite; use crate::io::ListSnapshotLiteOption; use crate::io::SnapshotLiteListExtended; use crate::io::SnapshotsIO; use crate::io::TableMetaLocationGenerator; use crate::sessions::TableContext; use crate::FuseTable; pub struct FuseSnapshot<'a> { pub ctx: Arc<dyn TableContext>, pub table: &'a FuseTable, } impl<'a> FuseSnapshot<'a> { pub fn new(ctx: Arc<dyn TableContext>, table: &'a FuseTable) -> Self { Self { ctx, table } } pub async fn get_snapshots(self, limit: Option<usize>) -> Result<DataBlock> { let meta_location_generator = self.table.meta_location_generator.clone(); let snapshot_location = self.table.snapshot_loc().await?; let snapshot = self.table.read_table_snapshot().await?; if let Some(snapshot_location) = snapshot_location { let snapshot_version = self.table.snapshot_format_version().await?; let snapshots_io = SnapshotsIO::create( self.ctx.clone(), self.table.operator.clone(), snapshot_version, ); let snapshot_lite = if limit.is_none() { // Use SnapshotsIO::read_snapshot_lites only if limit is None // // SnapshotsIO::read_snapshot lists snapshots from object storage, taking limit into // account, BEFORE the snapshots are chained, so there might be the case that although // there are more than limited number of snapshots could be chained, the number of // snapshots returned is lesser. let SnapshotLiteListExtended { chained_snapshot_lites, .. } = snapshots_io .read_snapshot_lites_ext( snapshot_location, None, &ListSnapshotLiteOption::NeedNotSegments, snapshot.and_then(|s| s.timestamp), &|_| {}, ) .await?; Ok(chained_snapshot_lites) } else { // SnapshotsIO::read_chained_snapshot_lists traverses the history of snapshot sequentially, by using the // TableSnapshot::prev_snapshot_id, which guarantees that the number of snapshot // returned is as expected snapshots_io .read_chained_snapshot_lites( meta_location_generator.clone(), snapshot_location, limit, ) .await }?; return self.to_block(&meta_location_generator, &snapshot_lite, snapshot_version); } Ok(DataBlock::empty_with_schema(Arc::new( FuseSnapshot::schema().into(), ))) } fn to_block( &self, location_generator: &TableMetaLocationGenerator, snapshots: &[TableSnapshotLite], latest_snapshot_version: u64, ) -> Result<DataBlock> { let len = snapshots.len(); let mut snapshot_ids: Vec<Vec<u8>> = Vec::with_capacity(len); let mut snapshot_locations: Vec<Vec<u8>> = Vec::with_capacity(len); let mut prev_snapshot_ids: Vec<Option<Vec<u8>>> = Vec::with_capacity(len); let mut format_versions: Vec<u64> = Vec::with_capacity(len); let mut segment_count: Vec<u64> = Vec::with_capacity(len); let mut block_count: Vec<u64> = Vec::with_capacity(len); let mut row_count: Vec<u64> = Vec::with_capacity(len); let mut compressed: Vec<u64> = Vec::with_capacity(len); let mut uncompressed: Vec<u64> = Vec::with_capacity(len); let mut index_size: Vec<u64> = Vec::with_capacity(len); let mut timestamps: Vec<Option<i64>> = Vec::with_capacity(len); let mut current_snapshot_version = latest_snapshot_version; for s in snapshots { snapshot_ids.push(s.snapshot_id.simple().to_string().into_bytes()); snapshot_locations.push( location_generator .snapshot_location_from_uuid(&s.snapshot_id, current_snapshot_version)? .into_bytes(), ); let (id, ver) = match s.prev_snapshot_id { Some((id, v)) => (Some(id.simple().to_string().into_bytes()), v), None => (None, 0), }; prev_snapshot_ids.push(id); format_versions.push(s.format_version); segment_count.push(s.segment_count); block_count.push(s.block_count); row_count.push(s.row_count); compressed.push(s.compressed_byte_size); uncompressed.push(s.uncompressed_byte_size); index_size.push(s.index_size); timestamps.push(s.timestamp.map(|dt| (dt.timestamp_micros()))); current_snapshot_version = ver; } Ok(DataBlock::new_from_columns(vec![ StringType::from_data(snapshot_ids), StringType::from_data(snapshot_locations), UInt64Type::from_data(format_versions), StringType::from_opt_data(prev_snapshot_ids), UInt64Type::from_data(segment_count), UInt64Type::from_data(block_count), UInt64Type::from_data(row_count), UInt64Type::from_data(uncompressed), UInt64Type::from_data(compressed), UInt64Type::from_data(index_size), TimestampType::from_opt_data(timestamps), ])) } pub fn schema() -> Arc<TableSchema> { TableSchemaRefExt::create(vec![ TableField::new("snapshot_id", TableDataType::String), TableField::new("snapshot_location", TableDataType::String), TableField::new( "format_version", TableDataType::Number(NumberDataType::UInt64), ), TableField::new( "previous_snapshot_id", TableDataType::String.wrap_nullable(), ), TableField::new( "segment_count", TableDataType::Number(NumberDataType::UInt64), ), TableField::new("block_count", TableDataType::Number(NumberDataType::UInt64)), TableField::new("row_count", TableDataType::Number(NumberDataType::UInt64)), TableField::new( "bytes_uncompressed", TableDataType::Number(NumberDataType::UInt64), ), TableField::new( "bytes_compressed", TableDataType::Number(NumberDataType::UInt64), ), TableField::new("index_size", TableDataType::Number(NumberDataType::UInt64)), TableField::new("timestamp", TableDataType::Timestamp.wrap_nullable()), ]) } }