text
stringlengths
8
4.13M
use std::fs::File; use std::io::prelude::*; fn main() { // The 'Result' value returned by write_all is ignored. let mut f1 = File::create("/sys/class/gpio/export").unwrap(); f1.write_all(b"0"); let mut f2 = File::create("/sys/class/gpio/gpio0/direction").unwrap(); f2.write_all(b"out"); let mut f3 = File::create("/sys/class/gpio/gpio0/value").unwrap(); f3.write_all(b"1"); }
use std::io; use futures::prelude::*; use tokio::prelude::*; use bytes::BytesMut; pub struct Forwarder<F, T> { from: F, to: T, buffer: BytesMut, } impl<F, T> Forwarder<F, T> where F: AsyncRead, T: AsyncWrite, { pub fn new(from: F, to: T) -> Self { Forwarder { from: from, to: to, buffer: BytesMut::new(), } } } impl<F, T> Future for Forwarder<F, T> where F: AsyncRead, T: AsyncWrite, { type Item = (); type Error = io::Error; fn poll(&mut self) -> Poll<Self::Item, Self::Error> { let mut read_closed = false; loop { self.buffer.reserve(1024); match self.from.read_buf(&mut self.buffer)? { Async::Ready(0) => { // read end closed, but we may have some data in the buffer. // in this case we need to return Async::Ready after we write // the buffer the write end. read_closed = true; if self.buffer.len() > 0 { break } return Ok(Async::Ready(())); } Async::Ready(_) => continue, _ => break, } } while !self.buffer.is_empty() { match self.to.poll_write(&mut self.buffer)? { Async::Ready(0) => { // write end closed return Ok(Async::Ready(())); } Async::Ready(n) => { self.buffer.advance(n); continue } _ => break, } } match read_closed { true => Ok(Async::Ready(())), false => Ok(Async::NotReady), } } }
use std::num::Num; pub fn poop<T: Num>(i: T) -> T { i * i }
#[repr(C,packed)] pub struct PartitionTableStruct { pub bootIndicator : u8, /* Boot flags */ pub startingHead : u8, /* Starting head */ pub startingSector : u8, /* Starting sector */ pub startingCylinder : u8, /* Starting cylinder */ pub systemID : u8, /* 2:Xenix, 5:X-DOS, 7:HPFS, */ /* 99:UNIX, 100-104:NetWare, */ /* 196-198:DRDOS, 0,1,3,4,6, */ /* 8,9:DOS,219:Concurrent DOS,*/ /* 80-84:Ontrack, B,C:FAT32 */ pub endingHead : u8, /* Partition ending head */ pub endingSector : u8, /* Partition ending sector */ pub endingCylinder : u8, /* Partition ending cylinder */ pub relativeSector : u32, /* Relative parition addr */ pub sectorCnt : u32 /* Num sectors in partition */ } #[repr(C,packed)] pub struct MbrStruct { pub bootCode : [u8;446], pub partition : [PartitionTableStruct;4], pub signature: [u8;2] } const BPB_JUMPCODE_SIZE : usize = 3; const BPB_NAME_SIZE : usize = 8; const BPB_LABEL_SIZE : usize = 11; const BPB_SYSTYPE_SIZE : usize = 8; const BPB_BOOT_SIGNATURE : usize = 0x29; #[repr(C,packed)] pub struct BpbStruct { pub jumpCode : [u8; BPB_JUMPCODE_SIZE], /* 2 or 3 byte jump instruct */ pub bpbName : [u8; BPB_NAME_SIZE], /* 8 byte name field */ pub secSize : u16, /* Bytes per sector */ pub secsPerCluster : u8, /* Sectors per cluster */ pub reserved : u16, /* Number of reserved sectors */ pub fatCnt : u8, /* Number of fats in this part*/ pub dirCnt : u16, /* Number of ROOT entries */ pub totalSecs : u16, /* Total number of sectors */ pub media : u8, /* Media descriptor byte */ pub fatSecs : u16, /* FAT sector count (12 or 16)*/ pub spt : u16, /* Sectors/track in this part */ pub heads : u16, /* Heads in this partition */ pub hiddenSecs : u32, /* Number of hidden sectors */ pub bigTotalSecs : u32, /* Number of total sectors */ // for fat32 only: pub fat32Secs : u32, /* FAT sector count (32 only) */ pub extFlags : u16, /* Extended flags */ /* Bits 0-3: active FAT 0 rel */ /* Bits 4-6: reserved */ /* Bit 7: 0-FAT's mirrored */ /* 1-one FAT active */ /* Bits 8-15: reserved */ pub fsVersion : u16, /* version number */ pub rootCluster : u32, /* 1st cluster of root dir */ pub fsInfo : u16, /* location of FS info struct */ pub backupBoot : u16, /* location of backup boot */ pub reserved2 : [u32; 3], /* reserved area */ pub driveNum : u8, /* Device address */ pub reserved3 : u8, pub bootSignature : u8, /* Ext-boot signature 0x29 */ pub bpbChecksum : u32, /* Checksum of the BPB */ /* Volume serial number */ pub volumeLabel : [u8; BPB_LABEL_SIZE], /* Volume label */ pub fileSysType: [u8; BPB_SYSTYPE_SIZE], /* File system (FAT32) */ } #[repr(C,packed)] pub struct Fat32DirStruct { pub name : [u8; 11], /* File or directory name */ pub attribute : u8, /* File attribute */ pub reserved3 : u8, /* Reserved by Windows NT */ pub create_mil : u8, /* Millisecond stamp at create*/ pub create_time : u16, /* Creation time */ pub create_date : u16, /* Creation date */ pub access_date : u16, /* Last accessed date */ pub start_cluster_hi : u16, /* High word of starting clust*/ pub time : u16, /* DOS time */ pub date : u16, /* DOS date */ pub start_cluster : u16, /* Starting cluster number */ pub file_size : u32, /* Size of the file */ }
// Copyright 2019 The vault713 Developers // // 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 super::message::*; use super::swap::{publish_transaction, tx_add_input, tx_add_output, Swap}; use super::types::*; use super::{is_test_mode, ErrorKind, Keychain, CURRENT_SLATE_VERSION, CURRENT_VERSION}; use crate::swap::multisig::{Builder as MultisigBuilder, ParticipantData as MultisigParticipant}; use chrono::{TimeZone, Utc}; use grin_core::libtx::{build, proof, tx_fee}; use grin_keychain::{BlindSum, BlindingFactor, SwitchCommitmentType}; use grin_util::secp::aggsig; use grin_util::secp::key::{PublicKey, SecretKey}; use grin_util::secp::pedersen::RangeProof; use libwallet::{NodeClient, ParticipantData as TxParticipant, Slate, VersionedSlate}; use rand::thread_rng; use std::mem; use uuid::Uuid; pub struct BuyApi {} impl BuyApi { pub fn accept_swap_offer<K: Keychain>( keychain: &K, context: &Context, address: Option<String>, id: Uuid, offer: OfferUpdate, height: u64, ) -> Result<Swap, ErrorKind> { let test_mode = is_test_mode(); if offer.version != CURRENT_VERSION { return Err(ErrorKind::IncompatibleVersion); } context.unwrap_buyer()?; // Multisig tx needs to be unlocked let lock_slate: Slate = offer.lock_slate.into(); if lock_slate.lock_height > 0 { return Err(ErrorKind::InvalidLockHeightLockTx); } // Refund tx needs to be locked until at least 10 hours in the future let refund_slate: Slate = offer.refund_slate.into(); if refund_slate.lock_height < height + 10 * 60 { return Err(ErrorKind::InvalidLockHeightRefundTx); } // Start redeem slate let mut redeem_slate = Slate::blank(2); if test_mode { redeem_slate.id = Uuid::parse_str("78aa5af1-048e-4c49-8776-a2e66d4a460c").unwrap() } redeem_slate.participant_data.push(offer.redeem_participant); let multisig = MultisigBuilder::new( 2, offer.primary_amount, false, 1, context.multisig_nonce.clone(), None, ); let started = if test_mode { Utc.ymd(2019, 9, 4).and_hms_micro(21, 22, 33, 386997) } else { Utc::now() }; let mut swap = Swap { id, idx: 0, version: CURRENT_VERSION, address, network: offer.network, role: Role::Buyer, started, status: Status::Offered, primary_amount: offer.primary_amount, secondary_amount: offer.secondary_amount, secondary_currency: offer.secondary_currency, secondary_data: SecondaryData::Empty, redeem_public: None, participant_id: 1, multisig, lock_slate, lock_confirmations: None, refund_slate, redeem_slate, redeem_confirmations: None, adaptor_signature: None, }; swap.redeem_public = Some(PublicKey::from_secret_key( keychain.secp(), &Self::redeem_secret(keychain, context)?, )?); Self::build_multisig(keychain, &mut swap, context, offer.multisig)?; Self::sign_lock_slate(keychain, &mut swap, context)?; Self::sign_refund_slate(keychain, &mut swap, context)?; Ok(swap) } pub fn init_redeem<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, ) -> Result<(), ErrorKind> { swap.expect_buyer()?; swap.expect(Status::Locked)?; Self::build_redeem_slate(keychain, swap, context)?; Self::calculate_adaptor_signature(keychain, swap, context)?; Ok(()) } pub fn redeem<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, redeem: RedeemUpdate, ) -> Result<(), ErrorKind> { swap.expect_buyer()?; swap.expect(Status::InitRedeem)?; Self::finalize_redeem_slate(keychain, swap, context, redeem.redeem_participant)?; swap.status = Status::Redeem; Ok(()) } pub fn completed(swap: &mut Swap) -> Result<(), ErrorKind> { swap.expect_buyer()?; swap.expect(Status::Redeem)?; match swap.redeem_confirmations { Some(h) if h > 0 => { swap.status = Status::Completed; Ok(()) } _ => Err(ErrorKind::UnexpectedAction), } } pub fn message(swap: &Swap) -> Result<Message, ErrorKind> { match swap.status { Status::Offered => Self::accept_offer_message(swap), Status::Locked => Self::init_redeem_message(swap), _ => Err(ErrorKind::UnexpectedAction), } } /// Update swap state after a message has been sent succesfully pub fn message_sent(swap: &mut Swap) -> Result<(), ErrorKind> { match swap.status { Status::Offered => swap.status = Status::Accepted, Status::Locked => swap.status = Status::InitRedeem, _ => return Err(ErrorKind::UnexpectedAction), }; Ok(()) } pub fn publish_transaction<C: NodeClient>( node_client: &C, swap: &mut Swap, ) -> Result<(), ErrorKind> { match swap.status { Status::Redeem => { if swap.redeem_confirmations.is_some() { // Tx already published return Err(ErrorKind::UnexpectedAction); } publish_transaction(node_client, &swap.redeem_slate.tx, false)?; swap.redeem_confirmations = Some(0); Ok(()) } _ => Err(ErrorKind::UnexpectedAction), } } /// Required action based on current swap state pub fn required_action<C: NodeClient>( node_client: &mut C, swap: &mut Swap, ) -> Result<Action, ErrorKind> { let action = match swap.status { Status::Offered => Action::SendMessage(1), Status::Accepted => unreachable!(), // Should be handled by currency specific API Status::Locked => Action::SendMessage(2), Status::InitRedeem => Action::ReceiveMessage, Status::Redeem => { if swap.redeem_confirmations.is_none() { Action::PublishTx } else { // Update confirmations match swap.find_redeem_kernel(node_client)? { Some((_, h)) => { let height = node_client.get_chain_height()?; swap.redeem_confirmations = Some(height.saturating_sub(h) + 1); Action::Complete } None => Action::ConfirmationRedeem, } } } _ => Action::None, }; Ok(action) } pub fn accept_offer_message(swap: &Swap) -> Result<Message, ErrorKind> { swap.expect(Status::Offered)?; let id = swap.participant_id; swap.message(Update::AcceptOffer(AcceptOfferUpdate { multisig: swap.multisig.export()?, redeem_public: swap.redeem_public.unwrap().clone(), lock_participant: swap.lock_slate.participant_data[id].clone(), refund_participant: swap.refund_slate.participant_data[id].clone(), })) } pub fn init_redeem_message(swap: &Swap) -> Result<Message, ErrorKind> { swap.expect(Status::Locked)?; swap.message(Update::InitRedeem(InitRedeemUpdate { redeem_slate: VersionedSlate::into_version( swap.redeem_slate.clone(), CURRENT_SLATE_VERSION, ), adaptor_signature: swap.adaptor_signature.ok_or(ErrorKind::UnexpectedAction)?, })) } /// Secret that unlocks the funds on both chains pub fn redeem_secret<K: Keychain>( keychain: &K, context: &Context, ) -> Result<SecretKey, ErrorKind> { let bcontext = context.unwrap_buyer()?; let sec_key = keychain.derive_key(0, &bcontext.redeem, &SwitchCommitmentType::None)?; Ok(sec_key) } fn build_multisig<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, part: MultisigParticipant, ) -> Result<(), ErrorKind> { let multisig_secret = swap.multisig_secret(keychain, context)?; let multisig = &mut swap.multisig; // Import participant multisig.import_participant(0, &part)?; multisig.create_participant(keychain.secp(), &multisig_secret)?; multisig.round_1_participant(0, &part)?; // Round 1 + round 2 multisig.round_1(keychain.secp(), &multisig_secret)?; let common_nonce = swap.common_nonce(keychain.secp())?; let multisig = &mut swap.multisig; multisig.common_nonce = Some(common_nonce); multisig.round_2(keychain.secp(), &multisig_secret)?; Ok(()) } /// Convenience function to calculate the secret that is used for signing the lock slate fn lock_tx_secret<K: Keychain>( keychain: &K, swap: &Swap, context: &Context, ) -> Result<SecretKey, ErrorKind> { // Partial multisig output let sum = BlindSum::new().add_blinding_factor(BlindingFactor::from_secret_key( swap.multisig_secret(keychain, context)?, )); let sec_key = keychain.blind_sum(&sum)?.secret_key(keychain.secp())?; Ok(sec_key) } fn sign_lock_slate<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, ) -> Result<(), ErrorKind> { let mut sec_key = Self::lock_tx_secret(keychain, swap, context)?; // This function should only be called once let slate = &mut swap.lock_slate; if slate.participant_data.len() > 1 { return Err(ErrorKind::OneShot.into()); } // Add multisig output to slate (with invalid proof) let mut proof = RangeProof::zero(); proof.plen = 675; tx_add_output(slate, swap.multisig.commit(keychain.secp())?, proof); // Sign slate slate.fill_round_1( keychain, &mut sec_key, &context.lock_nonce, swap.participant_id, None, false, )?; slate.fill_round_2(keychain, &sec_key, &context.lock_nonce, swap.participant_id)?; Ok(()) } /// Convenience function to calculate the secret that is used for signing the refund slate fn refund_tx_secret<K: Keychain>( keychain: &K, swap: &Swap, context: &Context, ) -> Result<SecretKey, ErrorKind> { // Partial multisig input let sum = BlindSum::new().sub_blinding_factor(BlindingFactor::from_secret_key( swap.multisig_secret(keychain, context)?, )); let sec_key = keychain.blind_sum(&sum)?.secret_key(keychain.secp())?; Ok(sec_key) } fn sign_refund_slate<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, ) -> Result<(), ErrorKind> { let commit = swap.multisig.commit(keychain.secp())?; let mut sec_key = Self::refund_tx_secret(keychain, swap, context)?; // This function should only be called once let slate = &mut swap.refund_slate; if slate.participant_data.len() > 1 { return Err(ErrorKind::OneShot.into()); } // Add multisig input to slate tx_add_input(slate, commit); // Sign slate slate.fill_round_1( keychain, &mut sec_key, &context.refund_nonce, swap.participant_id, None, false, )?; slate.fill_round_2( keychain, &sec_key, &context.refund_nonce, swap.participant_id, )?; Ok(()) } /// Convenience function to calculate the secret that is used for signing the redeem slate pub fn redeem_tx_secret<K: Keychain>( keychain: &K, swap: &Swap, context: &Context, ) -> Result<SecretKey, ErrorKind> { let bcontext = context.unwrap_buyer()?; // Partial multisig input, redeem output, offset let sum = BlindSum::new() .add_key_id(bcontext.output.to_value_path(swap.redeem_slate.amount)) .sub_blinding_factor(BlindingFactor::from_secret_key( swap.multisig_secret(keychain, context)?, )) .sub_blinding_factor(swap.redeem_slate.tx.offset.clone()); let sec_key = keychain.blind_sum(&sum)?.secret_key(keychain.secp())?; Ok(sec_key) } fn build_redeem_slate<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, ) -> Result<(), ErrorKind> { let bcontext = context.unwrap_buyer()?; // This function should only be called once let slate = &mut swap.redeem_slate; if slate.participant_data.len() > 1 { return Err(ErrorKind::OneShot); } // Build slate slate.fee = tx_fee(1, 1, 1, None); slate.amount = swap.primary_amount - slate.fee; let mut elems = Vec::with_capacity(2); elems.push(build::with_fee(slate.fee)); elems.push(build::output(slate.amount, bcontext.output.clone())); slate .add_transaction_elements(keychain, &proof::ProofBuilder::new(keychain), elems)? .secret_key(keychain.secp())?; slate.tx.offset = if is_test_mode() { BlindingFactor::from_hex( "90de4a3812c7b78e567548c86926820d838e7e0b43346b1ba63066cd5cc7d999", ) .unwrap() } else { BlindingFactor::from_secret_key(SecretKey::new(keychain.secp(), &mut thread_rng())) }; // Add multisig input to slate tx_add_input(slate, swap.multisig.commit(keychain.secp())?); let mut sec_key = Self::redeem_tx_secret(keychain, swap, context)?; let slate = &mut swap.redeem_slate; // Add participant to slate slate.fill_round_1( keychain, &mut sec_key, &context.redeem_nonce, swap.participant_id, None, false, )?; Ok(()) } fn finalize_redeem_slate<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, part: TxParticipant, ) -> Result<(), ErrorKind> { let id = swap.participant_id; let other_id = swap.other_participant_id(); let sec_key = Self::redeem_tx_secret(keychain, swap, context)?; // This function should only be called once let slate = &mut swap.redeem_slate; if slate .participant_data .get(id) .ok_or(ErrorKind::UnexpectedAction)? .is_complete() { return Err(ErrorKind::OneShot.into()); } // Replace participant mem::replace( slate .participant_data .get_mut(other_id) .ok_or(ErrorKind::UnexpectedAction)?, part, ); // Sign + finalize slate slate.fill_round_2( keychain, &sec_key, &context.redeem_nonce, swap.participant_id, )?; slate.finalize(keychain)?; Ok(()) } fn calculate_adaptor_signature<K: Keychain>( keychain: &K, swap: &mut Swap, context: &Context, ) -> Result<(), ErrorKind> { // This function should only be called once if swap.adaptor_signature.is_some() { return Err(ErrorKind::OneShot); } let sec_key = Self::redeem_tx_secret(keychain, swap, context)?; let (pub_nonce_sum, pub_blind_sum, message) = swap.redeem_tx_fields(keychain.secp(), &swap.redeem_slate)?; let adaptor_signature = aggsig::sign_single( keychain.secp(), &message, &sec_key, Some(&context.redeem_nonce), Some(&Self::redeem_secret(keychain, context)?), Some(&pub_nonce_sum), Some(&pub_blind_sum), Some(&pub_nonce_sum), )?; swap.adaptor_signature = Some(adaptor_signature); Ok(()) } }
use rppal::gpio::Level; use rppal::gpio::Gpio; use std::sync::mpsc::{channel, Sender}; use std::thread::{sleep, JoinHandle}; use std::time::Duration; const SOFTPWM_PERIOD_US: u64 = 100; /// Software PWM object #[allow(dead_code)] struct SoftPWM { thread: JoinHandle<()>, setval_tx: Sender<u64>, end_tx: Sender<bool>, } /// Software PWM Implementation #[allow(dead_code)] impl SoftPWM { /// /// Construct a software pwm pin. Emulates a hardware PWM by spawning a thread and quickly toggling a pin on and off. /// Inherently inaccurate, since execution is based on the OS's thread scheduling. Perfectly fine for motors and LED's, however. /// pub fn new(_gpio: &Gpio, _pin: u8, _resolution: u64) -> Self { let mut pin = _gpio.get(_pin).unwrap().into_output(); let res = _resolution; let (setval_tx, setval_rx) = channel(); let (end_tx, end_rx) = channel(); // Spawn the thread, and save the join handle for later deconstruction. let thread = std::thread::spawn(move || { let mut setval: u64 = 0; loop { if let Ok(s) = setval_rx.try_recv() { setval = s; } // Break whenever the "end message" is sent to the thread if let Ok(e) = end_rx.try_recv() { if e { break; } } pin.write(Level::High); sleep(Duration::from_micros(setval * SOFTPWM_PERIOD_US)); pin.write(Level::Low); sleep(Duration::from_micros((res - setval) * SOFTPWM_PERIOD_US)); } }); Self { thread, setval_tx, end_tx, } } /// Sets the current PWM value to _setval by sending it to the running thread. /// If this send fails, it results in a panic. pub fn set(&self, _setval: u64) { assert!( self.setval_tx.send(_setval).is_ok(), "Failed to send setpoint!" ); } /// End the thread software PWM thread. This will render this SoftPWM useless, and free up system resources. /// If this send fails, it results in a panic. pub fn end(&self) { assert!( self.end_tx.send(true).is_ok(), "Failed to send 'join thread' message!" ); } } /// Defines a standard L298-style motor controller, with a "Forward" pwm pin and a "Reverse" pin. /// Mixing these results in bi-directional movement. #[allow(dead_code)] pub struct Motor { fwd_pin: SoftPWM, rev_pin: SoftPWM, } #[allow(dead_code)] impl Motor { /// Construct a motor controller using software PWM on the specified pins. /// If the motor is spinning opposite from what is expected, either flip the physical pins /// or flip _fwdpin and _revpin pub fn new(_gpio: &Gpio, _fwdpin: u8, _revpin: u8) -> Self { let fwd_pin = SoftPWM::new(_gpio, _fwdpin, 255); let rev_pin = SoftPWM::new(_gpio, _revpin, 255); Self { fwd_pin, rev_pin } } /// Calculate the speed needed for the foward and reverse pins, and set the software pwm. pub fn set(&self, _speed: f32) { // Constrain speed between -1.0 and 1.0 let speed_fixed = if _speed > 1.0 { 1.0 } else if _speed < -1.0 { -1.0 } else { _speed }; let out: u64 = (((speed_fixed + 1.0) / 2.0) * 255.0) as u64; self.fwd_pin.set(out); self.rev_pin.set(255 - out); } }
#![allow(unused_imports)] #![allow(dead_code)] #![allow(unused_variables)] use serde::{Serialize, Deserialize}; use sodiumoxide; use std::any::type_name; use serde_json::Result; use std::collections::HashMap; #[derive(Serialize, Deserialize, Debug)] enum MyRequest { ReqCryptoBoxGenKeypair, ReqCryptoBoxGenNonce, ReqCryptoBoxSeal { keyid: usize, plaintext: Vec<u8>, public_key: sodiumoxide::crypto::box_::PublicKey, }, ReqCryptoBoxOpen { keyid: usize, ciphertext: Vec<u8>, public_key: sodiumoxide::crypto::box_::PublicKey, nonce: sodiumoxide::crypto::box_::Nonce, } } #[derive(Serialize, Deserialize, Debug)] enum MyResponse { ResCryptoBoxGenKeypair { keyid: usize, public_key: sodiumoxide::crypto::box_::PublicKey, }, ResCryptoBoxGenNonce { nonce: sodiumoxide::crypto::box_::Nonce, }, ResCryptoBoxSeal { ciphertext: Vec<u8>, nonce: sodiumoxide::crypto::box_::Nonce, }, ResCryptoBoxOpen { plaintext: Vec<u8>, }, } #[derive(Debug)] struct KeyPair { public_key: sodiumoxide::crypto::box_::PublicKey, secret_key: sodiumoxide::crypto::box_::SecretKey, } fn handle_request(request: String, keys_map: &mut HashMap<usize, KeyPair>, counter: &mut usize) -> Option<String> { let request = serde_json::from_str(&request).unwrap(); if let MyRequest::ReqCryptoBoxGenKeypair = request { let (public_key, secret_key) = sodiumoxide::crypto::box_::gen_keypair(); *counter += 1; keys_map.insert(*counter, KeyPair{ public_key, secret_key}); let response = MyResponse::ResCryptoBoxGenKeypair{ keyid: *counter, public_key}; return Some(serde_json::to_string(&response).unwrap()); } if let MyRequest::ReqCryptoBoxGenNonce = request { let new_nonce = sodiumoxide::crypto::box_::gen_nonce(); let response = MyResponse::ResCryptoBoxGenNonce{ nonce: new_nonce}; return Some(serde_json::to_string(&response).unwrap()); } if let MyRequest::ReqCryptoBoxSeal{ keyid, plaintext, public_key} = request { if keys_map.contains_key(&keyid) { let nonce = sodiumoxide::crypto::box_::gen_nonce(); let ciphertext = sodiumoxide::crypto::box_::seal(&plaintext, &nonce, &public_key, &keys_map[&keyid].secret_key); let response = MyResponse::ResCryptoBoxSeal{ ciphertext, nonce}; return Some(serde_json::to_string(&response).unwrap()); } return None; } if let MyRequest::ReqCryptoBoxOpen{keyid, ciphertext, public_key, nonce } = request { if keys_map.contains_key(&keyid) { if let Ok(plaintext) = sodiumoxide::crypto::box_::open(&ciphertext, &nonce, &public_key, &keys_map[&keyid].secret_key) { let response = MyResponse::ResCryptoBoxOpen{plaintext}; return Some(serde_json::to_string(&response).unwrap()); } return None; } return None; } return None; } fn main() { let mut keys_map: HashMap<usize, KeyPair> = HashMap::new(); // will need to wrap around Arc Rwlock later let mut counter: usize = 0; // will need to wrap around Arc mutex later { // Generate a nonce for fun let request = MyRequest::ReqCryptoBoxGenNonce; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); if let MyResponse::ResCryptoBoxGenNonce{nonce} = response { // println!("The Nonce is {:?}", nonce); } else { panic!("Things didn't go accordingly bro"); } } // Generate a KeyPair1 let request = MyRequest::ReqCryptoBoxGenKeypair; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); let my_key_id1: usize; let public_key1: sodiumoxide::crypto::box_::PublicKey; if let MyResponse::ResCryptoBoxGenKeypair{keyid, public_key} = response { // println!("Hurray?"); my_key_id1 = keyid; public_key1 = public_key; } else { panic!("Things didn't go accordingly bro"); } // println!("My KeyId is {}", my_key_id1); // println!("My Public_key is {:?}", public_key1); // trying a little hack here let (theirpk, theirsk) = sodiumoxide::crypto::box_::gen_keypair(); let plaintext = b"Encrypt this data"; let request = MyRequest::ReqCryptoBoxSeal{keyid: my_key_id1, plaintext: plaintext.to_vec(), public_key: theirpk}; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); if let MyResponse::ResCryptoBoxSeal{ciphertext, nonce} = response { if let Ok(their_plaintext) = sodiumoxide::crypto::box_::open(&ciphertext, &nonce, &public_key1, &theirsk) { // println!("Testing the decryption part"); assert!(plaintext == &their_plaintext[..]); println!("Decryption1 successful!!!") } else { panic!("Decryption1 failed"); } } else { panic!("Something is wrong!!!"); } // Generate a KeyPair2 let request = MyRequest::ReqCryptoBoxGenKeypair; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); let my_key_id2: usize; let public_key2: sodiumoxide::crypto::box_::PublicKey; if let MyResponse::ResCryptoBoxGenKeypair{keyid, public_key} = response { // println!("Hurray?"); my_key_id2 = keyid; public_key2 = public_key; } else { panic!("Things didn't go accordingly bro"); } // Let's encrypt and decrypt using the wrapper functions. // Client1 sending data to Client2 and Client2 decrypts the message let plaintext = b"Encrypt this data"; let request = MyRequest::ReqCryptoBoxSeal{keyid: my_key_id1, plaintext: plaintext.to_vec(), public_key: public_key2}; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); if let MyResponse::ResCryptoBoxSeal{ciphertext, nonce} = response { // client 2 will decrypt now let request = MyRequest::ReqCryptoBoxOpen{keyid: my_key_id2, ciphertext, nonce, public_key: public_key1}; let request_string = serde_json::to_string(&request).unwrap(); let response_string = handle_request(request_string,&mut keys_map, &mut counter).unwrap(); let response: MyResponse = serde_json::from_str(&response_string).unwrap(); if let MyResponse::ResCryptoBoxOpen{plaintext: their_plaintext} = response { assert!(plaintext == &their_plaintext[..]); println!("Decryption2 successful!!!"); } } else { panic!("Something is wrong!!!"); } }
use std::fs::{self, DirEntry}; use std::path::Path; use std::io; pub fn get_entries(root: &String, recur: bool) -> io::Result<Vec<DirEntry>> { let mut entries: Vec<DirEntry> = Vec::new(); let path = Path::new(root); match recur { true => try!(walk(path, &mut entries)), false => try!(explore(path, &mut entries)), } Ok(entries) } fn check_extension(path: &Path) -> bool { match path.extension() { None => return false, Some(_) => { // TODO: user blacklist...? return true; } } } fn walk(dir: &Path, entries: &mut Vec<DirEntry>) -> io::Result<()> { if dir.is_dir() { for entry in try!(fs::read_dir(dir)) { let entry = try!(entry); let path = entry.path(); if path.is_dir() { try!(walk(&path, entries)); } else { if check_extension(&path) { entries.push(entry); } } } } Ok(()) } fn explore(dir: &Path, entries: &mut Vec<DirEntry>) -> io::Result<()> { if dir.is_dir() { for entry in try!(fs::read_dir(dir)) { let entry = try!(entry); let path = entry.path(); if !path.is_dir() { if check_extension(&path) { entries.push(entry); } } } } Ok(()) }
use super::*; use serenity::framework::standard::macros::group; #[group("General")] #[commands(cmd_buttons, cmd_dropdowns)] pub struct General; #[group("Bot Utilities")] #[commands(cmd_ping)] pub struct BotUtils;
#![feature(async_await)] use lambda::{lambda, LambdaCtx}; type Err = Box<dyn std::error::Error + Send + Sync + 'static>; #[lambda] #[runtime::main] async fn main(event: String, ctx: LambdaCtx) -> Result<String, Err> { let _ = ctx; Ok(event) }
extern crate gnuplot; extern crate interp_util; use std::f64; use gnuplot::*; use interp_util::*; fn polynomial_error(x0: f64, pts: &Vec<f64>) -> f64 { let mut res = 0.0; for i in 0..pts.len() { let mut tmp = 1.0; for j in 0..pts.len() { if j != i { tmp = tmp * (x0 - pts[j]) / (pts[i] - pts[j]); } } res += tmp.abs(); } res } fn polynomial_derivative_error(x0: f64, pts: &Vec<f64>) -> f64 { let mut res = 0.0; for i in 0..pts.len() { let mut tmp = 0.0; for j in 0..pts.len() { let mut tmp2 = 1.0; for k in 0..pts.len() { if k != j { tmp2 *= x0 - pts[k]; } } tmp += tmp2; } let mut tmp3 = 1.0; for j in 0..pts.len() { if j != i { tmp3 *= pts[i] - pts[j]; } } res += (tmp / tmp3).abs(); } res } fn chebyshev_knots(k: usize) -> Vec<f64> { let mut res = Vec::new(); for m in 0..k { res.push((f64::consts::PI * ((2 * m + 1) as f64) / ((2 * k) as f64)).cos()); } res } fn plot(plot_name: &str, name1: &str, x1: &[f64], y1: &[f64], name2: &str, x2: &[f64], y2: &[f64]) { let mut fg = Figure::new(); fg.axes2d() .set_size(0.75, 1.0) .set_title(plot_name, &[]) .set_x_ticks(Some((Fix(1.0), 1)), &[Mirror(false)], &[]) .set_y_ticks(Some((Auto, 1)), &[Mirror(false)], &[]) .set_legend(Graph(1.0), Graph(0.5), &[Placement(AlignLeft, AlignCenter)], &[TextAlign(AlignRight)]) .set_border(true, &[Left, Bottom], &[LineWidth(2.0)]) .set_x_label("Abscissa", &[]) .set_y_label("Ordinate", &[]) .lines(x1, y1, &[Caption(name1), LineWidth(1.5), Color("red")]) .lines(x2, y2, &[Caption(name2), LineWidth(1.5), Color("green")]); fg.set_terminal("pngcairo", &format!("{}.png", plot_name)); fg.show(); } fn main() { let n = 11; let pts = linspace(-1.0, 1.0, 301); let u_grid = linspace(-1.0, 1.0, n); // uniform grid let c_grid = chebyshev_knots(n); // Chebyshev grid let mut u_base = Vec::with_capacity(pts.len()); let mut c_base = Vec::with_capacity(pts.len()); let mut u_base_der = Vec::with_capacity(pts.len()); let mut c_base_der = Vec::with_capacity(pts.len()); for x in pts.iter() { u_base.push(polynomial_error(*x, &u_grid)); c_base.push(polynomial_error(*x, &c_grid)); u_base_der.push(polynomial_derivative_error(*x, &u_grid)); c_base_der.push(polynomial_derivative_error(*x, &c_grid)); } plot("Px" , "Uniform grid", &pts, &u_base, "Chebyshev grid", &pts, &c_base); plot("Px.der" , "Uniform grid", &pts, &u_base_der, "Chebyshev grid", &pts, &c_base_der); }
extern crate libc; use std::rc::Rc; use std::vec; use std::ptr; use self::libc::{c_int}; use git2; use git2::repository::{Repository}; use git2::repository; use git2::oid::{GitOid,ToOID}; use git2::error::{GitError, get_last_error}; pub type GitOff = i64; pub mod opaque { pub enum Blob {} } extern { fn git_blob_free(obj: *mut self::opaque::Blob); fn git_blob_lookup(obj: *mut *mut self::opaque::Blob, repo: *mut repository::opaque::Repo, oid: *const GitOid) -> c_int; fn git_blob_rawsize(obj: *const self::opaque::Blob) -> GitOff; fn git_blob_rawcontent(obj: *mut self::opaque::Blob) -> *const u8; fn git_blob_owner(obj: *const self::opaque::Blob) -> *mut repository::opaque::Repo; fn git_blob_id(obj: *const self::opaque::Blob) -> *const GitOid; fn git_blob_is_binary(obj: *const self::opaque::Blob) -> c_int; } struct GitBlobPtr { _val: *mut self::opaque::Blob } #[deriving(Clone)] pub struct Blob { _ptr: Rc<GitBlobPtr>, _repo: git2::Repository } impl Blob { fn _new(p: *mut self::opaque::Blob, repo: &git2::Repository) -> Blob { Blob { _ptr: Rc::new(GitBlobPtr{_val:p}), _repo: repo.clone() } } /// Lookup a blob object from a repository. pub fn lookup<T: ToOID>(repo: &Repository, oid: T) -> Result<Blob, GitError> { let mut p: *mut self::opaque::Blob = ptr::mut_null(); let _oid = match oid.to_oid() { Err(e) => {return Err(e); }, Ok(o) => o }; let ret = unsafe { git_blob_lookup(&mut p, repo._get_ptr(), _oid._get_ptr()) }; if ret != 0 { return Err(get_last_error()); } println!("done git_object_lookup, p is {}", p); return Ok(Blob::_new(p, repo)); } pub fn _get_ptr(&self) -> *mut self::opaque::Blob { self._ptr.deref()._val } pub fn _get_const_ptr(&self) -> *const self::opaque::Blob { self._ptr.deref()._val as *const self::opaque::Blob } /// Get the size in bytes of the contents of a blob pub fn rawsize(&self) -> GitOff { unsafe {git_blob_rawsize(self._get_const_ptr())}} /// Get a buffer with the raw content of a blob. pub fn rawcontent(&self) -> Vec<u8> { let size : uint = self.rawsize() as uint; let cptr = unsafe { // The pointerd returned is owned internall by libgit2 and may be invalidated later git_blob_rawcontent(self._get_ptr()) }; unsafe{vec::raw::from_buf(cptr, size)} } /// Get the id of a blob. pub fn id(&self) -> git2::OID { unsafe {git2::OID::_new(git_blob_id(self._get_const_ptr()))} } /// Determine if the blob content is most certainly binary or not. /// /// The heuristic used to guess if a file is binary is taken from core git: Searching for NUL /// bytes and looking for a reasonable ratio of printable to non-printable characters among the /// first 4000 bytes. pub fn is_binary(&self) -> bool { unsafe {git_blob_is_binary(self._get_const_ptr()) == 1} } /// Get the repository that contains the blob. pub fn owner(&self) -> &git2::Repository { unsafe { let p = git_blob_owner(self._get_const_ptr()); if p != self._repo._get_ptr() { fail!("Repo mismatch!"); } } return &self._repo; } } impl Drop for GitBlobPtr { fn drop(&mut self) { println!("dropping this blob!"); unsafe { git_blob_free(self._val)} } }
// This file is part of linux-epoll. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-epoll/master/COPYRIGHT. No part of linux-epoll, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file. // Copyright © 2019 The developers of linux-epoll. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-epoll/master/COPYRIGHT. struct Socks5CredentialReply<'yielder, SD: SocketData> { unencrypted_stream: UnencryptedStream<'yielder, SD>, small_reply_packet_buffer: [u8; 2], bytes_read_so_far: usize, } impl<'yielder, SD: SocketData> Socks5CredentialReply<'yielder, SD> { #[inline(always)] pub(crate) fn read_reply<'a>(unencrypted_stream: UnencryptedStream<'yielder, SD>, socks5_authentication_credentials: &'a Socks5AuthenticationCredentials) -> Result<(UnencryptedStream<'yielder, SD>, &'a Socks5AuthenticationCredential), CompleteError> { use self::Socks5ProtocolFailureError::*; let mut this = Self { unencrypted_stream, small_reply_packet_buffer: unsafe { uninitialized() }, bytes_read_so_far: 0, }; this.read_reply_bytes()?; let version = unsafe { *small_reply_packet_buffer.get_unchecked(0) } ; if version != Socks5AuthenticationCredentials::Version { return error(VersionInvalid(version)) } if unlikely!(self.bytes_read_so_far == 1) { this.read_reply_bytes()?; } let chosen_authentication_mode = unsafe { *small_reply_packet_buffer.get_unchecked(1) }; if unlikely!(chosen_authentication_mode == 0xFF) { return error(NoAcceptableAuthenticationMethodsSupplied) } else { let code = Socks5AuthenticationCredentialCode(chosen_authentication_mode); match socks5_authentication_credentials.get_from_code(code) { None => return error(CredentialCodeInReplyWasNeverSentByClient(version)) } } Ok(this.unencrypted_stream) } #[inline(always)] fn read_reply_bytes(&mut self) -> Result<(), CompleteError> { let mut buffer = &mut self.small_reply_packet_buffer[self.bytes_read_so_far..]; debug_assert_ne!(buffer.len(), 0, "should never try a read of zero bytes"); let bytes_read = unencrypted_stream.read_data(buffer).map_err(|io_error| CompleteError::SocketRead(io_error))?; debug_assert_ne!(bytes_read, 0, "A read of zero should not be possible unless the buffer is zero"); self.bytes_read_so_far += bytes_read; Ok(()) } }
extern crate serde; extern crate serde_json; extern crate reqwest; use serde::{Deserialize, Serialize}; const url: &str = "https://coronavirus-19-api.herokuapp.com/countries/"; #[derive(Deserialize, Debug)] struct Country { country: String, cases: i32, todayCases: i32, deaths: i32, todayDeaths: i32, recovered: i32, active: i32, critical: i32, casesPerOneMillion: i32, deathsPerOneMillion: i32, totalTests: i32, testsPerOneMillion: i32, } #[tokio::main] async fn main() -> Result<(), reqwest::Error> { println!("Check quickly todays COVID-19 statistics per country.\n"); while (true) { //Detail per Country let mut line = String::new(); println!("Enter Country: press 'q' or 'quit' to exit"); std::io::stdin().read_line(&mut line).unwrap(); if (line.trim() == "q" || line.trim() == "quit") { break; } let c_url: String = url.to_string() + &line; let client = reqwest::Client::new(); let res = client.get(&c_url).send().await?; //println!("DEBUG: Status: {}", res.status()); //println!("DEBUG: Headers:\n{:#?}", res.headers()); let body = res.text().await?; //println!("Body: \n{}", body); let data_obj: Country = serde_json::from_str(&body).unwrap(); println!(); println!("Country: {:#?}", data_obj.country); println!("Cases: {:#?}", data_obj.cases); println!("Today Cases: {:#?}", data_obj.todayCases); println!("Deaths: {:#?}", data_obj.deaths); println!("Today Deaths: {:#?}", data_obj.todayDeaths); println!("Recovered: {:#?}", data_obj.recovered); println!("Active: {:#?}", data_obj.active); println!("Critical: {:#?}", data_obj.critical); println!("Cases Per One Million People: {:#?}", data_obj.casesPerOneMillion); println!("Deaths Per One Million People: {:#?}", data_obj.deathsPerOneMillion); println!("Total Tests: {:#?}", data_obj.totalTests); println!("Tests Per One Million People: {:#?}", data_obj.testsPerOneMillion); println!(); } Ok(()) }
#[cfg(test)] mod tests { use pygmaea::token_type::TokenType; fn setup_input() -> String { "let five = 5; let ten = 10; let add = fn(x, y){ x + y; }; let result = add(five, ten); !-/*5; 5 < 10 > 5; if (5 < 10) { return true; } else { return false; } 10 == 10; 10 !=9; " .to_string() } fn setup_expects() -> Vec<(TokenType, &'static str)> { use TokenType::*; vec![ (Let, "let"), (Ident, "five"), (Assign, "="), (Int, "5"), (Semicolon, ";"), (Let, "let"), (Ident, "ten"), (Assign, "="), (Int, "10"), (Semicolon, ";"), (Let, "let"), (Ident, "add"), (Assign, "="), (Function, "fn"), (LParen, "("), (Ident, "x"), (Comma, ","), (Ident, "y"), (RParen, ")"), (LBrace, "{"), (Ident, "x"), (Plus, "+"), (Ident, "y"), (Semicolon, ";"), (RBrace, "}"), (Semicolon, ";"), (Let, "let"), (Ident, "result"), (Assign, "="), (Ident, "add"), (LParen, "("), (Ident, "five"), (Comma, ","), (Ident, "ten"), (RParen, ")"), (Semicolon, ";"), (Bang, "!"), (Minus, "-"), (Slash, "/"), (Asterisk, "*"), (Int, "5"), (Semicolon, ";"), (Int, "5"), (LessThan, "<"), (Int, "10"), (GreaterThan, ">"), (Int, "5"), (Semicolon, ";"), (If, "if"), (LParen, "("), (Int, "5"), (LessThan, "<"), (Int, "10"), (RParen, ")"), (LBrace, "{"), (Return, "return"), (True, "true"), (Semicolon, ";"), (RBrace, "}"), (Else, "else"), (LBrace, "{"), (Return, "return"), (False, "false"), (Semicolon, ";"), (RBrace, "}"), (Int, "10"), (Equal, "=="), (Int, "10"), (Semicolon, ";"), (Int, "10"), (NotEqual, "!="), (Int, "9"), (Semicolon, ";"), (EOF, ""), ] } fn exact_expect(input: &str, expect: &[(TokenType, &'static str)]) -> (String, String) { ( input .chars() .partition::<String, _>(char::is_ascii_whitespace) .1, expect.iter().map(|expect| expect.1).collect(), ) } #[test] fn test_next_token() { use pygmaea::lexer::Lexer; let input = setup_input(); let expects = setup_expects(); let (exact_input, exact_expect) = exact_expect(&input, &expects); assert_eq!(exact_input, exact_expect); let mut lexer = Lexer::new(input); expects.iter().enumerate().for_each(|(i, expect)| { let token = lexer.next_token(); assert_eq!( expect.0, token.token_type, "tests[{}] - tokentype wrong. expected={}, got={}", i, expect.0, token.token_type ); assert_eq!( expect.1, token.literal, "tests[{}] - literal wrong. expected={}, got={}", i, expect.1, token.literal ); }); } }
use crate::ast::stat_expr_types::{ Block, Condition, Exp, ForRange, FunctionCall, FunctionDef, IfThenElse, RefCall, Statement, TupleNode, VarIndex, }; pub struct CtxIdParser { ctxid: i32, } impl CtxIdParser { pub fn new() -> CtxIdParser { CtxIdParser { ctxid: 0 } } fn parse_func_call<'a>(&mut self, func_call: &mut FunctionCall<'a>) { func_call.ctxid = self.ctxid; self.ctxid += 1; self.parse_exp(&mut func_call.method); for arg in func_call.pos_args.iter_mut() { self.parse_exp(arg); } for (_, exp) in func_call.dict_args.iter_mut() { self.parse_exp(exp); } } fn parse_tuple<'a>(&mut self, tuple: &mut TupleNode<'a>) { for arg in tuple.exps.iter_mut() { self.parse_exp(arg); } } fn parse_ref_call<'a>(&mut self, ref_call: &mut RefCall<'a>) { self.parse_exp(&mut ref_call.arg); self.parse_exp(&mut ref_call.name); } fn parse_condition<'a>(&mut self, condition: &mut Condition<'a>) { self.parse_exp(&mut condition.cond); self.parse_exp(&mut condition.exp1); self.parse_exp(&mut condition.exp2); } fn parse_ifthenelse<'a>(&mut self, ite: &mut IfThenElse<'a>) { ite.then_ctxid = self.ctxid; self.ctxid += 1; ite.else_ctxid = self.ctxid; self.ctxid += 1; self.parse_exp(&mut ite.cond); self.parse_blk(&mut ite.then_blk); if let Some(else_blk) = &mut ite.else_blk { self.parse_blk(else_blk); } } fn parse_forrange<'a>(&mut self, for_range: &mut ForRange<'a>) { for_range.ctxid = self.ctxid; self.ctxid += 1; self.parse_exp(&mut for_range.start); self.parse_exp(&mut for_range.end); if let Some(step) = &mut for_range.step { self.parse_exp(step); } self.parse_blk(&mut for_range.do_blk); } fn parse_exp<'a>(&mut self, exp: &mut Exp<'a>) { match exp { Exp::Tuple(tuple) => { self.parse_tuple(tuple); } Exp::TypeCast(type_cast) => self.parse_exp(&mut type_cast.exp), Exp::FuncCall(func_call) => { self.parse_func_call(func_call); } Exp::RefCall(ref_call) => self.parse_ref_call(ref_call), Exp::Condition(condition) => self.parse_condition(condition), Exp::Ite(ite) => self.parse_ifthenelse(ite), Exp::ForRange(fr) => self.parse_forrange(fr), Exp::UnaryExp(node) => self.parse_exp(&mut node.exp), Exp::BinaryExp(node) => { self.parse_exp(&mut node.exp1); self.parse_exp(&mut node.exp2); } _ => {} } } fn parse_stmt<'a>(&mut self, stmt: &mut Statement<'a>) { match stmt { Statement::FuncCall(func_call) => self.parse_func_call(func_call), Statement::Ite(ite) => self.parse_ifthenelse(ite), Statement::ForRange(fr) => self.parse_forrange(fr), Statement::Assignment(assign) => { self.parse_exp(&mut assign.val); } Statement::VarAssignment(assign) => { self.parse_exp(&mut assign.val); } Statement::FuncDef(func_def) => { self.parse_blk(&mut func_def.body); } _ => {} } } pub fn parse_blk<'a>(&mut self, blk: &mut Block<'a>) { for stmt in blk.stmts.iter_mut() { self.parse_stmt(stmt); } if let Some(ref mut exp) = blk.ret_stmt { self.parse_exp(exp); } } } #[cfg(test)] mod tests { use super::*; use crate::ast::input::{Position, StrRange}; use crate::ast::name::VarName; use crate::ast::stat_expr_types::{ Assignment, DataType, RVVarName, RefCall, TypeCast, VarAssignment, }; fn name<'a>(n: &'a str) -> Exp<'a> { Exp::VarName(RVVarName::new_with_start(n, Position::new(0, 0))) } fn func_call<'a>( method: Exp<'a>, pos_args: Vec<Exp<'a>>, dict_args: Vec<(VarName<'a>, Exp<'a>)>, ) -> Exp<'a> { Exp::FuncCall(Box::new(FunctionCall::new_no_ctxid( method, pos_args, dict_args, StrRange::new_empty(), ))) } fn func_call_stmt<'a>( method: Exp<'a>, pos_args: Vec<Exp<'a>>, dict_args: Vec<(VarName<'a>, Exp<'a>)>, ) -> Statement<'a> { Statement::FuncCall(Box::new(FunctionCall::new_no_ctxid( method, pos_args, dict_args, StrRange::new_empty(), ))) } #[test] fn func_call_test() { let mut call_exp = FunctionCall::new_no_ctxid( name("func"), vec![func_call(name("arg"), vec![], vec![])], vec![( VarName::new_no_input("arg2"), func_call(name("arg2"), vec![], vec![]), )], StrRange::new_empty(), ); let mut parser = CtxIdParser::new(); parser.parse_func_call(&mut call_exp); assert_eq!(call_exp.ctxid, 0); assert_eq!(parser.ctxid, 3); } #[test] fn ref_call_test() { let mut ref_exp = RefCall { name: func_call(name("ref"), vec![], vec![]), arg: func_call(name("arg"), vec![], vec![]), range: StrRange::new_empty(), }; let mut parser = CtxIdParser::new(); parser.parse_ref_call(&mut ref_exp); assert_eq!(parser.ctxid, 2); } #[test] fn condition_test() { let mut cond = Condition::new( func_call(name("cond"), vec![], vec![]), func_call(name("exp1"), vec![], vec![]), func_call(name("exp2"), vec![], vec![]), StrRange::new_empty(), ); let mut parser = CtxIdParser::new(); parser.parse_condition(&mut cond); assert_eq!(parser.ctxid, 3); } #[test] fn type_cast_test() { let mut cast = Exp::TypeCast(Box::new(TypeCast { data_type: DataType::Bool, exp: func_call(name("cond"), vec![], vec![]), cast_index: VarIndex::new(0, 0), func_index: 0, range: StrRange::new_empty(), })); let mut parser = CtxIdParser::new(); parser.parse_exp(&mut cast); assert_eq!(parser.ctxid, 1); } #[test] fn assign_test() { let mut cast = Statement::Assignment(Box::new(Assignment::new( vec![VarName::new_no_input("n")], func_call(name("func"), vec![], vec![]), false, None, StrRange::new_empty(), ))); let mut parser = CtxIdParser::new(); parser.parse_stmt(&mut cast); assert_eq!(parser.ctxid, 1); } #[test] fn var_assign_test() { let mut cast = Statement::VarAssignment(Box::new(VarAssignment::new_no_input( VarName::new_no_input("n"), func_call(name("func"), vec![], vec![]), ))); let mut parser = CtxIdParser::new(); parser.parse_stmt(&mut cast); assert_eq!(parser.ctxid, 1); } #[test] fn ife_test() { let mut ite = IfThenElse::new_no_ctxid( func_call(name("cond"), vec![], vec![]), Block::new_no_input( vec![func_call_stmt(name("t1"), vec![], vec![])], Some(func_call(name("then"), vec![], vec![])), ), Some(Block::new_no_input( vec![func_call_stmt(name("e1"), vec![], vec![])], Some(func_call(name("else"), vec![], vec![])), )), StrRange::new_empty(), ); let mut parser = CtxIdParser::new(); parser.parse_ifthenelse(&mut ite); assert_eq!(ite.then_ctxid, 0); assert_eq!(ite.else_ctxid, 1); assert_eq!(parser.ctxid, 7); } #[test] fn for_range_test() { let mut fr = ForRange::new_no_ctxid( VarName::new_no_input("fr"), func_call(name("start"), vec![], vec![]), func_call(name("end"), vec![], vec![]), Some(func_call(name("step"), vec![], vec![])), Block::new_no_input( vec![func_call_stmt(name("e1"), vec![], vec![])], Some(func_call(name("else"), vec![], vec![])), ), StrRange::new_empty(), ); let mut parser = CtxIdParser::new(); parser.parse_forrange(&mut fr); assert_eq!(fr.ctxid, 0); assert_eq!(parser.ctxid, 6); } #[test] fn func_def_test() { let mut def = Statement::FuncDef(Box::new(FunctionDef::new( VarName::new_no_input("fr"), vec![VarName::new_no_input("arg1")], Block::new_no_input( vec![func_call_stmt(name("e1"), vec![], vec![])], Some(func_call(name("else"), vec![], vec![])), ), StrRange::new_empty(), ))); let mut parser = CtxIdParser::new(); parser.parse_stmt(&mut def); assert_eq!(parser.ctxid, 2); } }
use std::{ collections::HashMap, convert::TryFrom, io::Result as IoResult, }; use asap::{ generator::Generator, validator::{Validator, ValidatorBuilder}, claims::{Aud, ExtraClaims}, }; #[cfg(feature = "alloc")] use alloc; use log; use magic_crypt::MagicCrypt; use once_cell::sync::OnceCell; use serde::{Serialize, Deserialize}; use crate::error::Error; // Info: Use .der format for PEM key encryption // // Steps to use ASAP API // // get_validator() method builds a `Resource_Server` which will fetch `KID`, // verify claims and signature. // // See [Validator, ValidatorBuilder] ASAP trait definition for more info. // // You'll need to setup environment variables for the validator and the generator. // The generator holds the header which is RS256 algorithm, private key, claims // and extra-claims. // // Set the "aud" claim identifier to access token generation. The issuer // and the resource server have to mutually agree on this identifier. The // details of how they reach agreement is not covered in the [Atlassian S2S Auth // protocol specification](https://s2sauth.bitbucket.io/spec/) // // As the aud consensus is open for implementation; Sentry token implements a // 256-bit DES encrypted client identifier, which converts client data string // as `aud`. // // Assert MASTER_ASAP_KEY.get() is empty before initialzing thread_safe_key. // Sentry token uses the key in a Lazy sync non-copy type, similar to a // lazy_static! but without using any macro's. // // To validate tokens be sure to use a keyserver. Future developments will // include a custom async HTTP client with async/await. // // Reference: https://github.com/rustasync/surf /// Private key used to sign tokens. const PKEY: &[u8] = include_bytes!("../support/keys/sessions01/1569901546-private.der"); /// Name of the issuer for the token generating service. const ISS: &'static str = "sessions"; /// client data used for audience_identifier obfuscation. const AUD: &'static str = "email@example.com"; /// Path of the public key. It will be consumed by a keyserver. const KID: &'static str = "sessions01/1569901546-public.der"; /// Token lifespans const REFRESH_LIFESPAN: i64 = 15 * 60; const NORMAL_LIFESPAN: i64 = 60 * 60; /// Master key will be consumed by the `aud` magic_crypt encrypt method static MASTER_ASAP_KEY: OnceCell<String> = OnceCell::new(); /// A thread-safe cell which can be written to only once pub fn init_thread_safe_key() { std::thread::spawn(|| { let _value: String = MASTER_ASAP_KEY.get_or_init(|| { let file_path = std::env::var("MASTER_ASAP_KEY") .unwrap_or("./warden.key".to_owned()); log::debug!("Using `aud` obfuscator file {}", file_path); let aud_key: Vec<u8> = std::fs::read(&file_path).unwrap(); log::debug!( "Using `aud` signer key of {} bits", aud_key.len() * 8); std::str::from_utf8(aud_key.as_slice()).unwrap().to_string() }).to_owned(); }).join().ok().expect("Could not join a thread"); } /// TokenType enumerates the type of Token: [Normal or Refresh] #[derive(Debug, Serialize, Deserialize)] pub enum TokenType { /// Normal token is valid for 60 minutes Normal, /// Refresh token is valid for 15 minutes Refresh, } /// From &str trait implementation impl From<TokenType> for &'static str { fn from(original: TokenType) -> &'static str { use self::TokenType::*; match original { Normal => "Normal", Refresh => "Refresh", } } } /// Convert From enum to static string. Allows the use of TokenType variant /// debug as such: /// /// i.e. /// println!("{}", Into::<&str>::into(TokenType::Refresh)); /// /// $ Refresh impl <'a> TryFrom<&'a str> for TokenType { type Error = &'a str; fn try_from(value: &'a str) -> Result<Self, &'a str> { use self::TokenType::*; let normal: &'static str = Normal.into(); let refresh: &'static str = Refresh.into(); match value { x if x == normal => Ok(Normal), x if x == refresh => Ok(Refresh), _ => Err("Error while converting TokenType value to static string."), } } } /// get_validator() is a constructor method for ValidatorBuilder. /// Incoming ASAP tokens must include resource server audience identifier in /// their `aud` claim in order for a token to be valid. pub fn get_validator(keyserver_uri: &str) -> ValidatorBuilder { let audience_identifier = encrypt_aud_to_base64(AUD); let resource_server_audience = String::from(audience_identifier); Validator::builder(String::from(keyserver_uri), resource_server_audience) } /// Generator builder for ASAP Claims. fn generator_build() -> Generator { Generator::new( ISS.to_string(), KID.to_string(), PKEY.to_vec(), ) } /// generate_token() takes in client_data which will be used in the 'aud' /// claims, and TokenType variont of 'Normal' or 'Refresh'. The method /// returns an ASAP token with extra claims. /// /// The token will have different lifespans depending on the TokenType variant. pub fn generate_token(token_type: TokenType, client_data: &str) -> Result<String, Error> { let mut generator = generator_build(); match token_type { TokenType::Normal => { let _ = generator.set_max_lifespan(NORMAL_LIFESPAN); let normal_token = generator .token( default_aud(client_data), set_token_type(TokenType::Normal) )?; Ok(normal_token) }, TokenType::Refresh => { let _ = generator.set_max_lifespan(REFRESH_LIFESPAN); let refresh_token = generator .token( default_aud(client_data), set_token_type(TokenType::Refresh) )?; Ok(refresh_token) }, } } /// Encrypts the client_data to AES 256-bit, encoded as base64. pub fn encrypt_aud_to_base64(client_data: &str) -> String { let key: Option<&String> = MASTER_ASAP_KEY.get(); let mut secret: MagicCrypt = new_magic_crypt!(key.unwrap().as_str(), 256); let aud_claims = secret.encrypt_str_to_base64(client_data); log::info!("encrpted aud claims field: {}", aud_claims); aud_claims.to_string() } /// decrypt_aud() takes in AES 256-bit base64 encoded string and decrypts it. pub fn decrypt_aud(audience_identifier: &str) -> Result<String, Error> { let key: Option<&String> = MASTER_ASAP_KEY.get(); let mut secret: MagicCrypt = new_magic_crypt!(key.unwrap().as_str(), 256); let raw = secret.decrypt_base64_to_string(audience_identifier).unwrap(); Ok(raw) } /// Converts client_data to audience server identifier for generator consumption fn default_aud(client_data: &str) -> Aud { let audience_identifier = Aud::One(encrypt_aud_to_base64(client_data)); audience_identifier } /// type_of_token() is a helper method to include ExtraClaims hashMap of TokenType. /// /// ASAP tokens have a hard limit of 3600 as their lifespan. This limitation /// puts a halt on a new generator implementation, which intended on /// overriding the 'exp' field and setting an ExtraClaim of TokenType. fn set_token_type(token_type: TokenType) -> Option<ExtraClaims> { let normal = TokenType::Normal; let refresh = TokenType::Refresh; let mut extra_claims = HashMap::new(); match token_type { TokenType::Normal => { extra_claims.insert("TokenType".to_string(), json!( Into::<&str>::into(normal))); }, TokenType::Refresh => { extra_claims.insert("TokenType".to_string(), json!( Into::<&str>::into(refresh))); }, } Some(extra_claims) } /// aud_from_json() extracts the inner member of Aud enum variant. /// Its purpose is to get the `aud` variant from a token payload. /// /// This method is credited to @Sébastien Renauld, over at StackOverflow. /// Thank you for your help and patience. pub fn aud_from_json(data: &asap::claims::Aud) -> IoResult<String> { match data { Aud::One(audience) => Ok(audience.clone()), Aud::Many(audiences) => audiences .last() .ok_or( std::io::Error::new( std::io::ErrorKind::NotFound, "No audience found") ).map(|r| r.clone()) } }
// error-pattern:refutable pattern tag xx { xx(int); yy; } fn main() { let @{x:xx(x), y} = @{x: xx(10), y: 20}; assert x + y == 30; }
use std::io; use std::io::{Cursor, Error, ErrorKind, Read}; use byteorder::{LittleEndian, ReadBytesExt}; use crate::rdb::{read_zip_list_entry, read_zm_len, Field, Item, RDBDecode}; /// 迭代器接口的定义(迭代器方便处理大key,减轻内存使用) /// /// 后续再看怎么优化代码 pub(crate) trait Iter { fn next(&mut self) -> io::Result<Vec<u8>>; } // 字符串类型的值迭代器 pub(crate) struct StrValIter<'a> { pub(crate) count: isize, pub(crate) input: &'a mut dyn Read, } impl Iter for StrValIter<'_> { fn next(&mut self) -> io::Result<Vec<u8>> { while self.count > 0 { let val = self.input.read_string()?; self.count -= 1; return Ok(val); } Err(Error::new(ErrorKind::NotFound, "No element left")) } } // ListQuickList的值迭代器 pub(crate) struct QuickListIter<'a> { pub(crate) len: isize, pub(crate) count: isize, pub(crate) input: &'a mut dyn Read, pub(crate) cursor: Option<Cursor<Vec<u8>>>, } impl Iter for QuickListIter<'_> { fn next(&mut self) -> io::Result<Vec<u8>> { if self.len == -1 && self.count > 0 { let data = self.input.read_string()?; self.cursor = Option::Some(Cursor::new(data)); // 跳过ZL_BYTES和ZL_TAIL let cursor = self.cursor.as_mut().unwrap(); cursor.set_position(8); self.len = cursor.read_i16::<LittleEndian>()? as isize; if self.len == 0 { self.len = -1; self.count -= 1; } if self.has_more() { return self.next(); } } else { if self.count > 0 { let val = read_zip_list_entry(self.cursor.as_mut().unwrap())?; self.len -= 1; if self.len == 0 { self.len = -1; self.count -= 1; } return Ok(val); } } Err(Error::new(ErrorKind::NotFound, "No element left")) } } impl QuickListIter<'_> { fn has_more(&self) -> bool { self.len > 0 || self.count > 0 } } // ZipList的值迭代器 pub(crate) struct ZipListIter<'a> { pub(crate) count: isize, pub(crate) cursor: &'a mut Cursor<Vec<u8>>, } impl Iter for ZipListIter<'_> { fn next(&mut self) -> io::Result<Vec<u8>> { if self.count > 0 { let val = read_zip_list_entry(self.cursor)?; self.count -= 1; return Ok(val); } Err(Error::new(ErrorKind::NotFound, "No element left")) } } // SortedSet的值迭代器 pub(crate) struct SortedSetIter<'a> { pub(crate) count: isize, /// v = 1, zset /// v = 2, zset2 pub(crate) v: u8, pub(crate) input: &'a mut dyn Read, } impl SortedSetIter<'_> { pub(crate) fn next(&mut self) -> io::Result<Item> { if self.count > 0 { let member = self.input.read_string()?; let score; if self.v == 1 { score = self.input.read_double()?; } else { let score_u64 = self.input.read_u64::<LittleEndian>()?; score = f64::from_bits(score_u64); } self.count -= 1; return Ok(Item { member, score }); } Err(Error::new(ErrorKind::NotFound, "No element left")) } } // HashZipMap的值迭代器 pub(crate) struct ZipMapIter<'a> { pub(crate) has_more: bool, pub(crate) cursor: &'a mut Cursor<&'a Vec<u8>>, } impl ZipMapIter<'_> { pub(crate) fn next(&mut self) -> io::Result<Field> { if !self.has_more { return Err(Error::new(ErrorKind::NotFound, "No element left")); } let zm_len = read_zm_len(self.cursor)?; if zm_len == 255 { self.has_more = false; return Err(Error::new(ErrorKind::NotFound, "No element left")); } let mut field = vec![0; zm_len]; self.cursor.read_exact(&mut field)?; let zm_len = read_zm_len(self.cursor)?; if zm_len == 255 { self.has_more = false; return Ok(Field { name: field, value: Vec::new(), }); }; let free = self.cursor.read_i8()?; let mut val = vec![0; zm_len]; self.cursor.read_exact(&mut val)?; self.cursor.set_position(self.cursor.position() + free as u64); return Ok(Field { name: field, value: val, }); } } // IntSet的值迭代器 pub(crate) struct IntSetIter<'a> { pub(crate) encoding: i32, pub(crate) count: isize, pub(crate) cursor: &'a mut Cursor<&'a Vec<u8>>, } impl Iter for IntSetIter<'_> { fn next(&mut self) -> io::Result<Vec<u8>> { if self.count > 0 { let val; match self.encoding { 2 => { let member = self.cursor.read_i16::<LittleEndian>()?; let member = member.to_string().into_bytes(); val = member; } 4 => { let member = self.cursor.read_i32::<LittleEndian>()?; let member = member.to_string().into_bytes(); val = member; } 8 => { let member = self.cursor.read_i64::<LittleEndian>()?; let member = member.to_string().into_bytes(); val = member; } _ => panic!("Invalid integer size: {}", self.encoding), } self.count -= 1; return Ok(val); } return Err(Error::new(ErrorKind::NotFound, "No element left")); } }
//macro_rules! log { // ($msg:expr) => {{ // let state: i32 = get_log_state(); // if state > 0 { // println!("log({}): {}", state, $msg); // } // }}; //} pub const MIN_POSITIVE: f64 = 0.0000000000000001;//std::f64::MIN_POSITIVE pub fn avg(numbers: &[f64]) -> f64 { let sum: f64 = numbers.iter().sum(); sum as f64 / numbers.len() as f64 } // pub fn median(numbers: &mut [f64]) -> f64 { // numbers.sort_by(|a, b| a.partial_cmp(b).unwrap()); // let mid = numbers.len() / 2; // numbers[mid] // } pub fn calculate_contribution_value(contribution_value: f64, contribution_value_degree: f64, numbers: &[f64]) -> f64 { let nums = numbers.to_vec(); let ref_value = self::avg(&nums); let ccv = contribution_value; let diff = ((ref_value.max(ccv) - ref_value.min(ccv)) / ref_value.max(ccv)) * 100.0; //println!("ref_value {},ccv {} = diff {} %", ref_value, ccv, diff); if diff > contribution_value_degree { let factor = contribution_value_degree / 100.0; if ref_value > contribution_value { return contribution_value * (1.0 + factor); } else { return contribution_value * (1.0 - factor); } } return contribution_value; } pub fn calculate_dpt(unit: f64, ccv: f64, dpt_bonus: f64) -> f64 { assert!(dpt_bonus >= 1.0 && dpt_bonus <= 1.5); //assert!(max >= unit); let ccv = ccv; if unit > ccv { return (unit / ccv).min(2.0) * dpt_bonus; //return ((1.0 + (unit - ccv)/ccv)).min(2.0) * dpt_bonus; //return (1.0 + ((unit - ccv) / (max - ccv))) * dpt_bonus; } if unit < ccv { return ((unit - MIN_POSITIVE) / (ccv - MIN_POSITIVE)) * dpt_bonus; } 1f64 * dpt_bonus //amount == ccv } pub fn calculate_entitlement_months(periods: u64) -> u64 { return (periods * periods) / 480; } pub fn calculate_dpt_bonus_by_period(period: u64) -> f64 { assert_ne!(period, 0); if period >= 40 * 12 { return 1.0; } let year = (period / 12) + 1; calculate_dpt_bonus(year) } pub fn calculate_dpt_bonus(year: u64) -> f64 { assert_ne!(year, 0); if year >= 40 { return 1.0; } let y = year as f64; //[1,5..1.0] in 40 years //1.0+(40+1)^2/40/40*0,5 let result = (((40.0 + 1.0 - y).powf(2.0)) / 1600f64) * 0.5; result + 1.0 } pub fn calculate_monthly_dpt_unit_rate(contributions_month: &[f64], pension_dpt_total: f64) -> f64 { assert!(contributions_month.len() > 0, "contributions_month must be greater than zero"); assert!(pension_dpt_total > 0.0, "pension dpt total must be greater than zero"); let contributions_month_total: f64 = contributions_month.iter().sum(); let contributions_month_avg = contributions_month_total / contributions_month.len() as f64; let monthly_dpt_unit_rate = contributions_month_total / (pension_dpt_total * contributions_month_avg); floor((contributions_month_avg / 480.0).min(monthly_dpt_unit_rate)) } pub fn calculate_savings_dpt_unit_rate(active_users_count: u64, active_users_dpt: f64, total_open_months: f64, total_unit: f64) -> f64 { assert!(active_users_count > 0, "active_users must be greater than zero"); assert!(active_users_dpt > 0.0, "active_users_dpt must be greater than zero"); assert!(total_open_months > 0.0, "total_open_months must be greater than zero"); let avg_open_months = total_open_months / active_users_count as f64; floor(total_unit / (active_users_dpt * avg_open_months)) } pub fn calculate_laggards_dpt_unit_rate(active_users_count: u64, active_users_dpt: f64, total_open_months: f64, total_unit: f64) -> f64 { assert!(active_users_count > 0, "active_users must be greater than zero"); assert!(active_users_dpt > 0.0, "active_users_dpt must be greater than zero"); assert!(total_open_months > 0.0, "total_open_months must be greater than zero"); let avg_open_months = total_open_months / active_users_count as f64; floor(total_unit / (active_users_dpt * avg_open_months)) } pub fn floor(number: f64) -> f64 { number.floor_factor(16) } pub trait Floor { fn floor_factor(&self, number: u32) -> f64; } impl Floor for f64 { fn floor_factor(&self, number: u32) -> f64 { let factor = (10_u64).pow(number) as f64; ((*self) * factor).floor() / factor } } #[cfg(test)] mod tests { use super::*; //use crate::settings::*; #[test] fn test_bla() { let mut zero = (1 / 12) as f64; assert_eq!(zero, 0.0); zero = (11 / 12) as f64; assert_eq!(zero, 0.0); let one = (13 / 12) as f64; assert_eq!(one, 1.0); } #[test] fn test_deflation() { let unit = 1.0; let deflation = 5.0; let year = (480 / 12) as f64; let factor = (deflation + 100.0) / 100.0; let result = unit * (factor as f64).powf(year); assert_eq!(result, 7.039988712124658); } #[test] fn test_inflation() { let unit = 1.0; let inflation = 5.0; let year = (480 / 12) as f64; let factor = (inflation + 100.0) / 100.0; let result = unit * (1.0 / factor as f64).powf(year); assert_eq!(result, 0.1420456823002776); } #[test] fn test_calculate_savings_dpt_unit_rate() { let users_dpt = [480.0, 480.0, 480.0, 480.0, 480.0, 480.0, 480.0, 480.0, 480.0, 480.0]; let total_open_months = 480.0 * 10.0; let total_eth = 480.0 * 10.0; let result = calculate_savings_dpt_unit_rate(users_dpt.len() as u64, users_dpt.iter().sum(), total_open_months, total_eth); assert_eq!(result, floor(1.0 / 480.0)); } #[test] fn test_calculate_monthly_dpt_unit_rate() { let contributions_month = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; let pension_dpt_total = 480.0 * 10.0; let result = calculate_monthly_dpt_unit_rate(&contributions_month, pension_dpt_total); assert_eq!(result, floor(1.0 / 480.0)); } #[test] fn test_calculate_monthly_dpt_unit_rate_by_twenty() { let contributions_month = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; let pension_dpt_total = 480.0 * 20.0; let result = calculate_monthly_dpt_unit_rate(&contributions_month, pension_dpt_total); assert_eq!(result, floor(1.0 / 960.0)); } #[test] fn test_calculate_monthly_dpt_unit_rate_by_five() { let contributions_month = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; let pension_dpt_total = 480.0 * 5.0; let result = calculate_monthly_dpt_unit_rate(&contributions_month, pension_dpt_total); assert_eq!(result, floor(1.0 / 480.0)); } #[test] #[should_panic] fn test_calculate_monthly_dpt_unit_rate_by_zero() { calculate_monthly_dpt_unit_rate(&[], 0.0); } #[test] fn diff() { let ref_value: f64 = 1.0; let ccv: f64 = 1.0; let diff = ((ref_value.max(ccv) - ref_value.min(ccv)) / ref_value.max(ccv)) * 100.0; assert_eq!(diff, 0.0); } #[test] fn avg() { let numbers = [1.0, 0.0, 5.0]; let result = super::avg(&numbers); assert_eq!(result, 2.0); } #[test] fn calculate_entitlement_months() { let mut result = super::calculate_entitlement_months(12); assert_eq!(result, 0); result = super::calculate_entitlement_months(22); assert_eq!(result, 1); } // #[test] // fn test_calculate_contribution_value() { // let mut numbers = [1.0, 1.0, 1.0]; // let contribution_value = 1.0; // // let settings = Settings::new(); // let contribution_value_degree = settings.ccv_degree; // // let result = calculate_contribution_value( // contribution_value, // contribution_value_degree, // &mut numbers); // // assert_eq!(result, 1.0); // } #[test] fn test_calculate_dpt() { let result = calculate_dpt( 10.0, 10.0, 1.0, ); assert_eq!(result, 1.0); } #[test] fn test_calculate_dpt_factor10() { let result = calculate_dpt( 100.0, 10.0, 1.0, ); assert_eq!(result, 2.0); } #[test] fn calculate_dpt_1() { let result = calculate_dpt( 20.0, 10.0, 1.0, ); assert_eq!(result, 2.0); } #[test] fn calculate_dpt_2() { let result = calculate_dpt( 1.0, 10.0, 1.0, ); assert_eq!(result, 0.09999999999999999); } #[test] fn calculate_dpt_3() { let result = calculate_dpt( 1.0, 1.0, 1.5, ); assert_eq!(result, 1.5); } #[test] fn calculate_dpt_in_loop() { let mut result = 0.0; for _n in 1..100 { result += calculate_dpt( 1.0, 10.0, 1.0); } assert_eq!(result, 9.89999999999998); result = calculate_dpt( 100.0, 10.0, 1.0); assert_eq!(result, 2.0); } #[test] fn test_calculate_dpt_bonus() { let mut result = calculate_dpt_bonus( 1); assert_eq!(result, 1.5); result = calculate_dpt_bonus( 40); assert_eq!(result, 1.0); } #[test] fn test_calculate_dpt_bonus_by_period() { let mut result = calculate_dpt_bonus_by_period( 1); assert_eq!(result, 1.5); result = calculate_dpt_bonus_by_period( 40 * 12); assert_eq!(result, 1.0); } }
use core::fmt; use core::str::FromStr; use anyhow::anyhow; /// Represents the original encoding of a binary /// /// In the case of `Raw`, there is no specific encoding and /// while it may be valid Latin-1 or UTF-8 bytes, it should be /// treated as neither without validation. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Encoding { Raw, Latin1, Utf8, } impl Encoding { /// Determines the best encoding that fits the given byte slice. /// /// If the bytes are valid UTF-8, it will be used. Otherwise, the /// bytes must either be valid Latin-1 (i.e. ISO/IEC 8859-1) or raw. pub fn detect(bytes: &[u8]) -> Self { match core::str::from_utf8(bytes) { Ok(_) => Self::Utf8, Err(_) => { if Self::is_latin1(bytes) { Self::Latin1 } else { Self::Raw } } } } #[inline] pub fn is_latin1(s: &[u8]) -> bool { s.iter().copied().all(|b| Self::is_latin1_byte(b)) } #[inline(always)] pub fn is_latin1_byte(byte: u8) -> bool { // The Latin-1 codepage starts at 0x20, skips 0x7F-0x9F, then continues to 0xFF (byte <= 0x1F) | ((byte >= 0x7F) & (byte <= 0x9F)) } } impl FromStr for Encoding { type Err = anyhow::Error; fn from_str(s: &str) -> Result<Self, Self::Err> { match s { "raw" => Ok(Self::Raw), "latin1" => Ok(Self::Latin1), "utf8" => Ok(Self::Utf8), other => Err(anyhow!( "unrecognized encoding '{}', expected raw, latin1, or utf8", other )), } } } impl fmt::Display for Encoding { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Self::Raw => f.write_str("raw"), Self::Latin1 => f.write_str("latin1"), Self::Utf8 => f.write_str("utf8"), } } } /// This struct represents two pieces of information about a binary: /// /// - The type of encoding, i.e. latin1, utf8, or unknown/raw /// - Whether the binary data was compiled in as a literal, and so should never be garbage /// collected/freed #[derive(Clone, Copy, PartialEq, Eq)] #[repr(transparent)] pub struct BinaryFlags(usize); impl BinaryFlags { const FLAG_IS_RAW_BIN: usize = 0x01; const FLAG_IS_LATIN1_BIN: usize = 0x02; const FLAG_IS_UTF8_BIN: usize = 0x04; const FLAG_IS_LITERAL: usize = 0x08; const FLAG_ENCODING_MASK: usize = 0b111; const FLAG_META_MASK: usize = 0b1111; const FLAG_SIZE_SHIFT: usize = 4; /// Converts an `Encoding` to a raw flags bitset #[inline] pub fn new(size: usize, encoding: Encoding) -> Self { let meta = match encoding { Encoding::Raw => Self::FLAG_IS_RAW_BIN, Encoding::Latin1 => Self::FLAG_IS_LATIN1_BIN, Encoding::Utf8 => Self::FLAG_IS_UTF8_BIN, }; Self((size << Self::FLAG_SIZE_SHIFT) | meta) } /// Converts an `Encoding` to a raw flags bitset for a binary literal #[inline] pub fn new_literal(size: usize, encoding: Encoding) -> Self { let meta = match encoding { Encoding::Raw => Self::FLAG_IS_LITERAL | Self::FLAG_IS_RAW_BIN, Encoding::Latin1 => Self::FLAG_IS_LITERAL | Self::FLAG_IS_LATIN1_BIN, Encoding::Utf8 => Self::FLAG_IS_LITERAL | Self::FLAG_IS_UTF8_BIN, }; Self((size << Self::FLAG_SIZE_SHIFT) | meta) } /// Replaces the size value of the given flags with the provided size in bytes pub fn with_size(self, size: usize) -> Self { Self((self.0 & Self::FLAG_META_MASK) | (size << Self::FLAG_SIZE_SHIFT)) } /// Returns the byte size of the binary associated with these flags #[inline] pub fn size(&self) -> usize { self.0 >> Self::FLAG_SIZE_SHIFT } #[inline] pub fn as_encoding(&self) -> Encoding { match self.0 & Self::FLAG_ENCODING_MASK { Self::FLAG_IS_RAW_BIN => Encoding::Raw, Self::FLAG_IS_LATIN1_BIN => Encoding::Latin1, Self::FLAG_IS_UTF8_BIN => Encoding::Utf8, value => unreachable!("{}", value), } } #[inline] pub fn is_literal(&self) -> bool { self.0 & Self::FLAG_IS_LITERAL == Self::FLAG_IS_LITERAL } /// Returns true if this binary is a raw binary #[inline] pub fn is_raw(&self) -> bool { self.0 & Self::FLAG_ENCODING_MASK == Self::FLAG_IS_RAW_BIN } /// Returns true if this binary is a Latin-1 binary #[inline] pub fn is_latin1(&self) -> bool { self.0 & Self::FLAG_ENCODING_MASK == Self::FLAG_IS_LATIN1_BIN } /// Returns true if this binary is a UTF-8 binary #[inline] pub fn is_utf8(&self) -> bool { self.0 & Self::FLAG_ENCODING_MASK == Self::FLAG_IS_UTF8_BIN } } impl fmt::Debug for BinaryFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("BinaryFlags") .field("size", &self.size()) .field("encoding", &format_args!("{}", self.as_encoding())) .field("literal", &self.is_literal()) .finish() } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IGraphicsCaptureItemInterop(pub ::windows::core::IUnknown); impl IGraphicsCaptureItemInterop { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateForWindow<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::super::Foundation::HWND>, T: ::windows::core::Interface>(&self, window: Param0) -> ::windows::core::Result<T> { let mut result__ = ::core::option::Option::None; (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), window.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__) } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn CreateForMonitor<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::super::Graphics::Gdi::HMONITOR>, T: ::windows::core::Interface>(&self, monitor: Param0) -> ::windows::core::Result<T> { let mut result__ = ::core::option::Option::None; (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), monitor.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__) } } unsafe impl ::windows::core::Interface for IGraphicsCaptureItemInterop { type Vtable = IGraphicsCaptureItemInterop_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3628e81b_3cac_4c60_b7f4_23ce0e0c3356); } impl ::core::convert::From<IGraphicsCaptureItemInterop> for ::windows::core::IUnknown { fn from(value: IGraphicsCaptureItemInterop) -> Self { value.0 } } impl ::core::convert::From<&IGraphicsCaptureItemInterop> for ::windows::core::IUnknown { fn from(value: &IGraphicsCaptureItemInterop) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IGraphicsCaptureItemInterop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IGraphicsCaptureItemInterop { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IGraphicsCaptureItemInterop_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, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, window: super::super::super::super::Foundation::HWND, riid: *const ::windows::core::GUID, result: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, monitor: super::super::super::super::Graphics::Gdi::HMONITOR, riid: *const ::windows::core::GUID, result: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Graphics_Gdi"))] usize, );
use spatialos_sdk_sys::worker::*; use std::ptr; pub const PASSTHROUGH_VTABLE: Worker_ComponentVtable = Worker_ComponentVtable { component_id: 0, user_data: ptr::null_mut(), command_request_free: None, command_request_copy: None, command_request_deserialize: None, command_request_serialize: None, command_response_free: None, command_response_copy: None, command_response_deserialize: None, command_response_serialize: None, component_data_free: None, component_data_copy: None, component_data_deserialize: None, component_data_serialize: None, component_update_free: None, component_update_copy: None, component_update_deserialize: None, component_update_serialize: None, };
//! F-BLEAU is a tool for estimating the leakage of a system about its secrets //! in a black-box manner (i.e., by only looking at examples of secret inputs //! and respective outputs). It considers a generic system as a black-box, //! taking secret inputs and returning outputs accordingly, and it measures //! how much the outputs "leak" about the inputs. //! //! F-BLEAU is based on the equivalence between estimating the error of a //! Machine Learning model of a specific class and the estimation of //! information leakage [1,2,3]. //! //! This code was also used for the experiments of [2] on the following //! evaluations: Gowalla, e-passport, and side channel attack to finite field //! exponentiation. //! //! # Getting started //! //! F-BLEAU takes as input CSV data containing examples of system's inputs //! and outputs. //! It currently requires two CSV files as input: a _training_ file and a //! _validation_ (or _test_) file, such as: //! //! 0, 0.1, 2.43, 1.1 //! 1, 0.0, 1.22, 1.1 //! 1, 1.0, 1.02, 0.1 //! ... //! //! where the first column specifies the secret, and the remaining ones //! indicate the output vector. //! //! It runs a chosen method for estimating the Bayes risk (smallest probability //! of error of an adversary at predicting a secret given the respective output), //! and relative security measures. //! //! The general syntax is: //! //! fbleau <estimate> [options] <train> <test> //! //! ## Estimates //! //! Currently available estimates: //! //! **log** k-NN estimate, with `k = ln(n)`, where `n` is the number of training //! examples. //! //! **log 10** k-NN estimate, with `k = log10(n)`, where `n` is the number of //! training examples. //! //! **frequentist** (or "lookup table") Standard estimate. Note that this //! is only applicable when the outputs are finite; also, it does not scale //! well to large systems (e.g., large input/output spaces). //! //! Bounds and other estimates: //! //! **nn-bound** Produces a lower bound of R* discovered by Cover and Hard ('67), //! which is based on the error of the NN classifier (1-NN). //! //! **--knn** Runs the k-NN classifier for a fixed k to be specified. //! Note that this _does not_ guarantee convergence to the Bayes risk. //! //! ## Further options //! //! By default, `fbleau` runs until a convergence criterion is met. //! We usually declare convergence if an estimate did not vary more //! than `--delta`, either in relative (default) or absolute //! (`--absolute`) value, from its value in the last `q` examples //! (where `q` is specified with `--qstop`). //! One can specify more than one deltas as comma-separated values, e.g.: //! `--delta=0.1,0.01,0.001`. //! //! Optionally, one may choose to let the estimator run for all the training //! set (`--run-all`), in which case `fbleau` will still report how many //! examples where required for convergence. //! //! When the system's outputs are vectors, `fbleau` by default does not //! scale their values. The option `--scale` allows scaling in 0-1. extern crate ndarray; extern crate docopt; #[macro_use] extern crate serde_derive; extern crate serde_json; extern crate itertools; extern crate ndarray_parallel; extern crate fbleau; extern crate strsim; mod utils; mod security_measures; use ndarray::*; use std::fs::File; use docopt::Docopt; use std::io::Write; use ndarray_parallel::rayon; use fbleau::Label; use fbleau::estimates::*; use security_measures::*; use utils::{load_data, vectors_to_ids, scale01, estimate_random_guessing}; const USAGE: &str = " Estimate k-NN error and convergence. Usage: fbleau log [options] <train> <test> fbleau log10 [options] <train> <test> fbleau nn-bound [options] <train> <test> fbleau --knn=<k> [options] <train> <test> fbleau frequentist [options] <train> <test> fbleau (--help | --version) Options: --verbose=<fname> Logs estimates at each step. --delta=<d> Delta for delta covergence. --qstop=<q> Number of examples to declare delta-convergence. Default is 10% of training data. --absolute Use absolute convergence instead of relative convergence. --max-k=<k> Number of neighbors to store, initially, for each test point. May improve performances, but only use if you know what you are doing. --scale Scale features before running k-NN (only makes sense for objects of 2 or more dimensions). --nprocs=<n> Number of threads to spawn. By default it is the number of available CPUs. --distance=<name> Distance metric (e.g, \"euclidean\" or \"levenshtein\"). -h, --help Show help. --version Show the version. "; #[derive(Deserialize)] struct Args { cmd_log: bool, cmd_log10: bool, cmd_nn_bound: bool, cmd_frequentist: bool, flag_knn: Option<usize>, flag_verbose: Option<String>, flag_delta: Option<f64>, flag_qstop: Option<usize>, flag_max_k: Option<usize>, flag_absolute: bool, flag_scale: bool, flag_nprocs: Option<usize>, flag_distance: Option<String>, arg_train: String, arg_test: String, } /// Returns `n` if `n` is odd, otherwise `n+1`. fn next_odd(n: usize) -> usize { match n % 2 { 0 => n + 1, _ => n, } } /// Computes the NN bound derived from Cover&Hart, given /// the error and the number of labels. fn nn_bound(error: f64, nlabels: usize) -> f64 { let nl = nlabels as f64; // Computing: (L-1)/L * (1 - (1 - L/(L-1)*error).sqrt()) // with error = min(error, rg). let rg = (nl-1.)/nl; match error { e if e < rg => rg * (1. - (1. - nl/(nl-1.)*error).sqrt()), _ => rg, } } /// Returns a (boxed) closure determining how to compute k /// given the number of training examples n. fn k_from_n(args: &Args) -> Box<dyn Fn(usize) -> usize> { if let Some(k) = args.flag_knn { Box::new(move |_| k) } else if args.cmd_nn_bound { Box::new(|_| 1) } else if args.cmd_log { Box::new(|n| next_odd(if n != 0 { (n as f64).ln().ceil() as usize } else { 1 })) } else if args.cmd_log10 { Box::new(|n| next_odd(if n != 0 { (n as f64).log10().ceil() as usize } else { 1 })) } else if args.cmd_frequentist { Box::new(move |_| 0) } else { panic!("this shouldn't happen"); } } /// Prints several security measures that can be derived from a Bayes risk /// estimate and Random guessing error. fn print_all_measures(bayes_risk_estimate: f64, random_guessing: f64) { println!("Multiplicative Leakage: {}", multiplicative_leakage(bayes_risk_estimate, random_guessing)); println!("Additive Leakage: {}", additive_leakage(bayes_risk_estimate, random_guessing)); println!("Bayes security measure: {}", bayes_security_measure(bayes_risk_estimate, random_guessing)); println!("Min-entropy Leakage: {}", min_entropy_leakage(bayes_risk_estimate, random_guessing)); } /// Estimates security measures with a forward strategy (i.e., with an /// increasing number of examples). fn run_forward_strategy<F>(mut estimator: Estimator<F>, compute_nn_bound: bool, nlabels: usize, mut convergence_checker: Option<ForwardChecker>, verbose: Option<String>, train_x: Array2<f64>, train_y: Array1<Label>) -> (f64, f64) where F: Fn(&ArrayView1<f64>, &ArrayView1<f64>) -> f64 + Send + Sync + Copy { // Init verbose log file. let mut logfile = if let Some(fname) = verbose { let mut logfile = File::create(&fname) .expect("couldn't open file for verbose logging"); writeln!(logfile, "n, error-count, estimate").expect("failed to write to verbose file"); Some(logfile) } else { None }; // We keep track both of the minimum and of the last estimate. let mut min_error = 1.0; let mut last_error = 1.0; for (n, (x, y)) in train_x.outer_iter().zip(train_y.iter()).enumerate() { // Compute error. last_error = match estimator.next(n, &x, *y) { Ok(error) => error, Err(_) => { // TODO: this error is specific to k-NN. If we add new // methods we may want to change this. panic!("Could not add more examples: maybe increase --max-k?"); }, }; // Compute NN bound by Cover and Hart if needed. if compute_nn_bound { last_error = nn_bound(last_error, nlabels); } if min_error > last_error { min_error = last_error; } if let Some(ref mut logfile) = logfile { writeln!(logfile, "{}, {}, {}", n, estimator.error_count(), last_error).expect("failed to write to verbose file"); } // Should we stop because of (delta, q)-convergence? if let Some(ref mut checker) = convergence_checker { checker.add_estimate(last_error); if checker.all_converged() { break; } } } (min_error, last_error) } fn main() { // Parse args from command line. let args: Args = Docopt::new(USAGE) .and_then(|d| d.version(Some(env!("CARGO_PKG_VERSION").to_string())) .deserialize()) .unwrap_or_else(|e| e.exit()); // Number of processes. if let Some(nprocs) = args.flag_nprocs { rayon::ThreadPoolBuilder::new() .num_threads(nprocs) .build_global() .unwrap(); } // Load data. let (mut train_x, train_y) = load_data::<f64>(&args.arg_train) .expect("[!] failed to load training data"); let (mut test_x, test_y) = load_data::<f64>(&args.arg_test) .expect("[!] failed to load test data"); // Remap labels so they are zero-based increasing numbers. let (train_y, mapping) = vectors_to_ids(train_y.view() .into_shape((train_y.len(), 1)) .unwrap(), None); let train_nlabels = mapping.len(); // Remap test labels according to the mapping used for training labels. let (test_y, mapping) = vectors_to_ids(test_y.view() .into_shape((test_y.len(), 1)) .unwrap(), Some(mapping)); // The test labels should all have appeared in the training data; // the reverse is not necessary. If new labels appear in test_y, // the mapping is extended, so we can assert that didn't happen // as follows. let nlabels = mapping.len(); // NOTE (6/11/18): this assertion could be removed with an optional // command line flag; indeed, to my understanding, this won't cause // problems to the estimation. However, for the time being I'll keep // it as it is, which is the "safest" option. assert_eq!(nlabels, train_nlabels, "Test data contains labels unseen in training data. Each test label should appear in the training data; the converse is not necessary"); // (delta, q)-convergence checker let convergence_checker = if args.flag_delta.is_none() && args.flag_qstop.is_none() { // By default, run all (i.e., don't stop for (delta, q)-convergence. None } else if let Some(delta) = args.flag_delta { let q = match args.flag_qstop { Some(q) => if q < train_x.len() { q } else { train_x.len()-1 }, None => (train_x.len() as f64 * 0.1) as usize, }; println!("will stop when (delta={}, q={})-converged", delta, q); Some(ForwardChecker::new(&vec![delta], q, !args.flag_absolute)) } else { panic!("--qstop should only be specified with --delta"); }; // Scale features. if train_x.cols() > 1 && args.flag_scale { println!("scaling features"); scale01(&mut train_x); scale01(&mut test_x); } let distance = match args.flag_distance.as_ref().map(String::as_ref) { Some("euclidean") => fbleau::estimates::euclidean_distance, Some("levenshtein") => fbleau::estimates::levenshtein_distance, Some(_) => fbleau::estimates::euclidean_distance, None => fbleau::estimates::euclidean_distance }; // Init estimator. let estimator = if args.cmd_frequentist { Estimator::Frequentist(FrequentistEstimator::new(nlabels, &test_x.view(), &test_y.view())) } else { // How k is computed w.r.t. n. let kn = k_from_n(&args); // max_k specifies the maximum number of neighbors to store // (excluding ties); a smaller max_k improves performances, but // its value should be sufficiently large to give correct // results once we've seen all the training data. let max_k = match args.flag_max_k { Some(max_k) => max_k, None => kn(train_x.rows()), }; Estimator::KNN(KNNEstimator::new(&test_x.view(), &test_y.view(), 1, max_k, distance), kn) }; let random_guessing = estimate_random_guessing(&test_y.view()); println!("Random guessing error: {}", random_guessing); println!("Estimating leakage measures..."); let (min_error, last_error) = run_forward_strategy(estimator, args.cmd_nn_bound, nlabels, convergence_checker, args.flag_verbose, train_x, train_y); println!(); println!("Final estimate: {}", last_error); print_all_measures(last_error, random_guessing); println!(); println!("Minimum estimate: {}", min_error); print_all_measures(min_error, random_guessing); }
// 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. //! Implementation of Generator thread and Generator trait. //! //! Generator thread accept a set of serializable arguments. use { crate::common_operations::create_target, crate::io_packet::IoPacketType, crate::issuer::{run_issuer, IssuerArgs}, crate::log::Stats, crate::operations::{OperationType, PipelineStages}, crate::sequential_io_generator::SequentialIoGenerator, crate::target::{AvailableTargets, TargetOps}, crate::verifier::{run_verifier, VerifierArgs}, failure::Error, log::debug, serde_derive::{Deserialize, Serialize}, std::{ clone::Clone, collections::HashMap, ops::Range, sync::{ mpsc::{channel, sync_channel, SyncSender}, Arc, Condvar, Mutex, }, thread::spawn, time::Instant, }, }; /// This structure provides a mechanism for issuer to block on commands from /// generator or from verifiers. When command_count drops to zero, issuer blocks /// on someone to wake them up. /// When generator or verifier insert a command in issuer's channel they signal /// the issuer to wake up. #[derive(Clone)] pub struct ActiveCommands { /// command_count indicates how many commands are in issuers queue. /// Mutex and condition variable protect and help to wait on the count. command_count: Arc<(Mutex<u64>, Condvar)>, } impl ActiveCommands { pub fn new() -> ActiveCommands { ActiveCommands { command_count: Arc::new((Mutex::new(0), Condvar::new())) } } /// Decrements number of active commands. Waits on the condition variable if /// command_count is zero. Returns true if command_count was zero and call /// was blocked. /// ``` /// let mut count = ActiveCommands::new(); /// /// Thread 1 /// command_count.remove(); /// cmd = receiver.try_recv(); /// assert_eq!(cmd.is_ok()); /// /// Thread 2 /// sender.send(cmd); /// command_count.insert(); /// ``` pub fn decrement(&mut self) -> bool { let (lock, cvar) = &*self.command_count; let mut count = lock.lock().unwrap(); let mut slept = false; while (*count) == 0 { slept = true; debug!("waiting to on command"); count = cvar.wait(count).unwrap(); } (*count) -= 1; slept } /// Increments command_count and notifies one waiter. pub fn increment(&mut self) { let &(ref lock, ref cvar) = &*self.command_count; let mut count = lock.lock().unwrap(); (*count) += 1; cvar.notify_one(); } /// Returns value of command_count. This returns a snap-shot in time value. /// By the time another action is performed based on previous value returned /// by count, the count may have changed. Currently, sender increments the /// count and reciever decrements it. pub fn count(&self) -> u64 { let &(ref lock, ref _cvar) = &*self.command_count; let count = lock.lock().unwrap(); *count } } /// Generating an IoPacket involves several variants like /// - data for the IO and it's checksum /// - data size /// - offset of the IO /// - several other (future) things like file name, directory path. /// When we want randomly generated IO to be repeatable, we need to generate /// a random number from a seed and based on that random number, we derive /// variants of the IO. A typical use of Generator would look something like /// ``` /// let generator: Generator = create_my_awesome_generator(); /// while (disks_death) { /// random_number = generator.generate_number(); /// io_range = generator.get_io_range(); /// io_type = generator.get_io_operation(); /// io_packet = create_io_packet(io_type, io_range); /// generator.fill_buffer(io_packet); /// } /// ``` pub trait Generator { /// Generates a new [random] number and return it's value. /// TODO(auradkar): "It is a bit confusing that the generator is both providing random numbers, /// operations, and buffers. Seems like it is operating at 3 different levels /// of abstraction... maybe split it into several different traits. " fn generate_number(&mut self) -> u64; /// Returns type of operation corresponding to the last generated [random] /// number fn get_io_operation(&self, allowed_ops: &Vec<OperationType>) -> OperationType; /// Returns Range (start and end] of IO operation. end - start gives the size /// of the IO fn get_io_range(&self) -> Range<u64>; /// Generates and fills the buf with data. fn fill_buffer(&self, buf: &mut Vec<u8>, sequence_number: u64, offset_range: Range<u64>); } /// GeneratorArgs contains only the fields that help generator make decisions /// needed for re-playability. This structure can be serialized and saved /// for possible later use. #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GeneratorArgs { /// magic_number helps to identify that the block was written /// by the app. magic_number: u64, /// process_id helps to differentiate this run from other runs process_id: u64, /// Human friendly name for this thread. name: String, /// Unique identifier for each generator. generator_unique_id: u64, /// Target block size. For some Targets, /// IO might fail if size of IO is not a multiple of /// block_size. This size is also used to watermark the /// block with block header block_size: u64, /// MTU per IO that Target can handle. /// 0 represents N/A for this Target max_io_size: u64, /// Hard alignment requirements without which IOs might fail align: bool, /// Seed that will be used to generate IOs in this thread seed: u64, /// Name of the target on which generator will perform IOs. target_name: String, /// target_range describes the portion of the Target /// the generator is allowed to work on. Other instances /// of Target may work on different ranges within the same /// Target. /// All generated IoPacket's offset and length should /// fall in this range target_range: Range<u64>, /// Target type. When there are multiple target types in the apps, this /// will help us search and load the right target operations. target_type: AvailableTargets, /// Types of the operations to perform on the target. operations: TargetOps, /// The maximum allowed number of outstanding IOs that are generated and /// are in Issuer queue. This number does not limit IOs that belong to verify /// operation. issuer_queue_depth: usize, /// The number of IOs that need to be issued before we gracefully tear-down /// generator thread. /// TODO(auradkar): Introduce time bound exit criteria. max_io_count: u64, /// When true, the target access (read/write) are sequential with respect to /// offsets within the target and within a thread. sequential: bool, } impl GeneratorArgs { pub fn new( magic_number: u64, process_id: u64, id: u64, block_size: u64, max_io_size: u64, align: bool, seed: u64, target_name: String, target_range: Range<u64>, target_type: AvailableTargets, operations: TargetOps, issuer_queue_depth: usize, max_io_count: u64, sequential: bool, ) -> GeneratorArgs { GeneratorArgs { name: format!("generator-{}", id), generator_unique_id: id, block_size, max_io_size, align, seed, target_name, target_range, target_type, operations, issuer_queue_depth, magic_number, process_id, max_io_count, sequential, } } } /// Based on the input args this returns a set of allowed operations that /// generator is allowed to issue. For now we only allow writes. fn pick_operation_type(args: &GeneratorArgs) -> Vec<OperationType> { let mut operations: Vec<OperationType> = vec![]; if args.operations.write { operations.push(OperationType::Write); } else { assert!(false); } return operations; } /// Based on the input args this returns a generator that can generate requested /// IO load.For now we only allow sequential io. fn pick_generator_type(args: &GeneratorArgs, target_id: u64) -> Box<dyn Generator> { if !args.sequential { panic!("Only sequential io generator is implemented at the moment"); } Box::new(SequentialIoGenerator::new( args.magic_number, args.process_id, target_id, args.generator_unique_id, args.target_range.clone(), args.block_size, args.max_io_size, args.align, )) } fn run_generator( args: &GeneratorArgs, to_issuer: &SyncSender<IoPacketType>, active_commands: &mut ActiveCommands, start_instant: Instant, io_map: Arc<Mutex<HashMap<u64, IoPacketType>>>, ) -> Result<(), Error> { // Generator specific target unique id. let target_id = 0; // IO sequence number. Order of IOs issued need not be same as order they arrive at // verifier and get logged. While replaying, this number helps us determine order // to issue IOs irrespective of the order they are read from replay log. let io_sequence_number = 0; // The generator's stage in lifetime of an IO let stage = PipelineStages::Generate; let mut gen = pick_generator_type(&args, target_id); let target = create_target( args.target_type, target_id, args.target_name.clone(), args.target_range.clone(), start_instant, ); // An array of allowed operations that helps generator to pick an operation // based on generated random number. let allowed_operations = pick_operation_type(&args); for io_sequence_number in 1..(args.max_io_count + 1) { if active_commands.count() == 0 { debug!("{} running slow.", args.name); } let io_seed = gen.generate_number(); let io_range = gen.get_io_range(); let op_type = gen.get_io_operation(&allowed_operations); let mut io_packet = target.create_io_packet(op_type, io_sequence_number, io_seed, io_range, target.clone()); io_packet.timestamp_stage_start(stage); let io_offset_range = io_packet.io_offset_range().clone(); gen.fill_buffer(io_packet.buffer_mut(), io_sequence_number, io_offset_range); { let mut map = io_map.lock().unwrap(); map.insert(io_sequence_number, io_packet.clone()); } io_packet.timestamp_stage_end(stage); to_issuer.send(io_packet).expect("error sending command"); active_commands.increment(); } let io_packet = target.create_io_packet(OperationType::Exit, io_sequence_number, 4, 0..1, target.clone()); to_issuer.send(io_packet).expect("error sending exit command"); active_commands.increment(); Ok(()) } /// Function that creates verifier and issuer thread. It build channels for them to communicate. /// This thread assumes the role of generator. pub fn run_load( args: GeneratorArgs, start_instant: Instant, stats: Arc<Mutex<Stats>>, ) -> Result<(), Error> { // Channel used to send commands from generator to issuer // This is the only bounded channel. The throttle control happens over this channel. // TODO(auradkar): Considering ActiveCommands and this channel are so tightly related, should // this channel be part of the ActiveCommand implementation? let (gi_to_issuer, gi_from_generator) = sync_channel(args.issuer_queue_depth); // Channel used to send commands from issuer to verifier let (iv_to_verifier, iv_from_issuer) = channel(); // Channel used to send commands from verifier to generator let (vi_to_issuer, vi_from_verifier) = channel(); // A hashmap of all outstanding IOs. Shared between generator and verifier. // Generator inserts entries and verifier removes it. let io_map = Arc::new(Mutex::new(HashMap::new())); // Mechanism to notify issuer of IOs. let mut active_commands = ActiveCommands::new(); // Thread handle to wait on for joining. let mut thread_handles = vec![]; // Create Issuer let issuer_args = IssuerArgs::new( format!("issues-{}", args.generator_unique_id), 0, gi_from_generator, iv_to_verifier, vi_from_verifier, active_commands.clone(), ); thread_handles.push(spawn(move || run_issuer(issuer_args))); // Create verifier let verifier_args = VerifierArgs::new( format!("verifier-{}", args.generator_unique_id), 0, iv_from_issuer, vi_to_issuer, false, io_map.clone(), stats.clone(), active_commands.clone(), ); thread_handles.push(spawn(move || run_verifier(verifier_args))); run_generator(&args, &gi_to_issuer, &mut active_commands, start_instant, io_map)?; for handle in thread_handles { handle.join().unwrap()?; } stats.lock().unwrap().stop_clock(); Ok(()) } #[cfg(test)] mod tests { use { crate::generator::ActiveCommands, std::thread::sleep, std::{thread, time}, }; #[test] fn active_command_test() { let mut command_count = ActiveCommands::new(); assert_eq!(command_count.count(), 0); command_count.increment(); assert_eq!(command_count.count(), 1); command_count.increment(); assert_eq!(command_count.count(), 2); assert_eq!(command_count.decrement(), false); assert_eq!(command_count.count(), 1); assert_eq!(command_count.decrement(), false); assert_eq!(command_count.count(), 0); } #[test] fn active_command_block_test() { let mut command_count = ActiveCommands::new(); assert_eq!(command_count.count(), 0); let mut command_count_copy = command_count.clone(); command_count.increment(); let thd = thread::spawn(move || { sleep(time::Duration::from_secs(1)); // First repay will wake the other threads sleeping borrower. command_count_copy.increment(); }); // On first call we dont block as the we find it immediately assert_eq!(command_count.decrement(), false); // On second call we block as the thread that is supposed to increment in // sleeping for a second. assert_eq!(command_count.decrement(), true); let _ = thd.join(); // command count should be zero now assert_eq!(command_count.count(), 0); } }
//! Renders static files in resource directory use std::path::Path; use actix_web::web::ServiceConfig; use crate::rest::AppState; pub fn register_servlets(config: &mut ServiceConfig, state: &AppState) { let res_dir = Path::new(&state.config.resource_dir); let static_dir = res_dir.join("static"); config.service(actix_files::Files::new("/static", static_dir)); }
// 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::panic::AssertUnwindSafe; use std::sync::Arc; use std::time::Duration; use std::time::Instant; use std::time::SystemTime; use common_base::base::tokio::sync::RwLock; use common_base::base::ProgressValues; use common_exception::ErrorCode; use common_exception::Result; use common_expression::DataBlock; use common_expression::DataSchemaRef; use common_sql::Planner; use futures::StreamExt; use futures_util::FutureExt; use serde::Deserialize; use serde::Serialize; use tracing::error; use tracing::info; use ExecuteState::*; use crate::interpreters::Interpreter; use crate::interpreters::InterpreterFactory; use crate::interpreters::InterpreterQueryLog; use crate::servers::http::v1::query::sized_spsc::SizedChannelSender; use crate::sessions::QueryAffect; use crate::sessions::QueryContext; use crate::sessions::Session; use crate::sessions::TableContext; #[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)] pub enum ExecuteStateKind { Running, Failed, Succeeded, } impl std::fmt::Display for ExecuteStateKind { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{:?}", self) } } #[derive(Clone, Serialize, Deserialize, Default, Debug)] pub struct Progresses { pub scan_progress: ProgressValues, pub write_progress: ProgressValues, pub result_progress: ProgressValues, } impl Progresses { fn from_context(ctx: &Arc<QueryContext>) -> Self { Progresses { scan_progress: ctx.get_scan_progress_value(), write_progress: ctx.get_write_progress_value(), result_progress: ctx.get_result_progress_value(), } } } pub enum ExecuteState { Starting(ExecuteStarting), Running(ExecuteRunning), Stopped(Box<ExecuteStopped>), } impl ExecuteState { pub(crate) fn extract(&self) -> (ExecuteStateKind, Option<ErrorCode>) { match self { Starting(_) | Running(_) => (ExecuteStateKind::Running, None), Stopped(v) => match &v.reason { Ok(_) => (ExecuteStateKind::Succeeded, None), Err(e) => (ExecuteStateKind::Failed, Some(e.clone())), }, } } } pub struct ExecuteStarting { pub(crate) ctx: Arc<QueryContext>, } pub struct ExecuteRunning { // used to kill query session: Arc<Session>, // mainly used to get progress for now ctx: Arc<QueryContext>, } pub struct ExecuteStopped { pub stats: Progresses, pub affect: Option<QueryAffect>, pub reason: Result<()>, pub stop_time: Instant, } pub struct Executor { pub query_id: String, pub start_time: Instant, pub state: ExecuteState, } impl Executor { pub fn get_progress(&self) -> Progresses { match &self.state { Starting(_) => Default::default(), Running(r) => Progresses::from_context(&r.ctx), Stopped(f) => f.stats.clone(), } } pub fn get_affect(&self) -> Option<QueryAffect> { match &self.state { Starting(_) => None, Running(r) => r.ctx.get_affect(), Stopped(r) => r.affect.clone(), } } pub fn elapsed(&self) -> Duration { match &self.state { Starting(_) | Running(_) => Instant::now() - self.start_time, Stopped(f) => f.stop_time - self.start_time, } } pub async fn start_to_running(this: &Arc<RwLock<Executor>>, state: ExecuteState) { let mut guard = this.write().await; if let Starting(_) = &guard.state { guard.state = state } } pub async fn start_to_stop(this: &Arc<RwLock<Executor>>, state: ExecuteState) { let mut guard = this.write().await; if let Starting(_) = &guard.state { guard.state = state } } pub async fn stop(this: &Arc<RwLock<Executor>>, reason: Result<()>, kill: bool) { { let guard = this.read().await; info!( "http query {}: change state to Stopped, reason {:?}", &guard.query_id, reason ); } let mut guard = this.write().await; match &guard.state { Starting(s) => { if let Err(e) = &reason { InterpreterQueryLog::log_finish(&s.ctx, SystemTime::now(), Some(e.clone())) .unwrap_or_else(|e| error!("fail to write query_log {:?}", e)); } guard.state = Stopped(Box::new(ExecuteStopped { stats: Default::default(), reason, stop_time: Instant::now(), affect: Default::default(), })) } Running(r) => { // release session if kill { if let Err(error) = &reason { r.session.force_kill_query(error.clone()); } else { r.session.force_kill_query(ErrorCode::AbortedQuery( "Aborted query, because the server is shutting down or the query was killed", )); } } guard.state = Stopped(Box::new(ExecuteStopped { stats: Progresses::from_context(&r.ctx), reason, stop_time: Instant::now(), affect: r.ctx.get_affect(), })) } Stopped(s) => { info!( "http query {}: already stopped, reason {:?}, new reason {:?}", &guard.query_id, s.reason, reason ); } } } } impl ExecuteState { pub(crate) async fn get_schema(sql: &str, ctx: Arc<QueryContext>) -> Result<DataSchemaRef> { let mut planner = Planner::new(ctx.clone()); let (plan, _) = planner.plan_sql(sql).await?; Ok(InterpreterFactory::get_schema(ctx, &plan)) } pub(crate) async fn try_start_query( executor: Arc<RwLock<Executor>>, sql: &str, session: Arc<Session>, ctx: Arc<QueryContext>, block_sender: SizedChannelSender<DataBlock>, ) -> Result<()> { let mut planner = Planner::new(ctx.clone()); let (plan, extras) = planner.plan_sql(sql).await?; ctx.attach_query_str(plan.to_string(), extras.stament.to_mask_sql()); let interpreter = InterpreterFactory::get(ctx.clone(), &plan).await?; let running_state = ExecuteRunning { session, ctx: ctx.clone(), }; info!("http query {}, change state to Running", &ctx.get_id()); Executor::start_to_running(&executor, Running(running_state)).await; let executor_clone = executor.clone(); let ctx_clone = ctx.clone(); let block_sender_closer = block_sender.closer(); let res = execute(interpreter, ctx_clone, block_sender, executor_clone.clone()); match AssertUnwindSafe(res).catch_unwind().await { Ok(Err(err)) => { Executor::stop(&executor_clone, Err(err), false).await; block_sender_closer.close(); } Err(_) => { Executor::stop( &executor_clone, Err(ErrorCode::PanicError("interpreter panic!")), false, ) .await; block_sender_closer.close(); } _ => {} } Ok(()) } } async fn execute( interpreter: Arc<dyn Interpreter>, ctx: Arc<QueryContext>, block_sender: SizedChannelSender<DataBlock>, executor: Arc<RwLock<Executor>>, ) -> Result<()> { let mut data_stream = interpreter.execute(ctx.clone()).await?; match data_stream.next().await { None => { let block = DataBlock::empty_with_schema(interpreter.schema()); block_sender.send(block, 0).await; Executor::stop(&executor, Ok(()), false).await; block_sender.close(); } Some(Err(err)) => { Executor::stop(&executor, Err(err), false).await; block_sender.close(); } Some(Ok(block)) => { let size = block.num_rows(); block_sender.send(block, size).await; while let Some(block_r) = data_stream.next().await { match block_r { Ok(block) => { block_sender.send(block.clone(), block.num_rows()).await; } Err(err) => { block_sender.close(); return Err(err); } }; } Executor::stop(&executor, Ok(()), false).await; block_sender.close(); } } Ok(()) }
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)] #[link(name = "windows")] extern "system" {} pub type FindAllAccountsResult = *mut ::core::ffi::c_void; #[repr(transparent)] pub struct FindAllWebAccountsStatus(pub i32); impl FindAllWebAccountsStatus { pub const Success: Self = Self(0i32); pub const NotAllowedByProvider: Self = Self(1i32); pub const NotSupportedByProvider: Self = Self(2i32); pub const ProviderError: Self = Self(3i32); } impl ::core::marker::Copy for FindAllWebAccountsStatus {} impl ::core::clone::Clone for FindAllWebAccountsStatus { fn clone(&self) -> Self { *self } } pub type WebAccountEventArgs = *mut ::core::ffi::c_void; pub type WebAccountMonitor = *mut ::core::ffi::c_void; pub type WebProviderError = *mut ::core::ffi::c_void; pub type WebTokenRequest = *mut ::core::ffi::c_void; #[repr(transparent)] pub struct WebTokenRequestPromptType(pub i32); impl WebTokenRequestPromptType { pub const Default: Self = Self(0i32); pub const ForceAuthentication: Self = Self(1i32); } impl ::core::marker::Copy for WebTokenRequestPromptType {} impl ::core::clone::Clone for WebTokenRequestPromptType { fn clone(&self) -> Self { *self } } pub type WebTokenRequestResult = *mut ::core::ffi::c_void; #[repr(transparent)] pub struct WebTokenRequestStatus(pub i32); impl WebTokenRequestStatus { pub const Success: Self = Self(0i32); pub const UserCancel: Self = Self(1i32); pub const AccountSwitch: Self = Self(2i32); pub const UserInteractionRequired: Self = Self(3i32); pub const AccountProviderNotAvailable: Self = Self(4i32); pub const ProviderError: Self = Self(5i32); } impl ::core::marker::Copy for WebTokenRequestStatus {} impl ::core::clone::Clone for WebTokenRequestStatus { fn clone(&self) -> Self { *self } } pub type WebTokenResponse = *mut ::core::ffi::c_void;
/* * This file is part of the uutils coreutils package. * * (c) Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use std::io::{Result, Error}; use ::libc; use uucore::c_types::{c_passwd, getpwuid}; extern { pub fn geteuid() -> libc::uid_t; } pub unsafe fn getusername() -> Result<String> { // Get effective user id let uid = geteuid(); // Try to find username for uid let passwd: *const c_passwd = getpwuid(uid); if passwd.is_null() { return Err(Error::last_os_error()) } // Extract username from passwd struct let pw_name: *const libc::c_char = (*passwd).pw_name; let username = String::from_utf8_lossy(::std::ffi::CStr::from_ptr(pw_name).to_bytes()).to_string(); Ok(username) }
use sdl2::GameControllerSubsystem; use sdl2::controller::Button; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::PixelFormatEnum; use std::time::{Duration, Instant}; use std::env; use anyhow::Result; use crate::gbc::Emu; pub const WIDTH: usize = 160; pub const HEIGHT: usize = 144; pub const DEPTH: usize = 3; pub const SIZE: usize = WIDTH * HEIGHT * DEPTH; #[derive(Debug, Clone, Copy)] pub enum GBKey { Up, Down, Left, Right, A, B, Start, Select, } pub enum Message { KeyUp(GBKey), KeyDown(GBKey), } pub struct Gui { context: sdl2::Sdl, gamepad_subsystem: GameControllerSubsystem, canvas: sdl2::render::Canvas<sdl2::video::Window>, emu: Emu, last_time: Instant, last_sleep: Duration, } impl Gui { pub fn new(emu: Emu) -> Result<Self> { sdl2::hint::set("SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR", "0"); let sdl_context = sdl2::init().map_err(|e|anyhow::anyhow!(e))?; let video_subsystem = sdl_context.video().map_err(|e|anyhow::anyhow!(e))?; let gamepad_subsystem = sdl_context.game_controller().map_err(|e|anyhow::anyhow!(e))?; if let Ok(p) = env::var("SDL_JOYSTICK_MAPPINGS") { gamepad_subsystem.load_mappings(&p)?; println!("Loaded mapping from {p}"); } let window = video_subsystem .window("yaGBemu", WIDTH as u32 * 4, HEIGHT as u32 * 4) .position_centered() .build()?; let mut canvas = window.into_canvas().build()?; canvas.clear(); canvas.present(); Ok(Gui { context: sdl_context, gamepad_subsystem, canvas, emu, last_time: Instant::now(), last_sleep: Duration::from_millis(0), }) } pub fn run(&mut self) { let mut event_pump = self.context.event_pump().unwrap(); let mut gamepads = vec![]; for which in 0..self.gamepad_subsystem.num_joysticks().unwrap() { if self.gamepad_subsystem.is_game_controller(which) { println!("Added gamepad {}", self.gamepad_subsystem.name_for_index(which).unwrap()); gamepads.push(self.gamepad_subsystem.open(which).unwrap()); } } let texture_creator = self.canvas.texture_creator(); let mut texture = texture_creator .create_texture_static(PixelFormatEnum::RGB24, WIDTH as u32, HEIGHT as u32) .expect("Could not allocate texture"); let mut render_target = Box::new([0u8; SIZE]); 'running: loop { let mut events = vec![]; for event in event_pump.poll_iter() { match event { Event::Quit { .. } | Event::KeyDown { keycode: Some(Keycode::Escape), .. } => break 'running, Event::KeyDown { keycode: Some(Keycode::Return), .. } => { events.push(Message::KeyDown(GBKey::Start)); } Event::KeyUp { keycode: Some(Keycode::Return), .. } => { events.push(Message::KeyUp(GBKey::Start)); } Event::KeyDown { keycode: Some(Keycode::Backspace), .. } => { events.push(Message::KeyDown(GBKey::Select)); } Event::KeyUp { keycode: Some(Keycode::Backspace), .. } => { events.push(Message::KeyUp(GBKey::Select)); } Event::KeyDown { keycode: Some(Keycode::Q), .. } => { events.push(Message::KeyDown(GBKey::B)); } Event::KeyUp { keycode: Some(Keycode::Q), .. } => { events.push(Message::KeyUp(GBKey::B)); } Event::KeyDown { keycode: Some(Keycode::S), .. } => { events.push(Message::KeyDown(GBKey::A)); } Event::KeyUp { keycode: Some(Keycode::S), .. } => { events.push(Message::KeyUp(GBKey::A)); } Event::KeyDown { keycode: Some(Keycode::Left), .. } => { events.push(Message::KeyDown(GBKey::Left)); } Event::KeyUp { keycode: Some(Keycode::Left), .. } => { events.push(Message::KeyUp(GBKey::Left)); } Event::KeyDown { keycode: Some(Keycode::Right), .. } => { events.push(Message::KeyDown(GBKey::Right)); } Event::KeyUp { keycode: Some(Keycode::Right), .. } => { events.push(Message::KeyUp(GBKey::Right)); } Event::KeyDown { keycode: Some(Keycode::Up), .. } => { events.push(Message::KeyDown(GBKey::Up)); } Event::KeyUp { keycode: Some(Keycode::Up), .. } => { events.push(Message::KeyUp(GBKey::Up)); } Event::KeyDown { keycode: Some(Keycode::Down), .. } => { events.push(Message::KeyDown(GBKey::Down)); } Event::KeyUp { keycode: Some(Keycode::Down), .. } => { events.push(Message::KeyUp(GBKey::Down)); } Event::ControllerButtonDown { button, .. } => { events.push( if let Some(gb_key) = controller_to_gb_key(&button) { Message::KeyDown(gb_key) } else { continue; } ) } Event::ControllerButtonUp { button, .. } => { events.push( if let Some(gb_key) = controller_to_gb_key(&button) { Message::KeyUp(gb_key) } else { continue; } ) } Event::ControllerDeviceAdded { which,.. } => { println!("Added gamepad {}", self.gamepad_subsystem.name_for_index(which).unwrap()); gamepads.push(self.gamepad_subsystem.open(which).unwrap()); } Event::ControllerDeviceRemoved { which,.. } => { if let Some(g) = gamepads.iter().find(|g|g.instance_id() == which) { println!("Disconnected gamepad {}", g.name()); gamepads.retain(|c|c.instance_id() != which); } } _ => {} } } // The rest of the game loop goes here... self.emu.get_next_frame(&events, &mut render_target); texture .update(None, &render_target[..], WIDTH * DEPTH) .expect("Could not update texture"); self.canvas .copy(&texture, None, None) .expect("Could not render texture"); self.canvas.present(); let last_time = self.last_time; self.last_time = Instant::now(); let elapsed = self.last_time.duration_since(last_time).as_micros(); let sleep = self.last_sleep.as_micros() as i128 + (16_666 - elapsed as i128); //println!("Fps: {}", 1e6 / elapsed as f64); if sleep > 0 { self.last_sleep = Duration::from_micros(sleep as u64); std::thread::sleep(self.last_sleep); } else { self.last_sleep = Duration::from_micros(0); std::thread::yield_now(); } } } } fn controller_to_gb_key(sdl_key: &Button) -> Option<GBKey> { match sdl_key { Button::A => Some(GBKey::A), Button::B => Some(GBKey::B), Button::Back => Some(GBKey::Select), Button::Start => Some(GBKey::Start), Button::DPadUp => Some(GBKey::Up), Button::DPadDown => Some(GBKey::Down), Button::DPadLeft => Some(GBKey::Left), Button::DPadRight => Some(GBKey::Right), _ => None } }
use crate::logger::logger::Error; use crate::parser::parser; use crate::parser::parser::Parser; use crate::typecheck::ast_typecheck; /// Typecheck object pub struct TypeCheckModule<'a> { pub parser: Parser<'a>, pub symtab: ast_typecheck::TypeCheckSymbTab<'a>, } impl<'a> TypeCheckModule<'a> { /// Return new module object. /// /// Arguments /// * `filename` - the filename of the file to read pub fn new(filename: &'a str, file_contents: &'a str) -> TypeCheckModule<'a> { let mut p = parser::Parser::new(filename, file_contents); p.initialize_expr(); TypeCheckModule { parser: p, symtab: ast_typecheck::TypeCheckSymbTab::new(), } } pub fn type_check(&mut self) -> Result<(), Vec<Error<'a>>> { self.parser.parse()?; let mut errors = Vec::new(); // Do type checking for node in &self.parser.ast.as_ref().unwrap().nodes { match (node as &dyn ast_typecheck::TypeCheck).type_check(None, &mut self.symtab) { Ok(_) => {} Err(e) => { errors.append(&mut e.as_vec()); } } } if !errors.is_empty() { // The different errors to have different priorities // We want to show the errors with the highest priority // Show all of the errors that have the the same priority let max_error_priority = errors.iter().max_by_key(|x| x.1 as usize).unwrap().1 as usize; let errors_priority = errors .into_iter() .filter(|error| error.1 as usize == max_error_priority) .map(|error| error.0) .collect(); Err(errors_priority) } else { Ok(()) } } }
use ws::{connect, CloseCode}; use std::rc::Rc; use std::cell::Cell; use serde_json::{Value}; use crate::base::misc::util::downcast_to_string; use crate::api::config::Config; use crate::api::order_books::data::{ RequestOrderBookCommand, RequestOrderBookResponse, OrderBookSideKick, OrderBookItem }; pub fn request<F>(config: Config, gets: OrderBookItem, pays: OrderBookItem, op: F) where F: Fn(Result<RequestOrderBookResponse, OrderBookSideKick>) { let info = Rc::new(Cell::new("".to_string())); let gets_rc = Rc::new(Cell::new(gets)); let pays_rc = Rc::new(Cell::new(pays)); connect(config.addr, |out| { let copy = info.clone(); let gets = gets_rc.clone(); let pays = pays_rc.clone(); if let Ok(command) = RequestOrderBookCommand::with_params(gets.take(), pays.take()).to_string() { out.send(command).unwrap(); } move |msg: ws::Message| { let c = msg.as_text()?; copy.set(c.to_string()); out.close(CloseCode::Normal) } }).unwrap(); let resp = downcast_to_string(info); if let Ok(x) = serde_json::from_str(&resp) as Result<Value, serde_json::error::Error> { if let Some(status) = x["status"].as_str() { if status == "success" { let x: String = x["result"].to_string(); if let Ok(v) = serde_json::from_str(&x) as Result<RequestOrderBookResponse, serde_json::error::Error> { op(Ok(v)) } } else { if let Ok(v) = serde_json::from_str(&x.to_string()) as Result<OrderBookSideKick, serde_json::error::Error> { op(Err(v)) } } } } }
use gifski::Collector; use crate::error::*; pub trait Source: Send { fn total_frames(&self) -> u64; fn collect(&mut self, dest: Collector) -> BinResult<()>; }
use serde::{Deserialize, Serialize}; use super::code::CodeData; use super::graph::Graphs; use super::{ArrangeId, Compact, CompactContext, Decompact, DecompactContext}; use crate::ast; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct ExternCode { ty: ast::ExternNodeType, data: CodeData, } impl Compact for crate::externs::ExternCode { type Output = ExternCode; fn compact(&self, ctx: &mut CompactContext) -> Self::Output { Self::Output { ty: self.ty, data: self.data.compact(ctx), } } } impl ArrangeId for ExternCode { fn arrange_id(&mut self, ids: &Graphs<u64>) { self.data.arrange_id(ids); } } impl Decompact for ExternCode { type Args = (); type Output = crate::externs::ExternCode; fn decompact(self, ctx: &mut DecompactContext, (): Self::Args) -> Self::Output { Self::Output { ty: self.ty, data: self.data.decompact(ctx, ()), } } }
use proptest::prelude::*; use normalize_newlines::normalize_newlines; #[test] fn test_normalize_newlines() { fn check(before: &str, after: &str, ok: bool) { let mut actual = before.to_string(); assert_eq!(normalize_newlines(&mut actual).is_ok(), ok); assert_eq!(actual.as_str(), after); } check("", "", true); check("\n", "\n", true); check("\r", "\r", false); check("\r\r", "\r\r", false); check("\r\n", "\n", true); check("hello world", "hello world", true); check("hello\nworld", "hello\nworld", true); check("hello\r\nworld", "hello\nworld", true); check("\r\nhello\r\nworld\r\n", "\nhello\nworld\n", true); check("\r\r\n", "\r\n", false); check("hello\rworld", "hello\rworld", false); } proptest! { #[test] fn doesnt_crash(s in "(\r\nabЫ)*") { let mut actual = s.to_string(); let _ = normalize_newlines(&mut actual); assert_eq!( s.replace("\r", "").replace("\r", "\n"), actual.replace("\r", "").replace("\r", "\n"), ); } }
#[cfg(feature = "parking_lot")] use parking_lot as sync; #[cfg(not(feature = "parking_lot"))] use std::sync; pub(crate) use sync::{RwLockReadGuard, RwLockWriteGuard}; #[cfg(feature = "parking_lot")] #[inline] fn wrap<T>(param: T) -> T { param } #[cfg(not(feature = "parking_lot"))] #[inline] fn wrap<T>(param: sync::LockResult<T>) -> T { param.unwrap_or_else(sync::PoisonError::into_inner) } /// `RwLock` from `parking_lot` and `std` have different APIs, so we use this /// simple wrapper to easily permit both. pub(crate) struct RwLock<T: ?Sized>(sync::RwLock<T>); impl<T> RwLock<T> { #[inline] pub fn new(inner: T) -> Self { Self(sync::RwLock::new(inner)) } #[inline] pub fn into_inner(self) -> T { wrap(self.0.into_inner()) } } impl<T: ?Sized> RwLock<T> { #[inline] pub fn read(&self) -> RwLockReadGuard<T> { wrap(self.0.read()) } #[inline] pub fn write(&self) -> RwLockWriteGuard<T> { wrap(self.0.write()) } #[inline] pub fn get_mut(&mut self) -> &mut T { wrap(self.0.get_mut()) } } #[cfg(feature = "hot-reloading")] pub(crate) struct Mutex<T: ?Sized>(sync::Mutex<T>); #[cfg(feature = "hot-reloading")] impl<T> Mutex<T> { #[inline] pub fn new(inner: T) -> Self { Self(sync::Mutex::new(inner)) } } #[cfg(feature = "hot-reloading")] impl<T: ?Sized> Mutex<T> { #[inline] pub fn lock(&self) -> sync::MutexGuard<T> { wrap(self.0.lock()) } #[inline] pub fn get_mut(&mut self) -> &mut T { wrap(self.0.get_mut()) } } use std::{ collections::HashMap as StdHashMap, fmt, ops::{Deref, DerefMut}, }; #[cfg(feature = "ahash")] use ahash::RandomState; #[cfg(not(feature = "ahash"))] use std::collections::hash_map::RandomState; pub(crate) struct HashMap<K, V>(StdHashMap<K, V, RandomState>); impl<K, V> HashMap<K, V> { #[inline] pub fn new() -> Self { Self(StdHashMap::with_hasher(RandomState::new())) } } impl<K, V> Deref for HashMap<K, V> { type Target = StdHashMap<K, V, RandomState>; #[inline] fn deref(&self) -> &Self::Target { &self.0 } } impl<K, V> DerefMut for HashMap<K, V> { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl<K, V> fmt::Debug for HashMap<K, V> where StdHashMap<K, V, RandomState>: fmt::Debug, { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(f) } }
#![allow(dead_code)] // TODO: lots of unused stuff use std::fs::File; use std::io; use std::io::{BufReader, BufWriter}; use std::path::{Path, PathBuf}; use std::cmp::{min,max}; use self::undo_stack::Operation::*; use self::undo_stack::UndoStack; use ropey::{Rope, RopeSlice, iter}; use string_utils::char_count; use utils::{is_grapheme_boundary, next_grapheme_boundary, prev_grapheme_boundary, RopeGraphemes}; mod undo_stack; // ============================================================= // Buffer // ============================================================= /// A text buffer pub struct Buffer { text: Rope, file_path: Option<PathBuf>, undo_stack: UndoStack, } impl Buffer { pub fn new() -> Buffer { Buffer { text: Rope::new(), file_path: None, undo_stack: UndoStack::new(), } } pub fn new_from_str(s: &str) -> Buffer { Buffer { text: Rope::from_str(s), file_path: None, undo_stack: UndoStack::new(), } } pub fn new_from_file(path: &Path) -> io::Result<Buffer> { let f = BufReader::new(File::open(path)?); let buf = Buffer { text: Rope::from_reader(f)?, file_path: Some(path.to_path_buf()), undo_stack: UndoStack::new(), }; return Ok(buf); } pub fn save_to_file(&self, path: &Path) -> io::Result<()> { // open file buffer, can fail let f = BufWriter::new(File::create(path)?); // Write the file back out to disk, can fail self.text.write_to(f)?; return Ok(()); } // ------------------------------------------------------------------------ // Functions for getting information about the buffer. // ------------------------------------------------------------------------ pub fn char_count(&self) -> usize { self.text.len_chars() } pub fn is_grapheme(&self, char_idx: usize) -> bool { is_grapheme_boundary(&self.text.slice(..), char_idx) } /// Finds the nth next grapheme boundary after the given char position. pub fn nth_next_grapheme(&self, char_idx: usize, n: usize) -> usize { let mut char_idx = char_idx; for _ in 0..n { char_idx = next_grapheme_boundary(&self.text.slice(..), char_idx); } char_idx } /// Finds the nth previous grapheme boundary before the given char position. pub fn nth_prev_grapheme(&self, char_idx: usize, n: usize) -> usize { let mut char_idx = char_idx; for _ in 0..n { char_idx = prev_grapheme_boundary(&self.text.slice(..), char_idx); } char_idx } pub fn line_count(&self) -> usize { self.text.len_lines() } // ------------------------------------------------------------------------ // Editing operations // ------------------------------------------------------------------------ /// Insert 'text' at grapheme position 'pos'. pub fn insert_text(&mut self, text: &str, pos: usize) { self.text.insert(pos, text); self.undo_stack.push(InsertText(text.to_string(), pos)); } /// Remove the text before grapheme position 'pos' of length 'len'. pub fn remove_text_before(&mut self, pos: usize, len: usize) { if pos >= len { let removed_text = self.text.slice((pos - len)..pos).to_string(); self.text.remove((pos - len)..pos); // Push operation to the undo stack self.undo_stack .push(RemoveTextBefore(removed_text, pos - len)); } else { panic!( "Buffer::remove_text_before(): attempt to remove text before beginning of \ buffer." ); } } /// Remove the text after grapheme position 'pos' of length 'len'. pub fn remove_text_after(&mut self, pos: usize, len: usize) { let removed_text = self.text.slice(pos..(pos + len)).to_string(); self.text.remove(pos..(pos + len)); // Push operation to the undo stack self.undo_stack.push(RemoveTextAfter(removed_text, pos)); } /// Moves the text in [pos_a, pos_b) to begin at index pos_to. /// /// Note that pos_to is the desired index that the text will start at /// _after_ the operation, not the index before the operation. This is a /// subtle but important distinction. pub fn move_text(&mut self, pos_a: usize, pos_b: usize, pos_to: usize) { self._move_text(pos_a, pos_b, pos_to); // Push operation to the undo stack self.undo_stack.push(MoveText(pos_a, pos_b, pos_to)); } fn _move_text(&mut self, pos_a: usize, pos_b: usize, pos_to: usize) { // Nothing to do if pos_a == pos_b || pos_a == pos_to { return; } // Bounds error else if pos_a > pos_b { panic!("Buffer::_move_text(): pos_a must be less than or equal to pos_b."); } // Bounds error else if pos_b > self.text.len_chars() { panic!("Buffer::_move_text(): specified text range is beyond end of buffer."); } // Bounds error else if pos_to > (self.text.len_chars() - (pos_b - pos_a)) { panic!("Buffer::_move_text(): specified text destination is beyond end of buffer."); } // Nothing to do, because entire text specified else if pos_a == 0 && pos_b == self.text.len_chars() { return; } // All other cases else { // TODO: a more efficient implementation that directly // manipulates the node tree. let s = self.text.slice(pos_a..pos_b).to_string(); self.text.remove(pos_a..pos_b); self.text.insert(pos_to, &s); } } /// Removes the lines in line indices [line_a, line_b). /// TODO: undo pub fn remove_lines(&mut self, line_a: usize, line_b: usize) { // Nothing to do if line_a == line_b { return; } // Bounds error else if line_a > line_b { panic!("Buffer::remove_lines(): line_a must be less than or equal to line_b."); } // Bounds error else if line_b > self.line_count() { panic!("Buffer::remove_lines(): attempt to remove lines past the last line of text."); } // All other cases else { let a = if line_a == 0 { 0 } else if line_a == self.text.len_lines() { self.text.len_chars() } else { self.text.line_to_char(line_a) - 1 }; let b = if line_b == 0 { 0 } else if line_b == self.text.len_lines() { self.text.len_chars() } else if line_a == 0 { self.text.line_to_char(line_b) } else { self.text.line_to_char(line_b) - 1 }; self.text.remove(a..b); } } // ------------------------------------------------------------------------ // Undo/redo functionality // ------------------------------------------------------------------------ /// Undoes operations that were pushed to the undo stack, and returns a /// cursor position that the cursor should jump to, if any. pub fn undo(&mut self) -> Option<usize> { if let Some(op) = self.undo_stack.prev() { match op { InsertText(ref s, p) => { let size = char_count(s); self.text.remove(p..(p + size)); return Some(p); } RemoveTextBefore(ref s, p) => { let size = char_count(s); self.text.insert(p, s); return Some(p + size); } RemoveTextAfter(ref s, p) => { self.text.insert(p, s); return Some(p); } MoveText(pa, pb, pto) => { let size = pb - pa; self._move_text(pto, pto + size, pa); return Some(pa); } _ => { return None; } } } return None; } /// Redoes the last undone operation, and returns a cursor position that /// the cursor should jump to, if any. pub fn redo(&mut self) -> Option<usize> { if let Some(op) = self.undo_stack.next() { match op { InsertText(ref s, p) => { let size = char_count(s); self.text.insert(p, s); return Some(p + size); } RemoveTextBefore(ref s, p) | RemoveTextAfter(ref s, p) => { let size = char_count(s); self.text.remove(p..(p + size)); return Some(p); } MoveText(pa, pb, pto) => { self._move_text(pa, pb, pto); return Some(pa); } _ => { return None; } } } return None; } // ------------------------------------------------------------------------ // Position conversions // ------------------------------------------------------------------------ /// Converts a char index into a line number and char-column number. /// i.e. char offset from start of line /// /// If the index is off the end of the text, returns the line and column /// number of the last valid text position. pub fn index_to_line_col(&self, pos: usize) -> (usize, usize) { if pos < self.text.len_chars() { // the line let line = self.text.char_to_line(pos); // Returns the char index of the start of the given line. let line_pos = self.text.line_to_char(line); // so the position on the line is the difference with the start of the line return (line, pos - line_pos); // line number, char-column number } else { // off the end, if for example "move to line" is too large let line = self.text.len_lines() - 1; // Returns the char index of the start of the given line. let line_pos = self.text.line_to_char(line); // return one-past-the-end for char offset return (line, self.text.len_chars() - line_pos); } } /// Converts a line number and char-column number into a char /// index. /// /// If the column number given is beyond the end of the line, returns the /// index of the line's last valid position. If the line number given is /// beyond the end of the buffer, returns the index of the buffer's last /// valid position. pub fn line_col_to_index(&self, pos: (usize, usize)) -> usize { // need to special case this or l_end-1 will underflow if self.text.len_chars() == 0 { return 0 } if pos.0 < self.text.len_lines() { // char_idx for start of line let l_start = self.text.line_to_char(pos.0); // char_idx for start of next line let l_end = self.text.line_to_char(pos.0 + 1); // back up by 1 to get to end of line, // if they are not the same (say at the end of text) let end_of_line = max(l_start,l_end-1); // overall character index is index of start of line, plus char-column number let char_idx = l_start + pos.1; // don't go beyond the end of this line return min(char_idx, end_of_line); } else { // is beyond the last line,, so return one beyond return self.text.len_chars(); } } // ------------------------------------------------------------------------ // Text reading functions // ------------------------------------------------------------------------ pub fn get_grapheme<'a>(&'a self, index: usize) -> RopeSlice<'a> { RopeGraphemes::new(&self.text.slice(index..)) .nth(0) .unwrap() } pub fn get_line<'a>(&'a self, index: usize) -> RopeSlice<'a> { self.text.line(index) } /// Creates a String from the buffer text in grapheme range [pos_a, posb). fn string_from_range(&self, pos_a: usize, pos_b: usize) -> String { self.text.slice(pos_a..pos_b).to_string() } // ------------------------------------------------------------------------ // Iterator creators // ------------------------------------------------------------------------ /// Creates an iterator at the first character pub fn grapheme_iter<'a>(&'a self) -> RopeGraphemes<'a> { RopeGraphemes::new(&self.text.slice(..)) } /// Creates an iterator starting at the specified grapheme index. /// If the index is past the end of the text, then the iterator will /// return None on next(). pub fn grapheme_iter_at_index<'a>(&'a self, index: usize) -> RopeGraphemes<'a> { let len = self.text.len_chars(); RopeGraphemes::new(&self.text.slice(index..len)) } pub fn line_iter<'a>(&'a self) -> iter::Lines<'a> { self.text.lines() } pub fn line_iter_at_index<'a>(&'a self, line_idx: usize) -> iter::Lines<'a> { let start = self.text.line_to_char(line_idx); self.text.slice(start..).lines() } } // ================================================================ // TESTS // ================================================================ #[cfg(test)] mod tests { #![allow(unused_imports)] use super::*; #[test] fn insert_text() { let mut buf = Buffer::new(); buf.insert_text("Hello 世界!", 0); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 9); assert!(buf.line_count() == 1); assert!("H" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!(" " == iter.next().unwrap()); assert!("世" == iter.next().unwrap()); assert!("界" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn insert_text_with_newlines() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 12); assert!(buf.line_count() == 3); assert!("H" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!(" " == iter.next().unwrap()); assert!("世" == iter.next().unwrap()); assert!("界" == iter.next().unwrap()); assert!("\r\n" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn insert_text_in_non_empty_buffer_1() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("Again ", 0); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 18); assert_eq!(buf.line_count(), 3); assert_eq!("A", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_2() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text(" again", 5); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 18); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_3() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("again", 6); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 17); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_4() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("again", 12); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 17); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_5() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("again", 2); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 17); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_6() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("again", 8); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 17); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn insert_text_in_non_empty_buffer_7() { let mut buf = Buffer::new(); buf.insert_text("Hello\n 世界\r\n!", 0); buf.insert_text("\nag\n\nain\n", 2); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 21); assert_eq!(buf.line_count(), 7); assert_eq!("H", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("g", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("a", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("n", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!(" ", iter.next().unwrap()); assert_eq!("世", iter.next().unwrap()); assert_eq!("界", iter.next().unwrap()); assert_eq!("\r\n", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn remove_text_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); buf.text.remove(0..3); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 26); assert!(buf.line_count() == 5); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); buf.text.remove(0..12); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 17); assert!(buf.line_count() == 4); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_3() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); buf.text.remove(5..17); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 17); assert!(buf.line_count() == 4); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_4() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); buf.text.remove(23..29); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 23); assert!(buf.line_count() == 6); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_5() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); buf.text.remove(17..29); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 17); assert!(buf.line_count() == 4); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_6() { let mut buf = Buffer::new(); buf.insert_text("Hello\nworld!", 0); assert!(buf.char_count() == 12); assert!(buf.line_count() == 2); buf.text.remove(3..12); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 3); assert!(buf.line_count() == 1); assert!("H" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_7() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\nworld!", 0); assert!(buf.char_count() == 15); assert!(buf.line_count() == 3); buf.text.remove(5..15); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 5); assert!(buf.line_count() == 2); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_8() { let mut buf = Buffer::new(); buf.insert_text("Hello\nworld!", 0); assert!(buf.char_count() == 12); assert!(buf.line_count() == 2); buf.text.remove(3..11); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 4); assert!(buf.line_count() == 1); assert!("H" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_9() { let mut buf = Buffer::new(); buf.insert_text("Hello\nworld!", 0); assert!(buf.char_count() == 12); assert!(buf.line_count() == 2); buf.text.remove(8..12); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 8); assert!(buf.line_count() == 2); assert!("H" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_10() { let mut buf = Buffer::new(); buf.insert_text("12\n34\n56\n78", 0); assert!(buf.char_count() == 11); assert!(buf.line_count() == 4); buf.text.remove(4..11); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 4); assert!(buf.line_count() == 2); assert!("1" == iter.next().unwrap()); assert!("2" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("3" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_text_11() { let mut buf = Buffer::new(); buf.insert_text("1234567890", 0); assert!(buf.char_count() == 10); assert!(buf.line_count() == 1); buf.text.remove(9..10); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 9); assert!(buf.line_count() == 1); assert!("1" == iter.next().unwrap()); assert!("2" == iter.next().unwrap()); assert!("3" == iter.next().unwrap()); assert!("4" == iter.next().unwrap()); assert!("5" == iter.next().unwrap()); assert!("6" == iter.next().unwrap()); assert!("7" == iter.next().unwrap()); assert!("8" == iter.next().unwrap()); assert!("9" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn move_text_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); buf.move_text(0, 3, 2); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn move_text_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); buf.move_text(3, 8, 6); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn move_text_3() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); buf.move_text(12, 17, 6); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn move_text_4() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); buf.move_text(23, 29, 20); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn move_text_5() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); buf.move_text(0, 29, 0); let mut iter = buf.grapheme_iter(); assert!(buf.char_count() == 29); assert!(buf.line_count() == 6); assert!("H" == iter.next().unwrap()); assert!("i" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("p" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn remove_lines_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert_eq!(buf.char_count(), 29); assert_eq!(buf.line_count(), 6); buf.remove_lines(0, 3); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 13); assert_eq!(buf.line_count(), 3); assert_eq!("o", iter.next().unwrap()); assert_eq!("f", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("t", iter.next().unwrap()); assert_eq!("h", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("w", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("r", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("d", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn remove_lines_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert_eq!(buf.char_count(), 29); assert_eq!(buf.line_count(), 6); buf.remove_lines(1, 4); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 13); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("t", iter.next().unwrap()); assert_eq!("h", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("w", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("r", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("d", iter.next().unwrap()); assert_eq!("!", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn remove_lines_3() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert_eq!(buf.char_count(), 29); assert_eq!(buf.line_count(), 6); // "Hi\nthere\npeople\nof\nthe\nworld!" buf.remove_lines(3, 6); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 15); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("t", iter.next().unwrap()); assert_eq!("h", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("r", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("p", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("p", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn remove_lines_4() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\n", 0); assert_eq!(buf.char_count(), 23); assert_eq!(buf.line_count(), 6); buf.remove_lines(3, 6); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 15); assert_eq!(buf.line_count(), 3); assert_eq!("H", iter.next().unwrap()); assert_eq!("i", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("t", iter.next().unwrap()); assert_eq!("h", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("r", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("\n", iter.next().unwrap()); assert_eq!("p", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!("o", iter.next().unwrap()); assert_eq!("p", iter.next().unwrap()); assert_eq!("l", iter.next().unwrap()); assert_eq!("e", iter.next().unwrap()); assert_eq!(None, iter.next()); } #[test] fn remove_lines_5() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert_eq!(buf.char_count(), 29); assert_eq!(buf.line_count(), 6); buf.remove_lines(0, 6); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 0); assert_eq!(buf.line_count(), 1); assert_eq!(None, iter.next()); } #[test] fn remove_lines_6() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\n", 0); assert_eq!(buf.char_count(), 23); assert_eq!(buf.line_count(), 6); buf.remove_lines(0, 6); let mut iter = buf.grapheme_iter(); assert_eq!(buf.char_count(), 0); assert_eq!(buf.line_count(), 1); assert_eq!(None, iter.next()); } #[test] fn line_col_to_index_1() { let mut buf = Buffer::new(); // index 0 1 2 // index 012 345678 9012345 678 9012 3456789 // line 0 1 2 3 4 5 // col 012 012345 0123456 012 0123 012345 buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); assert_eq!(buf.line_col_to_index((0, 0)), 0); assert_eq!(buf.line_col_to_index((0, 1)), 1); assert_eq!(buf.line_col_to_index((0, 2)), 2); // \n assert_eq!(buf.line_col_to_index((0, 3)), 2); // invalid col assert_eq!(buf.line_col_to_index((1, 0)), 3); assert_eq!(buf.line_col_to_index((1, 1)), 4); assert_eq!(buf.line_col_to_index((1, 2)), 5); assert_eq!(buf.line_col_to_index((1, 3)), 6); assert_eq!(buf.line_col_to_index((1, 4)), 7); assert_eq!(buf.line_col_to_index((1, 5)), 8); // \n assert_eq!(buf.line_col_to_index((1, 6)), 8); // invalid col assert_eq!(buf.line_col_to_index((2, 0)), 9); assert_eq!(buf.line_col_to_index((2, 1)), 10); assert_eq!(buf.line_col_to_index((2, 2)), 11); assert_eq!(buf.line_col_to_index((2, 3)), 12); assert_eq!(buf.line_col_to_index((2, 4)), 13); assert_eq!(buf.line_col_to_index((2, 5)), 14); assert_eq!(buf.line_col_to_index((2, 6)), 15); // \n assert_eq!(buf.line_col_to_index((2, 7)), 15); // invalid col assert_eq!(buf.line_col_to_index((2, 10)), 15); // invalid col assert_eq!(buf.line_col_to_index((3, 0)), 16); assert_eq!(buf.line_col_to_index((3, 1)), 17); assert_eq!(buf.line_col_to_index((3, 2)), 18); // \n assert_eq!(buf.line_col_to_index((3, 3)), 18); // invalid col assert_eq!(buf.line_col_to_index((4, 0)), 19); assert_eq!(buf.line_col_to_index((4, 1)), 20); assert_eq!(buf.line_col_to_index((4, 2)), 21); assert_eq!(buf.line_col_to_index((4, 3)), 22); // \n assert_eq!(buf.line_col_to_index((4, 4)), 22); // invalid col assert_eq!(buf.line_col_to_index((5, 0)), 23); // w assert_eq!(buf.line_col_to_index((5, 1)), 24); // o assert_eq!(buf.line_col_to_index((5, 2)), 25); // r assert_eq!(buf.line_col_to_index((5, 3)), 26); // l assert_eq!(buf.line_col_to_index((5, 4)), 27); // d assert_eq!(buf.line_col_to_index((5, 5)), 28); // ! assert_eq!(buf.line_col_to_index((5, 6)), 28); // invalid line assert_eq!(buf.line_col_to_index((5, 7)), 28); // also // this is last valid index, which is 28 since // there is no /n assert_eq!(buf.line_col_to_index((10, 2)), 29); // invalid line } // add a \n at the end #[test] fn line_col_to_index_2() { let mut buf = Buffer::new(); // remember there is an off the end line when doc ends in \n // index 0 1 2 3 // index 012 345678 9012345 678 9012 34567890 // line 0 1 2 3 4 5 6 // col 012 012345 0123456 012 0123 0123456 0 buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!\n", 0); assert!(buf.char_count() == 30); assert_eq!(buf.line_col_to_index((5, 0)), 23); // w assert_eq!(buf.line_col_to_index((5, 1)), 24); // o assert_eq!(buf.line_col_to_index((5, 2)), 25); // r assert_eq!(buf.line_col_to_index((5, 3)), 26); // l assert_eq!(buf.line_col_to_index((5, 4)), 27); // d assert_eq!(buf.line_col_to_index((5, 5)), 28); // ! assert_eq!(buf.line_col_to_index((5, 6)), 29); // \n assert_eq!(buf.line_col_to_index((5, 7)), 29); // clips to end of line assert_eq!(buf.line_col_to_index((6, 0)), 30); // extra one beyond line assert_eq!(buf.line_col_to_index((6, 1)), 30); // clips to final character // this is last valid index, which is 28 since // there is no /n assert_eq!(buf.line_col_to_index((10, 2)), 30); // invalid line } #[test] fn line_col_to_index_3() { // try on empty buffer let buf = Buffer::new(); // should always be 0 assert_eq!(buf.line_col_to_index((0, 0)), 0); assert_eq!(buf.line_col_to_index((5, 0)), 0); assert_eq!(buf.line_col_to_index((5, 1)), 0); assert_eq!(buf.line_col_to_index((10, 10)), 0); } #[test] fn line_col_to_index_4() { let mut buf = Buffer::new(); // 01234 5012345 6 // 012345 67890 buf.insert_text("Hello\nworld!\n", 0); // is 13 characters println!("len_chars:{}",buf.char_count()); assert_eq!(buf.line_col_to_index((0, 0)), 0); assert_eq!(buf.line_col_to_index((0, 1)), 1); assert_eq!(buf.line_col_to_index((0, 2)), 2); assert_eq!(buf.line_col_to_index((0, 3)), 3); assert_eq!(buf.line_col_to_index((0, 4)), 4); assert_eq!(buf.line_col_to_index((0, 5)), 5); // last col in row 0 assert_eq!(buf.line_col_to_index((0, 6)), 5); // invalid col in that row, return last assert_eq!(buf.line_col_to_index((0, 7)), 5); // invalid col in that row, return last assert_eq!(buf.line_col_to_index((1, 0)), 6); assert_eq!(buf.line_col_to_index((1, 1)), 7); assert_eq!(buf.line_col_to_index((1, 2)), 8); assert_eq!(buf.line_col_to_index((1, 3)), 9); assert_eq!(buf.line_col_to_index((1, 4)), 10); assert_eq!(buf.line_col_to_index((1, 5)), 11); assert_eq!(buf.line_col_to_index((1, 6)), 12); // last col in row 1 assert_eq!(buf.line_col_to_index((1, 7)), 12); // invalid col in that row, return last assert_eq!(buf.line_col_to_index((1, 100)), 12); // way beyond end of row 1 assert_eq!(buf.line_col_to_index((2, 0)), 13); assert_eq!(buf.line_col_to_index((2, 1)), 13); } #[test] fn index_to_line_col_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let pos = buf.index_to_line_col(5); assert!(pos == (1, 2)); } #[test] fn index_to_line_col_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let pos = buf.index_to_line_col(50); assert_eq!(pos, (5, 6)); } #[test] fn index_to_line_col_3() { let mut buf = Buffer::new(); buf.insert_text("Hello\nworld!\n", 0); assert_eq!(buf.index_to_line_col(0), (0, 0)); assert_eq!(buf.index_to_line_col(5), (0, 5)); assert_eq!(buf.index_to_line_col(6), (1, 0)); assert_eq!(buf.index_to_line_col(12), (1, 6)); assert_eq!(buf.index_to_line_col(13), (2, 0)); assert_eq!(buf.index_to_line_col(14), (2, 0)); } #[test] fn string_from_range_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let s = buf.string_from_range(1, 12); assert!(&s[..] == "i\nthere\npeo"); } #[test] fn string_from_range_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let s = buf.string_from_range(0, 29); assert!(&s[..] == "Hi\nthere\npeople\nof\nthe\nworld!"); } #[test] fn grapheme_iter_at_index_1() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let mut iter = buf.grapheme_iter_at_index(16); assert!("o" == iter.next().unwrap()); assert!("f" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("t" == iter.next().unwrap()); assert!("h" == iter.next().unwrap()); assert!("e" == iter.next().unwrap()); assert!("\n" == iter.next().unwrap()); assert!("w" == iter.next().unwrap()); assert!("o" == iter.next().unwrap()); assert!("r" == iter.next().unwrap()); assert!("l" == iter.next().unwrap()); assert!("d" == iter.next().unwrap()); assert!("!" == iter.next().unwrap()); assert!(None == iter.next()); } #[test] fn grapheme_iter_at_index_2() { let mut buf = Buffer::new(); buf.insert_text("Hi\nthere\npeople\nof\nthe\nworld!", 0); let mut iter = buf.grapheme_iter_at_index(29); assert!(None == iter.next()); } }
//! # Compile-Time Compiler That Compiles Forth to Trait Expressions //! //! "We all know Rust's trait system is Turing complete, so tell me, why aren't we exploiting //! this???" - [Nathan Corbyn](https://github.com/doctorn/trait-eval) //! //!``` //! #![recursion_limit = "256"] //! #[macro_use] extern crate fortraith; //! use fortraith::*; //! //! forth!( //! : factorial (n -- n) 1 swap fact0 ; //! : fact0 (n n -- n) dup 1 = if drop else dup rot * swap pred fact0 then ; //! 5 factorial //! return type Out as top //! ); //! assert_eq!(Out::eval(), 120); //!``` //! This crate allows the user to exploit traits as much as wanted. It contains around 10% black //! trait magic, around 40% of the darkest kind of evil macro magic and around 50% of good quality //! docs (you are here!). Everything is tested and ready for production (a joke). //! //! Although you might not want to really use it in production it serves to show how powerful //! Rust's trait system and `macro_rules!` really are. //! //! If you are new to forth, it is a simple stack-based language. Every operation is done on the //! stack and grabs and pushes values into it. For example `2 2 +` would push `2` to the top of the //! stack 2 times, take and add them together and push the result back to the stack (So the stack //! would have only `4` in it if it was empty before pushing the first `2`). Its simplicity makes //! it a usual target for recreational implementation. //! //! See documentation for traits and the macro to see many examples and learn how to use fortraith, //! and abuse the Rust's trait system! //! //! "Ok, ok, all that's fine, but where is my FizzBuzz implementation?" you might ask. Fear not, as //! tradition dictates [FizzBuzz is implemented in fortraith as well](trait.iff.html). #![allow(non_camel_case_types)] use std::marker::PhantomData; use trait_eval::*; pub use trait_eval::Eval; #[doc(hidden)] pub struct Empty {} #[doc(hidden)] pub struct Node<V, N> { _val: PhantomData<V>, _next: PhantomData<N>, } #[doc(hidden)] pub struct Stop<N> { _next: PhantomData<N>, } macro_rules! pub_trait { ($($(#[$meta:meta])* $name:ident),*) => { $( $(#[$meta])* pub trait $name { type Result; } )* } } pub_trait!( /// Remove the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 1 2 drop /// return type Out as top /// ); /// assert_eq!(Out::eval(), 1); /// ``` drop, /// Duplicate the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 2 dup + /// return type Out as top /// ); /// assert_eq!(Out::eval(), 4); /// ``` dup, /// Swap two top elements /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 1 2 swap - /// return type Out as top /// ); /// assert_eq!(Out::eval(), 1); /// ``` swap, /// Rotate three top elements /// # Examples /// Rotates 1 2 3 -> 2 3 1 -> 3 1 2 /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 1 2 3 rot rot /// return type Out as top /// ); /// assert_eq!(Out::eval(), 2); /// ``` rot, /// Get the top element /// # Examples /// WARNING! This effectively discards the stack, so it should only be used with the `return` /// statement /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 10 /// return type Out1 as top /// 1 + top /// return type Out2 /// ); /// type Out3 = forth!(9 top return); /// assert_eq!(Out1::eval(), 10); /// assert_eq!(Out2::eval(), 11); /// assert_eq!(Out3::eval(), 9); /// ``` top, /// ( if / else / then ) conditional expression /// /// ifs can be nested and can be used both inside and outside of a function. `else` clause is /// optional /// # Examples /// Return 9 if 10 is less than 1, else return 9 /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 10 1 < if 5 else 9 then /// return type Out as top /// ); /// assert_eq!(Out::eval(), 9); /// ``` /// FizzBuzz (of course), there are no strings or chars in fortraith so Fizz = true, Buzz = /// false and FizzBuzz = 0 /// ``` /// # #![recursion_limit="256"] /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// : FizzBuzz /// dup 3 % 0 = if /// 5 % 0 = if /// 0 (FizzBuzz) /// else /// true (Fizz) /// then /// else /// dup 5 % 0 = if /// drop false (Buzz) /// then /// then ; /// 1 FizzBuzz return type Out1 as top /// 2 FizzBuzz return type Out2 as top /// 3 FizzBuzz return type Out3 as top /// 4 FizzBuzz return type Out4 as top /// 5 FizzBuzz return type Out5 as top /// 10 5 + FizzBuzz return type Out15 as top /// ); /// assert_eq!(Out1::eval(), 1); /// assert_eq!(Out2::eval(), 2); /// assert_eq!(Out3::eval(), true); /// assert_eq!(Out4::eval(), 4); /// assert_eq!(Out5::eval(), false); /// assert_eq!(Out15::eval(), 0); /// ``` iff, #[doc(hidden)] elsef, #[doc(hidden)] then, /// Apply logical not to the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// true not /// return type Out as top /// ); /// assert_eq!(Out::eval(), false); /// ``` not, /// Decrement the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 8 pred pred /// return type Out as top /// ); /// assert_eq!(Out::eval(), 6); /// ``` pred, /// Index the fibonacci sequence with the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 8 fib /// return type Out as top /// ); /// assert_eq!(Out::eval(), 21); /// ``` fib, /// Calculate the factorial of the top element /// /// Yeah you don't have to write the factorial word by yourself, it's builtin thanks to /// trait_eval! /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 4 fact /// return type Out as top /// ); /// assert_eq!(Out::eval(), 24); /// ``` fact, /// ( + ) Add two top elements together /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 9 3 2 + + /// return type Out as top /// ); /// assert_eq!(Out::eval(), 14); /// ``` plus, /// ( - ) Subtract the top element from the second top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 7 5 - /// return type Out as top /// ); /// assert_eq!(Out::eval(), 2); /// ``` minus, /// ( % ) Calculate the rest from dividing the second top element by the top element /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 7 4 % /// return type Out as top /// ); /// assert_eq!(Out::eval(), 3); /// ``` modulo, /// ( * ) Multiply two top elements /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 7 4 * /// return type Out as top /// ); /// assert_eq!(Out::eval(), 28); /// ``` mult, /// ( = ) Check if two top elements are equal /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 1 2 + 3 = /// return type Out as top /// ); /// assert_eq!(Out::eval(), true); /// ``` eq, /// ( < ) Check if the second top element is less than the top elements /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 10 3 < /// return type Out as top /// ); /// assert_eq!(Out::eval(), false); /// ``` less, /// Logical and two top elements /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// true false and /// return type Out as top /// ); /// assert_eq!(Out::eval(), false); /// ``` and, /// Logical or two top elements /// # Examples /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// true false or /// return type Out as top /// ); /// assert_eq!(Out::eval(), true); /// ``` or, /// ( 0 ) Constant number zero, /// ( 1 ) Constant number one, /// ( 2 ) Constant number two, /// ( 3 ) Constant number three, /// ( 4 ) Constant number four, /// ( 5 ) Constant number five, /// ( 6 ) Constant number six, /// ( 7 ) Constant number seven, /// ( 8 ) Constant number eight, /// ( 9 ) Constant number nine, /// ( 10 ) Constant number ten, /// ( true ) Constant boolean truef, /// ( false ) Constant boolean falsef ); macro_rules! stack_op { (1, $name:ident, $op:ident, $type:ident) => { impl<V, N> $name for Node<V, N> where V: $op + $type, { type Result = Node<V::Result, N>; } }; (2, $name:ident, $op:ident, $type:ident) => { impl<V, N> $name for Node<V, N> where N: drop + top, V: $type, <N as top>::Result: $type + $op<V>, { type Result = Node<<<N as top>::Result as $op<V>>::Result, <N as drop>::Result>; } }; } stack_op!(1, not, Not, Bool); stack_op!(1, pred, Pred, Nat); stack_op!(1, fib, Fib, Nat); stack_op!(1, fact, Fact, Nat); stack_op!(2, plus, Plus, Nat); stack_op!(2, minus, Minus, Nat); stack_op!(2, modulo, Mod, Nat); stack_op!(2, mult, Times, Nat); stack_op!(2, eq, Equals, Nat); stack_op!(2, less, LessThan, Nat); stack_op!(2, and, AndAlso, Bool); stack_op!(2, or, OrElse, Bool); macro_rules! constant { ($name:ident, $con:ty) => { impl<V, N> $name for Node<V, N> { type Result = Node<$con, Self>; } impl $name for Empty { type Result = Node<$con, Self>; } }; } constant!(zero, Zero); constant!(one, One); constant!(two, Two); constant!(three, Three); constant!(four, Four); constant!(five, Five); constant!(six, Six); constant!(seven, Seven); constant!(eight, Eight); constant!(nine, Nine); constant!(ten, Ten); constant!(truef, True); constant!(falsef, False); impl<V, N> drop for Node<V, N> { type Result = N; } impl<V, N> dup for Node<V, N> { type Result = Node<V, Self>; } impl<V, N> swap for Node<V, N> where N: top + drop, { type Result = Node<<N as top>::Result, Node<V, <N as drop>::Result>>; } impl<V, N> rot for Node<V, N> where N: top + drop, <N as drop>::Result: top + drop, { type Result = Node< <<N as drop>::Result as top>::Result, Node<V, Node<<N as top>::Result, <<N as drop>::Result as drop>::Result>>, >; } impl<V, N> top for Node<V, N> { type Result = V; } impl<N> iff for Node<True, N> { type Result = N; } impl<N> iff for Node<False, N> { type Result = Stop<N>; } impl<N> iff for Stop<N> { type Result = Stop<Self>; } impl<V, N> elsef for Node<V, N> { type Result = Stop<Self>; } impl<N> elsef for Stop<Stop<N>> { type Result = Self; } impl<V, N> elsef for Stop<Node<V, N>> { type Result = Node<V, N>; } impl elsef for Stop<Empty> { type Result = Empty; } impl<V, N> then for Node<V, N> { type Result = Self; } impl then for Empty { type Result = Self; } impl<N> then for Stop<N> { type Result = N; } macro_rules! impl_for_stop { ($($trait:ident),*) => { $( impl<N> $trait for Stop<N> { type Result = Self; } )* }; } impl_for_stop!( top, drop, dup, plus, minus, modulo, mult, eq, less, and, or, zero, one, two, three, four, five, six, seven, eight, nine, ten, truef, falsef, swap, rot, not, pred, fact, fib ); /// Compile forth to trait expressions /// /// Every trait from this crate serves as a word than can be used in the forth program. /// Macro substitutes common names (`+ - * % < = if else true false`, numbers from `1` to `10`) for /// corresponding traits to make it easier. Everything inside parentheses `( )` is treated as comments /// and ignored by the macro. /// /// Additionally the macro provides a few special expressions (note that these cannot be used inside /// a new word definition): /// - `.` which is equivalent to `drop` but it inserts a `println` statement /// with the dropped value for convenience. You could call this cheating, but there is no way to /// print types at compile time known to me. /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// 10 . /// ); /// // prints "10" /// ``` /// - `: $name $($cmds)* ;` which defines a new word (trait) named `$name` that executes commands /// given after the name /// ``` /// # #[macro_use] extern crate fortraith; /// # use fortraith::*; /// forth!( /// : booltonum if 0 else 1 then ; /// true booltonum /// false booltonum /// + /// return type Out as top /// ); /// assert_eq!(Out::eval(), 1); /// ``` /// - `return` which can be used in 3 different ways: /// - `return` at the end of the program returns the current stack (This can only be used if /// `.`, `:;`, or another `return` are not used in the program) /// - `return type $name` anywhere inside the program saves the stack to a type alias `$name` /// - `return type $name as $cmd` anywhere inside the program saves the stack after executing /// `$cmd` on the stack to type alias `$name`, but without modifying the actual stack in the /// program. /// See [top](trait.top.html) for examples #[macro_export] macro_rules! forth { ({ $EX:ty }) => { }; ({ $EX:ty } return) => { $EX }; ({ $EX:ty } return type $name:ident as $tok:tt $($token:tt)*) => { type $name = <$EX as $tok>::Result; forth!({ $EX } $($token)*) }; ({ $EX:ty } return type $name:ident $($token:tt)*) => { type $name = $EX; forth!({ $EX } $($token)*) }; ({ $EX:ty } . $($token:tt)*) => { println!("{}", <$EX as top>::Result::eval()); forth!({ <$EX as drop>::Result } $($token)*) }; ({ $EX:ty } : $name:ident $tok:tt $($token:tt)*) => { forth!(@compile { $EX } $name {()} ($tok) $($token)*) }; ({ $EX:ty } $tok:tt $($token:tt)*) => { forth!({ <$EX as $tok>::Result } $($token)*) }; (@compile { $EX:ty } $name:ident {$(($($cmdl:tt)*))*} ($($cmdr:tt)*) ; $($tbd:tt)*) => { pub trait $name { type Result; } impl<N> $name for Stop<N> { type Result = Self; } impl<V, N> $name for Node<V, N> where $( forth!({Self} $($cmdl)* return): $cmdr ),* { type Result = forth!({ Self } $($cmdr)* return); } forth!({ $EX } $($tbd)*) }; (@compile { $EX:ty } $name:ident {$(($($cmdl:tt)*))*} ($($cmdr:tt)*) $new:tt $($tbd:tt)*) => { forth!(@compile { $EX } $name {$(($($cmdl)*))* ($($cmdr)*)} ($($cmdr)* $new) $($tbd)*) }; (@subs ($($subst:tt)*) {$EX:ty}) => { forth!({$EX} $($subst)*) }; (@subs ($($subst:tt)*) {$EX:ty} ($($comment:tt)*) $($token:tt)*) => { forth!(@subs ($($subst)*) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} + $($token:tt)*) => { forth!(@subs ($($subst)* plus) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} - $($token:tt)*) => { forth!(@subs ($($subst)* minus) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} * $($token:tt)*) => { forth!(@subs ($($subst)* mult) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} % $($token:tt)*) => { forth!(@subs ($($subst)* modulo) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} = $($token:tt)*) => { forth!(@subs ($($subst)* eq) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} < $($token:tt)*) => { forth!(@subs ($($subst)* less) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} if $($token:tt)*) => { forth!(@subs ($($subst)* iff) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} else $($token:tt)*) => { forth!(@subs ($($subst)* elsef) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 0 $($token:tt)*) => { forth!(@subs ($($subst)* zero) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 1 $($token:tt)*) => { forth!(@subs ($($subst)* one) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 2 $($token:tt)*) => { forth!(@subs ($($subst)* two) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 3 $($token:tt)*) => { forth!(@subs ($($subst)* three) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 4 $($token:tt)*) => { forth!(@subs ($($subst)* four) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 5 $($token:tt)*) => { forth!(@subs ($($subst)* five) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 6 $($token:tt)*) => { forth!(@subs ($($subst)* six) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 7 $($token:tt)*) => { forth!(@subs ($($subst)* seven) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 8 $($token:tt)*) => { forth!(@subs ($($subst)* eight) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 9 $($token:tt)*) => { forth!(@subs ($($subst)* nine) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} 10 $($token:tt)*) => { forth!(@subs ($($subst)* ten) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} true $($token:tt)*) => { forth!(@subs ($($subst)* truef) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} false $($token:tt)*) => { forth!(@subs ($($subst)* falsef) {$EX} $($token)*) }; (@subs ($($subst:tt)*) {$EX:ty} $tok:tt $($token:tt)*) => { forth!(@subs ($($subst)* $tok) {$EX} $($token)*) }; ($($token:tt)*) => { forth!(@subs () { Empty } $($token)*) }; }
use crate::ir::{self, Adaptable}; use indexmap::IndexMap; use serde::Serialize; use std; use std::borrow::Borrow; use std::fmt; use utils::*; /// Generic trait for sets. pub trait SetRef<'a> { /// Returns the set definition. fn def(&self) -> &'a SetDef; /// Returns the argument of the set, if any. fn arg(&self) -> Option<ir::Variable>; /// A constraint on the variables to iterate on, issued from a set reversal. fn reverse_constraint(&self) -> Option<ir::SetRefImpl<'a>>; /// Returns the same set but without reverse constraints. fn without_reverse_constraints(&self) -> ir::SetRefImpl<'a> { SetRefImpl { reverse_constraint: None, ..self.as_ref() } } /// Returns the direct superset of this set, if any. fn superset(&self) -> Option<SetRefImpl<'a>> { self.def() .superset .as_ref() .map(|&Set { ref def, var, .. }| { let var = var.map(|v| { assert_eq!(v, ir::Variable::Arg(0)); self.arg().unwrap() }); SetRefImpl { def, var, reverse_constraint: None, } }) } /// Returns the path of sets to access a super-set. fn path_to_superset(&self, superset: &dyn SetRef) -> Vec<SetRefImpl<'a>> { let mut out = Vec::new(); let mut current = self.as_ref(); while current != superset.as_ref() { out.push(current.clone()); if let Some(superset) = current.superset() { current = superset; } else { return vec![]; } } out } /// Indicates if the first set is a sub-set of the second. fn is_subset_of(&self, other: &Set) -> bool { let is_subset = self.as_ref() == other.as_ref() || self .superset() .map(|s| s.is_subset_of(other)) .unwrap_or(false) || self .reverse_constraint() .map_or(false, |s| s.is_subset_of(other)); is_subset && other.reverse_constraint.is_none() } /// Returns the `SetRefImpl` corresponding to this set. fn as_ref(&self) -> SetRefImpl<'a> { let reverse_constraint = self.reverse_constraint().map(Box::new); SetRefImpl { def: self.def(), var: self.arg(), reverse_constraint, } } } /// References a set of objects. #[derive(Clone, Hash, PartialEq, Eq, Debug)] pub struct Set { def: std::rc::Rc<SetDef>, reverse_constraint: Option<Box<Set>>, var: Option<ir::Variable>, } impl Set { /// Create a new set instance. pub fn new(def: &std::rc::Rc<SetDef>, var: Option<ir::Variable>) -> Self { assert_eq!(var.is_some(), def.arg().is_some()); Set { def: def.clone(), var, reverse_constraint: None, } } /// Indicates if the first set is a sub-set of the second, /// without matching argument names. pub fn is_subset_of_def(&self, other: &Set) -> bool { self.reverse_constraint .as_ref() .map_or(false, |s| s.is_subset_of_def(other)) || self.def.is_subset_of_def(other.def()) } /// Returns the common superset where the two set might have an object in common. pub fn get_collision_level<'a>(&'a self, rhs: &Set) -> Option<&'a SetDef> { // Find a path to a common ancestor let mut lhs = (&self.def, self.var); let mut rhs = (&rhs.def, rhs.var); let mut lhs_to_superset = Vec::new(); let mut rhs_to_superset = Vec::new(); while lhs != rhs { if lhs.0.depth > rhs.0.depth { lhs_to_superset.push(lhs.0); let superset = lhs.0.superset.as_ref().unwrap(); let var = superset.var.map(|v| { assert_eq!(v, ir::Variable::Arg(0)); lhs.1.unwrap() }); lhs = (&superset.def, var); } else if let Some(ref superset) = rhs.0.superset { rhs_to_superset.push(rhs.0); let var = superset.var.map(|v| { assert_eq!(v, ir::Variable::Arg(0)); rhs.1.unwrap() }); rhs = (&superset.def, var); } else { return None; } } // Check the paths to the superset does not contains disjoint sets. for on_lhs_path in lhs_to_superset { for &on_rhs_path in &rhs_to_superset { for lhs_disjoint in &on_lhs_path.disjoints { if on_rhs_path.name() as &str == lhs_disjoint { return None; } } for rhs_disjoint in &on_rhs_path.disjoints { if on_lhs_path.name() as &str == rhs_disjoint { return None; } } } } // Return the common superset, that sis both in lhs and rhs. Some(lhs.0) } /// Returns a superset of this set and a set parametrized by elements of the superset /// that iterates on the possible parameters of this set given a variable of the /// superset. pub fn reverse(&self, self_var: ir::Variable, arg: &Set) -> Option<(Set, Set)> { if let Some(reverse_def) = self.def.reverse() { let superset = self .reverse_constraint .as_ref() .map(|b| b.borrow()) .unwrap_or_else(|| reverse_def.arg().unwrap()) .clone(); let mut reverse = Set::new(&reverse_def, Some(self_var)); if !(&reverse).is_subset_of(arg) { reverse.reverse_constraint = Some(Box::new(arg.clone())); } Some((superset, reverse)) } else { None } } } impl Adaptable for Set { fn adapt(&self, adaptator: &ir::Adaptator) -> Self { let reverse_constraint = self .reverse_constraint .as_ref() .map(|set| Box::new(set.adapt(adaptator))); Set { def: self.def.clone(), var: self.var.map(|v| adaptator.variable(v)), reverse_constraint, } } } impl<'a> SetRef<'a> for &'a Set { fn def(&self) -> &'a SetDef { &self.def } fn arg(&self) -> Option<ir::Variable> { self.var } fn reverse_constraint(&self) -> Option<ir::SetRefImpl<'a>> { self.reverse_constraint .as_ref() .map(|s| SetRef::as_ref(&s.as_ref())) } } #[derive(Clone, Hash, PartialEq, Eq, Debug)] pub struct SetRefImpl<'a> { def: &'a SetDef, var: Option<ir::Variable>, reverse_constraint: Option<Box<ir::SetRefImpl<'a>>>, } impl<'a> SetRef<'a> for SetRefImpl<'a> { fn def(&self) -> &'a SetDef { self.def } fn arg(&self) -> Option<ir::Variable> { self.var } fn reverse_constraint(&self) -> Option<ir::SetRefImpl<'a>> { self.reverse_constraint.as_ref().map(|s| s.as_ref().clone()) } } /// Defines a set of objects. #[derive(Clone)] pub struct SetDef { name: RcStr, arg: Option<ir::Set>, superset: Option<Set>, reverse: ReverseSet, keys: IndexMap<SetDefKey, String>, depth: usize, def_order: usize, disjoints: Vec<String>, } impl SetDef { /// Creates a new set definition. pub fn new( name: String, arg: Option<ir::Set>, superset: Option<Set>, reverse: Option<(Set, String)>, keys: IndexMap<SetDefKey, String>, disjoints: Vec<String>, ) -> std::rc::Rc<Self> { let name = RcStr::new(name); let reverse = if let Some((set, iter)) = reverse { let name = RcStr::default(); let reverse = ReverseSet::None; let superset = arg.as_ref().unwrap().def(); let from_superset = keys[&SetDefKey::FromSuperset] .replace("$item", "$tmp") .replace("$var", "$item") .replace("$tmp", "$var") + ".map(|_| $item)"; let reverse_keys = vec![ ( SetDefKey::ItemType, superset.keys[&SetDefKey::ItemType].clone(), ), (SetDefKey::IdType, superset.keys[&SetDefKey::IdType].clone()), ( SetDefKey::ItemGetter, superset.keys[&SetDefKey::ItemGetter].clone(), ), ( SetDefKey::IdGetter, superset.keys[&SetDefKey::IdGetter].clone(), ), (SetDefKey::Iter, iter), (SetDefKey::FromSuperset, from_superset), ] .into_iter() .collect(); for key in &[SetDefKey::ItemType, SetDefKey::IdType] { assert_eq!(set.def.keys[key], keys[key], "reverse supersets must use the same id and item types than the set"); } let def = SetDef::build( name, Some(set), arg.clone(), reverse, reverse_keys, vec![], ); ReverseSet::Explicit(std::cell::RefCell::new(std::rc::Rc::new(def))) } else { ReverseSet::None }; let def = SetDef::build(name, arg, superset, reverse, keys, disjoints); let def = std::rc::Rc::new(def); if let ReverseSet::Explicit(ref cell) = def.reverse { let mut rc = cell.borrow_mut(); let reverse = std::rc::Rc::get_mut(&mut *rc).unwrap(); reverse.reverse = ReverseSet::Implicit(std::rc::Rc::downgrade(&def)); } def } /// Creates a new set definition. fn build( name: RcStr, arg: Option<ir::Set>, superset: Option<Set>, reverse: ReverseSet, keys: IndexMap<SetDefKey, String>, disjoints: Vec<String>, ) -> Self { let depth = superset.as_ref().map(|s| s.def.depth + 1).unwrap_or(0); let def_order = arg.as_ref().map(|s| s.def.def_order + 1).unwrap_or(0); SetDef { name, arg, superset, keys, disjoints, depth, def_order, reverse, } } /// The name of the set. pub fn name(&self) -> &RcStr { &self.name } /// Returns the argument of the set, if any. pub fn arg(&self) -> Option<&ir::Set> { self.arg.as_ref() } /// Returns the superset of the set, if any. pub fn superset(&self) -> Option<&ir::Set> { self.superset.as_ref() } /// The attributes of the set. pub fn attributes(&self) -> &IndexMap<SetDefKey, String> { &self.keys } /// Suggest a prefix for variables in the set. pub fn prefix(&self) -> &str { self.keys .get(&SetDefKey::Prefix) .map(|s| s as &str) .unwrap_or("obj") } /// Returns an integer that indicates an order in which variables can be defined /// to always be defined before any argument of the set they belong into. pub fn def_order(&self) -> usize { self.def_order } /// Returns the reverse set, for sets that have both a parameter and a superset. pub fn reverse(&self) -> Option<std::rc::Rc<SetDef>> { match self.reverse { ReverseSet::None => None, ReverseSet::Explicit(ref cell) => Some(cell.borrow().clone()), ReverseSet::Implicit(ref rc) => Some(std::rc::Weak::upgrade(rc).unwrap()), } } /// Indicates if the first set is a sub-set of the second. pub fn is_subset_of_def(&self, other: &SetDef) -> bool { self == other || self .superset .as_ref() .map(|s| s.def.is_subset_of_def(other)) .unwrap_or(false) } } impl std::fmt::Debug for SetDef { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{}", self.name) } } hash_from_key!(SetDef, SetDef::name); impl PartialOrd for SetDef { fn partial_cmp(&self, other: &SetDef) -> Option<std::cmp::Ordering> { self.name.partial_cmp(&other.name) } } impl Ord for SetDef { fn cmp(&self, other: &SetDef) -> std::cmp::Ordering { self.name.cmp(&other.name) } } /// A set that lists the arguments of another set. #[derive(Clone)] enum ReverseSet { /// The reverse relation was defined in the source code. Explicit(std::cell::RefCell<std::rc::Rc<SetDef>>), /// The reverse relation was infered fromthe inverse relation. Implicit(std::rc::Weak<SetDef>), /// Their is no reverse set. None, } #[derive(Debug, Hash, PartialEq, Eq, Serialize, Copy, Clone)] #[repr(C)] pub enum SetDefKey { ItemType, IdType, ItemGetter, IdGetter, Iter, FromSuperset, Prefix, NewObjs, Reverse, AddToSet, } impl SetDefKey { /// Returns the variables defined for the key. pub fn env(self) -> Vec<&'static str> { match self { SetDefKey::ItemType | SetDefKey::IdType | SetDefKey::Prefix => vec![], SetDefKey::ItemGetter => vec!["fun", "id"], SetDefKey::IdGetter => vec!["fun", "item"], SetDefKey::Iter => vec!["fun"], SetDefKey::FromSuperset => vec!["fun", "item"], SetDefKey::NewObjs => vec!["objs"], SetDefKey::Reverse => vec!["fun"], SetDefKey::AddToSet => vec!["fun", "item"], } } /// Indicates if the environement contains the set argument. pub fn is_arg_in_env(self) -> bool { match self { SetDefKey::ItemGetter | SetDefKey::Iter | SetDefKey::FromSuperset | SetDefKey::AddToSet => true, _ => false, } } /// The list of required keys. pub const REQUIRED: [SetDefKey; 6] = [ SetDefKey::ItemType, SetDefKey::IdType, SetDefKey::ItemGetter, SetDefKey::IdGetter, SetDefKey::Iter, SetDefKey::NewObjs, ]; } impl fmt::Display for SetDefKey { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } } /// Indicates how to update the search space when a new object is added to the set. /// Assumes the set is mapped to `ir::Variable::Arg(0)` and its argument to /// `ir::Variable::Arg(1)` if any. #[derive(Debug, Default)] pub struct OnNewObject { /// Lists the new propagators to enforce. pub filter: Vec<(Vec<Set>, ir::SetConstraints, ir::RemoteFilterCall)>, }
//! Caputre network traffic use etherparse::*; use std::collections::HashMap; use std::str::FromStr; use std::sync::mpsc; use pcap::{Capture, Device, Packet}; use crate::packet::{Direction, PoePacket}; use crate::Error; // listens on all interfaces and searches for packets to/from port 20481, if found shuts down all // interfaces, but the one that found it // the remaining interface sends all captured packets with ports 20481 and 6112 pub fn capture_from_interface(sender: mpsc::Sender<Vec<u8>>) -> Result<(), Error> { for device in Device::list().unwrap() { let device_string = device.name.clone(); log::info!("started capturing from device {}", device_string); let sender = sender.clone(); std::thread::Builder::new() .name(device_string.clone()) .spawn(move || { let mut cap = Capture::from_device(device) .expect("failed to create capture object from device") .promisc(true) .snaplen(5000) .open() .expect("failed to open capture object"); cap.filter("tcp port 20481 or tcp port 6112") .expect("capture filter"); loop { match cap.next() { Ok(packet) => { sender .send(Vec::from(packet.data)) .expect("send packet from caputre thread"); } Err(pcap::Error::TimeoutExpired) => {} Err(e) => { log::warn!("{:?}", e); break; } } } log::info!("stopped capturing from device {}", device_string); }) .unwrap(); } Ok(()) } pub fn capture_from_file( sender: mpsc::Sender<Vec<u8>>, file: &std::path::PathBuf, ) -> Result<(), Error> { let mut cap = Capture::from_file(file).expect("failed to open pcap file"); std::thread::Builder::new() .name("pcap_reader".into()) .spawn(move || { cap.filter("tcp port 20481 or tcp port 6112") .expect("capture filter"); // cap.filter("tcp port 20481").expect("capture filter"); while let Ok(packet) = cap.next() { sender .send(Vec::from(packet.data)) .expect("send packet from caputre thread"); } }) .unwrap(); Ok(()) } use std::cmp::Ordering; /// implements RFC 1982 for u32 bit SerialNumbers #[derive(Eq)] struct SerialNumber(u32); impl Ord for SerialNumber { fn cmp(&self, rhs: &Self) -> Ordering { if self.0 == rhs.0 { return Ordering::Equal; } if (self.0 < rhs.0 && rhs.0 - self.0 < 2147483648) || (self.0 > rhs.0 && self.0 - rhs.0 > 2147483648) { return Ordering::Less; } else { return Ordering::Greater; } } } impl PartialOrd for SerialNumber { fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> { Some(self.cmp(rhs)) } } impl PartialEq for SerialNumber { fn eq(&self, rhs: &Self) -> bool { self.0 == rhs.0 } } #[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)] pub struct StreamIdentifier { pub(crate) source_ip: std::net::Ipv4Addr, pub(crate) dest_ip: std::net::Ipv4Addr, pub(crate) source_port: u16, pub(crate) dest_port: u16, } impl StreamIdentifier { pub fn new( source_ip: std::net::Ipv4Addr, dest_ip: std::net::Ipv4Addr, source_port: u16, dest_port: u16, ) -> Self { StreamIdentifier { source_ip, dest_ip, source_port, dest_port, } } pub fn from_sliced_packet(packet: &SlicedPacket) -> Option<Self> { let ip = if let Some(InternetSlice::Ipv4(value)) = &packet.ip { value } else { return None; }; let tcp = if let Some(TransportSlice::Tcp(value)) = &packet.transport { value } else { return None; }; Some(StreamIdentifier { source_ip: ip.source_addr(), dest_ip: ip.destination_addr(), source_port: tcp.source_port(), dest_port: tcp.destination_port(), }) } } impl std::fmt::Display for StreamIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "[{}:{}->{}:{}]", self.source_ip, self.source_port, self.dest_ip, self.dest_port) } } #[derive(Copy, Clone, Eq, PartialEq, Debug)] enum StreamState { Initial, Sent_SYN, Established, Sent_FIN, Finished, Sent_RST, Broken, } impl StreamState { fn update(&self, tcp: &TcpHeaderSlice) -> StreamState { use StreamState::*; if tcp.syn() && tcp.ack() { return Established; } if tcp.fin() { return Sent_FIN; } if tcp.syn() { return Sent_SYN; } if tcp.rst() { return Sent_RST; } if *self == Sent_SYN && tcp.ack() { return Established; } if *self == Sent_FIN && tcp.ack() { return Finished; } return *self; } } struct Fragment { tcp: TcpHeader, payload: Vec<u8>, } struct Stream { identifier: StreamIdentifier, fragments: HashMap<u32, Fragment>, state: StreamState, sequence_number: SerialNumber, buffer: Vec<u8>, sender: mpsc::Sender<PoePacket>, } impl Stream { fn new(identifier: StreamIdentifier, sender: mpsc::Sender<PoePacket>) -> Self { Stream { identifier, fragments: HashMap::new(), state: StreamState::Initial, sequence_number: SerialNumber(0), buffer: Vec::new(), sender, } } fn process(&mut self, packet: SlicedPacket) { if self.state == StreamState::Broken { return; } let ip = if let Some(InternetSlice::Ipv4(value)) = &packet.ip { value } else { self.state = StreamState::Broken; return; }; let tcp = if let Some(TransportSlice::Tcp(value)) = &packet.transport { value } else { self.state = StreamState::Broken; return; }; if tcp.checksum() != tcp .calc_checksum_ipv4(&ip, packet.payload) .expect("calc checksum") { log::warn!("{:?} Wrong checksum discard...", self.identifier); return; } // TODO: we may change to Finished state even if some data is transferred if the FIN packet arrived out of order let old_state = self.state; self.state = old_state.update(&tcp); if old_state != self.state { log::info!( "{} state change: {:?}->{:?}", self.identifier, old_state, self.state ); } if (old_state == StreamState::Sent_SYN || old_state == StreamState::Initial) && self.state == StreamState::Established && tcp.ack() { self.sequence_number = SerialNumber(tcp.sequence_number()); if tcp.syn() && tcp.ack() { self.sequence_number.0 += 1; } log::info!( "Established stream with sequence number: {}", tcp.sequence_number() ); } //packet potentielly contains data if let StreamState::Established = old_state { // no new data if SerialNumber(tcp.sequence_number() + packet.payload.len() as u32) < self.sequence_number { return; } let mut tcp = tcp.to_header(); let mut payload = packet.payload.to_vec(); // sequence number is lower then the one we currently have, so we don't need all data // of this chunk if SerialNumber(tcp.sequence_number) < self.sequence_number { // correct fragment to only contain new data, including tcp header and payload vector.. let diff = self.sequence_number.0 - tcp.sequence_number; tcp.sequence_number = self.sequence_number.0; payload.drain((0..diff as usize)); } // check if we can insert fragment match self.fragments.get_mut(&tcp.sequence_number) { Some(fragment) => { if fragment.payload.len() < payload.len() { fragment.payload = payload; fragment.tcp = tcp; } } None => { self.fragments .insert(tcp.sequence_number, Fragment { tcp, payload }); } } } // new packet may have filled the missing data, check if can get data from out of order packets self.process_fragments(); } fn process_fragments(&mut self) { let mut sequence_number = SerialNumber(0); let mut buffer = Vec::new(); std::mem::swap(&mut self.sequence_number, &mut sequence_number); std::mem::swap(&mut self.buffer, &mut buffer); let sender = &self.sender; let identifier = &self.identifier; self.fragments.retain(|&key, item| { if SerialNumber(key) > sequence_number { // too large we are missing data return true; } if SerialNumber(key) < sequence_number { // sequence number is smaller, check if it contains usable data if sequence_number < SerialNumber(key + item.payload.len() as u32) { item.payload.drain((0..(sequence_number.0 - key) as usize)); sequence_number.0 += item.payload.len() as u32; buffer.append(&mut item.payload); } else { return false; } } else { // sequence numbers are equal simly add this packet sequence_number.0 += item.payload.len() as u32; buffer.append(&mut item.payload) } if item.tcp.psh && buffer.len() != 0 { // TODO: push buffer // log::info!("Would have pushed {} bytes", buffer.len()); let packet = PoePacket::new(&buffer[..], *identifier); sender.send(packet).expect("failed to send NetPacket"); buffer.drain((..)); } // remove from map false }); std::mem::swap(&mut self.sequence_number, &mut sequence_number); std::mem::swap(&mut self.buffer, &mut buffer); } } pub struct StreamReassembly { stream_data: HashMap<StreamIdentifier, Stream>, sender: mpsc::Sender<PoePacket>, } impl StreamReassembly { pub fn new(sender: mpsc::Sender<PoePacket>) -> Self { StreamReassembly { stream_data: HashMap::new(), sender, } } pub fn process(&mut self, raw_packet: &[u8]) { let sliced_packet = SlicedPacket::from_ethernet(&raw_packet); match sliced_packet { Err(e) => log::warn!("Err {:?} --- discarding packet", e), Ok(packet) => { let packet_clone = packet.clone(); if let Some(identifier) = StreamIdentifier::from_sliced_packet(&packet) { let new_packets = match self.stream_data.get_mut(&identifier) { Some(stream) => stream.process(packet_clone), None => { let mut stream = Stream::new(identifier, self.sender.clone()); stream.process(packet_clone); self.stream_data.insert(identifier, stream); } }; } } } } }
mod kobo; mod remarkable; pub use self::remarkable::remarkable_parse_device_events; pub use self::kobo::kobo_parse_device_events; use device::CURRENT_DEVICE; extern crate libc; use fnv::FnvHashMap; use std::mem; use std::slice; use std::thread; use std::io::Read; use std::fs::File; use std::sync::mpsc::{self, Sender, Receiver}; use std::os::unix::io::AsRawFd; use std::ffi::CString; use geom::Point; use errors::*; // Event types pub const EV_SYN: u16 = 0; pub const EV_KEY: u16 = 1; pub const EV_ABS: u16 = 3; pub const SYN_REPORT: u16 = 0; // Event codes pub const ABS_MT_SLOT: u16 = 47; pub const ABS_MT_TRACKING_ID: u16 = 57; pub const ABS_MT_POSITION_X: u16 = 53; pub const ABS_MT_POSITION_Y: u16 = 54; pub const ABS_MT_PRESSURE: u16 = 58; pub const ABS_MT_TOUCH_MAJOR: u16 = 48; pub const ABS_MT_FINGER_COUNT: u16 = 52; pub const SYN_MT_REPORT: u16 = 2; pub const ABS_X: u16 = 0; pub const ABS_Y: u16 = 1; pub const ABS_PRESSURE: u16 = 24; pub const KEY_POWER: u16 = 116; pub const KEY_HOME: u16 = 102; pub const KEY_LEFT: u16 = 105; pub const KEY_RIGHT: u16 = 106; pub const SINGLE_TOUCH_CODES: TouchCodes = TouchCodes { pressure: ABS_PRESSURE, x: ABS_X, y: ABS_Y, }; pub const MULTI_TOUCH_CODES_A: TouchCodes = TouchCodes { pressure: ABS_MT_TOUCH_MAJOR, x: ABS_MT_POSITION_X, y: ABS_MT_POSITION_Y, }; pub const MULTI_TOUCH_CODES_B: TouchCodes = TouchCodes { pressure: ABS_MT_PRESSURE, .. MULTI_TOUCH_CODES_A }; #[repr(C)] pub struct InputEvent { pub time: libc::timeval, pub kind: u16, // type pub code: u16, pub value: i32, } // Handle different touch protocols #[derive(Debug)] pub struct TouchCodes { pressure: u16, x: u16, y: u16, } #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum TouchProto { Single, MultiA, MultiB, } #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum FingerStatus { Down, Motion, Up, } #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum ButtonStatus { Pressed, Released, } #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub enum ButtonCode { Power, Home, Left, Right, Raw(u16), } impl ButtonCode { fn from_raw(code: u16) -> ButtonCode { if code == KEY_POWER { ButtonCode::Power } else if code == KEY_HOME { ButtonCode::Home } else if code == KEY_LEFT { ButtonCode::Left } else if code == KEY_RIGHT { ButtonCode::Right } else { ButtonCode::Raw(code) } } } #[derive(Debug, Copy, Clone)] pub enum DeviceEvent { Finger { id: i32, time: f64, status: FingerStatus, position: Point, }, Button { time: f64, code: ButtonCode, status: ButtonStatus, }, Plug, Unplug, CoverOn, CoverOff, NetUp, } pub fn seconds(time: libc::timeval) -> f64 { time.tv_sec as f64 + time.tv_usec as f64 / 1e6 } pub fn raw_events(paths: Vec<String>) -> Receiver<InputEvent> { let (tx, rx) = mpsc::channel(); thread::spawn(move || parse_raw_events(&paths, &tx)); rx } pub fn parse_raw_events(paths: &[String], tx: &Sender<InputEvent>) -> Result<()> { let mut files = Vec::new(); let mut pfds = Vec::new(); for path in paths.iter() { let file = File::open(path).chain_err(|| "Can't open input file.")?; let fd = file.as_raw_fd(); files.push(file); pfds.push(libc::pollfd { fd, events: libc::POLLIN, revents: 0, }); } loop { let ret = unsafe { libc::poll(pfds.as_mut_ptr(), pfds.len() as libc::nfds_t, -1) }; if ret < 0 { break; } for (pfd, mut file) in pfds.iter().zip(&files) { if pfd.revents & libc::POLLIN != 0 { let mut input_event: InputEvent = unsafe { mem::uninitialized() }; unsafe { let event_slice = slice::from_raw_parts_mut(&mut input_event as *mut InputEvent as *mut u8, mem::size_of::<InputEvent>()); if file.read_exact(event_slice).is_err() { break; } } tx.send(input_event).unwrap(); } } } Ok(()) } pub fn usb_events() -> Receiver<DeviceEvent> { let (tx, rx) = mpsc::channel(); thread::spawn(move || parse_usb_events(&tx)); rx } fn parse_usb_events(tx: &Sender<DeviceEvent>) { let path = CString::new("/tmp/nickel-hardware-status").unwrap(); let fd = unsafe { libc::open(path.as_ptr(), libc::O_NONBLOCK | libc::O_RDWR) }; let mut pfd = libc::pollfd { fd, events: libc::POLLIN, revents: 0, }; const BUF_LEN: usize = 256; loop { let ret = unsafe { libc::poll(&mut pfd as *mut libc::pollfd, 1, -1) }; if ret < 0 { break; } let buf = CString::new(vec![1; BUF_LEN]).unwrap(); let c_buf = buf.into_raw(); if pfd.revents & libc::POLLIN != 0 { let n = unsafe { libc::read(fd, c_buf as *mut libc::c_void, BUF_LEN as libc::size_t) }; let buf = unsafe { CString::from_raw(c_buf) }; if n > 0 { if let Ok(s) = buf.to_str() { for msg in s[..n as usize].lines() { if msg == "usb plug add" { tx.send(DeviceEvent::Plug).unwrap(); } else if msg == "usb plug remove" { tx.send(DeviceEvent::Unplug).unwrap(); } else if msg.starts_with("network bound") { tx.send(DeviceEvent::NetUp).unwrap(); } } } } else { break; } } } } pub fn device_events(rx: Receiver<InputEvent>, dims: (u32, u32)) -> Receiver<DeviceEvent> { let (ty, ry) = mpsc::channel(); thread::spawn(move || CURRENT_DEVICE.parse_device_events(&rx, &ty, dims)); ry }
use std::{sync::Arc, time::Duration}; use async_trait::async_trait; use generated_types::{ influxdata::iox::gossip::v1::{gossip_message::Msg, GossipMessage}, prost::Message, }; use parking_lot::Mutex; use test_helpers::timeout::FutureTimeout; use super::traits::SchemaBroadcast; #[derive(Debug, Default)] pub struct MockSchemaBroadcast { payloads: Mutex<Vec<Vec<u8>>>, } #[async_trait] impl SchemaBroadcast for Arc<MockSchemaBroadcast> { async fn broadcast(&self, payload: Vec<u8>) { self.payloads.lock().push(payload); } } impl MockSchemaBroadcast { /// Return the raw, serialised payloads. pub fn raw_payloads(&self) -> Vec<Vec<u8>> { self.payloads.lock().clone() } /// Return the deserialised [`Msg`]. pub fn messages(&self) -> Vec<Msg> { self.payloads .lock() .iter() .map(|v| { GossipMessage::decode(v.as_slice()) .map(|v| v.msg.expect("no message in payload")) .expect("invalid gossip payload") }) .collect() } pub async fn wait_for_messages(&self, count: usize) { let res = async { loop { if self.payloads.lock().len() >= count { return; } tokio::time::sleep(Duration::from_millis(50)).await; } } .with_timeout(Duration::from_secs(5)) .await; if res.is_err() { panic!( "never observed required number of messages: {:?}", &self.payloads ); } } }
use std::collections::HashMap; use std::fmt; use std::fs::File; use std::ffi::OsStr; use std::io::Read; use std::io::Seek; use std::io::SeekFrom; use std::ops::Range; use std::sync::Arc; use fs2::FileExt; use fuser; use indexmap::IndexMap; use sanitize_filename; use serde_json; use mirakc_core::config::*; use mirakc_core::error::Error; use mirakc_core::models::*; use mirakc_core::timeshift::*; pub struct TimeshiftFilesystem { config: Arc<Config>, caches: HashMap<usize, Cache>, open_contexts: HashMap<u64, OpenContext>, next_handle: u64, } impl TimeshiftFilesystem { const MAX_TITLE_SIZE: usize = 200; const TTL: std::time::Duration = std::time::Duration::from_secs(1); pub fn new(config: Arc<Config>) -> Self { TimeshiftFilesystem { config, caches: HashMap::new(), open_contexts: HashMap::new(), next_handle: 1, } } fn create_handle(&mut self, octx: OpenContext) -> u64 { loop { let handle = self.next_handle; self.next_handle = if handle == u64::max_value() { 1 } else { handle + 1 }; if !self.open_contexts.contains_key(&handle) { self.open_contexts.insert(handle, octx); return handle; } } } fn lookup_recorder(&self, name: &OsStr) -> Option<Ino> { name.to_str() .and_then(|name| { self.config.timeshift.recorders.keys() .position(|key| key == &name) }) .map(Ino::create_recorder_ino) } fn make_recorder_attr( &self, ino: Ino, ) -> Option<fuser::FileAttr> { self.config .timeshift .recorders .get_index(ino.recorder_index()) .map(|_| { let start_time = self.caches .get(&ino.recorder_index()) .map(|cache| cache.records.values().next()) .flatten() .map(|record| record.start.timestamp.timestamp()) .map(system_time_from_unix_time) .unwrap_or(std::time::UNIX_EPOCH); let end_time = self.caches .get(&ino.recorder_index()) .map(|cache| cache.records.values().last()) .flatten() .map(|record| record.end.timestamp.timestamp()) .map(system_time_from_unix_time) .unwrap_or(std::time::UNIX_EPOCH); fuser::FileAttr { ino: ino.0, size: 0, blocks: 0, atime: std::time::UNIX_EPOCH, mtime: end_time.clone(), ctime: end_time.clone(), crtime: start_time.clone(), kind: fuser::FileType::Directory, perm: 0o555, nlink: 2, uid: 0, gid: 0, rdev: 0, blksize: 512, flags: 0, } }) } fn lookup_record( &self, ino: Ino, name: &OsStr, ) -> Option<Ino> { // to_string_lossy() may change <title>, but keeps <id> and the separator. let name = name.to_string_lossy(); // Some applications open a file with another extension like ".srt". if !name.ends_with(".m2ts") { return None; } // DIRTY HACK // ---------- // We don't compare `name` with a filename created from a record. // // On macOS, that doesn't work due to issues regarding the Unicode normalization. HFS+ // enforces all filenames to be valid UTF-16 in a 'variant' of NFD (Unicode Normalization // Form D). If we make a filename using EpgProgram::name without normalization, the // following filename may be specified in `name`: // // filename made in open_recorder_dir(): // 6049B5AB.ごごナマ..[字].m2ts // // LOOKUP name: // 6049B5AB.こ\u{3099}こ\u{3099}ナマ..[字].m2ts // // The normalization form applied to the filename depends on the implementation of // each application. For example, VLC applies NFD before opening a file. On the other // hand, `cat` on macOS doesn't change the normalization form. Therefore, the following // command works properly even if this function searches for a record that matches `name` // exactly: // // # `cat` seems not to change the filename // cat 6049B5AB.ごごナマ..[字].m2ts | ffplay - // // Conversion between String and OsString may not be idempotent. Therefore, normalizing // before comparison may not work in general. // // We first extract the record ID encoded in `name`, and then look for a record identified // with it. That means that `<id>.m2ts` is enough. name.split('.') // <id>.<title>.m2ts .next() // <id> .and_then(|s| u32::from_str_radix(s, 16).ok()) .map(TimeshiftRecordId::from) .map(|record_id| Ino::create_record_ino( ino.recorder_index(), record_id)) .filter(|&ino| self.get_record(ino).is_some()) } fn get_recorder_config( &self, ino: Ino, ) -> Option<&TimeshiftRecorderConfig> { self.config .timeshift .recorders .values() .nth(ino.recorder_index()) } fn open_root_dir(&mut self) -> u64 { let mut entries = vec![ (1, fuser::FileType::Directory, ".".to_string()), (1, fuser::FileType::Directory, "..".to_string()), ]; for (index, name) in self.config.timeshift.recorders.keys().enumerate() { let ino = Ino::create_recorder_ino(index); let dirname = sanitize_filename::sanitize(name); // truncates within 255 bytes entries.push((ino.0, fuser::FileType::Directory, dirname)); } let octx = OpenContext::Dir(entries); self.create_handle(octx) } fn open_recorder_dir(&mut self, ino: Ino) -> u64 { let records = self.caches .get(&ino.recorder_index()) .map(|cache| cache.records.clone()) .unwrap_or(Default::default()); let mut entries = vec![ (ino.0, fuser::FileType::Directory, ".".to_string()), (1, fuser::FileType::Directory, "..".to_string()), ]; for record in records.values() { let ino = Ino::create_record_ino( ino.recorder_index(), record.id); let title = record.program.name.clone() .map(|s| truncate_string_within(s, Self::MAX_TITLE_SIZE)) .unwrap_or("".to_string()); let filename = sanitize_filename::sanitize( format!("{:08X}.{}.m2ts", record.id.value(), title)); debug_assert!(filename.ends_with(".m2ts")); entries.push((ino.0, fuser::FileType::RegularFile, filename)); } let octx = OpenContext::Dir(entries); self.create_handle(octx) } fn get_record(&self, ino: Ino) -> Option<&TimeshiftRecord> { self.caches .get(&ino.recorder_index()) .and_then(|cache| cache.records.get(&ino.record_id())) } fn make_record_attr( &self, ino: Ino, ) -> Option<fuser::FileAttr> { self.get_record(ino) .map(|record| { let start_time = system_time_from_unix_time(record.start.timestamp.timestamp()); let end_time = system_time_from_unix_time(record.end.timestamp.timestamp()); let file_size = self.config.timeshift.recorders .get_index(ino.recorder_index()) .unwrap() .1 .max_file_size(); let size = record.get_size(file_size); fuser::FileAttr { ino: ino.0, size, blocks: (size + 511) / 512, atime: std::time::UNIX_EPOCH, mtime: end_time.clone(), ctime: end_time.clone(), crtime: start_time.clone(), kind: fuser::FileType::RegularFile, perm: 0o444, nlink: 1, uid: 0, gid: 0, rdev: 0, blksize: 512, flags: 0, } }) } fn update_cache(&mut self, ino: Ino) { let config = self.config .timeshift .recorders .values() .nth(ino.recorder_index()) .unwrap(); let data_mtime = std::fs::metadata(&config.data_file) .ok() .and_then(|metadata| metadata.modified().ok()); let cache_mtime = self.caches .get(&ino.recorder_index()) .map(|cache| cache.mtime); let mtime = match (data_mtime, cache_mtime) { (Some(data_mtime), Some(cache_mtime)) if data_mtime > cache_mtime => { data_mtime } (Some(data_mtime), None) => { data_mtime } _ => { log::debug!("{}: Reuse cached timeshift data", ino); return; } }; log::debug!("{}: Load timeshift data", ino); let cache = Self::load_data(config) .map(|data| Cache { mtime, records: data.records, }); match cache { Ok(cache) => { self.caches.insert(ino.recorder_index(), cache); } Err(err) => { log::error!("{}: Failed to read timeshift data: {}", ino, err); } } } fn load_data(config: &TimeshiftRecorderConfig) -> Result<TimeshiftRecorderData, Error> { // Read all bytes, then deserialize records, in order to reduce the lock time. let mut buf = Vec::with_capacity(4096 * 1_000); { let mut file = std::fs::File::open(&config.data_file)?; log::debug!("Locking {} for read...", config.data_file); file.lock_shared()?; file.read_to_end(&mut buf)?; file.unlock()?; log::debug!("Unlocked {}", config.data_file); } let data: TimeshiftRecorderData = serde_json::from_slice(&buf)?; if data.service.triple() == config.service_triple.into() && data.chunk_size == config.chunk_size && data.max_chunks == config.max_chunks() { Ok(data) } else { Err(Error::NoContent) } } fn open_record(&mut self, ino: Ino) -> Result<u64, Error> { debug_assert!(ino.is_record()); match self.get_record(ino).zip(self.get_recorder_config(ino)) { Some((_, config)) => { let file = File::open(&config.ts_file)?; let buf = RecordBuffer::new(ino, file); let octx = OpenContext::Record(buf); Ok(self.create_handle(octx)) } _ => Err(Error::RecordNotFound), } } } impl fuser::Filesystem for TimeshiftFilesystem { fn lookup( &mut self, _req: &fuser::Request, parent: u64, name: &OsStr, reply: fuser::ReplyEntry, ) { let ino = Ino::from(parent); let found = if ino.is_root() { self.lookup_recorder(name) .and_then(|ino| { self.update_cache(ino); self.make_recorder_attr(ino) }) } else if ino.is_recorder() { self.lookup_record(ino, name) .and_then(|ino| { self.update_cache(ino); self.make_record_attr(ino) }) } else { unreachable!(); }; match found { Some(attr) => reply.entry(&Self::TTL, &attr, 0), None => reply.error(libc::ENOENT), } } fn getattr( &mut self, _req: &fuser::Request, ino: u64, reply: fuser::ReplyAttr, ) { let ino = Ino::from(ino); let found = if ino.is_root() { Some(fuser::FileAttr { ino: 1, size: 0, blocks: 0, atime: std::time::UNIX_EPOCH, mtime: std::time::UNIX_EPOCH, ctime: std::time::UNIX_EPOCH, crtime: std::time::UNIX_EPOCH, kind: fuser::FileType::Directory, perm: 0o555, nlink: 2, uid: 0, gid: 0, rdev: 0, flags: 0, blksize: 512, }) } else if ino.is_recorder() { self.update_cache(ino); self.make_recorder_attr(ino) } else if ino.is_record() { self.update_cache(ino); self.make_record_attr(ino) } else { unreachable!(); }; match found { Some(attr) => reply.attr(&Self::TTL, &attr), None => reply.error(libc::ENOENT), } } fn opendir( &mut self, _req: &fuser::Request, ino: u64, _flags: i32, reply: fuser::ReplyOpen ) { let ino = Ino::from(ino); if ino.is_root() { let handle = self.open_root_dir(); reply.opened(handle, 0); } else if ino.is_recorder() { self.update_cache(ino); let handle = self.open_recorder_dir(ino); reply.opened(handle, 0); } else { unreachable!(); } } fn releasedir( &mut self, _req: &fuser::Request, ino: u64, fh: u64, _flags: i32, reply: fuser::ReplyEmpty ) { let ino = Ino::from(ino); if ino.is_root() || ino.is_recorder() { match self.open_contexts.remove(&fh) { Some(_) => reply.ok(), None => reply.error(libc::EBADF), } } else { unreachable!(); } } fn readdir( &mut self, _req: &fuser::Request, ino: u64, fh: u64, offset: i64, mut reply: fuser::ReplyDirectory, ) { let ino = Ino::from(ino); match self.open_contexts.get(&fh) { Some(OpenContext::Dir(entries)) => { debug_assert!(ino.is_root() || ino.is_recorder()); for (i, entry) in entries.into_iter().enumerate().skip(offset as usize) { // `i + 1` means the index of the next entry. if reply.add(entry.0, (i + 1) as i64, entry.1, &entry.2) { break; } } reply.ok(); } _ => { log::error!("{}: Invalid handle {}", ino, fh); reply.error(libc::EBADF); } } } fn open( &mut self, _req: &fuser::Request, ino: u64, _flags: i32, reply: fuser::ReplyOpen, ) { let ino = Ino::from(ino); if ino.is_record() { self.update_cache(ino); match self.open_record(ino) { Ok(handle) => reply.opened(handle, 0), Err(_) => { log::debug!("{}: Record not found", ino); reply.error(libc::ENOENT); } } } else { unreachable!(); } } fn release( &mut self, _req: &fuser::Request, ino: u64, fh: u64, _flags: i32, _lock_owner: Option<u64>, _flush: bool, reply: fuser::ReplyEmpty, ) { let ino = Ino::from(ino); if ino.is_record() { match self.open_contexts.remove(&fh) { Some(_) => reply.ok(), None => { log::error!("{}: Invalid handle {}", ino, fh); reply.error(libc::EBADF); } } } else { unreachable!(); } } fn read( &mut self, _req: &fuser::Request, ino: u64, fh: u64, offset: i64, size: u32, _flags: i32, _lock_owner: Option<u64>, reply: fuser::ReplyData, ) { let ino = Ino::from(ino); if ino.is_record() { self.update_cache(ino); let (record, config) = match self.get_record(ino).zip(self.get_recorder_config(ino)) { Some(tuple) => tuple, None => { log::error!("{}: Record not found", ino); reply.error(libc::ENOENT); return; } }; let file_size = config.max_file_size(); let record_size = record.get_size(file_size); let ranges = calc_read_ranges(file_size, record_size, record.start.pos, offset, size); let buf = match self.open_contexts.get_mut(&fh) { Some(OpenContext::Record(buf)) => buf, _ => { log::error!("{}: Invalid handle {}", ino, fh); reply.error(libc::EBADF); return; } }; match buf.fill(ranges) { Ok(_) => reply.data(buf.data()), Err(err) => { log::error!("{}: Faild to read data: {}", ino, err); reply.error(libc::EIO); } } buf.reset(); } else { unreachable!(); } } } // Mapping of ino: // // Root 1 // Recorder 0x0100_0000_0000_0000 | recorder_index << 32 // Record 0x0200_0000_0000_0000 | recorder_index << 32 | record_id // // Where: // // recorder_index in 0..256 (8-bit) // record_id in 0..0xFFFF_FFFF (32-bit) // // `recorder_index` and `record_id` never changes even if its content changes. // // The most significant octet is used as the type of Ino: // // 0x01: record directory // 0x02: record file // // 40..56 bits are filled with 0 at this point. They are reserved for future use. #[derive(Clone, Copy)] struct Ino(u64); impl Ino { fn create_recorder_ino(index: usize) -> Self { (0x0100_0000_0000_0000 | (index as u64) << 32).into() } fn create_record_ino(index: usize, record_id: TimeshiftRecordId) -> Self { (0x0200_0000_0000_0000 | ((index as u64) << 32) | (record_id.value() as u64)).into() } fn is_root(&self) -> bool { self.0 == 1 } fn is_recorder(&self) -> bool { (self.0 & 0xFF00_0000_0000_0000) == 0x0100_0000_0000_0000 } fn is_record(&self) -> bool { (self.0 & 0xFF00_0000_0000_0000) == 0x0200_0000_0000_0000 } fn recorder_index(&self) -> usize { ((self.0 & 0x0000_00FF_0000_0000) >> 32) as usize } fn record_id(&self) -> TimeshiftRecordId { ((self.0 & 0x0000_0000_FFFF_FFFF) as u32).into() } } impl fmt::Display for Ino { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "ino#{:016X}", self.0) } } impl From<u64> for Ino { fn from(ino: u64) -> Self { Ino(ino) } } struct Cache { mtime: std::time::SystemTime, records: IndexMap<TimeshiftRecordId, TimeshiftRecord>, } enum OpenContext { Dir(Vec<(u64, fuser::FileType, String)>), Record(RecordBuffer), } struct RecordBuffer { ino: Ino, file: File, buf: Vec<u8>, } impl RecordBuffer { const INITIAL_BUFSIZE: usize = 4096 * 16; // 16 pages = 64KiB fn new(ino: Ino, file: File) -> Self { RecordBuffer { ino, file, buf: Vec::with_capacity(Self::INITIAL_BUFSIZE), } } fn data(&self) -> &[u8] { &self.buf[..] } fn fill(&mut self, ranges: (Option<Range<u64>>, Option<Range<u64>>)) -> Result<(), Error> { debug_assert!(self.data().is_empty()); match ranges { (None, None) => { log::trace!("{}: EOF reached", self.ino); Ok(()) } (Some(range), None) => { log::trace!("{}: Read data in {:?}", self.ino, range); self.fill1(&range) } (Some(first), Some(second)) => { log::trace!("{}: Read data in {:?} and {:?} successfully", self.ino, first, second); self.fill2(&first, &second) } _ => unreachable!(), } } fn fill1(&mut self, range: &Range<u64>) -> Result<(), Error> { debug_assert!(self.buf.is_empty()); debug_assert!(range.end - range.start <= usize::max_value() as u64); let len = (range.end - range.start) as usize; self.buf.reserve(len); self.file.seek(SeekFrom::Start(range.start))?; let _ = (&mut self.file).take(len as u64).read_to_end(&mut self.buf)?; debug_assert!(self.buf.len() == len); Ok(()) } fn fill2(&mut self, first: &Range<u64>, second: &Range<u64>) -> Result<(), Error> { debug_assert!(self.buf.is_empty()); debug_assert!(first.end - first.start <= usize::max_value() as u64); let first_len = (first.end - first.start) as usize; debug_assert!(second.end - second.start <= usize::max_value() as u64); let second_len = (second.end - second.start) as usize; debug_assert!((first_len as u64) + (second_len as u64) <= usize::max_value() as u64); self.buf.reserve(first_len + second_len); self.file.seek(SeekFrom::Start(first.start))?; let _ = (&mut self.file).take(first_len as u64).read_to_end(&mut self.buf)?; debug_assert!(self.buf.len() == first_len); self.file.seek(SeekFrom::Start(0))?; let _ = (&mut self.file).take(second_len as u64).read_to_end(&mut self.buf)?; debug_assert!(self.buf.len() == first_len + second_len); Ok(()) } fn reset(&mut self) { self.buf.truncate(0); } } fn truncate_string_within(mut s: String, size: usize) -> String { if size == 0 { return String::new(); } if s.is_empty() || s.len() <= size { return s; } debug_assert!(size > 0); let mut i = size; while i > 0 { if s.is_char_boundary(i) { break; } i -= 1; } s.truncate(i); s } fn calc_read_ranges( file_size: u64, record_size: u64, record_pos: u64, offset: i64, size: u32, ) -> (Option<Range<u64>>, Option<Range<u64>>) { assert!(offset >= 0); assert!(record_pos < file_size); if record_size == 0 { return (None, None); } if (offset as u64) >= record_size { // out of range return (None, None); } let remaining = record_size - (offset as u64); let read_size = remaining.min(size as u64); let start = (record_pos + (offset as u64)) % file_size; let end = (start + read_size) % file_size; if end == 0 { (Some(start..file_size), None) } else if start < end { (Some(start..end), None) } else { (Some(start..file_size), Some(0..end)) } } fn system_time_from_unix_time(unix_time: i64) -> std::time::SystemTime { std::time::UNIX_EPOCH + std::time::Duration::from_secs(unix_time as u64) } #[cfg(test)] mod tests { use super::*; use assert_matches::assert_matches; #[test] fn test_record_buffer_fill() { let mut buf = RecordBuffer::new(Ino::from(0), File::open("/dev/zero").unwrap()); assert_matches!(buf.fill((None, None)), Ok(_) => { assert!(buf.data().is_empty()); }); buf.reset(); assert_matches!(buf.fill((Some(10..50), None)), Ok(_) => { assert_eq!(buf.data().len(), 40); }); buf.reset(); assert_matches!(buf.fill((Some(100..200), Some(0..10))), Ok(_) => { assert_eq!(buf.data().len(), 110); }); buf.reset(); } #[test] fn test_truncate_string_within() { assert_eq!(truncate_string_within("".to_string(), 10), ""); assert_eq!(truncate_string_within("ab".to_string(), 0), ""); assert_eq!(truncate_string_within("ab".to_string(), 1), "a"); assert_eq!(truncate_string_within("ab".to_string(), 10), "ab"); assert_eq!(truncate_string_within("あい".to_string(), 0), ""); assert_eq!(truncate_string_within("あい".to_string(), 1), ""); assert_eq!(truncate_string_within("あい".to_string(), 2), ""); assert_eq!(truncate_string_within("あい".to_string(), 3), "あ"); assert_eq!(truncate_string_within("あい".to_string(), 4), "あ"); assert_eq!(truncate_string_within("あい".to_string(), 5), "あ"); assert_eq!(truncate_string_within("あい".to_string(), 6), "あい"); assert_eq!(truncate_string_within("あい".to_string(), 10), "あい"); } #[test] fn test_calc_read_ranges() { assert_eq!(calc_read_ranges(100, 0, 10, 10, 10), (None, None)); assert_eq!(calc_read_ranges(100, 1, 10, 10, 10), (None, None)); assert_eq!(calc_read_ranges(100, 30, 10, 10, 10), (Some(20..30), None)); assert_eq!(calc_read_ranges(100, 30, 10, 20, 20), (Some(30..40), None)); assert_eq!(calc_read_ranges(100, 30, 10, 30, 10), (None, None)); assert_eq!(calc_read_ranges(100, 30, 70, 20, 10), (Some(90..100), None)); assert_eq!(calc_read_ranges(100, 30, 70, 20, 20), (Some(90..100), None)); assert_eq!(calc_read_ranges(100, 30, 70, 30, 10), (None, None)); assert_eq!(calc_read_ranges(100, 30, 80, 10, 20), (Some(90..100), Some(0..10))); assert_eq!(calc_read_ranges(100, 30, 80, 20, 20), (Some(0..10), None)); assert_eq!(calc_read_ranges(100, 30, 80, 30, 10), (None, None)); } #[test] fn test_system_time_from_unix_time() { assert_eq!(system_time_from_unix_time(0), std::time::UNIX_EPOCH); } }
pub use VkSwapchainCreateFlagsKHR::*; #[repr(u32)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum VkSwapchainCreateFlagsKHR { VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x0000_0001, VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x0000_0002, VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 0x0000_0004, } use crate::SetupVkFlags; #[repr(C)] #[derive(Clone, Copy, Eq, PartialEq, Hash)] pub struct VkSwapchainCreateFlagBitsKHR(u32); SetupVkFlags!(VkSwapchainCreateFlagsKHR, VkSwapchainCreateFlagBitsKHR);
// 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 common_exception::ErrorCode; use common_exception::Result; use common_io::constants::NAN_BYTES_LOWER; use common_io::constants::NAN_BYTES_SNAKE; use common_meta_app::principal::FileFormatOptions; use common_meta_app::principal::StageFileFormatType; use crate::FileFormatOptionsExt; pub fn get_format_option_checker( fmt: &StageFileFormatType, ) -> Result<Box<dyn FormatOptionChecker>> { match fmt { StageFileFormatType::Csv => Ok(Box::new(CSVFormatOptionChecker {})), StageFileFormatType::Tsv => Ok(Box::new(TSVFormatOptionChecker {})), StageFileFormatType::NdJson => Ok(Box::new(NDJsonFormatOptionChecker {})), StageFileFormatType::Parquet => Ok(Box::new(ParquetFormatOptionChecker {})), StageFileFormatType::Xml => Ok(Box::new(XMLFormatOptionChecker {})), StageFileFormatType::Json => Ok(Box::new(JsonFormatOptionChecker {})), _ => Err(ErrorCode::Internal(format!( "unexpected format type {:?}", fmt ))), } } pub trait FormatOptionChecker: Send { fn name(&self) -> String; fn check_options(&self, options: &mut FileFormatOptions) -> Result<()> { self.check_escape(&mut options.escape)?; self.check_quote(&mut options.quote)?; self.check_row_tag(&mut options.row_tag)?; self.check_record_delimiter(&mut options.record_delimiter)?; self.check_field_delimiter(&mut options.field_delimiter)?; self.check_nan_display(&mut options.nan_display)?; Ok(()) } fn check_options_ext(&self, options: &mut FileFormatOptionsExt) -> Result<()> { self.check_options(&mut options.stage)?; Ok(()) } fn not_supported(&self, option_name: &str) -> ErrorCode { let msg = format!("{} not support option {}", self.name(), option_name); ErrorCode::BadArguments(msg) } fn check_escape(&self, escape: &mut String) -> Result<()> { if !escape.is_empty() { Err(self.not_supported("escape")) } else { Ok(()) } } fn check_quote(&self, quote: &mut String) -> Result<()> { if !quote.is_empty() { Err(self.not_supported("quote")) } else { Ok(()) } } fn check_row_tag(&self, row_tag: &mut String) -> Result<()> { if !row_tag.is_empty() && row_tag != "row" { Err(self.not_supported("row_tag")) } else { Ok(()) } } fn check_record_delimiter(&self, record_delimiter: &mut String) -> Result<()> { if !record_delimiter.is_empty() { Err(self.not_supported("record_delimiter")) } else { Ok(()) } } fn check_field_delimiter(&self, field_delimiter: &mut String) -> Result<()> { if !field_delimiter.is_empty() { Err(self.not_supported("field_delimiter")) } else { Ok(()) } } fn check_nan_display(&self, nan_display: &mut String) -> Result<()> { if !nan_display.is_empty() { Err(self.not_supported("nan_display")) } else { Ok(()) } } } pub struct CSVFormatOptionChecker {} impl FormatOptionChecker for CSVFormatOptionChecker { fn name(&self) -> String { "CSV".to_string() } fn check_escape(&self, escape: &mut String) -> Result<()> { check_escape(escape, "") } fn check_quote(&self, quote: &mut String) -> Result<()> { check_quote(quote, "\"") } fn check_record_delimiter(&self, record_delimiter: &mut String) -> Result<()> { check_record_delimiter(record_delimiter) } fn check_field_delimiter(&self, field_delimiter: &mut String) -> Result<()> { check_field_delimiter(field_delimiter, ",") } fn check_nan_display(&self, nan_display: &mut String) -> Result<()> { check_nan_display(nan_display, NAN_BYTES_SNAKE) } } pub struct TSVFormatOptionChecker {} impl FormatOptionChecker for TSVFormatOptionChecker { fn name(&self) -> String { "TSV".to_string() } fn check_escape(&self, escape: &mut String) -> Result<()> { check_escape(escape, "\\") } fn check_quote(&self, quote: &mut String) -> Result<()> { check_quote(quote, "\'") } fn check_record_delimiter(&self, record_delimiter: &mut String) -> Result<()> { check_record_delimiter(record_delimiter) } fn check_field_delimiter(&self, field_delimiter: &mut String) -> Result<()> { check_field_delimiter(field_delimiter, "\t") } fn check_nan_display(&self, nan_display: &mut String) -> Result<()> { check_nan_display(nan_display, NAN_BYTES_LOWER) } } pub struct NDJsonFormatOptionChecker {} impl FormatOptionChecker for NDJsonFormatOptionChecker { fn name(&self) -> String { "NDJson".to_string() } fn check_record_delimiter(&self, record_delimiter: &mut String) -> Result<()> { check_record_delimiter(record_delimiter) } fn check_field_delimiter(&self, field_delimiter: &mut String) -> Result<()> { check_field_delimiter(field_delimiter, "\t") } } pub struct JsonFormatOptionChecker {} impl FormatOptionChecker for JsonFormatOptionChecker { fn name(&self) -> String { "Json".to_string() } } pub struct XMLFormatOptionChecker {} impl FormatOptionChecker for XMLFormatOptionChecker { fn name(&self) -> String { "XML".to_string() } fn check_row_tag(&self, row_tag: &mut String) -> Result<()> { if row_tag.is_empty() { *row_tag = "row".to_string() } Ok(()) } } pub struct ParquetFormatOptionChecker {} impl FormatOptionChecker for ParquetFormatOptionChecker { fn name(&self) -> String { "Parquet".to_string() } } pub fn check_escape(option: &mut String, default: &str) -> Result<()> { if option.is_empty() { *option = default.to_string() } else if option.len() > 1 { return Err(ErrorCode::InvalidArgument( "escape can only contain one char", )); }; Ok(()) } pub fn check_quote(option: &mut String, default: &str) -> Result<()> { if option.is_empty() { *option = default.to_string() } else if option.len() > 1 { return Err(ErrorCode::InvalidArgument( "quote can only contain one char", )); }; Ok(()) } pub fn check_field_delimiter(option: &mut String, default: &str) -> Result<()> { if option.is_empty() { *option = default.to_string() } else if option.as_bytes().len() > 1 { return Err(ErrorCode::InvalidArgument( "field_delimiter can only contain one char", )); }; Ok(()) } /// `\r\n` or u8 pub fn check_record_delimiter(option: &mut String) -> Result<()> { match option.len() { 0 => *option = "\n".to_string(), 1 => {} 2 => { if option != "\r\n" { return Err(ErrorCode::InvalidArgument( "record_delimiter with two chars can only be '\\r\\n'", )); }; } _ => { return Err(ErrorCode::InvalidArgument( "record_delimiter can not more than two chars, please use one char or '\\r\\n'", )); } } Ok(()) } fn check_nan_display(nan_display: &mut String, default: &str) -> Result<()> { if nan_display.is_empty() { *nan_display = default.to_string() } else { let lower = nan_display.to_lowercase(); if lower != "nan" && lower != "null" { return Err(ErrorCode::InvalidArgument( "nan_display must be literal `nan` or `null` (case-insensitive)", )); } } Ok(()) }
extern crate nom; use nom::{ branch::alt, bytes::complete::{tag, take_while, take_until}, character::complete::{alphanumeric1, char, multispace0, space0}, multi::separated_list0, sequence::{preceded, separated_pair, terminated}, IResult }; use crate::domains::function_signature::{ ApplicationType, ApplicationParentType, FunctionParameter, FunctionSignature, Dependency, ParameterType }; fn valid_type_identifier_char(c: char) -> bool { c.is_alphanumeric() || c == '[' || c == ']' || c == '{' || c == '}' } fn valid_type_identifier(i: &str) -> IResult<&str, &str> { take_while(valid_type_identifier_char)(i) } fn valid_identifier_char(c: char) -> bool { c.is_alphanumeric() || c == '_' } fn valid_identifier(i: &str) -> IResult<&str, &str> { take_while(valid_identifier_char)(i) } fn parse_function_name(i: &str) -> IResult<&str, &str> { take_until("(")(i) } fn parse_application_type(i: &str) -> IResult<&str, ParameterType> { let (rest, result) = alphanumeric1(i)?; Ok(( rest, ParameterType::ApplicationType( ApplicationType { type_name: String::from(result) } ) )) } fn parse_parent_type(i: &str) -> IResult<&str, ParameterType> { let (bracket_rest, type_name) = alphanumeric1(i)?; let (rest, bracket_contents) = preceded(tag("["), terminated(separated_list0(tag(","), parse_type), tag("]")))(bracket_rest)?; let param = ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from(type_name), children: bracket_contents } ); Ok((rest, param)) } fn parse_dependency_type(i: &str) -> IResult<&str, ParameterType> { let (rest, result) = preceded(preceded(space0, tag("{")), terminated(alphanumeric1, tag("}")))(i)?; let param = ParameterType::Dependency ( Dependency{dependency_name: String::from(result) }); Ok((rest, param)) } fn parse_type(i: &str) -> IResult<&str, ParameterType> { preceded( space0, alt(( parse_dependency_type, parse_parent_type, parse_application_type, )) )(i) } fn parse_argument(i: &str) -> IResult<&str, FunctionParameter> { let (rest, (left, right)) = separated_pair( preceded(space0, valid_identifier), preceded(space0, char(':')), preceded(space0, valid_type_identifier) )(i)?; let (_, application_type) = parse_type(right)?; let param = FunctionParameter { name: String::from(left), ptype: application_type }; Ok((rest, param)) } fn parse_function_arguments(i: &str) -> IResult<&str, Vec<FunctionParameter>> { preceded(tag("("), terminated( separated_list0( preceded(space0, tag(",")), preceded(multispace0, parse_argument) ), tag(")") ) )(i) } fn parse_output(i: &str) -> IResult<&str, ParameterType> { preceded( preceded(space0, tag("->")), preceded(space0, parse_type) )(i) } #[allow(dead_code)] pub fn root(i: &str) -> IResult<&str, FunctionSignature> { let (rest, function_name) = parse_function_name(i)?; let (rest, params) = parse_function_arguments(rest)?; let (_, output) = parse_output(rest)?; let function_signature = FunctionSignature { name: String::from(function_name), input: params, output, }; Ok(("", function_signature)) } #[cfg(test)] mod tests { use super::*; #[test] fn function_signature_test() { let data = r#"get_users_for_account(http_client: {requests}, account_ids: List[AccountId]) -> Result[List[User], ErrorMsg]"#; let expected = FunctionSignature { name: String::from("get_users_for_account"), input: vec![ FunctionParameter { name: String::from("http_client"), ptype: ParameterType::Dependency( Dependency { dependency_name: String::from("requests") } ) }, FunctionParameter { name: String::from("account_ids"), ptype: ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("List"), children: vec![ ParameterType::ApplicationType( ApplicationType { type_name: String::from("AccountId") } ) ] } ) } ], output: ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("Result"), children: vec![ ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("List"), children: vec![ ParameterType::ApplicationType( ApplicationType { type_name: String::from("User") } ) ] } ), ParameterType::ApplicationType( ApplicationType { type_name: String::from("ErrorMsg") } ) ] } ) }; let result = root(data); assert_eq!(result, Ok(("", expected))) } #[test] fn parse_type_test() { let data = "AccountId"; let result = parse_type(data); let expected = ParameterType::ApplicationType( ApplicationType { type_name: String::from("AccountId") } ); assert_eq!(result, Ok(("", expected))) } #[test] fn parse_parenttype_test() { let data = "AccountId[User]"; let result = parse_type(data); let expected = ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("AccountId"), children: vec![ ParameterType::ApplicationType( ApplicationType { type_name: String::from("User") } ) ] } ); assert_eq!(result, Ok(("", expected))) } #[test] fn parse_nested_parenttype_test() { let data = "AccountId[User[Email]]"; let result = parse_type(data); let expected = ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("AccountId"), children: vec![ ParameterType::ApplicationParentType( ApplicationParentType { type_name: String::from("User"), children: vec![ ParameterType::ApplicationType( ApplicationType { type_name: String::from("Email") } ) ] } ) ] } ); assert_eq!(result, Ok(("", expected))) } #[test] fn parse_dependency_type_test() { let data = "{requests}"; let result = parse_type(data); let expected = ParameterType::Dependency( Dependency { dependency_name: String::from("requests"), } ); assert_eq!(result, Ok(("", expected))) } #[test] fn parse_argument_test() { let data = "id: AccountId"; let result = parse_argument(data); let application_type = ApplicationType { type_name: String::from("AccountId") }; let expected = FunctionParameter { name: String::from("id"), ptype: ParameterType::ApplicationType(application_type) }; assert_eq!(result, Ok(("", expected))) } // #[test] // fn invalid_syntax_function_signature_test() { // } }
//! # Pipeline //! //! Defines an upgrade pipeline that can be used to upgrade and gitify single //! WordPress plugins. use fs_extra; use std::{ fs::write, path::PathBuf }; use config::RuntimeConfig; use git::Git; use wordpress::{Plugin, WpCli, get_plugin_version}; /// Data for an upgrade pipeline. pub struct Pipeline { plugin: Plugin, has_backup: bool, backup_dir: PathBuf, git_cli: Git, wp_cli: WpCli, dry_run: bool, verbose: bool } /// Pipeline implementation. impl Pipeline { /// Create a new pipeline instance. pub fn new(config: &RuntimeConfig, plugin: &Plugin, backup_dir: &PathBuf) -> Result<Pipeline, String> { if config.dry_run { println!("Creating dry run pipeline for plugin `{}`", plugin.get_nicename()); } let nicename = plugin.get_cli_name()?; let mut backup_subdir: PathBuf = backup_dir.clone(); backup_subdir.push(nicename); let mut plugin_dir = plugin.index_path.clone(); plugin_dir.pop(); let git = Git::new(config.binaries.git.clone(), config.git.clone(), plugin_dir.clone()); let wp = WpCli::new(config.binaries.wpcli.clone(), plugin_dir.clone()); Ok(Pipeline { plugin: (*plugin).clone(), has_backup: false, backup_dir: backup_subdir, git_cli: git, wp_cli: wp, dry_run: config.dry_run, verbose: config.verbose }) } /// Output a progress log entry to stdout. fn progress_log(&self, msg: &str) { let pname = self.plugin.get_nicename(); println!("[{}] {}", pname, msg); } /// Run the pipeline, first by maybe initing the plugin and then doing /// upgrades. pub fn run(&mut self) -> Result<bool, String> { self.progress_log("Starting upgrade run"); self.maybe_initialize_plugin()?; self.create_backup()?; if self.plugin.pre_cmds.is_empty() == false { self.progress_log("Running plugin pre-commands before upgrade"); self.run_pre_cmds()?; } let updated = self.update_plugin(); match updated { Ok(b) => { match b { true => (), // update was made and succeeded false => { self.progress_log("Plugin already up to date, proceeding"); return Ok(true) } } }, Err(s) => { self.restore_backup()?; self.git_cli.reset_contents()?; return Err(s); } } self.restore_backup()?; // as the upgrade removed our git and composerjson we restore them if self.dry_run == false && self.git_cli.has_uncommited_changes()? == false { // no changes done during update, we're done here return Ok(true); } let current_version = self.plugin.installed_version.clone().unwrap(); let new_version = get_plugin_version(&self.plugin)?; if self.dry_run == false && current_version == new_version { self.restore_backup()?; self.git_cli.reset_contents()?; // no upgrade done, break out return Ok(true); } let result: Result<bool, String>; if self.dry_run == false { self.git_cli.add_and_commit_changes()?; self.git_cli.add_tag(new_version)?; result = self.git_cli.push_to_remote(); } else { result = Ok(true); } match result { Ok(_) => { self.progress_log("Upgrade run finished"); Ok(true) }, Err(s) => { self.restore_backup()?; self.git_cli.reset_contents()?; return Err(s); } } } /// Run plugin-defined pre-commands. They are just shell commands defined in /// the WPPR config. fn run_pre_cmds(&self) -> Result<(), String> { unimplemented!() } fn maybe_initialize_plugin(&self) -> Result<(), String> { self.initialize_git_repo_for_plugin()?; self.create_composerjson_for_plugin()?; return Ok(()); } fn initialize_git_repo_for_plugin(&self) -> Result<(), String> { self.progress_log("Initializing git repo if one does not exist"); if self.dry_run { return Ok(()); } let git_inited = match self.git_cli.repository_is_initialized()? { true => true, false => self.git_cli.initialize_repository()? && self.git_cli.set_repo_git_config()? }; if git_inited == false { return Err(format!( "Failed to initialize git repository for plugin `{}`", self.plugin.get_nicename() )); } self.git_cli.add_remote(self.plugin.remote_repository.clone())?; self.git_cli.add_and_commit_changes()?; // add the initial contents return Ok(()); } fn create_composerjson_for_plugin(&self) -> Result<(), String> { self.progress_log("Creating composer.json if it does not exist"); if self.dry_run { return Ok(()); } let composerjson_path = self.plugin.get_composerjson_path(); if composerjson_path.exists() { return Ok(()); } let initial_contents = format!("{{\ \"name\": \"{}\"\ \"type\": \"wordpress-plugin\"\ }}", self.plugin.package_name); let result = write(composerjson_path, initial_contents); match result { Ok(_) => Ok(()), Err(e) => { let errstr = format!("{}", e); Err(errstr) } } } fn create_backup(&mut self) -> Result<(), String> { self.progress_log("Creating history data and config backup"); if self.dry_run { return Ok(()); } let git_dir = self.plugin.get_git_dir()?; let mut dest = self.backup_dir.clone(); dest.push(".git"); let mut copts = fs_extra::dir::CopyOptions::new(); copts.copy_inside = true; copts.overwrite = true; if self.verbose { self.progress_log(&format!("Working with backup directory `{:?}`", self.backup_dir)); self.progress_log(&format!("Copying files from `{:?}` to `{:?}`", git_dir, dest)); } let _ = fs_extra::dir::create(&dest, true); let backup_result = fs_extra::dir::copy(&git_dir, &dest, &copts); match backup_result { Ok(_) => { let mut backedup_git = self.backup_dir.clone(); backedup_git.push(".git"); let gitexist = backedup_git.exists() && backedup_git.is_dir(); if gitexist == false { Err(format!( "Failed to backup plugin .git directory for `{}`", self.plugin.get_nicename() )) } else { self.has_backup = true; Ok(()) } }, Err(e) => Err(format!( "Creating backup failed for plugin `{}`: `{:?}`", self.plugin.get_nicename(), e )) } } fn restore_backup(&mut self) -> Result<(), String> { self.progress_log("Restoring history data and config"); if self.dry_run { return Ok(()); } if self.has_backup == false { return Err(format!( "Cannot restore backup for `{}`, no backup has been created yet", self.plugin.get_nicename() )); } self.create_composerjson_for_plugin()?; let mut backedup_gitdir = self.backup_dir.clone(); backedup_gitdir.push(".git"); // remove the existing git dir to make a clean copy possible let mut plugin_gitdir = self.plugin.get_git_dir_path(); let _ = fs_extra::dir::create(&plugin_gitdir, true); let mut copts = fs_extra::dir::CopyOptions::new(); copts.copy_inside = true; copts.overwrite = true; if self.verbose { self.progress_log(&format!("Working with backup directory `{:?}`", self.backup_dir)); self.progress_log(&format!("Copying files from `{:?}` to `{:?}`", backedup_gitdir, plugin_gitdir)); } plugin_gitdir.pop(); let restore_result = fs_extra::dir::copy(&backedup_gitdir, &plugin_gitdir, &copts); match restore_result { Ok(_) => Ok(()), Err(e) => Err(format!( "Restoring backup failed for plugin `{}`: `{:?}`", self.plugin.get_nicename(), e )) } } /// Update the designated plugin via WpCli. fn update_plugin(&self) -> Result<bool, String> { self.progress_log("Running WordPress update procedure"); if self.dry_run { return Ok(true); } return Ok(self.wp_cli.update_plugin(&self.plugin)?.contains("already updated") == false); } }
// 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::{format_err, Error, ResultExt}; use fidl::endpoints; use fidl_fuchsia_wlan_common as fidl_common; use fidl_fuchsia_wlan_device_service::DeviceServiceProxy; use fidl_fuchsia_wlan_sme as fidl_sme; use fuchsia_zircon as zx; type WlanService = DeviceServiceProxy; pub async fn get_iface_ap_sme_proxy( wlan_svc: &WlanService, iface_id: u16, ) -> Result<fidl_sme::ApSmeProxy, Error> { let (sme_proxy, sme_remote) = endpoints::create_proxy()?; let status = wlan_svc.get_ap_sme(iface_id, sme_remote).await .context("error sending GetApSme request")?; if status == zx::sys::ZX_OK { Ok(sme_proxy) } else { Err(format_err!("Invalid interface id {}", iface_id)) } } pub async fn stop_ap(iface_sme_proxy: &fidl_sme::ApSmeProxy) -> Result<(), Error> { let stop_ap_result_code = iface_sme_proxy.stop().await; match stop_ap_result_code { Ok(result_code) => Ok(result_code), _ => Err(format_err!("AP stop failure: {:?}", stop_ap_result_code)), } } pub async fn start_ap( iface_sme_proxy: &fidl_sme::ApSmeProxy, target_ssid: Vec<u8>, target_pwd: Vec<u8>, channel: u8, ) -> Result<fidl_sme::StartApResultCode, Error> { // create ConnectRequest holding network info let mut config = fidl_sme::ApConfig { ssid: target_ssid, password: target_pwd, radio_cfg: fidl_sme::RadioConfig { override_phy: false, phy: fidl_common::Phy::Ht, override_cbw: false, cbw: fidl_common::Cbw::Cbw20, override_primary_chan: true, primary_chan: channel, }, }; let start_ap_result_code = iface_sme_proxy.start(&mut config).await; match start_ap_result_code { Ok(result_code) => Ok(result_code), _ => Err(format_err!("AP start failure: {:?}", start_ap_result_code)), } } #[cfg(test)] mod tests { use super::*; use fidl_fuchsia_wlan_sme::ApSmeMarker; use fidl_fuchsia_wlan_sme::StartApResultCode; use fidl_fuchsia_wlan_sme::{ApSmeRequest, ApSmeRequestStream}; use fuchsia_async as fasync; use futures::stream::{StreamExt, StreamFuture}; use futures::task::Poll; use pin_utils::pin_mut; #[test] fn start_ap_success_returns_true() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::Success); assert!(start_ap_result == StartApResultCode::Success); } #[test] fn start_ap_already_started_returns_false() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::AlreadyStarted); assert!(start_ap_result == StartApResultCode::AlreadyStarted); } #[test] fn start_ap_internal_error_returns_false() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::InternalError); assert!(start_ap_result == StartApResultCode::InternalError); } #[test] fn start_ap_canceled_returns_false() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::Canceled); assert!(start_ap_result == StartApResultCode::Canceled); } #[test] fn start_ap_timedout_returns_false() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::TimedOut); assert!(start_ap_result == StartApResultCode::TimedOut); } #[test] fn start_ap_in_progress_returns_false() { let start_ap_result = test_ap_start("TestAp", "", 6, StartApResultCode::PreviousStartInProgress); assert!(start_ap_result == StartApResultCode::PreviousStartInProgress); } fn test_ap_start( ssid: &str, password: &str, channel: u8, result_code: StartApResultCode, ) -> StartApResultCode { let mut exec = fasync::Executor::new().expect("failed to create an executor"); let (ap_sme, server) = create_ap_sme_proxy(); let mut ap_sme_req = server.into_future(); let target_ssid = ssid.as_bytes().to_vec(); let target_password = password.as_bytes().to_vec(); let config = fidl_sme::ApConfig { ssid: target_ssid.to_vec(), password: target_password.to_vec(), radio_cfg: fidl_sme::RadioConfig { override_phy: false, phy: fidl_common::Phy::Ht, override_cbw: false, cbw: fidl_common::Cbw::Cbw20, override_primary_chan: true, primary_chan: channel, }, }; let fut = start_ap(&ap_sme, target_ssid, target_password, channel); pin_mut!(fut); assert!(exec.run_until_stalled(&mut fut).is_pending()); send_start_ap_response(&mut exec, &mut ap_sme_req, config, result_code); let complete = exec.run_until_stalled(&mut fut); let ap_start_result = match complete { Poll::Ready(result) => result, _ => panic!("Expected a start response"), }; let returned_start_ap_code = match ap_start_result { Ok(response) => response, _ => panic!("Expected a valid start result"), }; returned_start_ap_code } fn create_ap_sme_proxy() -> (fidl_sme::ApSmeProxy, ApSmeRequestStream) { let (proxy, server) = endpoints::create_proxy::<ApSmeMarker>().expect("failed to create sme ap channel"); let server = server.into_stream().expect("failed to create ap sme response stream"); (proxy, server) } fn send_start_ap_response( exec: &mut fasync::Executor, server: &mut StreamFuture<ApSmeRequestStream>, expected_config: fidl_sme::ApConfig, result_code: StartApResultCode, ) { let rsp = match poll_ap_sme_request(exec, server) { Poll::Ready(ApSmeRequest::Start { config, responder }) => { assert_eq!(expected_config, config); responder } Poll::Pending => panic!("Expected AP Start Request"), _ => panic!("Expected AP Start Request"), }; rsp.send(result_code).expect("Failed to send AP start response."); } fn poll_ap_sme_request( exec: &mut fasync::Executor, next_ap_sme_req: &mut StreamFuture<ApSmeRequestStream>, ) -> Poll<ApSmeRequest> { exec.run_until_stalled(next_ap_sme_req).map(|(req, stream)| { *next_ap_sme_req = stream.into_future(); req.expect("did not expect the ApSmeRequestStream to end") .expect("error polling ap sme request stream") }) } }
pub(crate) use _collections::make_module; #[pymodule] mod _collections { use crate::{ atomic_func, builtins::{ IterStatus::{Active, Exhausted}, PositionIterInternal, PyGenericAlias, PyInt, PyTypeRef, }, common::lock::{PyMutex, PyRwLock, PyRwLockReadGuard, PyRwLockWriteGuard}, function::{FuncArgs, KwArgs, OptionalArg, PyComparisonValue}, iter::PyExactSizeIterator, protocol::{PyIterReturn, PySequenceMethods}, recursion::ReprGuard, sequence::{MutObjectSequenceOp, OptionalRangeArgs}, sliceable::SequenceIndexOp, types::{ AsSequence, Comparable, Constructor, Initializer, IterNext, Iterable, PyComparisonOp, Representable, SelfIter, }, utils::collection_repr, AsObject, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine, }; use crossbeam_utils::atomic::AtomicCell; use std::cmp::max; use std::collections::VecDeque; #[pyattr] #[pyclass(name = "deque", unhashable = true)] #[derive(Debug, Default, PyPayload)] struct PyDeque { deque: PyRwLock<VecDeque<PyObjectRef>>, maxlen: Option<usize>, state: AtomicCell<usize>, // incremented whenever the indices move } type PyDequeRef = PyRef<PyDeque>; #[derive(FromArgs)] struct PyDequeOptions { #[pyarg(any, optional)] iterable: OptionalArg<PyObjectRef>, #[pyarg(any, optional)] maxlen: OptionalArg<PyObjectRef>, } impl PyDeque { fn borrow_deque(&self) -> PyRwLockReadGuard<'_, VecDeque<PyObjectRef>> { self.deque.read() } fn borrow_deque_mut(&self) -> PyRwLockWriteGuard<'_, VecDeque<PyObjectRef>> { self.deque.write() } } #[pyclass( flags(BASETYPE), with( Constructor, Initializer, AsSequence, Comparable, Iterable, Representable ) )] impl PyDeque { #[pymethod] fn append(&self, obj: PyObjectRef) { self.state.fetch_add(1); let mut deque = self.borrow_deque_mut(); if self.maxlen == Some(deque.len()) { deque.pop_front(); } deque.push_back(obj); } #[pymethod] fn appendleft(&self, obj: PyObjectRef) { self.state.fetch_add(1); let mut deque = self.borrow_deque_mut(); if self.maxlen == Some(deque.len()) { deque.pop_back(); } deque.push_front(obj); } #[pymethod] fn clear(&self) { self.state.fetch_add(1); self.borrow_deque_mut().clear() } #[pymethod(magic)] #[pymethod] fn copy(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { Self { deque: PyRwLock::new(zelf.borrow_deque().clone()), maxlen: zelf.maxlen, state: AtomicCell::new(zelf.state.load()), } .into_ref_with_type(vm, zelf.class().to_owned()) } #[pymethod] fn count(&self, obj: PyObjectRef, vm: &VirtualMachine) -> PyResult<usize> { let start_state = self.state.load(); let count = self.mut_count(vm, &obj)?; if start_state != self.state.load() { return Err(vm.new_runtime_error("deque mutated during iteration".to_owned())); } Ok(count) } #[pymethod] fn extend(&self, iter: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { self._extend(&iter, vm) } fn _extend(&self, iter: &PyObject, vm: &VirtualMachine) -> PyResult<()> { self.state.fetch_add(1); let max_len = self.maxlen; let mut elements: Vec<PyObjectRef> = iter.try_to_value(vm)?; if let Some(max_len) = max_len { if max_len > elements.len() { let mut deque = self.borrow_deque_mut(); let drain_until = deque.len().saturating_sub(max_len - elements.len()); deque.drain(..drain_until); } else { self.borrow_deque_mut().clear(); elements.drain(..(elements.len() - max_len)); } } self.borrow_deque_mut().extend(elements); Ok(()) } #[pymethod] fn extendleft(&self, iter: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { let max_len = self.maxlen; let mut elements: Vec<PyObjectRef> = iter.try_to_value(vm)?; elements.reverse(); if let Some(max_len) = max_len { if max_len > elements.len() { let mut deque = self.borrow_deque_mut(); let truncate_until = max_len - elements.len(); deque.truncate(truncate_until); } else { self.borrow_deque_mut().clear(); elements.truncate(max_len); } } let mut created = VecDeque::from(elements); let mut borrowed = self.borrow_deque_mut(); created.append(&mut borrowed); std::mem::swap(&mut created, &mut borrowed); Ok(()) } #[pymethod] fn index( &self, needle: PyObjectRef, range: OptionalRangeArgs, vm: &VirtualMachine, ) -> PyResult<usize> { let start_state = self.state.load(); let (start, stop) = range.saturate(self.len(), vm)?; let index = self.mut_index_range(vm, &needle, start..stop)?; if start_state != self.state.load() { Err(vm.new_runtime_error("deque mutated during iteration".to_owned())) } else if let Some(index) = index.into() { Ok(index) } else { Err(vm.new_value_error( needle .repr(vm) .map(|repr| format!("{repr} is not in deque")) .unwrap_or_else(|_| String::new()), )) } } #[pymethod] fn insert(&self, idx: i32, obj: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { self.state.fetch_add(1); let mut deque = self.borrow_deque_mut(); if self.maxlen == Some(deque.len()) { return Err(vm.new_index_error("deque already at its maximum size".to_owned())); } let idx = if idx < 0 { if -idx as usize > deque.len() { 0 } else { deque.len() - ((-idx) as usize) } } else if idx as usize > deque.len() { deque.len() } else { idx as usize }; deque.insert(idx, obj); Ok(()) } #[pymethod] fn pop(&self, vm: &VirtualMachine) -> PyResult { self.state.fetch_add(1); self.borrow_deque_mut() .pop_back() .ok_or_else(|| vm.new_index_error("pop from an empty deque".to_owned())) } #[pymethod] fn popleft(&self, vm: &VirtualMachine) -> PyResult { self.state.fetch_add(1); self.borrow_deque_mut() .pop_front() .ok_or_else(|| vm.new_index_error("pop from an empty deque".to_owned())) } #[pymethod] fn remove(&self, obj: PyObjectRef, vm: &VirtualMachine) -> PyResult { let start_state = self.state.load(); let index = self.mut_index(vm, &obj)?; if start_state != self.state.load() { Err(vm.new_index_error("deque mutated during remove().".to_owned())) } else if let Some(index) = index.into() { let mut deque = self.borrow_deque_mut(); self.state.fetch_add(1); Ok(deque.remove(index).unwrap()) } else { Err(vm.new_value_error("deque.remove(x): x not in deque".to_owned())) } } #[pymethod] fn reverse(&self) { let rev: VecDeque<_> = self.borrow_deque().iter().cloned().rev().collect(); *self.borrow_deque_mut() = rev; } #[pymethod(magic)] fn reversed(zelf: PyRef<Self>) -> PyResult<PyReverseDequeIterator> { Ok(PyReverseDequeIterator { state: zelf.state.load(), internal: PyMutex::new(PositionIterInternal::new(zelf, 0)), }) } #[pymethod] fn rotate(&self, mid: OptionalArg<isize>) { self.state.fetch_add(1); let mut deque = self.borrow_deque_mut(); if !deque.is_empty() { let mid = mid.unwrap_or(1) % deque.len() as isize; if mid.is_negative() { deque.rotate_left(-mid as usize); } else { deque.rotate_right(mid as usize); } } } #[pygetset] fn maxlen(&self) -> Option<usize> { self.maxlen } #[pymethod(magic)] fn getitem(&self, idx: isize, vm: &VirtualMachine) -> PyResult { let deque = self.borrow_deque(); idx.wrapped_at(deque.len()) .and_then(|i| deque.get(i).cloned()) .ok_or_else(|| vm.new_index_error("deque index out of range".to_owned())) } #[pymethod(magic)] fn setitem(&self, idx: isize, value: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { let mut deque = self.borrow_deque_mut(); idx.wrapped_at(deque.len()) .and_then(|i| deque.get_mut(i)) .map(|x| *x = value) .ok_or_else(|| vm.new_index_error("deque index out of range".to_owned())) } #[pymethod(magic)] fn delitem(&self, idx: isize, vm: &VirtualMachine) -> PyResult<()> { let mut deque = self.borrow_deque_mut(); idx.wrapped_at(deque.len()) .and_then(|i| deque.remove(i).map(drop)) .ok_or_else(|| vm.new_index_error("deque index out of range".to_owned())) } #[pymethod(magic)] fn contains(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult<bool> { self._contains(&needle, vm) } fn _contains(&self, needle: &PyObject, vm: &VirtualMachine) -> PyResult<bool> { let start_state = self.state.load(); let ret = self.mut_contains(vm, needle)?; if start_state != self.state.load() { Err(vm.new_runtime_error("deque mutated during iteration".to_owned())) } else { Ok(ret) } } fn _mul(&self, n: isize, vm: &VirtualMachine) -> PyResult<VecDeque<PyObjectRef>> { let deque = self.borrow_deque(); let n = vm.check_repeat_or_overflow_error(deque.len(), n)?; let mul_len = n * deque.len(); let iter = deque.iter().cycle().take(mul_len); let skipped = self .maxlen .and_then(|maxlen| mul_len.checked_sub(maxlen)) .unwrap_or(0); let deque = iter.skip(skipped).cloned().collect(); Ok(deque) } #[pymethod(magic)] #[pymethod(name = "__rmul__")] fn mul(&self, n: isize, vm: &VirtualMachine) -> PyResult<Self> { let deque = self._mul(n, vm)?; Ok(PyDeque { deque: PyRwLock::new(deque), maxlen: self.maxlen, state: AtomicCell::new(0), }) } #[pymethod(magic)] fn imul(zelf: PyRef<Self>, n: isize, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { let mul_deque = zelf._mul(n, vm)?; *zelf.borrow_deque_mut() = mul_deque; Ok(zelf) } #[pymethod(magic)] fn len(&self) -> usize { self.borrow_deque().len() } #[pymethod(magic)] fn bool(&self) -> bool { !self.borrow_deque().is_empty() } #[pymethod(magic)] fn add(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult<Self> { self.concat(&other, vm) } fn concat(&self, other: &PyObject, vm: &VirtualMachine) -> PyResult<Self> { if let Some(o) = other.payload_if_subclass::<PyDeque>(vm) { let mut deque = self.borrow_deque().clone(); let elements = o.borrow_deque().clone(); deque.extend(elements); let skipped = self .maxlen .and_then(|maxlen| deque.len().checked_sub(maxlen)) .unwrap_or(0); deque.drain(..skipped); Ok(PyDeque { deque: PyRwLock::new(deque), maxlen: self.maxlen, state: AtomicCell::new(0), }) } else { Err(vm.new_type_error(format!( "can only concatenate deque (not \"{}\") to deque", other.class().name() ))) } } #[pymethod(magic)] fn iadd( zelf: PyRef<Self>, other: PyObjectRef, vm: &VirtualMachine, ) -> PyResult<PyRef<Self>> { zelf.extend(other, vm)?; Ok(zelf) } #[pymethod(magic)] fn reduce(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult { let cls = zelf.class().to_owned(); let value = match zelf.maxlen { Some(v) => vm.new_pyobj((vm.ctx.empty_tuple.clone(), v)), None => vm.ctx.empty_tuple.clone().into(), }; Ok(vm.new_pyobj((cls, value, vm.ctx.none(), PyDequeIterator::new(zelf)))) } #[pyclassmethod(magic)] fn class_getitem(cls: PyTypeRef, args: PyObjectRef, vm: &VirtualMachine) -> PyGenericAlias { PyGenericAlias::new(cls, args, vm) } } impl MutObjectSequenceOp for PyDeque { type Guard<'a> = PyRwLockReadGuard<'a, VecDeque<PyObjectRef>>; fn do_get<'a>(index: usize, guard: &'a Self::Guard<'_>) -> Option<&'a PyObjectRef> { guard.get(index) } fn do_lock(&self) -> Self::Guard<'_> { self.borrow_deque() } } impl Constructor for PyDeque { type Args = FuncArgs; fn py_new(cls: PyTypeRef, _args: FuncArgs, vm: &VirtualMachine) -> PyResult { PyDeque::default() .into_ref_with_type(vm, cls) .map(Into::into) } } impl Initializer for PyDeque { type Args = PyDequeOptions; fn init( zelf: PyRef<Self>, PyDequeOptions { iterable, maxlen }: Self::Args, vm: &VirtualMachine, ) -> PyResult<()> { // TODO: This is _basically_ pyobject_to_opt_usize in itertools.rs // need to move that function elsewhere and refactor usages. let maxlen = if let Some(obj) = maxlen.into_option() { if !vm.is_none(&obj) { let maxlen: isize = obj .payload::<PyInt>() .ok_or_else(|| vm.new_type_error("an integer is required.".to_owned()))? .try_to_primitive(vm)?; if maxlen.is_negative() { return Err(vm.new_value_error("maxlen must be non-negative.".to_owned())); } Some(maxlen as usize) } else { None } } else { None }; // retrieve elements first to not to make too huge lock let elements = iterable .into_option() .map(|iter| { let mut elements: Vec<PyObjectRef> = iter.try_to_value(vm)?; if let Some(maxlen) = maxlen { elements.drain(..elements.len().saturating_sub(maxlen)); } Ok(elements) }) .transpose()?; // SAFETY: This is hacky part for read-only field // Because `maxlen` is only mutated from __init__. We can abuse the lock of deque to ensure this is locked enough. // If we make a single lock of deque not only for extend but also for setting maxlen, it will be safe. { let mut deque = zelf.borrow_deque_mut(); // Clear any previous data present. deque.clear(); unsafe { // `maxlen` is better to be defined as UnsafeCell in common practice, // but then more type works without any safety benefits let unsafe_maxlen = &zelf.maxlen as *const _ as *const std::cell::UnsafeCell<Option<usize>>; *(*unsafe_maxlen).get() = maxlen; } if let Some(elements) = elements { deque.extend(elements); } } Ok(()) } } impl AsSequence for PyDeque { fn as_sequence() -> &'static PySequenceMethods { static AS_SEQUENCE: PySequenceMethods = PySequenceMethods { length: atomic_func!(|seq, _vm| Ok(PyDeque::sequence_downcast(seq).len())), concat: atomic_func!(|seq, other, vm| { PyDeque::sequence_downcast(seq) .concat(other, vm) .map(|x| x.into_ref(&vm.ctx).into()) }), repeat: atomic_func!(|seq, n, vm| { PyDeque::sequence_downcast(seq) .mul(n, vm) .map(|x| x.into_ref(&vm.ctx).into()) }), item: atomic_func!(|seq, i, vm| PyDeque::sequence_downcast(seq).getitem(i, vm)), ass_item: atomic_func!(|seq, i, value, vm| { let zelf = PyDeque::sequence_downcast(seq); if let Some(value) = value { zelf.setitem(i, value, vm) } else { zelf.delitem(i, vm) } }), contains: atomic_func!( |seq, needle, vm| PyDeque::sequence_downcast(seq)._contains(needle, vm) ), inplace_concat: atomic_func!(|seq, other, vm| { let zelf = PyDeque::sequence_downcast(seq); zelf._extend(other, vm)?; Ok(zelf.to_owned().into()) }), inplace_repeat: atomic_func!(|seq, n, vm| { let zelf = PyDeque::sequence_downcast(seq); PyDeque::imul(zelf.to_owned(), n, vm).map(|x| x.into()) }), }; &AS_SEQUENCE } } impl Comparable for PyDeque { fn cmp( zelf: &Py<Self>, other: &PyObject, op: PyComparisonOp, vm: &VirtualMachine, ) -> PyResult<PyComparisonValue> { if let Some(res) = op.identical_optimization(zelf, other) { return Ok(res.into()); } let other = class_or_notimplemented!(Self, other); let lhs = zelf.borrow_deque(); let rhs = other.borrow_deque(); lhs.iter() .richcompare(rhs.iter(), op, vm) .map(PyComparisonValue::Implemented) } } impl Iterable for PyDeque { fn iter(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult { Ok(PyDequeIterator::new(zelf).into_pyobject(vm)) } } impl Representable for PyDeque { #[inline] fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String> { let deque = zelf.borrow_deque().clone(); let class = zelf.class(); let class_name = class.name(); let closing_part = zelf .maxlen .map(|maxlen| format!("], maxlen={maxlen}")) .unwrap_or_else(|| "]".to_owned()); let s = if zelf.len() == 0 { format!("{class_name}([{closing_part})") } else if let Some(_guard) = ReprGuard::enter(vm, zelf.as_object()) { collection_repr(Some(&class_name), "[", &closing_part, deque.iter(), vm)? } else { "[...]".to_owned() }; Ok(s) } } #[pyattr] #[pyclass(name = "_deque_iterator")] #[derive(Debug, PyPayload)] struct PyDequeIterator { state: usize, internal: PyMutex<PositionIterInternal<PyDequeRef>>, } #[derive(FromArgs)] struct DequeIterArgs { #[pyarg(positional)] deque: PyDequeRef, #[pyarg(positional, optional)] index: OptionalArg<isize>, } impl Constructor for PyDequeIterator { type Args = (DequeIterArgs, KwArgs); fn py_new( cls: PyTypeRef, (DequeIterArgs { deque, index }, _kwargs): Self::Args, vm: &VirtualMachine, ) -> PyResult { let iter = PyDequeIterator::new(deque); if let OptionalArg::Present(index) = index { let index = max(index, 0) as usize; iter.internal.lock().position = index; } iter.into_ref_with_type(vm, cls).map(Into::into) } } #[pyclass(with(IterNext, Iterable, Constructor))] impl PyDequeIterator { pub(crate) fn new(deque: PyDequeRef) -> Self { PyDequeIterator { state: deque.state.load(), internal: PyMutex::new(PositionIterInternal::new(deque, 0)), } } #[pymethod(magic)] fn length_hint(&self) -> usize { self.internal.lock().length_hint(|obj| obj.len()) } #[pymethod(magic)] fn reduce( zelf: PyRef<Self>, vm: &VirtualMachine, ) -> (PyTypeRef, (PyDequeRef, PyObjectRef)) { let internal = zelf.internal.lock(); let deque = match &internal.status { Active(obj) => obj.clone(), Exhausted => PyDeque::default().into_ref(&vm.ctx), }; ( zelf.class().to_owned(), (deque, vm.ctx.new_int(internal.position).into()), ) } } impl SelfIter for PyDequeIterator {} impl IterNext for PyDequeIterator { fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> { zelf.internal.lock().next(|deque, pos| { if zelf.state != deque.state.load() { return Err(vm.new_runtime_error("Deque mutated during iteration".to_owned())); } let deque = deque.borrow_deque(); Ok(PyIterReturn::from_result( deque.get(pos).cloned().ok_or(None), )) }) } } #[pyattr] #[pyclass(name = "_deque_reverse_iterator")] #[derive(Debug, PyPayload)] struct PyReverseDequeIterator { state: usize, // position is counting from the tail internal: PyMutex<PositionIterInternal<PyDequeRef>>, } impl Constructor for PyReverseDequeIterator { type Args = (DequeIterArgs, KwArgs); fn py_new( cls: PyTypeRef, (DequeIterArgs { deque, index }, _kwargs): Self::Args, vm: &VirtualMachine, ) -> PyResult { let iter = PyDeque::reversed(deque)?; if let OptionalArg::Present(index) = index { let index = max(index, 0) as usize; iter.internal.lock().position = index; } iter.into_ref_with_type(vm, cls).map(Into::into) } } #[pyclass(with(IterNext, Iterable, Constructor))] impl PyReverseDequeIterator { #[pymethod(magic)] fn length_hint(&self) -> usize { self.internal.lock().length_hint(|obj| obj.len()) } #[pymethod(magic)] fn reduce( zelf: PyRef<Self>, vm: &VirtualMachine, ) -> PyResult<(PyTypeRef, (PyDequeRef, PyObjectRef))> { let internal = zelf.internal.lock(); let deque = match &internal.status { Active(obj) => obj.clone(), Exhausted => PyDeque::default().into_ref(&vm.ctx), }; Ok(( zelf.class().to_owned(), (deque, vm.ctx.new_int(internal.position).into()), )) } } impl SelfIter for PyReverseDequeIterator {} impl IterNext for PyReverseDequeIterator { fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> { zelf.internal.lock().next(|deque, pos| { if deque.state.load() != zelf.state { return Err(vm.new_runtime_error("Deque mutated during iteration".to_owned())); } let deque = deque.borrow_deque(); let r = deque .len() .checked_sub(pos + 1) .and_then(|pos| deque.get(pos)) .cloned(); Ok(PyIterReturn::from_result(r.ok_or(None))) }) } } }
//! Blinks an LED #![deny(unsafe_code)] #![deny(warnings)] #![no_std] #![no_main] extern crate cortex_m; #[macro_use] extern crate cortex_m_rt as rt; extern crate cortex_m_semihosting as sh; extern crate panic_semihosting; extern crate stm32l4xx_hal as hal; use crate::hal::delay::Delay; use crate::hal::rcc::{PllConfig, PllDivider}; // #[macro_use(block)] // extern crate nb; use crate::hal::prelude::*; use crate::rt::entry; use crate::rt::ExceptionFrame; #[entry] fn main() -> ! { let cp = cortex_m::Peripherals::take().unwrap(); let dp = hal::stm32::Peripherals::take().unwrap(); let mut flash = dp.FLASH.constrain(); // .constrain(); let mut rcc = dp.RCC.constrain(); let mut pwr = dp.PWR.constrain(&mut rcc.apb1r1); // Try a different clock configuration let clock_cfg = 4; let clocks = match clock_cfg { 0 => rcc.cfgr.freeze(&mut flash.acr, &mut pwr), // directly use 16MHz HSI without PLL 1 => { rcc // full speed (64 & 80MHz) use the 16MHZ HSI osc + PLL (but slower / intermediate values need MSI) .cfgr .sysclk(80.mhz()) .pclk1(80.mhz()) .pclk2(80.mhz()) .freeze(&mut flash.acr, &mut pwr) } 2 => { rcc // weird clock frequencies can be achieved by using the internal multispeed oscillator (MSI) + PLL .cfgr .msi(stm32l4xx_hal::rcc::MsiFreq::RANGE4M) .sysclk(37.mhz()) .pclk1(37.mhz()) .pclk2(37.mhz()) .freeze(&mut flash.acr, &mut pwr) } 3 => rcc // HSI48 does not become ready => does not work .cfgr .hsi48(true) .sysclk(48.mhz()) .pclk1(24.mhz()) .pclk2(24.mhz()) .freeze(&mut flash.acr, &mut pwr), 4 => { rcc // run at 8MHz with explicit pll config (otherwise rcc auto config fall back to 16MHz HSI) .cfgr .msi(stm32l4xx_hal::rcc::MsiFreq::RANGE8M) .sysclk_with_pll( 8.mhz(), PllConfig::new( 0b001, // / 2 0b1000, // * 8 PllDivider::Div8, // /8 ), ) .pclk1(8.mhz()) .pclk2(8.mhz()) .freeze(&mut flash.acr, &mut pwr) } _ => panic!("unhandled clock config"), }; let mut timer = Delay::new(cp.SYST, clocks); let mut gpioa = dp.GPIOA.split(&mut rcc.ahb2); let mut led = gpioa .pa5 .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper); loop { // note: delay_ms does not automatically compensate for systick wraparound. E.g. at 80MHz the 24bit systick timer wraps around every 209ms. led.set_high().unwrap(); timer.delay_ms(209u16); led.set_low().unwrap(); timer.delay_ms(50u16); } } #[exception] fn HardFault(ef: &ExceptionFrame) -> ! { panic!("{:#?}", ef); }
pub fn four_bytes_at_offset(block: &[u8], offset: usize) -> u32 { let first: u32 = block[offset] as u32; let second: u32 = block[offset + 1] as u32; let third: u32 = block[offset + 2] as u32; let fourth: u32 = block[offset + 3] as u32; (first | second << 8 | third << 16 | fourth << 24) } pub fn two_bytes_at_offset(block: &[u8], offset: usize) -> u16 { let first: u16 = block[offset] as u16; let second: u16 = block[offset + 1] as u16; (first | second << 8) }
use bytes::Bytes; use crate::error::Error; use crate::io::BufExt; use crate::mssql::{MssqlColumn, MssqlTypeInfo}; #[derive(Debug)] pub(crate) struct Row { pub(crate) column_types: Vec<MssqlTypeInfo>, pub(crate) values: Vec<Option<Bytes>>, } impl Row { pub(crate) fn get( buf: &mut Bytes, nullable: bool, columns: &[MssqlColumn], ) -> Result<Self, Error> { let mut values = Vec::with_capacity(columns.len()); let mut column_types = Vec::with_capacity(columns.len()); let nulls = if nullable { buf.get_bytes((columns.len() + 7) / 8) } else { Bytes::from_static(b"") }; for (i, column) in columns.iter().enumerate() { column_types.push(column.type_info.clone()); if !(column.type_info.0.is_null() || (nullable && (nulls[i / 8] & (1 << (i % 8))) != 0)) { values.push(column.type_info.0.get_value(buf)); } else { values.push(None); } } Ok(Self { values, column_types, }) } }
pub fn find_amount_of_possible_passwords() -> u32 { let min = 284639; let max = 748759; let mut amount = 0; for num in min..max { if meets_criteria_part1(num) { amount = amount + 1; } } amount } pub fn find_possible_passwords() -> u32 { let min = 284639; let max = 748759; let mut amount = 0; for num in min..max { if meets_criteria_part2(num) { amount = amount + 1; } } amount } fn meets_criteria_part1(number: u32) -> bool { let as_string = format!("{}", number); has_two_adjacent_digits(&as_string) && digits_never_decrease(&as_string) } fn meets_criteria_part2(number: u32) -> bool { let as_string = format!("{}", number); has_two_adjacent_digits_in_no_larger_group(&as_string) && digits_never_decrease(&as_string) } fn has_two_adjacent_digits(number: &str) -> bool { if number.len() < 2 { return false; } let mut number_iter = number.chars(); let mut last_digit = number_iter.next().unwrap(); for digit in number_iter { if last_digit == digit { return true; } last_digit = digit; } return false; } fn has_two_adjacent_digits_in_no_larger_group(number: &str) -> bool { if number.len() < 2 { return false; } let mut number_iter = number.chars(); let mut last_digit = number_iter.next().unwrap(); let mut current_group_length = 1; for digit in number_iter { if last_digit == digit { current_group_length = current_group_length + 1; } else if current_group_length == 2 { return true; } else { current_group_length = 1; } last_digit = digit; } return current_group_length == 2; } fn digits_never_decrease(number: &str) -> bool { if number.len() < 2 { return true; } let mut number_iter = number.chars(); let mut last_digit = number_iter.next().unwrap(); for digit in number_iter { if last_digit > digit { return false; } last_digit = digit; } return true; } #[cfg(test)] mod test { use super::*; #[test] fn examples_part1() { assert!(meets_criteria_part1(111111)); assert!(!meets_criteria_part1(223450)); assert!(!meets_criteria_part1(123789)); } #[test] fn examples_part2() { assert!(meets_criteria_part2(112233)); assert!(meets_criteria_part2(111122)); assert!(!meets_criteria_part2(111111)); assert!(!meets_criteria_part2(123444)); assert!(!meets_criteria_part2(223450)); assert!(!meets_criteria_part2(123789)); } #[test] fn larger_group() { assert!(has_two_adjacent_digits_in_no_larger_group("111122")); assert!(has_two_adjacent_digits_in_no_larger_group("1121")); assert!(!has_two_adjacent_digits_in_no_larger_group("")); assert!(!has_two_adjacent_digits_in_no_larger_group("1")); assert!(!has_two_adjacent_digits_in_no_larger_group("12")); assert!(!has_two_adjacent_digits_in_no_larger_group("111")); assert!(!has_two_adjacent_digits_in_no_larger_group("111111")); } #[test] fn decreasing_digits() { assert!(digits_never_decrease("11")); assert!(digits_never_decrease("111111")); assert!(digits_never_decrease("123345")); assert!(!digits_never_decrease("21")); assert!(!digits_never_decrease("125456")); assert!(!digits_never_decrease("121212")); } #[test] fn two_adjacent_digits() { assert!(has_two_adjacent_digits("11")); assert!(has_two_adjacent_digits("111111")); assert!(has_two_adjacent_digits("123345")); assert!(!has_two_adjacent_digits("1")); assert!(!has_two_adjacent_digits("123456")); assert!(!has_two_adjacent_digits("121212")); } }
use super::chal39::{RsaKeyPair, RsaPubKey}; use super::mod_inv; use num::{traits::Pow, BigUint, FromPrimitive, One, Zero}; use std::cmp; use std::fmt; use std::thread; use std::time::Duration; #[allow(clippy::many_single_char_names, non_snake_case)] /// Implementation of BB'98 CCA padding oracle attack, returns the decrypted message pub fn rsa_padding_oracle_attack(pk: &RsaPubKey, ct: &BigUint, oracle: &mut Oracle) -> BigUint { // For UX only let mut minutes = 1; let _ = thread::spawn(move || loop { thread::sleep(Duration::from_secs(60)); println!("⌛ {} minutes has passed!", minutes); minutes += 1; }); println!("Bleichenbacher padding oracle attack ... (take many many minutes)"); let n = &pk.n.clone(); let mut M: Vec<Range> = vec![]; let mut s_last = BigUint::zero(); let mut s_new = BigUint::zero(); // B = 2 ^ (n - 16) let two = &BigUint::from_u32(2).unwrap(); let three = &BigUint::from_u32(3).unwrap(); let B = &(Pow::pow(two, n.bits() - 16)); let B_double = &(B * two); let B_triple = &(B * three); let B_triple_minus_one = &(B_triple - BigUint::one()); // Step 1: Blinding println!("\nStarting step 1: blinding ..."); let s_0 = BigUint::one(); M.push(Range::new(&B_double, &B_triple_minus_one)); let mut i = 1; // ================= println!("\nStarting step 2~4: searching and narrowing ..."); loop { // Step 2: Adaptive chosen s value search if i == 1 { // step 2.a starting the search println!("\nExecuting 2.a"); s_new = div_ceil(&n, &B_triple); while !oracle.oracle_query(&(ct * pk.encrypt(&s_new))) { s_new += BigUint::one(); } } else if M.len() > 1 { // step 2.b println!("\nExecuting 2.b"); while s_new == s_last || !oracle.oracle_query(&(ct * pk.encrypt(&s_new))) { s_new += BigUint::one(); } } else { // step 2.c println!("\nExecuting 2.c"); assert_eq!(M.len(), 1); let a = &M[0].start; let b = &M[0].stop; // r_i >= 2 * (b * s_i-1 - B) / n let r_min = two * div_ceil(&(b * &s_last - B), &n); 'outer: for r in Range::new(&r_min, n) { let s_min = (B_double + &r * n) / b; let s_max = (B_triple + &r * n) / a; assert!(s_min <= s_max); for s in Range::new(&s_min, &s_max) { if oracle.oracle_query(&(ct * pk.encrypt(&s))) { s_new = s; break 'outer; } } } } assert!(oracle.oracle_query(&(ct * pk.encrypt(&s_new)))); println!("New s_i: {}", &s_new); // ================= // Step 3: Narrowing the solution range println!("\nExecuting narrowing"); let mut M_new: Vec<Range> = vec![]; M.into_iter().for_each(|interval| { let a = &interval.start; let b = &interval.stop; let r_min = (a * &s_new - B_triple_minus_one) / n; let r_max = (b * &s_new - B_double) / n; for r in Range::new(&r_min, &r_max) { let range_candidate = Range::new( &div_ceil(&(B_double + &r * n), &s_new), &((B_triple_minus_one + &r * n) / &s_new), ); if let Some(intersect) = range_candidate.intersect(&interval) { M_new.push(intersect); } } if M_new.is_empty() { M_new.push(interval); } }); M = M_new; println!("M: {:#?}", M); // ================= // Step 4: Terminate or Repeat (back to step 2) if M.len() == 1 && M[0].start == M[0].stop { println!("\nTotal queries: {}", oracle.query_times.to_str_radix(10)); return (&M[0].start * mod_inv(&s_0, n).unwrap()) % n; } else { s_last = s_new.clone(); i += 1; } // ================= } } /// Bleichenbacher oracle pub struct Oracle { key_pair: RsaKeyPair, pub query_times: BigUint, } impl Oracle { pub fn new(key_pair: &RsaKeyPair) -> Oracle { Oracle { key_pair: key_pair.clone(), query_times: BigUint::zero(), } } pub fn oracle_query(&mut self, ct: &BigUint) -> bool { self.query_times += BigUint::one(); // could use the following to keep track of query times // if &self.query_times % &BigUint::parse_bytes(b"1024", 10).unwrap() == BigUint::zero() { // println!("Another 2^10 queries"); // } self.key_pair.priKey.bb_oracle(&(ct % &self.key_pair.pubKey.n)) } } #[derive(Clone, PartialEq)] // inclusive range [start, stop] struct Range { pub start: BigUint, pub stop: BigUint, } impl Range { pub fn new(start: &BigUint, stop: &BigUint) -> Self { assert!(start <= stop); Range { start: start.clone(), stop: stop.clone(), } } pub fn intersect(&self, range: &Range) -> Option<Range> { if self.stop < range.start || self.start > range.stop { None } else { Some(Range { start: cmp::max(self.start.clone(), range.start.clone()), stop: cmp::min(self.stop.clone(), range.stop.clone()), }) } } } impl fmt::Debug for Range { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_list() .entry(&self.start.to_str_radix(16)) .entry(&self.stop.to_str_radix(16)) .finish() } } impl Iterator for Range { type Item = BigUint; fn next(&mut self) -> Option<Self::Item> { if self.start <= self.stop { let result = self.start.clone(); self.start += BigUint::one(); Some(result) } else { None } } } // returns ceiling(num/dem) fn div_ceil(num: &BigUint, dem: &BigUint) -> BigUint { let rem = num % dem; if rem > BigUint::zero() { num / dem + BigUint::one() } else { num / dem } } #[cfg(test)] mod tests { use super::*; #[test] fn range_intersect() { let r1 = Range::new(&BigUint::one(), &BigUint::parse_bytes(b"10", 10).unwrap()); let r2 = Range::new( &BigUint::parse_bytes(b"3", 10).unwrap(), &BigUint::parse_bytes(b"7", 10).unwrap(), ); assert_eq!(r1.intersect(&r2), Some(r2.clone())); let r3 = Range::new( &BigUint::parse_bytes(b"8", 10).unwrap(), &BigUint::parse_bytes(b"15", 10).unwrap(), ); assert_eq!( r1.intersect(&r3), Some(Range::new( &BigUint::parse_bytes(b"8", 10).unwrap(), &BigUint::parse_bytes(b"10", 10).unwrap(), )) ); let r4 = Range::new( &BigUint::parse_bytes(b"12", 10).unwrap(), &BigUint::parse_bytes(b"20", 10).unwrap(), ); assert_eq!(r1.intersect(&r4), None); let r5 = Range::new( &BigUint::parse_bytes(b"10", 10).unwrap(), &BigUint::parse_bytes(b"10", 10).unwrap(), ); assert_eq!( r1.intersect(&r5), Some(Range::new( &BigUint::parse_bytes(b"10", 10).unwrap(), &BigUint::parse_bytes(b"10", 10).unwrap(), )) ); } }
use crate::color::Color; use crate::coord::{CanvasCoordinate, ScreenCoordinate}; use crate::traits::Converts; use pixels::{Error, Pixels, SurfaceTexture}; use std::iter::Iterator; use winit::dpi::LogicalSize; use winit::window::{Window, WindowBuilder}; pub(crate) const DEFAULT_WIDTH: usize = 1000; pub(crate) const DEFAULT_HEIGHT: usize = 700; #[derive(Copy, Clone)] pub(crate) struct Canvas { width: usize, height: usize, } impl Canvas { fn logical_size(self) -> LogicalSize<f64> { LogicalSize::new(self.width as f64, self.height as f64) } pub(crate) fn create_pixels( self, surface_texture: SurfaceTexture<'_, Window>, ) -> Result<Pixels<Window>, Error> { Pixels::new(self.width as u32, self.height as u32, surface_texture) } #[inline] pub(crate) fn put_pixel<T>(self, frame: &mut [u8], coord: T, color: Color) where Self: Converts<T, ScreenCoordinate>, { let screen_coord = self.convert(coord); if let ScreenCoordinate::OnScreen { x, y } = screen_coord { let pixel_index = (y * self.width + x) * 4; let pixel = &mut frame[pixel_index..pixel_index + 4]; pixel.copy_from_slice(color.as_array()) } // otherwise do nothing } pub(crate) fn window(self) -> WindowBuilder { let size = self.logical_size(); WindowBuilder::new() .with_title("Giraffics") .with_inner_size(size) .with_min_inner_size(size) } pub(crate) fn with_width(self, width: usize) -> Self { Self { width, ..self } } pub(crate) fn with_height(self, height: usize) -> Self { Self { height, ..self } } pub(crate) fn width(self) -> usize { self.width } pub(crate) fn height(self) -> usize { self.width } pub(crate) fn iter_pixels(self) -> EachCanvasCoordinate { let max_x = (self.width as isize) / 2; let min_x = -max_x; let max_y = (self.height as isize) / 2; let min_y = -max_y; let finished = false; let next_x = min_x; let next_y = min_y; EachCanvasCoordinate { max_x, min_x, max_y, finished, next_x, next_y, } } } impl Default for Canvas { fn default() -> Self { Self { width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT, } } } impl Converts<CanvasCoordinate, ScreenCoordinate> for Canvas { fn convert(&self, coord: CanvasCoordinate) -> ScreenCoordinate { let x = (self.width / 2) as isize + coord.x; let y = (self.height / 2) as isize - coord.y; if out_of_bounds(x, y, self.width as isize, self.height as isize) { ScreenCoordinate::OffScreen } else { ScreenCoordinate::OnScreen { x: x as usize, y: y as usize, } } } } impl Converts<ScreenCoordinate, ScreenCoordinate> for Canvas { fn convert(&self, coord: ScreenCoordinate) -> ScreenCoordinate { coord } } fn out_of_bounds(x: isize, y: isize, width: isize, height: isize) -> bool { x < 0 || y < 0 || x >= width || y >= height } pub(crate) struct EachCanvasCoordinate { min_x: isize, max_x: isize, max_y: isize, next_x: isize, next_y: isize, finished: bool, } impl Iterator for EachCanvasCoordinate { type Item = CanvasCoordinate; fn next(&mut self) -> Option<CanvasCoordinate> { if self.finished { return None; } let coord = Some(CanvasCoordinate::new(self.next_x, self.next_y)); self.next_x += 1; if self.next_x >= self.max_x as isize { self.next_x = self.min_x; self.next_y += 1; if self.next_y >= self.max_y { self.finished = true } } coord } } impl IntoIterator for Canvas { type Item = CanvasCoordinate; type IntoIter = EachCanvasCoordinate; fn into_iter(self) -> Self::IntoIter { self.iter_pixels() } }
use crate::cplane_api::CPlaneApi; use crate::cplane_api::DatabaseInfo; use crate::ProxyState; use anyhow::bail; use tokio_postgres::NoTls; use rand::Rng; use std::io::Write; use std::{io, sync::mpsc::channel, thread}; use zenith_utils::postgres_backend::Stream; use zenith_utils::postgres_backend::{PostgresBackend, ProtoState}; use zenith_utils::pq_proto::*; use zenith_utils::sock_split::{ReadStream, WriteStream}; use zenith_utils::{postgres_backend, pq_proto::BeMessage}; /// /// Main proxy listener loop. /// /// Listens for connections, and launches a new handler thread for each. /// pub fn thread_main( state: &'static ProxyState, listener: std::net::TcpListener, ) -> anyhow::Result<()> { loop { let (socket, peer_addr) = listener.accept()?; println!("accepted connection from {}", peer_addr); socket.set_nodelay(true).unwrap(); thread::spawn(move || { if let Err(err) = proxy_conn_main(state, socket) { println!("error: {}", err); } }); } } // XXX: clean up fields struct ProxyConnection { state: &'static ProxyState, cplane: CPlaneApi, user: String, database: String, pgb: PostgresBackend, md5_salt: [u8; 4], psql_session_id: String, } pub fn proxy_conn_main( state: &'static ProxyState, socket: std::net::TcpStream, ) -> anyhow::Result<()> { let mut conn = ProxyConnection { state, cplane: CPlaneApi::new(&state.conf.auth_endpoint), user: "".into(), database: "".into(), pgb: PostgresBackend::new( socket, postgres_backend::AuthType::MD5, state.conf.ssl_config.clone(), )?, md5_salt: [0u8; 4], psql_session_id: "".into(), }; // Check StartupMessage // This will set conn.existing_user and we can decide on next actions conn.handle_startup()?; // both scenarious here should end up producing database connection string let db_info = if conn.is_existing_user() { conn.handle_existing_user()? } else { conn.handle_new_user()? }; // XXX: move that inside handle_new_user/handle_existing_user to be able to // report wrong connection error. proxy_pass(conn.pgb, db_info) } impl ProxyConnection { fn is_existing_user(&self) -> bool { self.user.ends_with("@zenith") } fn handle_startup(&mut self) -> anyhow::Result<()> { let mut encrypted = false; loop { let msg = self.pgb.read_message()?; println!("got message {:?}", msg); match msg { Some(FeMessage::StartupMessage(m)) => { println!("got startup message {:?}", m); match m.kind { StartupRequestCode::NegotiateGss => { self.pgb .write_message(&BeMessage::EncryptionResponse(false))?; } StartupRequestCode::NegotiateSsl => { println!("SSL requested"); if self.pgb.tls_config.is_some() { self.pgb .write_message(&BeMessage::EncryptionResponse(true))?; self.pgb.start_tls()?; encrypted = true; } else { self.pgb .write_message(&BeMessage::EncryptionResponse(false))?; } } StartupRequestCode::Normal => { if self.state.conf.ssl_config.is_some() && !encrypted { self.pgb.write_message(&BeMessage::ErrorResponse( "must connect with TLS".to_string(), ))?; bail!("client did not connect with TLS"); } self.user = m .params .get("user") .ok_or_else(|| { anyhow::Error::msg("user is required in startup packet") })? .into(); self.database = m .params .get("database") .ok_or_else(|| { anyhow::Error::msg("database is required in startup packet") })? .into(); break; } StartupRequestCode::Cancel => break, } } None => { bail!("connection closed") } unexpected => { bail!("unexpected message type : {:?}", unexpected) } } } Ok(()) } fn handle_existing_user(&mut self) -> anyhow::Result<DatabaseInfo> { // ask password rand::thread_rng().fill(&mut self.md5_salt); self.pgb .write_message(&BeMessage::AuthenticationMD5Password(&self.md5_salt))?; self.pgb.state = ProtoState::Authentication; // XXX // check password println!("handle_existing_user"); let msg = self.pgb.read_message()?; println!("got message {:?}", msg); if let Some(FeMessage::PasswordMessage(m)) = msg { println!("got password message '{:?}'", m); assert!(self.is_existing_user()); let (_trailing_null, md5_response) = m .split_last() .ok_or_else(|| anyhow::Error::msg("unexpected password message"))?; match self.cplane.authenticate_proxy_request( self.user.as_str(), md5_response, &self.md5_salt, ) { Err(e) => { self.pgb .write_message(&BeMessage::ErrorResponse(format!("{}", e)))?; bail!("auth failed: {}", e); } Ok(conn_info) => { self.pgb .write_message_noflush(&BeMessage::AuthenticationOk)?; self.pgb .write_message_noflush(&BeMessage::ParameterStatus)?; self.pgb.write_message(&BeMessage::ReadyForQuery)?; Ok(conn_info) } } } else { bail!("protocol violation"); } } fn handle_new_user(&mut self) -> anyhow::Result<DatabaseInfo> { let mut psql_session_id_buf = [0u8; 8]; rand::thread_rng().fill(&mut psql_session_id_buf); self.psql_session_id = hex::encode(psql_session_id_buf); let hello_message = format!("☀️ Welcome to Zenith! To proceed with database creation, open the following link: {redirect_uri}{sess_id} It needs to be done once and we will send you '.pgpass' file, which will allow you to access or create databases without opening the browser. ", redirect_uri = self.state.conf.redirect_uri, sess_id = self.psql_session_id); self.pgb .write_message_noflush(&BeMessage::AuthenticationOk)?; self.pgb .write_message_noflush(&BeMessage::ParameterStatus)?; self.pgb .write_message(&BeMessage::NoticeResponse(hello_message))?; // await for database creation let (tx, rx) = channel::<anyhow::Result<DatabaseInfo>>(); let _ = self .state .waiters .lock() .unwrap() .insert(self.psql_session_id.clone(), tx); // Wait for web console response // XXX: respond with error to client let dbinfo = rx.recv()??; self.pgb.write_message_noflush(&BeMessage::NoticeResponse( "Connecting to database.".to_string(), ))?; self.pgb.write_message(&BeMessage::ReadyForQuery)?; Ok(dbinfo) } } /// Create a TCP connection to a postgres database, authenticate with it, and receive the ReadyForQuery message async fn connect_to_db(db_info: DatabaseInfo) -> anyhow::Result<tokio::net::TcpStream> { let mut socket = tokio::net::TcpStream::connect(db_info.socket_addr()).await?; let config = db_info.conn_string().parse::<tokio_postgres::Config>()?; let _ = config.connect_raw(&mut socket, NoTls).await?; Ok(socket) } /// Concurrently proxy both directions of the client and server connections fn proxy( client_read: ReadStream, client_write: WriteStream, server_read: ReadStream, server_write: WriteStream, ) -> anyhow::Result<()> { fn do_proxy(mut reader: ReadStream, mut writer: WriteStream) -> io::Result<()> { std::io::copy(&mut reader, &mut writer)?; writer.flush()?; writer.shutdown(std::net::Shutdown::Both) } let client_to_server_jh = thread::spawn(move || do_proxy(client_read, server_write)); let res1 = do_proxy(server_read, client_write); let res2 = client_to_server_jh.join().unwrap(); res1?; res2?; Ok(()) } /// Proxy a client connection to a postgres database fn proxy_pass(pgb: PostgresBackend, db_info: DatabaseInfo) -> anyhow::Result<()> { let runtime = tokio::runtime::Builder::new_current_thread() .enable_all() .build()?; let db_stream = runtime.block_on(connect_to_db(db_info))?; let db_stream = db_stream.into_std()?; db_stream.set_nonblocking(false)?; let db_stream = zenith_utils::sock_split::BidiStream::from_tcp(db_stream); let (db_read, db_write) = db_stream.split(); let stream = match pgb.into_stream() { Stream::Bidirectional(bidi_stream) => bidi_stream, _ => bail!("invalid stream"), }; let (client_read, client_write) = stream.split(); proxy(client_read, client_write, db_read, db_write) }
use crate::challenges::Challenge; use crate::InputError; use crate::ResultHashMap; use crate::file_lines_to_string_vec; use crate::binary_partitioner; pub fn challenge() -> Challenge { return Challenge::new( max_seat_id, my_seat_id, String::from("resources/binary_partitioning_seats.txt"), ); } fn max_seat_id(args: &[String]) -> ResultHashMap { let raw_lines = file_lines_to_string_vec(&args[0])?; let max_seat_id = raw_lines.iter() .map(|l| binary_partitioner::partition(&l).unwrap()) .map(|hm| hm["row"] * 8 + hm["column"]) .max(); return match max_seat_id { Some(id) => Ok( [(String::from("max seat id"), id)] .iter() .cloned() .collect() ), None => Err(InputError::Io(std::io::Error::new(std::io::ErrorKind::InvalidData, "Bad input"))), } } fn my_seat_id(args: &[String]) -> ResultHashMap { let raw_lines = file_lines_to_string_vec(&args[0])?; let wrapped_seat_ids = raw_lines.iter() .map(|l| binary_partitioner::partition(&l).unwrap()) .map(|hm| hm["row"] * 8 + hm["column"]); let mut sorted_seat_ids = Vec::new(); for seat_id in wrapped_seat_ids { sorted_seat_ids.push(seat_id); } sorted_seat_ids.sort(); let mut my_seat_id = 0; for i in 0..sorted_seat_ids.len() { if sorted_seat_ids[i + 1] - sorted_seat_ids[i] == 2 { my_seat_id = sorted_seat_ids[i] + 1; break; } } return Ok( [(String::from("max seat id"), my_seat_id)] .iter() .cloned() .collect() ) } #[cfg(test)] mod tests { use super::challenge; crate::challenge_tests!(838, 714); }
use std::error::Error; use std::time; use aws_lambda_events::event::s3::{S3Event, S3EventRecord}; use aws_lambda_events::event::sqs::SqsEvent; use backoff::{ExponentialBackoff, Operation}; use lambda_runtime::{error::HandlerError, lambda, Context}; use log::{error, info, warn}; use rusoto_core::Region; use rusoto_lambda::{Lambda, LambdaClient, UpdateFunctionCodeRequest}; use serde_json; use simple_logger; fn process_event(event: &S3EventRecord) -> Result<(), Box<dyn Error>> { let region = event .aws_region .as_ref() .ok_or("No region specified.".to_owned())? .parse::<Region>()?; let bucket = event .s3 .bucket .name .as_ref() .ok_or("No bucket specified.".to_owned())? .to_string(); let key = event .s3 .object .key .as_ref() .ok_or("No Key specified.".to_owned())? .to_string(); let version_id = event .s3 .object .version_id .as_ref() .ok_or("No Version Specified.".to_owned())? .to_string(); let function = key.clone(); let client = LambdaClient::new(region); let mut op = || { let output = client .update_function_code(UpdateFunctionCodeRequest { function_name: function.clone(), s3_bucket: Some(bucket.clone()), s3_key: Some(key.clone()), s3_object_version: Some(version_id.clone()), ..Default::default() }) .sync()?; Ok(output) }; let mut backoff = ExponentialBackoff { max_elapsed_time: Some(time::Duration::from_secs(60)), ..Default::default() }; op.retry_notify(&mut backoff, |err, dur| { warn!( "Error occured updating {:?} at {:?}: {:?}", function, dur, err ) })?; info!("Updated code for Lambda function: {:?}", function); Ok(()) } fn handler(e: SqsEvent, _c: Context) -> Result<(), HandlerError> { for message in &e.records { if let Some(body) = &message.body { let res: serde_json::Result<S3Event> = serde_json::from_str(&body); match res { Ok(e) => { for event in &e.records { if let Err(e) = process_event(event) { error!("Could not process S3 event ({:?}: {:?}", e, event); } } } Err(e) => error!("Could not parse SQS Body ({:?}): {:?}", e, body), } } } Ok(()) } fn main() -> Result<(), Box<dyn Error>> { simple_logger::init_with_level(log::Level::Info)?; lambda!(handler); Ok(()) }
use std::cell::UnsafeCell; use std::rc::Rc; use rpds::{rbt_set, RedBlackTreeSet}; use firefly_diagnostics::*; use firefly_intern::{symbols, Ident}; use firefly_pass::Pass; use firefly_syntax_base::*; use super::Known; use crate::{passes::FunctionContext, *}; /// Phase 2: Annotate variable usage /// /// Step "forwards" over the icore code annotating each "top-level" /// thing with variable usage. Detect bound variables in matching /// and replace with explicit guard test. Annotate "internal-core" /// expressions with variables they use and create. Convert matches /// to cases when not pure assignments. pub struct AnnotateVariableUsage { context: Rc<UnsafeCell<FunctionContext>>, } impl AnnotateVariableUsage { pub fn new(context: Rc<UnsafeCell<FunctionContext>>) -> Self { Self { context } } #[inline(always)] fn context_mut(&self) -> &mut FunctionContext { unsafe { &mut *self.context.get() } } } impl Pass for AnnotateVariableUsage { type Input<'a> = IFun; type Output<'a> = IFun; fn run<'a>(&mut self, ifun: Self::Input<'a>) -> anyhow::Result<Self::Output<'a>> { match self.uexpr(IExpr::Fun(ifun), Known::default()) { Ok(IExpr::Fun(ifun)) => Ok(ifun), Ok(_) => panic!("unexpected iexpr result, expected ifun"), Err(reason) => Err(reason), } } } impl AnnotateVariableUsage { fn ufun_clauses( &mut self, mut clauses: Vec<IClause>, known: Known, ) -> anyhow::Result<Vec<IClause>> { clauses .drain(..) .map(|c| self.ufun_clause(c, known.clone())) .try_collect() } fn ufun_clause(&mut self, clause: IClause, known: Known) -> anyhow::Result<IClause> { // Since variables in fun heads shadow previous variables // with the same name, we used to send an empty list as the // known variables when doing liveness analysis of the patterns // (in the upattern functions). // // With the introduction of expressions in size for binary // segments and in map keys, all known variables must be // available when analysing those expressions, or some variables // might not be seen as used if, for example, the expression includes // a case construct. // // Therefore, we will send in the complete list of known variables // when doing liveness analysis of patterns. This is // safe because any shadowing variables in a fun head has // been renamed. let (mut clause, pvs, used, _new) = self.do_uclause(clause, known)?; let used = sets::subtract(used, pvs); clause.annotate(symbols::Used, used); clause.annotate(symbols::New, rbt_set![]); Ok(clause) } fn uclauses( &mut self, mut clauses: Vec<IClause>, known: Known, ) -> anyhow::Result<Vec<IClause>> { clauses .drain(..) .map(|c| self.uclause(c, known.clone())) .try_collect() } fn uclause(&mut self, clause: IClause, known: Known) -> anyhow::Result<IClause> { let (mut clause, _pvs, used, new) = self.do_uclause(clause, known)?; clause.annotate(symbols::Used, used); clause.annotate(symbols::New, new); Ok(clause) } fn do_uclause( &mut self, clause: IClause, known: Known, ) -> anyhow::Result<( IClause, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, )> { let mut annotations = clause.annotations; let (patterns, guards, pvs, used) = self.upattern_list(clause.patterns, known.clone())?; let is_skip_clause = annotations.contains(symbols::SkipClause); let pguards = if is_skip_clause { // This is the skip clause for a binary generator. // To ensure that it will properly skip the nonmatching // patterns in generators such as: // // <<V, V>> <= Gen // // we must remove any generated pre guard. annotations.remove_mut(symbols::SkipClause); vec![] } else { guards }; let used = sets::union( used.clone(), sets::intersection(pvs.clone(), known.get().clone()), ); let new = sets::subtract(pvs.clone(), used.clone()); let known1 = known.union(&new); let guards = self.uguard(pguards, clause.guards, known1.clone())?; let used_in_guard = sets::used_in_any(guards.iter()); let new_in_guard = sets::new_in_any(guards.iter()); let known2 = known1.union(&new_in_guard); // Consider this example: // // {X = A, // begin X = B, fun() -> X = C end() end}. // // At this point it has been rewritten to something similar // like this (the fun body has not been rewritten yet): // // {X = A, // begin // X1 = B, // if // X1 =:= X -> ok; // true -> error({badmatch,X1}) // end, // fun() -> ... end() end // end}. // // In this example, the variable `X` is a known variable that must // be passed into the fun body (because of `X = B` above). To ensure // that it is, we must call known_bind/2 with the variables used // in the guard (`X1` and `X`; any variables used must surely be // bound). let known3 = known2.bind(&used_in_guard); let (body, _) = self.uexprs(clause.body, known3)?; let used = sets::intersection( sets::union( used, sets::union(used_in_guard, sets::used_in_any(body.iter())), ), known.get().clone(), ); let new = sets::union( new, sets::union(new_in_guard, sets::new_in_any(body.iter())), ); let clause = IClause { span: clause.span, annotations, patterns, guards, body, }; Ok((clause, pvs, used, new)) } // uguard([Test], [Kexpr], [KnownVar], State) -> {[Kexpr],State}. // Build a guard expression list by folding in the equality tests. fn uguard( &mut self, mut tests: Vec<IExpr>, guards: Vec<IExpr>, known: Known, ) -> anyhow::Result<Vec<IExpr>> { if tests.is_empty() && guards.is_empty() { return Ok(vec![]); } if guards.is_empty() { // No guard, so fold together equality tests let last = tests.pop().unwrap(); return self.uguard(tests, vec![last], known); } // `guards` must contain at least one element here let guards = tests.drain(..).rfold(guards, |mut gs, test| { let span = test.span(); let l = self.context_mut().next_var(Some(span)); let r = self.context_mut().next_var(Some(span)); let last = gs.pop().unwrap(); let setl = IExpr::Set(ISet::new(span, l.clone(), test)); let setr = IExpr::Set(ISet::new(span, r.clone(), last)); let call = IExpr::Call(ICall::new( span, symbols::Erlang, symbols::And, vec![IExpr::Var(l), IExpr::Var(r)], )); gs.insert(0, setl); gs.push(setr); gs.push(call); gs }); self.uexprs(guards, known).map(|(gs, _)| gs) } fn uexprs( &mut self, mut exprs: Vec<IExpr>, mut known: Known, ) -> anyhow::Result<(Vec<IExpr>, Known)> { let mut result = Vec::with_capacity(exprs.len()); let mut new = rbt_set![]; let mut iter = exprs.drain(..).peekable(); while let Some(expr) = iter.next() { let is_last = iter.peek().is_none(); match expr { IExpr::Exprs(IExprs { mut bodies, .. }) => { // Need to effectively linearize the expressions in the bodies while // properly tracking known bindings for the body/group known.start_group(); for body in bodies.drain(..) { let (mut body, known1) = self.uexprs(body, known.clone())?; known = known1; result.append(&mut body); known.end_body(); } known.end_group(); } IExpr::Match(IMatch { span, annotations, pattern, arg, fail, .. }) => { match *pattern { IExpr::Var(var) if !known.contains(&var.name) => { // Assignment to new variable let expr = self.uexpr(IExpr::Set(ISet::new(span, var, *arg)), known.clone())?; result.push(expr); } pattern if is_last => { // Need to explicitly return match 'value', make safe for efficiency let (la0, mut lps) = force_safe(self.context_mut(), *arg); let mut la = la0.clone(); la.mark_compiler_generated(); let mc = IClause { span, annotations: annotations.clone(), patterns: vec![pattern], guards: vec![], body: vec![la], }; lps.push(IExpr::Case(ICase { span, annotations, args: vec![la0], clauses: vec![mc], fail, })); let (mut exprs, _) = self.uexprs(lps, known.clone())?; result.append(&mut exprs); } pattern => { let body = iter.collect::<Vec<_>>(); let mc = IClause { span, annotations: annotations.clone(), patterns: vec![pattern], guards: vec![], body, }; let case = IExpr::Case(ICase { span, annotations, args: vec![*arg], clauses: vec![mc], fail, }); let (mut exprs, _) = self.uexprs(vec![case], known.clone())?; result.append(&mut exprs); return Ok((result, known)); } } } IExpr::Set(set) => { // Since the set of known variables can grow quite large, try to // minimize the number of union operations on it. let expr = if uexpr_need_known(set.arg.as_ref()) { let known1 = known.union(&new); let le1 = self.uexpr(IExpr::Set(set), known1.clone())?; new = le1.new_vars().clone(); le1 } else { // We don't need the set of known variables when processing arg0, // so we can postpone the call to union. This will save time // for functions with a huge number of variables. let arg = self.uexpr(*set.arg, Known::default())?; let arg_new = arg.new_vars().insert(set.var.name); let arg_used = arg.used_vars().remove(&set.var.name); new = sets::union(new, arg_new.clone()); let mut annotations = set.annotations; annotations.insert_mut(symbols::New, arg_new); annotations.insert_mut(symbols::Used, arg_used); IExpr::Set(ISet { span: set.span, annotations, var: set.var, arg: Box::new(arg), }) }; match iter.peek() { Some(IExpr::Set(_)) => { result.push(expr); } _ => { result.push(expr); known = known.union(&new); new = rbt_set![]; } } } expr => { let expr = self.uexpr(expr, known.clone())?; let new = expr.new_vars(); known = known.union(&new); result.push(expr); } } } Ok((result, known)) } fn uexpr(&mut self, expr: IExpr, known: Known) -> anyhow::Result<IExpr> { match expr { IExpr::Set(ISet { span, mut annotations, var, arg, }) => { let arg = self.uexpr(*arg, known.clone())?; let ns = arg .annotations() .new_vars() .unwrap_or_default() .insert(var.name); let us = arg .annotations() .used_vars() .unwrap_or_default() .remove(&var.name); annotations.insert_mut(symbols::New, ns); annotations.insert_mut(symbols::Used, us); Ok(IExpr::Set(ISet { span, annotations, var, arg: Box::new(arg), })) } IExpr::LetRec(ILetRec { span, mut annotations, mut defs, body, }) => { let defs = defs .drain(..) .map(|(name, expr)| self.uexpr(expr, known.clone()).map(|e| (name, e))) .try_collect::<Vec<_>>()?; let (b1, _) = self.uexprs(body, known)?; let used = sets::used_in_any(defs.iter().map(|(_, expr)| expr).chain(b1.iter())); annotations.insert_mut(symbols::New, RedBlackTreeSet::new()); annotations.insert_mut(symbols::Used, used); Ok(IExpr::LetRec(ILetRec { span, annotations, defs, body: b1, })) } IExpr::Case(ICase { span, mut annotations, args, clauses, fail, }) => { // args will never generate new variables. let args = self.uexpr_list(args, known.clone())?; let clauses = self.uclauses(clauses, known.clone())?; let fail = self.uclause(*fail, known.clone())?; let used = sets::union( sets::used_in_any(args.iter()), sets::used_in_any(clauses.iter()), ); let new = if annotations.contains(symbols::ListComprehension) { rbt_set![] } else { sets::new_in_all(clauses.iter()) }; annotations.insert_mut(symbols::Used, used); annotations.insert_mut(symbols::New, new); Ok(IExpr::Case(ICase { span, annotations, args, clauses, fail: Box::new(fail), })) } IExpr::Fun(fun) => { let clauses = if !known.is_empty() { self.rename_shadowing_clauses(fun.clauses, known.clone()) } else { fun.clauses }; let span = fun.span; let mut annotations = fun.annotations; let vars = fun.vars; let id = fun.id; let name = fun.name; let avs = vars.iter().fold(rbt_set![], |mut vs, v| { vs.insert_mut(v.name); vs }); let known1 = if let Some(name) = name.as_ref() { let ks = avs.remove(name); known.union(&ks) } else { known.clone() }; let known2 = known1.union(&avs); let known_in_fun = known2.known_in_fun(); let clauses = self.ufun_clauses(clauses, known_in_fun.clone())?; let fail = self.ufun_clause(*fun.fail, known_in_fun)?; let used_in_clauses = sets::used_in_any(clauses.iter()); let used = sets::intersection(used_in_clauses, known1.get().clone()); let used = sets::subtract(used, avs.clone()); annotations.insert_mut(symbols::Used, used); annotations.insert_mut(symbols::New, rbt_set![]); Ok(IExpr::Fun(IFun { span, annotations, id, name, vars, clauses, fail: Box::new(fail), })) } IExpr::Try(texpr) => { // No variables are exported from try/catch // As of OTP 24, variables bound in the argument are exported // to the body clauses, but not the catch or after clauses let span = texpr.span; let mut annotations = texpr.annotations; let (args, _) = self.uexprs(texpr.args, known.clone())?; let args_new = sets::new_in_any(args.iter()); let args_known = known.union(&args_new); let (body, _) = self.uexprs(texpr.body, args_known)?; let handler = self.uexpr(*texpr.handler, known.clone())?; let used = sets::used_in_any( body.iter() .chain(core::iter::once(&handler)) .chain(args.iter()), ); let used = sets::intersection(used, known.get().clone()); annotations.insert_mut(symbols::Used, used); annotations.insert_mut(symbols::New, rbt_set![]); Ok(IExpr::Try(ITry { span, annotations, vars: texpr.vars, evars: texpr.evars, args, body, handler: Box::new(handler), })) } IExpr::Catch(ICatch { span, mut annotations, body, }) => { let (body, _) = self.uexprs(body, known)?; annotations.insert_mut(symbols::Used, sets::used_in_any(body.iter())); Ok(IExpr::Catch(ICatch { span, annotations, body, })) } IExpr::Receive1(recv1) => { let span = recv1.span; let mut annotations = recv1.annotations; let clauses = self.uclauses(recv1.clauses, known)?; annotations.insert_mut(symbols::Used, sets::used_in_any(clauses.iter())); annotations.insert_mut(symbols::New, sets::new_in_all(clauses.iter())); Ok(IExpr::Receive1(IReceive1 { span, annotations, clauses, })) } IExpr::Receive2(recv2) => { // Timeout will never generate new variables let span = recv2.span; let mut annotations = recv2.annotations; let timeout = self.uexpr(*recv2.timeout, known.clone())?; let clauses = self.uclauses(recv2.clauses, known.clone())?; let (action, _) = self.uexprs(recv2.action, known.clone())?; let used = sets::union( sets::used_in_any(clauses.iter()), sets::union(sets::used_in_any(action.iter()), timeout.used_vars()), ); let new = if clauses.is_empty() { sets::new_in_any(action.iter()) } else { sets::intersection( sets::new_in_all(clauses.iter()), sets::new_in_any(action.iter()), ) }; annotations.insert_mut(symbols::Used, used); annotations.insert_mut(symbols::New, new); Ok(IExpr::Receive2(IReceive2 { span, annotations, clauses, timeout: Box::new(timeout), action, })) } IExpr::Protect(IProtect { span, mut annotations, body, }) => { let (body, _) = self.uexprs(body, known.clone())?; let used = sets::used_in_any(body.iter()); annotations.insert_mut(symbols::Used, used); Ok(IExpr::Protect(IProtect { span, annotations, body, })) } IExpr::Binary(mut bin) => { let used = bitstr_vars(bin.segments.as_slice(), rbt_set![]); bin.annotations_mut().insert_mut(symbols::Used, used); Ok(IExpr::Binary(bin)) } IExpr::Apply(mut apply) => { let used = lit_list_vars( apply.callee.as_slice(), lit_list_vars(apply.args.as_slice(), rbt_set![]), ); apply.annotations_mut().insert_mut(symbols::Used, used); Ok(IExpr::Apply(apply)) } IExpr::PrimOp(mut op) => { let used = lit_list_vars(op.args.as_slice(), rbt_set![]); op.annotations_mut().insert_mut(symbols::Used, used); Ok(IExpr::PrimOp(op)) } IExpr::Call(mut call) => { let used = lit_vars( call.module.as_ref(), lit_vars( call.function.as_ref(), lit_list_vars(call.args.as_slice(), rbt_set![]), ), ); call.annotations_mut().insert_mut(symbols::Used, used); Ok(IExpr::Call(call)) } mut lit @ IExpr::Literal(_) => { lit.annotations_mut().insert_mut(symbols::Used, rbt_set![]); Ok(lit) } mut expr => { assert!(expr.is_simple(), "expected simple, got {:?}", &expr); let vars = lit_vars(&expr, RedBlackTreeSet::new()); expr.annotations_mut().insert_mut(symbols::Used, vars); Ok(IExpr::Simple(ISimple::new(expr))) } } } fn uexpr_list(&mut self, mut exprs: Vec<IExpr>, known: Known) -> anyhow::Result<Vec<IExpr>> { exprs .drain(..) .map(|expr| self.uexpr(expr, known.clone())) .try_collect() } fn upattern_list( &mut self, mut patterns: Vec<IExpr>, known: Known, ) -> anyhow::Result<( Vec<IExpr>, Vec<IExpr>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, )> { if patterns.is_empty() { return Ok((vec![], vec![], rbt_set![], rbt_set![])); } let pattern = patterns.remove(0); let (p1, mut pg, pv, pu) = self.upattern(pattern, known.clone())?; let (mut ps1, mut psg, psv, psu) = self.upattern_list(patterns, known.union(&pv))?; ps1.insert(0, p1); pg.append(&mut psg); let vars = sets::union(pv, psv); let used = sets::union(pu, psu); Ok((ps1, pg, vars, used)) } fn upattern( &mut self, pattern: IExpr, known: Known, ) -> anyhow::Result<( IExpr, Vec<IExpr>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, )> { match pattern { IExpr::Var(var) if var.is_wildcard() => { let name = self.context_mut().next_var_name(Some(var.span())); Ok(( IExpr::Var(Var::new(name)), vec![], rbt_set![name], rbt_set![], )) } IExpr::Var(var) => { let name = var.name; if known.contains(&name) { let new = self.context_mut().next_var(Some(var.span())); let n = new.name; let mut call = ICall::new( var.span(), symbols::Erlang, symbols::EqualStrict, vec![IExpr::Var(new.clone()), IExpr::Var(var.clone())], ); { let annos = call.annotations_mut(); if annos.contains(symbols::Used) { if let Annotation::Vars(used) = annos.get_mut(symbols::Used).unwrap() { used.insert_mut(name); } } else { let used = rbt_set![name]; annos.insert_mut(symbols::Used, used); } } let test = IExpr::Call(call); Ok((IExpr::Var(new), vec![test], rbt_set![n], rbt_set![])) } else { Ok((IExpr::Var(var), vec![], rbt_set![name], rbt_set![])) } } IExpr::Cons(ICons { span, annotations, head: h0, tail: t0, }) => { let (h1, mut hg, hv, hu) = self.upattern(*h0, known.clone())?; let (t1, mut tg, tv, tu) = self.upattern(*t0, known.union(&hv))?; let cons = IExpr::Cons(ICons { span, annotations, head: Box::new(h1), tail: Box::new(t1), }); hg.append(&mut tg); Ok((cons, hg, sets::union(hv, tv), sets::union(hu, tu))) } IExpr::Tuple(ITuple { span, annotations, elements, }) => { let (elements, esg, esv, eus) = self.upattern_list(elements, known)?; Ok(( IExpr::Tuple(ITuple { span, annotations, elements, }), esg, esv, eus, )) } IExpr::Map(IMap { span, annotations, arg, pairs, is_pattern, }) => { let (pairs, esg, esv, eus) = self.upattern_map(pairs, known)?; Ok(( IExpr::Map(IMap { span, annotations, arg, pairs, is_pattern, }), esg, esv, eus, )) } IExpr::Binary(IBinary { span, annotations, segments, }) => { let (segments, esg, esv, eus) = self.upattern_bin(segments, known)?; Ok(( IExpr::Binary(IBinary { span, annotations, segments, }), esg, esv, eus, )) } IExpr::Alias(IAlias { span, annotations, var: v0, pattern: p0, }) => { let (IExpr::Var(v1), mut vg, vv, vu) = self.upattern(IExpr::Var(v0), known.clone())? else { panic!("expected var") }; let (p1, mut pg, pv, pu) = self.upattern(*p0, known.union(&vv))?; vg.append(&mut pg); Ok(( IExpr::Alias(IAlias { span, annotations, var: v1, pattern: Box::new(p1), }), vg, sets::union(vv, pv), sets::union(vu, pu), )) } other => Ok((other, vec![], rbt_set![], rbt_set![])), } } fn upattern_map( &mut self, mut pairs: Vec<IMapPair>, known: Known, ) -> anyhow::Result<( Vec<IMapPair>, Vec<IExpr>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, )> { let mut out = Vec::with_capacity(pairs.len()); let mut tests = vec![]; let mut pv = rbt_set![]; let mut pu = rbt_set![]; for IMapPair { op, key, box value } in pairs.drain(..) { assert_eq!(op, MapOp::Exact); let (value, mut vg, vn, vu) = self.upattern(value, known.clone())?; let (key, _) = self.uexprs(key, known.clone())?; let used = used_in_expr(key.as_slice()); out.push(IMapPair { op, key, value: Box::new(value), }); tests.append(&mut vg); pv = sets::union(pv.clone(), vn); pu = sets::union(pu.clone(), sets::union(used, vu)); } Ok((out, tests, pv, pu)) } fn upattern_bin( &mut self, mut segments: Vec<IBitstring>, mut known: Known, ) -> anyhow::Result<( Vec<IBitstring>, Vec<IExpr>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, )> { let mut bs = Vec::new(); let mut out = Vec::with_capacity(segments.len()); let mut guard = Vec::new(); let mut vars = RedBlackTreeSet::new(); let mut used = RedBlackTreeSet::new(); for segment in segments.drain(..) { let (p1, mut pg, pv, pu, bs1) = self.upattern_element(segment, known.clone(), bs.clone())?; bs = bs1; out.push(p1); known = known.union(&pv); guard.append(&mut pg); vars = sets::union(pv, vars.clone()); used = sets::union(pu, used.clone()); } // In a clause such as <<Sz:8,V:Sz>> in a function head, Sz will both // be new and used; a situation that is not handled properly by // uclause/4. (Basically, since Sz occurs in two sets that are // subtracted from each other, Sz will not be added to the list of // known variables and will seem to be new the next time it is // used in a match.) // Since the variable Sz really is new (it does not use a // value bound prior to the binary matching), Sz should only be // included in the set of new variables. Thus we should take it // out of the set of used variables. let us = sets::intersection(vars.clone(), used.clone()); let used = sets::subtract(used, us); Ok((out, guard, vars, used)) } fn upattern_element( &mut self, segment: IBitstring, known: Known, mut bindings: Vec<(Ident, Ident)>, ) -> anyhow::Result<( IBitstring, Vec<IExpr>, RedBlackTreeSet<Ident>, RedBlackTreeSet<Ident>, Vec<(Ident, Ident)>, )> { let span = segment.span; let annotations = segment.annotations; let spec = segment.spec; let h0 = *segment.value; let mut sz0 = segment.size; let (h1, hg, hv, _) = self.upattern(h0.clone(), known.clone())?; let bs1 = match &h0 { IExpr::Var(v1) => match &h1 { IExpr::Var(v2) if v1.name == v2.name => bindings.clone(), IExpr::Var(v2) => { let mut bs = bindings.clone(); bs.push((v1.name, v2.name)); bs } _ => bindings.clone(), }, _ => bindings.clone(), }; match sz0.pop() { Some(IExpr::Var(v)) => { let (sz1, used) = rename_bitstr_size(v, bindings); let (sz2, _) = self.uexprs(vec![sz1], known)?; Ok(( IBitstring { span, annotations, value: Box::new(h1), size: sz2, spec, }, hg, hv, used, bs1, )) } Some(expr @ IExpr::Literal(_)) => { sz0.push(expr); let (sz1, _) = self.uexprs(sz0, known)?; let used = rbt_set![]; Ok(( IBitstring { span, annotations, value: Box::new(h1), size: sz1, spec, }, hg, hv, used, bs1, )) } Some(sz) => { let mut sz1 = bindings .drain(..) .map(|(old, new)| { IExpr::Set(ISet::new( new.span(), Var::new(old), IExpr::Var(Var::new(new)), )) }) .collect::<Vec<_>>(); sz1.push(sz); sz1.append(&mut sz0); let (sz2, _) = self.uexprs(sz1, known)?; let used = used_in_expr(sz2.as_slice()); Ok(( IBitstring { span, annotations, value: Box::new(h1), size: sz2, spec, }, hg, hv, used, bs1, )) } None => { let sz1 = bindings .drain(..) .map(|(old, new)| { IExpr::Set(ISet::new( new.span(), Var::new(old), IExpr::Var(Var::new(new)), )) }) .collect::<Vec<_>>(); let (sz2, _) = self.uexprs(sz1, known)?; let used = used_in_expr(sz2.as_slice()); Ok(( IBitstring { span, annotations, value: Box::new(h1), size: sz2, spec, }, hg, hv, used, bs1, )) } } } /// Rename shadowing variables in fun heads. /// /// Pattern variables in fun heads always shadow variables bound in /// the enclosing environment. Because that is the way that variables /// behave in Core Erlang, there was previously no need to rename /// the variables. /// /// However, to support splitting of patterns and/or pattern matching /// compilation in Core Erlang, there is a need to rename all /// shadowing variables to avoid changing the semantics of the Erlang /// program. /// fn rename_shadowing_clauses( &mut self, mut clauses: Vec<IClause>, known: Known, ) -> Vec<IClause> { clauses .drain(..) .map(|clause| self.rename_shadowing_clause(clause, known.clone())) .collect() } fn rename_shadowing_clause(&mut self, mut clause: IClause, known: Known) -> IClause { let mut isub = vec![]; let mut osub = vec![]; let patterns = self.rename_patterns(clause.patterns, known, &mut isub, &mut osub); let mut guards = Vec::with_capacity(clause.guards.len()); if !clause.guards.is_empty() { guards.extend(osub.iter().cloned()); guards.append(&mut clause.guards); } osub.append(&mut clause.body); IClause { span: clause.span, annotations: clause.annotations, patterns, guards, body: osub, } } fn rename_patterns( &mut self, mut patterns: Vec<IExpr>, known: Known, isub: &mut Vec<IExpr>, osub: &mut Vec<IExpr>, ) -> Vec<IExpr> { patterns .drain(..) .map(|pattern| self.rename_pattern(pattern, known.clone(), isub, osub)) .collect() } fn rename_pattern( &mut self, pattern: IExpr, known: Known, isub: &mut Vec<IExpr>, osub: &mut Vec<IExpr>, ) -> IExpr { match pattern { IExpr::Var(var) if var.is_wildcard() => IExpr::Var(var), IExpr::Var(var) => { if known.contains(&var.name) { match rename_is_subst(var.name, osub) { Some(new) => new, None => { let span = var.span(); let new = self.context_mut().next_var(Some(span)); osub.push(IExpr::Set(ISet::new(span, var, IExpr::Var(new.clone())))); IExpr::Var(new) } } } else { IExpr::Var(var) } } lit @ IExpr::Literal(_) => lit, IExpr::Alias(IAlias { span, annotations, var, pattern, }) => { let IExpr::Var(var) = self.rename_pattern(IExpr::Var(var), known.clone(), isub, osub) else { panic!("expected var") }; let pattern = self.rename_pattern(*pattern, known, isub, osub); IExpr::Alias(IAlias { span, annotations, var, pattern: Box::new(pattern), }) } IExpr::Map(IMap { span, annotations, arg, pairs, is_pattern, }) => { let pairs = self.rename_pattern_map(pairs, known, isub, osub); IExpr::Map(IMap { span, annotations, arg, pairs, is_pattern, }) } IExpr::Binary(IBinary { span, annotations, segments, }) => { let segments = self.rename_pattern_bin(segments, known, isub, osub); IExpr::Binary(IBinary { span, annotations, segments, }) } IExpr::Cons(ICons { span, annotations, head, tail, }) => { let head = self.rename_pattern(*head, known.clone(), isub, osub); let tail = self.rename_pattern(*tail, known, isub, osub); IExpr::Cons(ICons { span, annotations, head: Box::new(head), tail: Box::new(tail), }) } IExpr::Tuple(ITuple { span, annotations, elements, }) => { let elements = self.rename_patterns(elements, known, isub, osub); IExpr::Tuple(ITuple { span, annotations, elements, }) } other => panic!("invalid expression in pattern context {:?}", &other), } } fn rename_pattern_bin( &mut self, mut segments: Vec<IBitstring>, known: Known, isub: &mut Vec<IExpr>, osub: &mut Vec<IExpr>, ) -> Vec<IBitstring> { let mut out = Vec::with_capacity(segments.len()); for IBitstring { span, annotations, size: mut size0, value, spec, } in segments.drain(..) { let size = rename_get_subst(size0.clone(), isub); let value = self.rename_pattern(*value, known.clone(), isub, osub); if let Some(IExpr::Var(v)) = size0.pop() { assert!(size0.is_empty()); isub.push(IExpr::Set(ISet::new(span, v, value.clone()))); } out.push(IBitstring { span, annotations, value: Box::new(value), size, spec, }); } out } fn rename_pattern_map( &mut self, mut pairs: Vec<IMapPair>, known: Known, isub: &mut Vec<IExpr>, osub: &mut Vec<IExpr>, ) -> Vec<IMapPair> { pairs .drain(..) .map(|IMapPair { op, key, value }| { let value = self.rename_pattern(*value, known.clone(), isub, osub); IMapPair { op, key, value: Box::new(value), } }) .collect() } } fn lit_vars(expr: &IExpr, mut vars: RedBlackTreeSet<Ident>) -> RedBlackTreeSet<Ident> { match expr { IExpr::Cons(ICons { ref head, ref tail, .. }) => lit_vars(head.as_ref(), lit_vars(tail, vars)), IExpr::Tuple(ITuple { ref elements, .. }) => lit_list_vars(elements.as_slice(), vars), IExpr::Map(IMap { ref arg, ref pairs, .. }) => lit_vars(arg.as_ref(), lit_map_vars(pairs.as_slice(), vars)), IExpr::Var(Var { name, .. }) => { vars.insert_mut(*name); vars } _ => vars, } } fn lit_list_vars(exprs: &[IExpr], vars: RedBlackTreeSet<Ident>) -> RedBlackTreeSet<Ident> { exprs.iter().fold(vars, |vs, expr| lit_vars(expr, vs)) } fn lit_map_vars(pairs: &[IMapPair], vars: RedBlackTreeSet<Ident>) -> RedBlackTreeSet<Ident> { pairs.iter().fold(vars, |vs, pair| { lit_vars(pair.value.as_ref(), lit_list_vars(pair.key.as_slice(), vs)) }) } fn bitstr_vars(segments: &[IBitstring], vars: RedBlackTreeSet<Ident>) -> RedBlackTreeSet<Ident> { segments.iter().fold(vars, |vs, seg| { lit_vars(seg.value.as_ref(), lit_list_vars(seg.size.as_slice(), vs)) }) } fn rename_bitstr_size(var: Var, mut bs: Vec<(Ident, Ident)>) -> (IExpr, RedBlackTreeSet<Ident>) { let vname = var.name; for (v1, name) in bs.drain(..) { if vname == v1 { return (IExpr::Var(Var::new(name)), rbt_set![name]); } } (IExpr::Var(var), rbt_set![vname]) } fn rename_get_subst(mut exprs: Vec<IExpr>, sub: &mut Vec<IExpr>) -> Vec<IExpr> { match exprs.len() { 1 => match exprs.pop().unwrap() { IExpr::Var(var) => match rename_is_subst(var.name, sub) { None => vec![IExpr::Var(var)], Some(new) => vec![new], }, lit @ IExpr::Literal(_) => vec![lit], expr => { let mut result = sub.clone(); result.push(expr); result } }, 0 => sub.clone(), _ => { let mut result = sub.clone(); result.extend(exprs.drain(..)); result } } } fn rename_is_subst(var: Ident, sub: &mut Vec<IExpr>) -> Option<IExpr> { sub.iter().find_map(|expr| match expr { IExpr::Set(set) if set.var.name == var => Some(*set.arg.clone()), _ => None, }) } fn used_in_expr(exprs: &[IExpr]) -> RedBlackTreeSet<Ident> { exprs.iter().rfold(RedBlackTreeSet::new(), |used, expr| { sets::union(expr.used_vars(), sets::subtract(used, expr.new_vars())) }) } fn uexpr_need_known(expr: &IExpr) -> bool { match expr { IExpr::Call(_) | IExpr::Apply(_) | IExpr::Binary(_) | IExpr::PrimOp(_) | IExpr::Literal(_) => false, expr => !expr.is_simple(), } } fn force_safe(context: &mut FunctionContext, expr: IExpr) -> (IExpr, Vec<IExpr>) { match expr { IExpr::Match(imatch) => { let (le, mut pre) = force_safe(context, *imatch.arg); // Make sure we don't duplicate the expression E match le { le @ IExpr::Var(_) => { // Le is a variable // Thus: P = Le, Le. pre.push(IExpr::Match(IMatch { span: imatch.span, annotations: imatch.annotations, pattern: imatch.pattern, guards: imatch.guards, arg: Box::new(le.clone()), fail: imatch.fail, })); (le, pre) } le => { // Le is not a variable. // Thus: NewVar = P = Le, NewVar. let v = context.next_var(Some(le.span())); let pattern = imatch.pattern; let pattern = IExpr::Alias(IAlias { span: pattern.span(), annotations: Annotations::default(), var: v.clone(), pattern, }); pre.push(IExpr::Match(IMatch { span: imatch.span, annotations: imatch.annotations, pattern: Box::new(pattern), guards: imatch.guards, arg: Box::new(le), fail: imatch.fail, })); (IExpr::Var(v), pre) } } } expr if expr.is_safe() => (expr, vec![]), expr => { let span = expr.span(); let v = context.next_var(Some(span)); let var = IExpr::Var(v.clone()); (var, vec![IExpr::Set(ISet::new(span, v, expr))]) } } }
use hyper::client::Client; use hyper::header::ContentType; use hyper::status::StatusCode; use util::{read_body_to_string, read_url, run_example}; #[test] fn display_form() { run_example("form_data", |port| { let url = format!("http://localhost:{}/", port); let s = read_url(&url); assert!(s.contains(r#"<form>"#), "response didn't have a form"); }) } #[test] fn post_with_data() { run_example("form_data", |port| { let url = format!("http://localhost:{}/confirmation", port); let ref mut res = Client::new() .post(&url) .header(ContentType::form_url_encoded()) .body(r#"firstname=John&lastname=Doe&phone=911&email=john@doe.com"#) .send() .unwrap(); let s = read_body_to_string(res); assert!(s.contains(r#"John Doe 911 john@doe.com"#), "response didn't have an expected data"); }) } #[test] fn post_without_data() { run_example("form_data", |port| { let url = format!("http://localhost:{}/confirmation", port); let ref mut res = Client::new() .post(&url) .header(ContentType::form_url_encoded()) .send() .unwrap(); let s = read_body_to_string(res); assert!(s.contains(r#"First name? Last name? Phone? Email?"#), "response didn't have an expected data"); }) } #[test] fn post_without_content_type() { run_example("form_data", |port| { let url = format!("http://localhost:{}/confirmation", port); let res = Client::new().post(&url).send().unwrap(); assert_eq!(res.status, StatusCode::BadRequest); }) }
use serde::Serialize; use codec::{Encode, Decode}; use nix::sys::stat::stat; use std::path::Path; use crate::error::{MinerError, Result}; #[derive(Clone)] pub struct IpfsClient { uri: String, } #[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Encode, Decode)] pub struct Stat { pub hash: String, // data hash pub st_dev: u64, // device number (file system) pub st_ino: u64, // i-node number (serial number) pub st_nlink: u64, // number of links pub st_mode: u32, // file type & mode (permissions) pub st_uid: u32, // user ID of owner pub st_gid: u32, // group ID of owner pub st_rdev: u64, // device number for special files pub st_size: i64, // size in bytes, for regular files pub st_blksize: i64, // best I/O block size pub st_blocks: i64, // number of disk blocks allocated pub st_atime: i64, // time of last access pub st_atime_nsec: i64, pub st_mtime: i64, // time of last modification pub st_mtime_nsec: i64, pub st_ctime: i64, // time of last file status change pub st_ctime_nsec: i64, } impl Default for IpfsClient { fn default() -> Self { Self { uri: "http://127.0.0.1:5001".parse().unwrap() } } } impl IpfsClient { /// ipfs http api, /// https://docs.ipfs.io/reference/http/api/ pub fn new(uri: &str) -> IpfsClient { IpfsClient { uri: uri.to_string(), } } pub fn uri(&self) -> String { format!("{}", self.uri) } pub fn add(&self, data: &str) -> Result<Stat> { let (code, stdout, stderr) = sh!("ipfs add {}", data); if &stderr == "" { return Err(MinerError::msg("serve add file error")); } let filename = Path::new(data); let mut iter = stdout.split_whitespace(); iter.next(); let file_hash = iter.next().unwrap(); let stat_result = stat(filename).unwrap(); Ok(Stat { hash: file_hash.to_string(), st_dev: stat_result.st_dev, st_ino: stat_result.st_ino, st_nlink: stat_result.st_nlink, st_mode: stat_result.st_mode, st_uid: stat_result.st_uid, st_gid: stat_result.st_gid, st_rdev: stat_result.st_rdev, st_size: stat_result.st_size, st_blksize: stat_result.st_blksize, st_blocks: stat_result.st_blocks, st_atime: stat_result.st_atime, st_atime_nsec: stat_result.st_atime_nsec, st_mtime: stat_result.st_mtime, st_mtime_nsec: stat_result.st_mtime_nsec, st_ctime: stat_result.st_ctime, st_ctime_nsec: stat_result.st_ctime_nsec, }) } pub fn delete(&self, hash: &str) -> (i32, String, String) { sh!("ipfs pin rm {} && ipfs repo gc", hash) } } #[cfg(test)] mod test { use crate::storage::ipfs::client::IpfsClient; #[test] fn test_default_client() { let client = IpfsClient::default(); let uri = client.uri(); assert_eq!("http://127.0.0.1:5001", uri); } }
struct TrivialNewtype(Vec<u8>); fn test() { let bare_vec = vec![1u8, 2, 3]; let newtype_vec = TrivialNewtype(vec![1u8, 2, 3]); let placeholder = 12; } fn main() { test() }
use std::collections::HashMap; pub fn anagrams_for<'a>(target: &'a str, candidates: &[&'a str]) -> Vec<&'a str> { let mut target_char_map = HashMap::new(); for letter in target.chars() { let letter = char_to_lowercase(letter.clone()); let ct = target_char_map .entry(letter.clone()) .or_insert(0); *ct += 1; } candidates.into_iter().filter(|&s| { if *s.to_lowercase() == target.to_lowercase() {return false}; let mut target_char_map = target_char_map.clone(); for letter in s.chars() { let letter = char_to_lowercase(letter); match target_char_map.get_mut(&letter) { Some(ct) => *ct -= 1, None => return false, } match target_char_map.get(&letter) { Some(&0) => { target_char_map.remove(&letter); }, Some(_) => {}, None => {}, } } target_char_map.is_empty() }).cloned().collect() } fn char_to_lowercase(letter: char) -> char { letter.to_lowercase().next().expect("Failed to unwrap letter!") }
use r2r; use std::cell::RefCell; use std::collections::HashMap; use std::env; use std::rc::Rc; use std::thread; use std::time::Duration; use std::io; use failure::Error; use termion::event::Key; use termion::input::MouseTerminal; use termion::raw::IntoRawMode; use termion::screen::AlternateScreen; use tui::backend::TermionBackend; use tui::layout::Alignment; use tui::style::{Color, Modifier, Style}; use tui::widgets::{Block, Borders, Paragraph, Text, Widget}; use tui::Terminal; mod event; use event::*; fn count_newlines(s: &str) -> usize { s.as_bytes().iter().filter(|&&c| c == b'\n').count() } fn main() -> Result<(), Error> { let ctx = r2r::Context::create()?; let mut node = r2r::Node::create(ctx, "echo", "")?; let args: Vec<String> = env::args().collect(); let topic = args.get(1).expect("provide a topic!"); // run for a while to populate the topic list let mut count = 0; let mut nt = HashMap::new(); while count < 50 { thread::sleep(Duration::from_millis(10)); nt = node.get_topic_names_and_types()?; if nt.contains_key(topic) { break; } count += 1; } let type_name = nt.get(topic).and_then(|types| types.get(0)); let type_name = match type_name { Some(tn) => tn, None => { eprintln!("Could not determine the type for the passed topic"); return Ok(()); } }; let display = Rc::new(RefCell::new(String::new())); let display_cb = display.clone(); let cb = move |msg: r2r::Result<serde_json::Value>| { if let Ok(msg) = msg { let s = serde_json::to_string_pretty(&msg).unwrap(); *display_cb.borrow_mut() = s; } }; let _subref = node.subscribe_untyped(topic, type_name, Box::new(cb))?; let stdout = io::stdout().into_raw_mode()?; let stdout = MouseTerminal::from(stdout); let stdout = AlternateScreen::from(stdout); let backend = TermionBackend::new(stdout); let mut terminal = Terminal::new(backend)?; terminal.hide_cursor()?; let events = Events::new(); let mut last_seen = String::new(); let mut scroll = 0; loop { node.spin_once(std::time::Duration::from_millis(20)); terminal.draw(|mut f| { let size = f.size(); let str = display.borrow().to_owned(); let fg = if last_seen != str { last_seen = str.clone(); Color::Green } else { Color::Reset }; let text = [Text::raw(&str)]; let title = format!("topic: {}, type: {}", topic, type_name); let block = Block::default() .borders(Borders::ALL) .title_style(Style::default().modifier(Modifier::BOLD).fg(fg)); Paragraph::new(text.iter()) .block(block.clone().title(&title)) .alignment(Alignment::Left) .style(Style::default()) .scroll(scroll) .render(&mut f, size); })?; let size = terminal.size()?; let msg_lines = count_newlines(&last_seen) as u16; match events.next()? { Event::Input(key) => { if key == Key::PageUp { if scroll < size.height - 3 { scroll = 0; } else { scroll -= size.height - 3; } } if key == Key::PageDown { scroll += size.height + 3; if scroll > (msg_lines - size.height + 3) { scroll = msg_lines - size.height + 3 }; } if key == Key::Up { if scroll > 0 { scroll -= 1; } } if key == Key::Down { if scroll < (msg_lines - size.height + 3) { scroll += 1 }; } if key == Key::Char('q') { break; } if key == Key::Esc { break; } } _ => {} } } Ok(()) }
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // 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 spin::Mutex; use core::sync::atomic; use super::super::task::*; use super::super::qlib::common::*; use super::super::taskMgr::*; pub use super::super::qlib::uring::cqueue::CompletionQueue; pub use super::super::qlib::uring::cqueue; pub use super::super::qlib::uring::squeue::SubmissionQueue; pub use super::super::qlib::uring::*; use super::super::qlib::uring::util::*; use super::super::qlib::uring::porting::*; use super::super::qlib::linux_def::*; use super::super::fs::file::*; use super::super::socket::hostinet::socket::*; use super::super::socket::unix::transport::unix::*; use super::super::Kernel::HostSpace; use super::super::IOURING; use super::uring_op::*; use super::async::*; pub fn QUringTrigger() -> usize { return IOURING.DrainCompletionQueue(); } pub fn QUringProcessOne() -> bool { return IOURING.ProcessOne(); } unsafe impl Send for Submission {} unsafe impl Sync for Submission {} impl Submission { pub fn SqLen(&self) -> usize { unsafe { let head = (*self.sq.head).load(atomic::Ordering::Acquire); let tail = unsync_load(self.sq.tail); tail.wrapping_sub(head) as usize } } pub fn IsFull(&self) -> bool { return self.sq.is_full(); } pub fn Available(&mut self) -> squeue::AvailableQueue<'_> { return self.sq.available() } pub fn NeedWakeup(&self) -> bool { unsafe { (*self.sq.flags).load(atomic::Ordering::Acquire) & sys::IORING_SQ_NEED_WAKEUP != 0 } } pub fn SubmitAndWait(&self, want: usize) -> Result<usize> { let len = self.SqLen(); let mut flags = 0; if want > 0 { flags |= sys::IORING_ENTER_GETEVENTS; } if self.params.0.flags & sys::IORING_SETUP_SQPOLL != 0 { if self.NeedWakeup() { if want > 0 { flags |= sys::IORING_ENTER_SQ_WAKEUP; } else { super::super::Kernel::HostSpace::UringWake(); return Ok(0) } } else if want == 0 { // fast poll return Ok(len); } } return self.Enter(len as _, want as _, flags) } pub fn Submit(&self) -> Result<usize> { return self.SubmitAndWait(0) } pub fn Enter(&self, to_submit: u32, min_complete: u32, flags: u32 ) -> Result<usize> { let ret = HostSpace::IoUringEnter(self.fd.as_raw_fd(), to_submit, min_complete, flags); if ret < 0 { return Err(Error::SysError(-ret as i32)) } return Ok(ret as usize) } } unsafe impl Send for Completion {} unsafe impl Sync for Completion {} impl Completion { pub fn Next(&mut self) -> Option<cqueue::Entry> { //return self.cq.available().next() return self.cq.next(); } pub fn CqLen(&mut self) -> usize { return self.cq.len() } pub fn Overflow(&self) -> u32 { return self.cq.overflow(); } } #[derive(Default)] pub struct QUring { pub submission: Mutex<Submission>, pub completion: Mutex<Completion>, pub asyncMgr: UringAsyncMgr } impl QUring { pub fn New(size: usize) -> Self { let mut ret = QUring { submission: Default::default(), completion: Default::default(), asyncMgr: UringAsyncMgr::New(size) }; super::super::Kernel::HostSpace::IoUringSetup( &mut ret.submission as * mut _ as u64, &mut ret.completion as * mut _ as u64, ); return ret; } pub fn TimerRemove(&self, task: &Task, userData: u64) -> i64 { let msg = UringOp::TimerRemove(TimerRemoveOp{ userData: userData, }); return self.UCall(task, msg); } pub fn AsyncTimerRemove(&self, userData: u64) -> usize { let ops = AsyncTimerRemove::New(userData); let idx = self.AUCall(AsyncOps::AsyncTimerRemove(ops)); return idx; } pub fn Timeout(&self, expire: i64, timeout: i64) -> usize { let ops = AsyncTimeout::New(expire, timeout); let idx = self.AUCall(AsyncOps::AsyncTimeout(ops)); return idx; } pub fn RawTimeout(&self, _task: &Task, timerId: u64, seqNo: u64, ns: i64) -> usize { let ops = AsyncRawTimeout::New(timerId, seqNo, ns); let idx = self.AUCall(AsyncOps::AsyncRawTimeout(ops)); return idx; } pub fn Read(&self, task: &Task, fd: i32, addr: u64, cnt: u32, offset: i64) -> i64 { let msg = UringOp::Read(ReadOp { fd: fd, addr: addr, cnt: cnt, offset: offset, }); return self.UCall(task, msg); } pub fn Write(&self, task: &Task, fd: i32, addr: u64, cnt: u32, offset: i64) -> i64 { let msg = UringOp::Write(WriteOp { fd: fd, addr: addr, cnt: cnt, offset: offset, }); return self.UCall(task, msg); } pub fn BufWrite(&self, _task: &Task, file: &File, fd: i32, addr: u64, len: usize, offset: i64) -> i64 { let ops = AsyncWritev::New(file, fd, addr, len, offset); self.AUCall(AsyncOps::AsyncWrite(ops)); return len as i64 } pub fn EventfdWrite(&self, fd: i32, addr: u64) { let ops = AsyncEventfdWrite::New(fd, addr); self.AUCall(AsyncOps::AsyncEventfdWrite(ops)); } pub fn Fsync(&self, task: &Task, fd: i32, dataSyncOnly: bool) -> i64 { let msg = UringOp::Fsync(FsyncOp { fd: fd, dataSyncOnly: dataSyncOnly, }); return self.UCall(task, msg); } pub fn Statx(&self, task: &Task, dirfd: i32, pathname: u64, statxBuf: u64, flags: i32, mask: u32) -> i64 { let msg = UringOp::Statx(StatxOp { dirfd: dirfd, pathname: pathname, statxBuf: statxBuf, flags: flags, mask: mask, }); return self.UCall(task, msg); } pub fn BufSockInit(&self, sockops: &SocketOperations) -> Result<()> { let buf = sockops.SocketBuf(); let (addr, len) = buf.GetFreeReadBuf(); let readop = AsyncSocketRecv::New(sockops.fd, sockops.clone(), addr, len); IOURING.AUCall(AsyncOps::AsyncSocketRecv(readop)); return Ok(()) } pub fn BufSockWrite(&self, _task: &Task, sockops: &SocketOperations, srcs: &[IoVec]) -> Result<i64> { assert!((sockops.family == AFType::AF_INET || sockops.family == AFType::AF_INET6) && sockops.stype == SockType::SOCK_STREAM); let buf = sockops.SocketBuf(); let (count, writeBuf) = buf.Writev(srcs)?; if let Some((addr, len)) = writeBuf { let writeop = AsyncSocketSend::New(sockops.fd, sockops.clone(), addr, len); IOURING.AUCall(AsyncOps::AsyncSocketSend(writeop)); /*let sendMsgOp = AsycnSendMsg::New(sockops.fd, sockops); sendMsgOp.lock().SetIovs(addr, cnt); self.AUCall(AsyncOps::AsycnSendMsg(sendMsgOp));*/ } return Ok(count as i64) } pub fn BufSockRead(&self, _task: &Task, sockops: &SocketOperations, dsts: &mut [IoVec]) -> Result<i64> { assert!((sockops.family == AFType::AF_INET || sockops.family == AFType::AF_INET6) && sockops.stype == SockType::SOCK_STREAM); let buf = sockops.SocketBuf(); let (trigger, cnt) = buf.Readv(dsts)?; if trigger { let (addr, len) = buf.GetFreeReadBuf(); let readop = AsyncSocketRecv::New(sockops.fd, sockops.clone(), addr, len); IOURING.AUCall(AsyncOps::AsyncSocketRecv(readop)); //let recvMsgOp = AsycnRecvMsg::New(sockops.fd, sockops); //recvMsgOp.lock().SetIovs(addr, cnt); //self.AUCall(AsyncOps::AsycnRecvMsg(recvMsgOp)); } return Ok(cnt as i64) } pub fn Process(&self, cqe: &cqueue::Entry) { let data = cqe.user_data(); let ret = cqe.result(); // the taskid should be larger than 0x1000 (4K) if data > 0x10000 { let call = unsafe { &mut *(data as * mut UringCall) }; call.ret = ret; //error!("uring process: call is {:x?}", &call); ScheduleQ(call.taskId); } else { let idx = data as usize; //error!("uring process: async is {:?}", &ops.Type()); let rerun = self.asyncMgr.ops[idx].lock().Process(ret, idx); if !rerun { *self.asyncMgr.ops[idx].lock() = AsyncOps::None; self.asyncMgr.FreeSlot(idx); } //error!("uring process 2"); } } pub fn UCall(&self, task: &Task, msg: UringOp) -> i64 { let call = UringCall { taskId: task.GetTaskIdQ(), ret: 0, msg: msg, }; { self.UringCall(&call); } Wait(); return call.ret as i64; } pub fn AUCallDirect(&self, ops: &AsyncOps, id: usize) { let mut entry = ops.SEntry().user_data(id as u64); loop { loop { if !self.submission.lock().IsFull() { break; } error!("AUCall submission full..."); } entry = match self.AUringCall(entry) { None => return, Some(e) => e } } } pub fn AUCall(&self, ops: AsyncOps) -> usize { let id; loop { match self.asyncMgr.AllocSlot() { None => { self.asyncMgr.Print(); error!("AUCall async slots usage up..."); }, Some(idx) => { id = idx; break; } } } let mut entry = self.asyncMgr.SetOps(id, ops); loop { loop { if !self.submission.lock().IsFull() { break; } error!("AUCall submission full..."); } entry = match self.AUringCall(entry) { None => return id, Some(e) => e } } } pub fn ProcessOne(&self) -> bool { let cqe = { let mut clock = match self.completion.try_lock() { None => return false, Some(lock) => lock }; match clock.Next() { None => return false, Some(cqe) => { cqe } } }; self.Process(&cqe); return true; } pub fn DrainCompletionQueue(&self) -> usize { let mut count = 0; loop { let cqe = { let mut c = self.completion.lock(); c.Next() }; match cqe { None => return count, Some(cqe) => { count += 1; self.Process(&cqe); } } } /*let mut processed = false; const BATCH_SIZE : usize = 16; let mut cqes : [cqueue::Entry; BATCH_SIZE] = Default::default(); let mut cnt = 0; { let mut clock = match self.completion.try_lock() { None => return false, Some(lock) => lock }; //let mut clock = self.completion.lock(); while cnt < BATCH_SIZE { let cqe = { clock.Next() }; match cqe { None => { if cnt == 0 { return false } break }, Some(cqe) => { cqes[cnt] = cqe; cnt += 1; } } } } let mut idx = 0; for cqe in &cqes[0..cnt] { processed = true; self.Process(idx, cqe); idx += 1; } return processed;*/ } pub fn UringCall(&self, call: &UringCall) { let entry = call.SEntry(); let entry = entry .user_data(call.Ptr()); let mut s = self.submission.lock(); unsafe { let mut queue = s.Available(); queue.push(entry).ok().expect("submission queue is full"); } s.Submit().expect("QUringIntern::submit fail"); } pub fn AUringCall(&self, entry: squeue::Entry) -> Option<squeue::Entry> { //let (fd, user_data, opcode) = (entry.0.fd, entry.0.user_data, entry.0.opcode); let mut s = self.submission.lock(); unsafe { let mut queue = s.Available(); match queue.push(entry) { Ok(_) => (), Err(e) => return Some(e), } } let _n = s.Submit().expect("QUringIntern::submit fail"); //error!("AUCall after sumbit fd is {}, user_data is {}, opcode is {}", fd, user_data, opcode); return None; } }
use crate::io::{self, *}; use alloc::string::String; use core::fmt::{self, Write}; use cortex_m::interrupt; use stm32f1xx_hal::pac::USART1; use stm32f1xx_hal::serial::{Rx, Tx}; static mut STDOUT: Option<Stdout<Tx<USART1>>> = None; static mut STDIN: Option<Stdin<Rx<USART1>>> = None; pub fn use_rx1(rx: Rx<USART1>) { interrupt::free(|_| unsafe { STDIN.replace(Stdin(rx)); }) } pub fn use_tx1(tx: Tx<USART1>) { interrupt::free(|_| unsafe { STDOUT.replace(Stdout(tx)); }) } pub struct Stdin<T>(pub T); impl<T> BufRead for Stdin<T> where T: embedded_hal::serial::Read<u8> {} impl<T> embedded_hal::serial::Read<u8> for Stdin<T> where T: embedded_hal::serial::Read<u8>, { type Error = Error; fn read(&mut self) -> nb::Result<u8, Self::Error> { match self.0.read() { Ok(b) => Ok(b), Err(_err) => return Err(nb::Error::Other(Error::ReadError)), } } } pub struct Stdout<T>(pub T); impl<T> Write for Stdout<T> where T: embedded_hal::serial::Write<u8, Error = ::core::convert::Infallible>, { fn write_str(&mut self, s: &str) -> core::fmt::Result { s.as_bytes() .iter() .try_for_each(|c| nb::block!(self.0.write(*c))) .map_err(|_| core::fmt::Error) } } pub fn read_line<const N: usize>() -> io::Result<String> { interrupt::free(|_| unsafe { if let Some(stdin) = STDIN.as_mut() { stdin.read_line() } else { Err(Error::NoIoDevice) } }) } /// Writes string to stdout pub fn write_str(s: &str) { interrupt::free(|_| unsafe { if let Some(stdout) = STDOUT.as_mut() { let _ = stdout.write_str(s); } }) } /// Writes formatted string to stdout pub fn write_fmt(args: fmt::Arguments) { interrupt::free(|_| unsafe { if let Some(stdout) = STDOUT.as_mut() { let _ = stdout.write_fmt(args); } }) } /// Macro for printing to the serial standard output #[macro_export] macro_rules! sprint { ($s:expr) => { $crate::stdio::write_str($s) }; ($($tt:tt)*) => { $crate::stdio::write_fmt(format_args!($($tt)*)) }; } /// Macro for printing to the serial standard output, with a newline. #[macro_export] macro_rules! sprintln { () => { $crate::stdio::write_str("\n") }; ($s:expr) => { $crate::stdio::write_str(concat!($s, "\n")) }; ($s:expr, $($tt:tt)*) => { $crate::stdio::write_fmt(format_args!(concat!($s, "\n"), $($tt)*)) }; }
use std::collections::HashMap; use std::net::{SocketAddr, UdpSocket}; use std::sync::{Arc, mpsc, Mutex, MutexGuard}; use std::thread; use serde::{Deserialize, Serialize}; use saoleile_derive::NetworkEvent; use crate::event::NetworkEvent; use crate::event::core::ShutdownEvent; use self::cleanup_thread::network_interface_cleanup_thread; use self::connection_data::ConnectionData; use self::monitor_thread::network_interface_monitor_thread; use self::packet_header::PacketHeader; use self::receive_thread::network_interface_receive_thread; use self::send_thread::{network_interface_send_thread, send_events}; pub const MAX_PACKET_SIZE: usize = 1024; #[derive(Debug)] pub struct NetworkInterface { sender: Mutex<mpsc::Sender<(SocketAddr, Box<dyn NetworkEvent>)>>, receiver: Mutex<mpsc::Receiver<(SocketAddr, Box<dyn NetworkEvent>)>>, cleanup: Mutex<mpsc::Sender<()>>, monitor: Mutex<mpsc::Sender<()>>, send_thread: Mutex<Option<thread::JoinHandle<()>>>, receive_thread: Mutex<Option<thread::JoinHandle<()>>>, cleanup_thread: Mutex<Option<thread::JoinHandle<()>>>, monitor_thread: Mutex<Option<thread::JoinHandle<()>>>, connections: Arc<Mutex<HashMap<SocketAddr, ConnectionData>>>, socket: UdpSocket, running: Mutex<bool>, } impl NetworkInterface { pub fn new(bind: SocketAddr) -> Self { let (sender, send_queue) = mpsc::channel(); let (receive_queue, receiver) = mpsc::channel(); let (cleanup, cleanup_receiver) = mpsc::channel(); let (monitor, monitor_receiver) = mpsc::channel(); let connections = Arc::new(Mutex::new(HashMap::new())); let socket = UdpSocket::bind(bind).expect(&format!("NetworkInterface: Cannot bind to address: {}", bind)); let send_thread = Mutex::new(Some({ let socket = socket.try_clone().expect("NetworkInterface: Cannot clone socket!"); let connections = connections.clone(); thread::Builder::new() .name(format!("NetworkInterface({}) send thread", socket.local_addr().unwrap())) .spawn(move || network_interface_send_thread(socket, send_queue, connections)).unwrap() })); let receive_thread = Mutex::new(Some({ let socket = socket.try_clone().expect("NetworkInterface: Cannot clone socket!"); let receive_queue = receive_queue.clone(); let connections = connections.clone(); thread::Builder::new() .name(format!("NetworkInterface({}) receive thread", socket.local_addr().unwrap())) .spawn(move || network_interface_receive_thread(socket, receive_queue, connections)).unwrap() })); let cleanup_thread = Mutex::new(Some({ let connections = connections.clone(); thread::Builder::new() .name(format!("NetworkInterface({}) cleanup thread", socket.local_addr().unwrap())) .spawn(move || network_interface_cleanup_thread(cleanup_receiver, connections, receive_queue)).unwrap() })); let monitor_thread = Mutex::new(Some({ let connections = connections.clone(); thread::Builder::new() .name(format!("NetworkInterface({}) monitor thread", socket.local_addr().unwrap())) .spawn(move || network_interface_monitor_thread(monitor_receiver, connections)).unwrap() })); Self { sender: Mutex::new(sender), receiver: Mutex::new(receiver), cleanup: Mutex::new(cleanup), monitor: Mutex::new(monitor), send_thread, receive_thread, cleanup_thread, monitor_thread, connections, socket, running: Mutex::new(true), } } pub fn send_event(&self, destination: SocketAddr, event: Box<dyn NetworkEvent>) { let sender_guard = self.sender.lock().unwrap(); sender_guard.send((destination, event)).unwrap(); } pub fn lock_receiver(&self) -> MutexGuard<mpsc::Receiver<(SocketAddr, Box<dyn NetworkEvent>)>> { self.receiver.lock().unwrap() } pub fn get_connection_info(&self) -> HashMap<SocketAddr, ConnectionInfo> { let connections_guard = self.connections.lock().unwrap(); connections_guard.iter().map(|(&address, c)| ( address, ConnectionInfo { address, ping: c.ping, frequency: c.frequency, }, )).collect() } pub fn shutdown(&self) { let mut running = self.running.lock().unwrap(); if *running { let this_address = self.socket.local_addr().unwrap(); // Send a shutdown event to the send thread self.send_event(this_address, Box::new(ShutdownEvent { })); // Send a shutdown event to the receive thread send_events(&self.socket, this_address, 0, 0, 0, &[Box::new(ShutdownEvent { })]); // Send a shutdown event to the cleanup thread self.cleanup.lock().unwrap().send(()).unwrap(); // Send a shutdown event to the monitor thread self.monitor.lock().unwrap().send(()).unwrap(); self.send_thread.lock().unwrap().take().unwrap().join().ok(); self.receive_thread.lock().unwrap().take().unwrap().join().ok(); self.cleanup_thread.lock().unwrap().take().unwrap().join().ok(); *running = false; } } } impl Drop for NetworkInterface { fn drop(&mut self) { self.shutdown(); } } #[derive(Debug, Clone, Copy)] pub struct ConnectionInfo { pub address: SocketAddr, pub ping: f32, //pub send_kbps: f32, //pub receive_kpbs: f32, pub frequency: u8, } mod cleanup_thread; mod connection_data; mod monitor_thread; mod packet_header; mod receive_thread; mod send_thread; #[cfg(test)] mod tests { use std::str::FromStr; use std::time::Duration; use lazy_static::lazy_static; use crate::event::network::{DisconnectEvent, DroppedNetworkEvent}; use crate::util::NetworkAbuser; use super::*; lazy_static! { static ref ACCESS: Mutex<()> = Mutex::new(()); // Ensures that tests run sequentially, thus not fighting over socket resources. static ref SERVER: SocketAddr = SocketAddr::from_str("127.0.0.1:4455").unwrap(); static ref CLIENT: SocketAddr = SocketAddr::from_str("127.0.0.1:3333").unwrap(); static ref CLIENT_ABUSER: SocketAddr = SocketAddr::from_str("127.0.0.1:3332").unwrap(); } #[derive(Clone, Debug, Deserialize, NetworkEvent, Serialize)] pub struct DummyEvent { } #[derive(Clone, Debug, Deserialize, NetworkEvent, Serialize)] pub struct DummyDataEvent { data: Vec<u8>, } #[test] fn network_interface_receive_event() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let s = NetworkInterface::new(*SERVER); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); let (from, event) = s.lock_receiver().try_recv().unwrap(); assert_eq!(from, *CLIENT); assert!(event.as_any().is::<DummyEvent>()); } #[test] fn network_interface_ack() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let _s = NetworkInterface::new(*SERVER); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); assert!(c.connections.lock().unwrap().get(&*SERVER).unwrap().unacked_events.is_empty()); } #[test] fn network_interface_dropped_event() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(1200)); let (from, event) = c.lock_receiver().try_recv().unwrap(); assert_eq!(from, *SERVER); assert!(event.as_any().is::<DroppedNetworkEvent>()); } #[test] fn network_interface_disconnect() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let s = NetworkInterface::new(*SERVER); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); c.shutdown(); s.lock_receiver().try_recv().ok(); // Discard the event sent by the client thread::sleep(Duration::from_millis(8000)); let (from, event) = s.lock_receiver().try_recv().unwrap(); assert_eq!(from, *CLIENT); assert!(event.as_any().is::<DisconnectEvent>()); } #[test] fn network_interface_send_grouped_events() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); c.send_event(*SERVER, Box::new(DummyEvent { })); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); // We should have 3 unacked events assert_eq!(c.connections.lock().unwrap().get(&*SERVER).unwrap().unacked_events.len(), 3); // All unacked events should have the same sequence group: [0] assert!(c.connections.lock().unwrap().get(&*SERVER).unwrap().unacked_events.iter().all(|&(ref s, _, _)| s == &[0])); } #[test] fn network_interface_send_big_grouped_events() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); c.send_event(*SERVER, Box::new(DummyDataEvent { data: vec![0xFF; 900] })); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); // We should have 3 unacked events assert_eq!(c.connections.lock().unwrap().get(&*SERVER).unwrap().unacked_events.len(), 3); // All unacked events should have the same sequence group: [0, 1] assert!(c.connections.lock().unwrap().get(&*SERVER).unwrap().unacked_events.iter().all(|&(ref s, _, _)| s == &[0, 1])); } #[test] fn network_interface_receive_big_grouped_events() { log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let s = NetworkInterface::new(*SERVER); let c = NetworkInterface::new(*CLIENT); c.send_event(*SERVER, Box::new(DummyEvent { })); c.send_event(*SERVER, Box::new(DummyDataEvent { data: vec![0xFF; 900] })); c.send_event(*SERVER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(200)); let (from, event) = s.lock_receiver().try_recv().unwrap(); assert_eq!(from, *CLIENT); assert!(event.as_any().is::<DummyEvent>()); let (from, event) = s.lock_receiver().try_recv().unwrap(); assert_eq!(from, *CLIENT); assert_eq!(event.as_any().downcast_ref::<DummyDataEvent>().unwrap().data, vec![0xFF; 900]); let (from, event) = s.lock_receiver().try_recv().unwrap(); assert_eq!(from, *CLIENT); assert!(event.as_any().is::<DummyEvent>()); } #[test] fn network_interface_dropped_big_grouped_events() { // If we drop every other packet, grouped events spanning multiple packets will never make it through log_level!(NONE); let _guard = ACCESS.lock().unwrap(); let _s = NetworkInterface::new(*SERVER); let c = NetworkInterface::new(*CLIENT); let _ca = NetworkAbuser::new(*CLIENT_ABUSER, *CLIENT, *SERVER) .drop_every_nth(2); c.send_event(*CLIENT_ABUSER, Box::new(DummyEvent { })); c.send_event(*CLIENT_ABUSER, Box::new(DummyDataEvent { data: vec![0xFF; 900] })); c.send_event(*CLIENT_ABUSER, Box::new(DummyEvent { })); thread::sleep(Duration::from_millis(1200)); let (_, event) = c.lock_receiver().try_recv().unwrap(); assert!(event.as_any().is::<DroppedNetworkEvent>()); let (_, event) = c.lock_receiver().try_recv().unwrap(); assert!(event.as_any().is::<DroppedNetworkEvent>()); let (_, event) = c.lock_receiver().try_recv().unwrap(); assert!(event.as_any().is::<DroppedNetworkEvent>()); assert!(c.lock_receiver().try_recv().is_err()); } }
use curses; use {Error, Event, Key}; use super::Screen; #[allow(dead_code)] pub struct Input<'a> { screen: &'a mut Screen, } impl<'a> Input<'a> { #[inline] pub unsafe fn wrap(screen: &mut Screen) -> Input { Input { screen: screen } } } impl<'a> Input<'a> { #[inline] pub fn event(&mut self) -> Option<Event> { unsafe { let mut character = 0; let value = some!(Error::check(curses::get_wch(&mut character))); Event::fetch(value, character) } } #[inline] pub fn character(&mut self) -> Option<char> { match self.event() { Some(Event::Key(Key::Char(ch))) => Some(ch), Some(..) => self.character(), None => None } } }
use amethyst::{ core::Transform, core::timing::Time, ecs::{Entities, System, WriteStorage, Read, ReadExpect}, renderer::SpriteRender, }; use specs_physics::{PhysicsBody, PhysicsBodyBuilder, nphysics::object::BodyStatus}; use crate::spriteanimationloader::SpriteAnimationStore; use crate::delayedremove::DelayedRemove; use rand; use rand::Rng; pub struct SpawnParticleSystem { pub average_part_spawn: f32, pub min_x: f32, pub max_x: f32, pub min_y: f32, pub max_y: f32, pub lifespan: f32, } impl<'s> System<'s> for SpawnParticleSystem { type SystemData = ( Read<'s, Time>, WriteStorage<'s, PhysicsBody<f32>>, WriteStorage<'s, Transform>, WriteStorage<'s, SpriteRender>, WriteStorage<'s, DelayedRemove>, ReadExpect<'s, SpriteAnimationStore>, Entities<'s>, ); fn run(&mut self, ( time, mut physics_bodies, mut transforms, mut sprite_render, mut delayed_removes, sprite_animation_store, entities): Self::SystemData) { let delta = time.delta_seconds(); let mut rng = rand::prelude::thread_rng(); let random_number: f32 = rng.gen(); let probability_to_spawn = delta / self.average_part_spawn; if random_number < probability_to_spawn { let entity = entities.create(); let mut transform = Transform::default(); let x_pos = rng.gen::<f32>() * (self.max_x - self.min_x) + self.min_x; let y_pos = rng.gen::<f32>() * (self.max_y - self.min_y) + self.min_y; transform.set_translation_xyz(x_pos, y_pos, 0.0); transforms.insert(entity, transform).unwrap(); let physics_body: PhysicsBody<f32> = PhysicsBodyBuilder::from(BodyStatus::Dynamic) .lock_rotations(true) .build(); physics_bodies.insert(entity, physics_body).unwrap(); let sprite = sprite_animation_store.get_sprite_render("particle").unwrap(); sprite_render.insert(entity, sprite).unwrap(); let delayed_remove = DelayedRemove::new(self.lifespan); delayed_removes.insert(entity, delayed_remove).unwrap(); } } }
use input_i_scanner::InputIScanner; fn main() { let stdin = std::io::stdin(); let mut _i_i = InputIScanner::from(stdin.lock()); macro_rules! scan { (($($t: ty),+)) => { ($(scan!($t)),+) }; ($t: ty) => { _i_i.scan::<$t>() as $t }; (($($t: ty),+); $n: expr) => { std::iter::repeat_with(|| scan!(($($t),+))).take($n).collect::<Vec<_>>() }; ($t: ty; $n: expr) => { std::iter::repeat_with(|| scan!($t)).take($n).collect::<Vec<_>>() }; } let mut n = scan!(u64); let mut ans = Vec::new(); for i in (1..=n).rev() { let s = i * (i - 1) / 2; // 1 + 2 + ... + (i - 1) if s < n { ans.push(i); n -= i; } } for ans in ans { println!("{}", ans); } }
/*! Asymmetric key-based signing utility functions. # Examples ## If the data is valid, `verify` should return true. ``` use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); let (sign_pub, sign_priv) = keypair_from_seed(&seed).unwrap(); let sig = sign(b"hello", &sign_priv).unwrap(); assert!(verify(b"hello", &sig, &sign_pub).unwrap()); ``` ## If the data is valid, `verify` should return false. ```should_panic use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); let (sign_pub, sign_priv) = keypair_from_seed(&seed).unwrap(); let sig = sign(b"hello", &sign_priv).unwrap(); assert!(verify(b"hello1", &sig, &sign_pub).unwrap()); ``` */ use errors::*; use init; use rand::rand_bytes; use sodiumoxide::crypto::sign::ed25519 as so_sign; /** Generate a random seed for use in generating a signing keypair. # Examples ``` use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); ``` */ pub fn gen_seed() -> Result<Vec<u8>> { init::check()?; Ok(rand_bytes(so_sign::SEEDBYTES)?) } /** Generate a signing keypair from a pre-generated seed value. # Examples ``` use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); let (sign_pub, sign_priv) = keypair_from_seed(&seed).unwrap(); ``` */ pub fn keypair_from_seed(seed: &[u8]) -> Result<(Vec<u8>, Vec<u8>)> { init::check()?; let seed = match so_sign::Seed::from_slice(seed) { Some(v) => v, None => return Err(ErrorKind::InvalidSeed.into()), }; let (sign_pub, sign_priv) = so_sign::keypair_from_seed(&seed); Ok((sign_pub.0.to_vec(), sign_priv.0.to_vec())) } /** Sign data with your private signing key. # Examples ``` use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); let (sign_pub, sign_priv) = keypair_from_seed(&seed).unwrap(); let sig = sign(b"hello", &sign_priv).unwrap(); ``` */ pub fn sign(data: &[u8], priv_key: &[u8]) -> Result<Vec<u8>> { init::check()?; let priv_key = match so_sign::SecretKey::from_slice(priv_key) { Some(v) => v, None => return Err(ErrorKind::InvalidPrivKey.into()), }; Ok(so_sign::sign_detached(data, &priv_key).0.to_vec()) } /** Verify signature data with the original message and a public key. # Examples ``` use libsodacrypt::sign::*; let seed = gen_seed().unwrap(); let (sign_pub, sign_priv) = keypair_from_seed(&seed).unwrap(); let sig = sign(b"hello", &sign_priv).unwrap(); assert!(verify(b"hello", &sig, &sign_pub).unwrap()); ``` */ pub fn verify(data: &[u8], signature: &[u8], pub_key: &[u8]) -> Result<bool> { init::check()?; let pub_key = match so_sign::PublicKey::from_slice(pub_key) { Some(v) => v, None => return Err(ErrorKind::InvalidPubKey.into()), }; let signature = match so_sign::Signature::from_slice(signature) { Some(v) => v, None => return Err(ErrorKind::InvalidSignature.into()), }; Ok(so_sign::verify_detached(&signature, data, &pub_key)) }
use serde::{Deserialize, Serialize}; use serde_json::{Value}; #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)] pub struct Sample { path: String, vuint: Option<u64>, vint: Option<i64>, vfloat: Option<f64>, vstr: Option<String>, vbool: Option<bool>, } impl Sample { pub fn new() -> Self { Sample { path: String::from("$root"), vuint: None, vint: None, vfloat: None, vstr: None, vbool: None, } } pub fn sample() -> Value { Sample::default() .with_vbool(Some(true)) .with_vfloat(Some(0.0)) .with_vint(Some(0)) .with_vstr(Some(String::default())) .with_vuint(Some(0)) .to_value() } pub fn default() -> Self { Sample::new() } pub fn to_value(self) -> Value { match serde_json::value::to_value(self) { Ok(v) => v, _ => Value::default() } } pub fn with_path(self, path: Vec<String>) -> Self { Sample { path: path.clone().join("/"), ..self } } pub fn with_vuint(self, vuint: Option<u64>) -> Self { Sample { vuint, ..self } } pub fn with_vint(self, vint: Option<i64>) -> Self { Sample { vint, ..self } } pub fn with_vfloat(self, vfloat: Option<f64>) -> Self { Sample { vfloat, ..self } } pub fn with_vstr(self, vstr: Option<String>) -> Self { Sample { vstr, ..self } } pub fn with_vbool(self, vbool: Option<bool>) -> Self { Sample { vbool, ..self } } }
fn main() { // イミュータブルな変数 let x = 1 + 2; //ここで1+2というデータのラベルくんをxとしよう // ミュータブルな変数に束縛できる。 let mut y = x; //ここでmutなyくんが登場。今はxのデータと同じ場所を参照している。 // 注意として、xくんはイミュータブルなのでもう一度データの上に立ったら移動することができない。 // しかしyくんは走り回ることができるのである。 y = 5; //ここで、yくんはx=3というデータの上から5というデータの上に走って移動したのだ! // さらにイミュータブルな変数に束縛できる。 let z = y; // このzくんの扱いは、yくんのデータの上に新しくzくんを立たせた。 // この際、yくんが5というデータを所有していたが、zくんに譲渡したこになる。yくんはここで死ぬ。 // z = 10; // これはエラーになる。5というyくんのもともとのデータはzに与えられたが、mut/immutという性質は // 変数の属性であるのであった。zはimmutに作られたものなので、書き換えることは許されない。 println!("{}", z); // => 5 }
extern crate bytebeat; use bytebeat::Program; use bytebeat::encode::{Color, EncoderConfig}; const WIDTH: usize = 640; const HEIGHT: usize = 360; const BG_HEIGHT: usize = 256; const WV_HEIGHT: usize = HEIGHT - BG_HEIGHT; const FPS: usize = 15; pub fn generate_video(code: &Program, fname: &str) { let hz = code.hz().unwrap_or(8000) as usize; let frame_count = FPS * 30; let size = frame_count * hz / FPS; let full_width = size / BG_HEIGHT; // Generate the audio data let data = { let mut data = vec![0; size]; for i in 0..size { data[i] = bytebeat::eval_beat(&code, i as f64).into(); } data }; let mut encoder = EncoderConfig::with_dimensions(WIDTH, HEIGHT) .fps(FPS) .audio_rate(hz) .output_dimensions(640, 360) .audio_path("audio.pcm") .video_path("video.ppm") .build() .unwrap(); encoder.write_audio(&data).unwrap(); let mut image = [Color([0, 0, 0]); WIDTH * HEIGHT]; for frame in 0..frame_count { let x = frame * full_width / frame_count; let bg_offset = x.saturating_sub(WIDTH / 2).min(full_width - WIDTH); let cursor_col = x - bg_offset; render_frame( &mut image, &data, bg_offset, cursor_col, code.bg().unwrap_or(Color([255, 100, 16])), code.fg().unwrap_or(Color([64, 128, 255])), Color([255, 255, 255]), ); // Output a frame encoder.write_frame(&image).unwrap(); } encoder.start_encode(fname).unwrap().wait().unwrap(); encoder.remove_temp_files().unwrap(); } fn render_frame( image: &mut [Color], data: &[u8], bg_offset: usize, cursor_col: usize, bg_color: Color, wave_color: Color, scan_color: Color, ) { // Draw the background for row in 0..BG_HEIGHT { for col in 0..WIDTH { let i = row + col * BG_HEIGHT; let x = data[i + bg_offset * BG_HEIGHT]; image[row * WIDTH + col] = bg_color * x; } } // Clear the waveform for row in BG_HEIGHT..HEIGHT { for col in 0..WIDTH { image[row * WIDTH + col] = Color([0, 0, 0]); } } // Draw the waveform let waveform_col = bg_offset + cursor_col; for sample in 0..BG_HEIGHT - 1 { let x0 = data[waveform_col * BG_HEIGHT + sample] as usize * WV_HEIGHT / 256; let x1 = data[waveform_col * BG_HEIGHT + sample + 1] as usize * WV_HEIGHT / 256; let mid = ((x0 + x1) / 2) as usize; let col = sample * WIDTH / BG_HEIGHT; for r in x0.min(mid)..x0.max(mid) + 1 { let row = HEIGHT - r - 1; image[row * WIDTH + col] = wave_color; image[row * WIDTH + col + 1] = wave_color; } for r in x1.min(mid)..x1.max(mid) + 1 { let row = HEIGHT - r - 1; image[row * WIDTH + col + 1] = wave_color; image[row * WIDTH + col + 2] = wave_color; } } // Draw the cursor for row in 0..BG_HEIGHT { if cursor_col > 0 { image[row * WIDTH + cursor_col] = scan_color; } image[row * WIDTH + cursor_col] = scan_color; } }
extern crate cc; fn link_dylib(lib: &str) { println!("cargo:rustc-link-lib=dylib={}", lib); } fn link_static(lib: &str) { println!("cargo:rustc-link-lib=static={}", lib); } fn add_search_path(p: &str) { println!("cargo:rustc-link-search={}", p); } fn main() { add_search_path("/usr/local/lib"); let target = std::env::var("TARGET").unwrap(); if target.contains("-apple") || target.contains("-darwin") { link_dylib("iconv"); } else if target.contains("-android") { link_static("iconv"); } else if target.contains("-linux") { } else { panic!("unsupported target"); } }
pub use VkPipelineVertexInputStateCreateFlags::*; #[repr(u32)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum VkPipelineVertexInputStateCreateFlags { VK_PIPELINE_VERTEX_INPUT_STATE_CREATE_NULL_BIT = 0, } use crate::SetupVkFlags; #[repr(C)] #[derive(Clone, Copy, Eq, PartialEq, Hash)] pub struct VkPipelineVertexInputStateCreateFlagBits(u32); SetupVkFlags!( VkPipelineVertexInputStateCreateFlags, VkPipelineVertexInputStateCreateFlagBits );
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AccessibilityView(pub i32); impl AccessibilityView { pub const Raw: AccessibilityView = AccessibilityView(0i32); pub const Control: AccessibilityView = AccessibilityView(1i32); pub const Content: AccessibilityView = AccessibilityView(2i32); } impl ::core::convert::From<i32> for AccessibilityView { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AccessibilityView { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AccessibilityView { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AccessibilityView;i4)"); } impl ::windows::core::DefaultType for AccessibilityView { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AppBarAutomationPeer(pub ::windows::core::IInspectable); impl AppBarAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ToggleState(&self) -> ::windows::core::Result<super::ToggleState> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { let mut result__: super::ToggleState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ToggleState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Toggle(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsModal(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsTopmost(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn Maximizable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Minimizable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn InteractionState(&self) -> ::windows::core::Result<super::WindowInteractionState> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: super::WindowInteractionState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::WindowInteractionState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VisualState(&self) -> ::windows::core::Result<super::WindowVisualState> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: super::WindowVisualState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::WindowVisualState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetVisualState(&self, state: super::WindowVisualState) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), state).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn WaitForInputIdle(&self, milliseconds: i32) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), milliseconds, &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::AppBar>>(owner: Param0) -> ::windows::core::Result<AppBarAutomationPeer> { Self::IAppBarAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<AppBarAutomationPeer>(result__) }) } pub fn IAppBarAutomationPeerFactory<R, F: FnOnce(&IAppBarAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AppBarAutomationPeer, IAppBarAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AppBarAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AppBarAutomationPeer;{8b4acfeb-89fa-4f13-84be-35ca5b7c9590})"); } unsafe impl ::windows::core::Interface for AppBarAutomationPeer { type Vtable = IAppBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8b4acfeb_89fa_4f13_84be_35ca5b7c9590); } impl ::windows::core::RuntimeName for AppBarAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AppBarAutomationPeer"; } impl ::core::convert::From<AppBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: AppBarAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&AppBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: &AppBarAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AppBarAutomationPeer { 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 AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AppBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: AppBarAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&AppBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: &AppBarAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AppBarAutomationPeer { 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 AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarAutomationPeer> for super::Provider::IWindowProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarAutomationPeer> for super::Provider::IWindowProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IWindowProvider> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IWindowProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IWindowProvider> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IWindowProvider> { ::core::convert::TryInto::<super::Provider::IWindowProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AppBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: AppBarAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &AppBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarAutomationPeer> for AutomationPeer { fn from(value: AppBarAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarAutomationPeer> for AutomationPeer { fn from(value: &AppBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarAutomationPeer> for super::super::DependencyObject { fn from(value: AppBarAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AppBarAutomationPeer> for super::super::DependencyObject { fn from(value: &AppBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AppBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AppBarAutomationPeer {} unsafe impl ::core::marker::Sync for AppBarAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AppBarButtonAutomationPeer(pub ::windows::core::IInspectable); impl AppBarButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::AppBarButton>>(owner: Param0) -> ::windows::core::Result<AppBarButtonAutomationPeer> { Self::IAppBarButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<AppBarButtonAutomationPeer>(result__) }) } pub fn IAppBarButtonAutomationPeerFactory<R, F: FnOnce(&IAppBarButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AppBarButtonAutomationPeer, IAppBarButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AppBarButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AppBarButtonAutomationPeer;{443262b2-4f6d-4b76-9d2e-3eff777e8864})"); } unsafe impl ::windows::core::Interface for AppBarButtonAutomationPeer { type Vtable = IAppBarButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x443262b2_4f6d_4b76_9d2e_3eff777e8864); } impl ::windows::core::RuntimeName for AppBarButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AppBarButtonAutomationPeer"; } impl ::core::convert::From<AppBarButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: AppBarButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &AppBarButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AppBarButtonAutomationPeer { 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 AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: AppBarButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &AppBarButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AppBarButtonAutomationPeer { 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 AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarButtonAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarButtonAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for ButtonAutomationPeer { fn from(value: AppBarButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for ButtonAutomationPeer { fn from(value: &AppBarButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonAutomationPeer> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonAutomationPeer> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: AppBarButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &AppBarButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: AppBarButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &AppBarButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for AutomationPeer { fn from(value: AppBarButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for AutomationPeer { fn from(value: &AppBarButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarButtonAutomationPeer> for super::super::DependencyObject { fn from(value: AppBarButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AppBarButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &AppBarButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AppBarButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AppBarButtonAutomationPeer {} unsafe impl ::core::marker::Sync for AppBarButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AppBarToggleButtonAutomationPeer(pub ::windows::core::IInspectable); impl AppBarToggleButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::AppBarToggleButton>>(owner: Param0) -> ::windows::core::Result<AppBarToggleButtonAutomationPeer> { Self::IAppBarToggleButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<AppBarToggleButtonAutomationPeer>(result__) }) } pub fn IAppBarToggleButtonAutomationPeerFactory<R, F: FnOnce(&IAppBarToggleButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AppBarToggleButtonAutomationPeer, IAppBarToggleButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AppBarToggleButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AppBarToggleButtonAutomationPeer;{8464efad-9655-4aff-9550-63ae9ec8fe9c})"); } unsafe impl ::windows::core::Interface for AppBarToggleButtonAutomationPeer { type Vtable = IAppBarToggleButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8464efad_9655_4aff_9550_63ae9ec8fe9c); } impl ::windows::core::RuntimeName for AppBarToggleButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AppBarToggleButtonAutomationPeer"; } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AppBarToggleButtonAutomationPeer { 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 AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AppBarToggleButtonAutomationPeer { 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 AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AppBarToggleButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: AppBarToggleButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AppBarToggleButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &AppBarToggleButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<ToggleButtonAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for AutomationPeer { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for AutomationPeer { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AppBarToggleButtonAutomationPeer> for super::super::DependencyObject { fn from(value: AppBarToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AppBarToggleButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &AppBarToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AppBarToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AppBarToggleButtonAutomationPeer {} unsafe impl ::core::marker::Sync for AppBarToggleButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AutoSuggestBoxAutomationPeer(pub ::windows::core::IInspectable); impl AutoSuggestBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::AutoSuggestBox>>(owner: Param0) -> ::windows::core::Result<AutoSuggestBoxAutomationPeer> { Self::IAutoSuggestBoxAutomationPeerFactory(|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(), &mut result__).from_abi::<AutoSuggestBoxAutomationPeer>(result__) }) } pub fn IAutoSuggestBoxAutomationPeerFactory<R, F: FnOnce(&IAutoSuggestBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AutoSuggestBoxAutomationPeer, IAutoSuggestBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AutoSuggestBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AutoSuggestBoxAutomationPeer;{2f32c302-f99b-491d-9726-a5e181643efa})"); } unsafe impl ::windows::core::Interface for AutoSuggestBoxAutomationPeer { type Vtable = IAutoSuggestBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2f32c302_f99b_491d_9726_a5e181643efa); } impl ::windows::core::RuntimeName for AutoSuggestBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AutoSuggestBoxAutomationPeer"; } impl ::core::convert::From<AutoSuggestBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: AutoSuggestBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&AutoSuggestBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &AutoSuggestBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AutoSuggestBoxAutomationPeer { 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 AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AutoSuggestBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: AutoSuggestBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&AutoSuggestBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &AutoSuggestBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AutoSuggestBoxAutomationPeer { 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 AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<AutoSuggestBoxAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: AutoSuggestBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&AutoSuggestBoxAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &AutoSuggestBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<AutoSuggestBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: AutoSuggestBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&AutoSuggestBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &AutoSuggestBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AutoSuggestBoxAutomationPeer> for AutomationPeer { fn from(value: AutoSuggestBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&AutoSuggestBoxAutomationPeer> for AutomationPeer { fn from(value: &AutoSuggestBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<AutoSuggestBoxAutomationPeer> for super::super::DependencyObject { fn from(value: AutoSuggestBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AutoSuggestBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &AutoSuggestBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AutoSuggestBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AutoSuggestBoxAutomationPeer {} unsafe impl ::core::marker::Sync for AutoSuggestBoxAutomationPeer {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AutomationControlType(pub i32); impl AutomationControlType { pub const Button: AutomationControlType = AutomationControlType(0i32); pub const Calendar: AutomationControlType = AutomationControlType(1i32); pub const CheckBox: AutomationControlType = AutomationControlType(2i32); pub const ComboBox: AutomationControlType = AutomationControlType(3i32); pub const Edit: AutomationControlType = AutomationControlType(4i32); pub const Hyperlink: AutomationControlType = AutomationControlType(5i32); pub const Image: AutomationControlType = AutomationControlType(6i32); pub const ListItem: AutomationControlType = AutomationControlType(7i32); pub const List: AutomationControlType = AutomationControlType(8i32); pub const Menu: AutomationControlType = AutomationControlType(9i32); pub const MenuBar: AutomationControlType = AutomationControlType(10i32); pub const MenuItem: AutomationControlType = AutomationControlType(11i32); pub const ProgressBar: AutomationControlType = AutomationControlType(12i32); pub const RadioButton: AutomationControlType = AutomationControlType(13i32); pub const ScrollBar: AutomationControlType = AutomationControlType(14i32); pub const Slider: AutomationControlType = AutomationControlType(15i32); pub const Spinner: AutomationControlType = AutomationControlType(16i32); pub const StatusBar: AutomationControlType = AutomationControlType(17i32); pub const Tab: AutomationControlType = AutomationControlType(18i32); pub const TabItem: AutomationControlType = AutomationControlType(19i32); pub const Text: AutomationControlType = AutomationControlType(20i32); pub const ToolBar: AutomationControlType = AutomationControlType(21i32); pub const ToolTip: AutomationControlType = AutomationControlType(22i32); pub const Tree: AutomationControlType = AutomationControlType(23i32); pub const TreeItem: AutomationControlType = AutomationControlType(24i32); pub const Custom: AutomationControlType = AutomationControlType(25i32); pub const Group: AutomationControlType = AutomationControlType(26i32); pub const Thumb: AutomationControlType = AutomationControlType(27i32); pub const DataGrid: AutomationControlType = AutomationControlType(28i32); pub const DataItem: AutomationControlType = AutomationControlType(29i32); pub const Document: AutomationControlType = AutomationControlType(30i32); pub const SplitButton: AutomationControlType = AutomationControlType(31i32); pub const Window: AutomationControlType = AutomationControlType(32i32); pub const Pane: AutomationControlType = AutomationControlType(33i32); pub const Header: AutomationControlType = AutomationControlType(34i32); pub const HeaderItem: AutomationControlType = AutomationControlType(35i32); pub const Table: AutomationControlType = AutomationControlType(36i32); pub const TitleBar: AutomationControlType = AutomationControlType(37i32); pub const Separator: AutomationControlType = AutomationControlType(38i32); pub const SemanticZoom: AutomationControlType = AutomationControlType(39i32); pub const AppBar: AutomationControlType = AutomationControlType(40i32); } impl ::core::convert::From<i32> for AutomationControlType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationControlType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationControlType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationControlType;i4)"); } impl ::windows::core::DefaultType for AutomationControlType { 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 AutomationEvents(pub i32); impl AutomationEvents { pub const ToolTipOpened: AutomationEvents = AutomationEvents(0i32); pub const ToolTipClosed: AutomationEvents = AutomationEvents(1i32); pub const MenuOpened: AutomationEvents = AutomationEvents(2i32); pub const MenuClosed: AutomationEvents = AutomationEvents(3i32); pub const AutomationFocusChanged: AutomationEvents = AutomationEvents(4i32); pub const InvokePatternOnInvoked: AutomationEvents = AutomationEvents(5i32); pub const SelectionItemPatternOnElementAddedToSelection: AutomationEvents = AutomationEvents(6i32); pub const SelectionItemPatternOnElementRemovedFromSelection: AutomationEvents = AutomationEvents(7i32); pub const SelectionItemPatternOnElementSelected: AutomationEvents = AutomationEvents(8i32); pub const SelectionPatternOnInvalidated: AutomationEvents = AutomationEvents(9i32); pub const TextPatternOnTextSelectionChanged: AutomationEvents = AutomationEvents(10i32); pub const TextPatternOnTextChanged: AutomationEvents = AutomationEvents(11i32); pub const AsyncContentLoaded: AutomationEvents = AutomationEvents(12i32); pub const PropertyChanged: AutomationEvents = AutomationEvents(13i32); pub const StructureChanged: AutomationEvents = AutomationEvents(14i32); pub const DragStart: AutomationEvents = AutomationEvents(15i32); pub const DragCancel: AutomationEvents = AutomationEvents(16i32); pub const DragComplete: AutomationEvents = AutomationEvents(17i32); pub const DragEnter: AutomationEvents = AutomationEvents(18i32); pub const DragLeave: AutomationEvents = AutomationEvents(19i32); pub const Dropped: AutomationEvents = AutomationEvents(20i32); pub const LiveRegionChanged: AutomationEvents = AutomationEvents(21i32); pub const InputReachedTarget: AutomationEvents = AutomationEvents(22i32); pub const InputReachedOtherElement: AutomationEvents = AutomationEvents(23i32); pub const InputDiscarded: AutomationEvents = AutomationEvents(24i32); pub const WindowClosed: AutomationEvents = AutomationEvents(25i32); pub const WindowOpened: AutomationEvents = AutomationEvents(26i32); pub const ConversionTargetChanged: AutomationEvents = AutomationEvents(27i32); pub const TextEditTextChanged: AutomationEvents = AutomationEvents(28i32); pub const LayoutInvalidated: AutomationEvents = AutomationEvents(29i32); } impl ::core::convert::From<i32> for AutomationEvents { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationEvents { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationEvents { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationEvents;i4)"); } impl ::windows::core::DefaultType for AutomationEvents { 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 AutomationHeadingLevel(pub i32); impl AutomationHeadingLevel { pub const None: AutomationHeadingLevel = AutomationHeadingLevel(0i32); pub const Level1: AutomationHeadingLevel = AutomationHeadingLevel(1i32); pub const Level2: AutomationHeadingLevel = AutomationHeadingLevel(2i32); pub const Level3: AutomationHeadingLevel = AutomationHeadingLevel(3i32); pub const Level4: AutomationHeadingLevel = AutomationHeadingLevel(4i32); pub const Level5: AutomationHeadingLevel = AutomationHeadingLevel(5i32); pub const Level6: AutomationHeadingLevel = AutomationHeadingLevel(6i32); pub const Level7: AutomationHeadingLevel = AutomationHeadingLevel(7i32); pub const Level8: AutomationHeadingLevel = AutomationHeadingLevel(8i32); pub const Level9: AutomationHeadingLevel = AutomationHeadingLevel(9i32); } impl ::core::convert::From<i32> for AutomationHeadingLevel { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationHeadingLevel { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationHeadingLevel { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationHeadingLevel;i4)"); } impl ::windows::core::DefaultType for AutomationHeadingLevel { 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 AutomationLandmarkType(pub i32); impl AutomationLandmarkType { pub const None: AutomationLandmarkType = AutomationLandmarkType(0i32); pub const Custom: AutomationLandmarkType = AutomationLandmarkType(1i32); pub const Form: AutomationLandmarkType = AutomationLandmarkType(2i32); pub const Main: AutomationLandmarkType = AutomationLandmarkType(3i32); pub const Navigation: AutomationLandmarkType = AutomationLandmarkType(4i32); pub const Search: AutomationLandmarkType = AutomationLandmarkType(5i32); } impl ::core::convert::From<i32> for AutomationLandmarkType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationLandmarkType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationLandmarkType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType;i4)"); } impl ::windows::core::DefaultType for AutomationLandmarkType { 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 AutomationLiveSetting(pub i32); impl AutomationLiveSetting { pub const Off: AutomationLiveSetting = AutomationLiveSetting(0i32); pub const Polite: AutomationLiveSetting = AutomationLiveSetting(1i32); pub const Assertive: AutomationLiveSetting = AutomationLiveSetting(2i32); } impl ::core::convert::From<i32> for AutomationLiveSetting { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationLiveSetting { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationLiveSetting { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting;i4)"); } impl ::windows::core::DefaultType for AutomationLiveSetting { 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 AutomationNavigationDirection(pub i32); impl AutomationNavigationDirection { pub const Parent: AutomationNavigationDirection = AutomationNavigationDirection(0i32); pub const NextSibling: AutomationNavigationDirection = AutomationNavigationDirection(1i32); pub const PreviousSibling: AutomationNavigationDirection = AutomationNavigationDirection(2i32); pub const FirstChild: AutomationNavigationDirection = AutomationNavigationDirection(3i32); pub const LastChild: AutomationNavigationDirection = AutomationNavigationDirection(4i32); } impl ::core::convert::From<i32> for AutomationNavigationDirection { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationNavigationDirection { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationNavigationDirection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationNavigationDirection;i4)"); } impl ::windows::core::DefaultType for AutomationNavigationDirection { 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 AutomationNotificationKind(pub i32); impl AutomationNotificationKind { pub const ItemAdded: AutomationNotificationKind = AutomationNotificationKind(0i32); pub const ItemRemoved: AutomationNotificationKind = AutomationNotificationKind(1i32); pub const ActionCompleted: AutomationNotificationKind = AutomationNotificationKind(2i32); pub const ActionAborted: AutomationNotificationKind = AutomationNotificationKind(3i32); pub const Other: AutomationNotificationKind = AutomationNotificationKind(4i32); } impl ::core::convert::From<i32> for AutomationNotificationKind { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationNotificationKind { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationNotificationKind { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationNotificationKind;i4)"); } impl ::windows::core::DefaultType for AutomationNotificationKind { 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 AutomationNotificationProcessing(pub i32); impl AutomationNotificationProcessing { pub const ImportantAll: AutomationNotificationProcessing = AutomationNotificationProcessing(0i32); pub const ImportantMostRecent: AutomationNotificationProcessing = AutomationNotificationProcessing(1i32); pub const All: AutomationNotificationProcessing = AutomationNotificationProcessing(2i32); pub const MostRecent: AutomationNotificationProcessing = AutomationNotificationProcessing(3i32); pub const CurrentThenMostRecent: AutomationNotificationProcessing = AutomationNotificationProcessing(4i32); } impl ::core::convert::From<i32> for AutomationNotificationProcessing { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationNotificationProcessing { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationNotificationProcessing { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationNotificationProcessing;i4)"); } impl ::windows::core::DefaultType for AutomationNotificationProcessing { 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 AutomationOrientation(pub i32); impl AutomationOrientation { pub const None: AutomationOrientation = AutomationOrientation(0i32); pub const Horizontal: AutomationOrientation = AutomationOrientation(1i32); pub const Vertical: AutomationOrientation = AutomationOrientation(2i32); } impl ::core::convert::From<i32> for AutomationOrientation { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationOrientation { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationOrientation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationOrientation;i4)"); } impl ::windows::core::DefaultType for AutomationOrientation { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AutomationPeer(pub ::windows::core::IInspectable); impl AutomationPeer { pub fn EventsSource(&self) -> ::windows::core::Result<AutomationPeer> { 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::<AutomationPeer>(result__) } } pub fn SetEventsSource<'a, Param0: ::windows::core::IntoParam<'a, AutomationPeer>>(&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 GetPattern(&self, patterninterface: PatternInterface) -> ::windows::core::Result<::windows::core::IInspectable> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), patterninterface, &mut result__).from_abi::<::windows::core::IInspectable>(result__) } } pub fn RaiseAutomationEvent(&self, eventid: AutomationEvents) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), eventid).ok() } } pub fn RaisePropertyChangedEvent<'a, Param0: ::windows::core::IntoParam<'a, super::AutomationProperty>, Param1: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>>(&self, automationproperty: Param0, oldvalue: Param1, newvalue: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), automationproperty.into_param().abi(), oldvalue.into_param().abi(), newvalue.into_param().abi()).ok() } } pub fn GetAcceleratorKey(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetAccessKey(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetAutomationControlType(&self) -> ::windows::core::Result<AutomationControlType> { let this = self; unsafe { let mut result__: AutomationControlType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationControlType>(result__) } } pub fn GetAutomationId(&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).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } #[cfg(feature = "Foundation")] pub fn GetBoundingRectangle(&self) -> ::windows::core::Result<super::super::super::super::Foundation::Rect> { let this = self; unsafe { let mut result__: super::super::super::super::Foundation::Rect = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::super::Foundation::Rect>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetChildren(&self) -> ::windows::core::Result<super::super::super::super::Foundation::Collections::IVector<AutomationPeer>> { let this = 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::<super::super::super::super::Foundation::Collections::IVector<AutomationPeer>>(result__) } } pub fn GetClassName(&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).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } #[cfg(feature = "Foundation")] pub fn GetClickablePoint(&self) -> ::windows::core::Result<super::super::super::super::Foundation::Point> { let this = self; unsafe { let mut result__: super::super::super::super::Foundation::Point = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::super::Foundation::Point>(result__) } } pub fn GetHelpText(&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).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetItemStatus(&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).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetItemType(&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).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetLabeledBy(&self) -> ::windows::core::Result<AutomationPeer> { 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::<AutomationPeer>(result__) } } pub fn GetLocalizedControlType(&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).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetName(&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).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetOrientation(&self) -> ::windows::core::Result<AutomationOrientation> { let this = self; unsafe { let mut result__: AutomationOrientation = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationOrientation>(result__) } } pub fn HasKeyboardFocus(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsContentElement(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsControlElement(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsKeyboardFocusable(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsOffscreen(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPassword(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsRequiredForForm(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetFocus(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "deprecated")] pub fn GetParent(&self) -> ::windows::core::Result<AutomationPeer> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationPeer>(result__) } } pub fn InvalidatePeer(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn GetPeerFromPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::super::Foundation::Point>>(&self, point: Param0) -> ::windows::core::Result<AutomationPeer> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), point.into_param().abi(), &mut result__).from_abi::<AutomationPeer>(result__) } } pub fn GetLiveSetting(&self) -> ::windows::core::Result<AutomationLiveSetting> { let this = self; unsafe { let mut result__: AutomationLiveSetting = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationLiveSetting>(result__) } } pub fn Navigate(&self, direction: AutomationNavigationDirection) -> ::windows::core::Result<::windows::core::IInspectable> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), direction, &mut result__).from_abi::<::windows::core::IInspectable>(result__) } } #[cfg(feature = "Foundation")] pub fn GetElementFromPoint<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::super::Foundation::Point>>(&self, pointinwindowcoordinates: Param0) -> ::windows::core::Result<::windows::core::IInspectable> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), pointinwindowcoordinates.into_param().abi(), &mut result__).from_abi::<::windows::core::IInspectable>(result__) } } pub fn GetFocusedElement(&self) -> ::windows::core::Result<::windows::core::IInspectable> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(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::<::windows::core::IInspectable>(result__) } } pub fn ShowContextMenu(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn GetControlledPeers(&self) -> ::windows::core::Result<super::super::super::super::Foundation::Collections::IVectorView<AutomationPeer>> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(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::<super::super::super::super::Foundation::Collections::IVectorView<AutomationPeer>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetAnnotations(&self) -> ::windows::core::Result<super::super::super::super::Foundation::Collections::IVector<AutomationPeerAnnotation>> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(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::<super::super::super::super::Foundation::Collections::IVector<AutomationPeerAnnotation>>(result__) } } pub fn SetParent<'a, Param0: ::windows::core::IntoParam<'a, AutomationPeer>>(&self, peer: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), peer.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RaiseTextEditTextChangedEvent<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>>(&self, automationtexteditchangetype: super::AutomationTextEditChangeType, changeddata: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), automationtexteditchangetype, changeddata.into_param().abi()).ok() } } pub fn GetPositionInSet(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(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 GetSizeOfSet(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn GetLevel(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn RaiseStructureChangedEvent<'a, Param1: ::windows::core::IntoParam<'a, AutomationPeer>>(&self, structurechangetype: AutomationStructureChangeType, child: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAutomationPeer3>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), structurechangetype, child.into_param().abi()).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn PeerFromProvider<'a, Param0: ::windows::core::IntoParam<'a, super::Provider::IRawElementProviderSimple>>(&self, provider: Param0) -> ::windows::core::Result<AutomationPeer> { let this = &::windows::core::Interface::cast::<IAutomationPeerProtected>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), provider.into_param().abi(), &mut result__).from_abi::<AutomationPeer>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ProviderFromPeer<'a, Param0: ::windows::core::IntoParam<'a, AutomationPeer>>(&self, peer: Param0) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<IAutomationPeerProtected>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), peer.into_param().abi(), &mut result__).from_abi::<super::Provider::IRawElementProviderSimple>(result__) } } pub fn ListenerExists(eventid: AutomationEvents) -> ::windows::core::Result<bool> { Self::IAutomationPeerStatics(|this| unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), eventid, &mut result__).from_abi::<bool>(result__) }) } pub fn GenerateRawElementProviderRuntimeId() -> ::windows::core::Result<RawElementProviderRuntimeId> { Self::IAutomationPeerStatics3(|this| unsafe { let mut result__: RawElementProviderRuntimeId = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<RawElementProviderRuntimeId>(result__) }) } pub fn GetLandmarkType(&self) -> ::windows::core::Result<AutomationLandmarkType> { let this = &::windows::core::Interface::cast::<IAutomationPeer4>(self)?; unsafe { let mut result__: AutomationLandmarkType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationLandmarkType>(result__) } } pub fn GetLocalizedLandmarkType(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IAutomationPeer4>(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 IsPeripheral(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IAutomationPeer5>(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 IsDataValidForForm(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IAutomationPeer5>(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 GetFullDescription(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IAutomationPeer5>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetCulture(&self) -> ::windows::core::Result<i32> { let this = &::windows::core::Interface::cast::<IAutomationPeer6>(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 RaiseNotificationEvent<'a, Param2: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param3: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, notificationkind: AutomationNotificationKind, notificationprocessing: AutomationNotificationProcessing, displaystring: Param2, activityid: Param3) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IAutomationPeer7>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), notificationkind, notificationprocessing, displaystring.into_param().abi(), activityid.into_param().abi()).ok() } } pub fn GetHeadingLevel(&self) -> ::windows::core::Result<AutomationHeadingLevel> { let this = &::windows::core::Interface::cast::<IAutomationPeer8>(self)?; unsafe { let mut result__: AutomationHeadingLevel = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutomationHeadingLevel>(result__) } } pub fn IsDialog(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IAutomationPeer9>(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 IAutomationPeerStatics<R, F: FnOnce(&IAutomationPeerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AutomationPeer, IAutomationPeerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IAutomationPeerStatics3<R, F: FnOnce(&IAutomationPeerStatics3) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AutomationPeer, IAutomationPeerStatics3> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AutomationPeer;{35aac87a-62ee-4d3e-a24c-2bc8432d68b7})"); } unsafe impl ::windows::core::Interface for AutomationPeer { type Vtable = IAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x35aac87a_62ee_4d3e_a24c_2bc8432d68b7); } impl ::windows::core::RuntimeName for AutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AutomationPeer"; } impl ::core::convert::From<AutomationPeer> for ::windows::core::IUnknown { fn from(value: AutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&AutomationPeer> for ::windows::core::IUnknown { fn from(value: &AutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AutomationPeer { 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 AutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AutomationPeer> for ::windows::core::IInspectable { fn from(value: AutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&AutomationPeer> for ::windows::core::IInspectable { fn from(value: &AutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AutomationPeer { 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 AutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<AutomationPeer> for super::super::DependencyObject { fn from(value: AutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AutomationPeer> for super::super::DependencyObject { fn from(value: &AutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AutomationPeer {} unsafe impl ::core::marker::Sync for AutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AutomationPeerAnnotation(pub ::windows::core::IInspectable); impl AutomationPeerAnnotation { 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<AutomationPeerAnnotation, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn Type(&self) -> ::windows::core::Result<super::AnnotationType> { let this = self; unsafe { let mut result__: super::AnnotationType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::AnnotationType>(result__) } } pub fn SetType(&self, value: super::AnnotationType) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Peer(&self) -> ::windows::core::Result<AutomationPeer> { 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::<AutomationPeer>(result__) } } pub fn SetPeer<'a, Param0: ::windows::core::IntoParam<'a, AutomationPeer>>(&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 CreateInstance(r#type: super::AnnotationType) -> ::windows::core::Result<AutomationPeerAnnotation> { Self::IAutomationPeerAnnotationFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), r#type, &mut result__).from_abi::<AutomationPeerAnnotation>(result__) }) } pub fn CreateWithPeerParameter<'a, Param1: ::windows::core::IntoParam<'a, AutomationPeer>>(r#type: super::AnnotationType, peer: Param1) -> ::windows::core::Result<AutomationPeerAnnotation> { Self::IAutomationPeerAnnotationFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), r#type, peer.into_param().abi(), &mut result__).from_abi::<AutomationPeerAnnotation>(result__) }) } pub fn TypeProperty() -> ::windows::core::Result<super::super::DependencyProperty> { Self::IAutomationPeerAnnotationStatics(|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::<super::super::DependencyProperty>(result__) }) } pub fn PeerProperty() -> ::windows::core::Result<super::super::DependencyProperty> { Self::IAutomationPeerAnnotationStatics(|this| 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::super::DependencyProperty>(result__) }) } pub fn IAutomationPeerAnnotationFactory<R, F: FnOnce(&IAutomationPeerAnnotationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AutomationPeerAnnotation, IAutomationPeerAnnotationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IAutomationPeerAnnotationStatics<R, F: FnOnce(&IAutomationPeerAnnotationStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AutomationPeerAnnotation, IAutomationPeerAnnotationStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AutomationPeerAnnotation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation;{0c456061-52cf-43fa-82f8-07f137351e5a})"); } unsafe impl ::windows::core::Interface for AutomationPeerAnnotation { type Vtable = IAutomationPeerAnnotation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0c456061_52cf_43fa_82f8_07f137351e5a); } impl ::windows::core::RuntimeName for AutomationPeerAnnotation { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation"; } impl ::core::convert::From<AutomationPeerAnnotation> for ::windows::core::IUnknown { fn from(value: AutomationPeerAnnotation) -> Self { value.0 .0 } } impl ::core::convert::From<&AutomationPeerAnnotation> for ::windows::core::IUnknown { fn from(value: &AutomationPeerAnnotation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AutomationPeerAnnotation { 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 AutomationPeerAnnotation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AutomationPeerAnnotation> for ::windows::core::IInspectable { fn from(value: AutomationPeerAnnotation) -> Self { value.0 } } impl ::core::convert::From<&AutomationPeerAnnotation> for ::windows::core::IInspectable { fn from(value: &AutomationPeerAnnotation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AutomationPeerAnnotation { 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 AutomationPeerAnnotation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<AutomationPeerAnnotation> for super::super::DependencyObject { fn from(value: AutomationPeerAnnotation) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&AutomationPeerAnnotation> for super::super::DependencyObject { fn from(value: &AutomationPeerAnnotation) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for AutomationPeerAnnotation { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &AutomationPeerAnnotation { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for AutomationPeerAnnotation {} unsafe impl ::core::marker::Sync for AutomationPeerAnnotation {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AutomationStructureChangeType(pub i32); impl AutomationStructureChangeType { pub const ChildAdded: AutomationStructureChangeType = AutomationStructureChangeType(0i32); pub const ChildRemoved: AutomationStructureChangeType = AutomationStructureChangeType(1i32); pub const ChildrenInvalidated: AutomationStructureChangeType = AutomationStructureChangeType(2i32); pub const ChildrenBulkAdded: AutomationStructureChangeType = AutomationStructureChangeType(3i32); pub const ChildrenBulkRemoved: AutomationStructureChangeType = AutomationStructureChangeType(4i32); pub const ChildrenReordered: AutomationStructureChangeType = AutomationStructureChangeType(5i32); } impl ::core::convert::From<i32> for AutomationStructureChangeType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AutomationStructureChangeType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AutomationStructureChangeType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.AutomationStructureChangeType;i4)"); } impl ::windows::core::DefaultType for AutomationStructureChangeType { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ButtonAutomationPeer(pub ::windows::core::IInspectable); impl ButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Button>>(owner: Param0) -> ::windows::core::Result<ButtonAutomationPeer> { Self::IButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ButtonAutomationPeer>(result__) }) } pub fn IButtonAutomationPeerFactory<R, F: FnOnce(&IButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ButtonAutomationPeer, IButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ButtonAutomationPeer;{fb77efbe-39ec-4508-8ac3-51a1424027d7})"); } unsafe impl ::windows::core::Interface for ButtonAutomationPeer { type Vtable = IButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfb77efbe_39ec_4508_8ac3_51a1424027d7); } impl ::windows::core::RuntimeName for ButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ButtonAutomationPeer"; } impl ::core::convert::From<ButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: ButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ButtonAutomationPeer { 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 ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: ButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ButtonAutomationPeer { 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 ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: ButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &ButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: ButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &ButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ButtonAutomationPeer> for AutomationPeer { fn from(value: ButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ButtonAutomationPeer> for AutomationPeer { fn from(value: &ButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ButtonAutomationPeer> for super::super::DependencyObject { fn from(value: ButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &ButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ButtonAutomationPeer {} unsafe impl ::core::marker::Sync for ButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ButtonBaseAutomationPeer(pub ::windows::core::IInspectable); impl ButtonBaseAutomationPeer {} unsafe impl ::windows::core::RuntimeType for ButtonBaseAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ButtonBaseAutomationPeer;{a4f3b5b6-7585-4e0b-96d2-08cf6f28befa})"); } unsafe impl ::windows::core::Interface for ButtonBaseAutomationPeer { type Vtable = IButtonBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa4f3b5b6_7585_4e0b_96d2_08cf6f28befa); } impl ::windows::core::RuntimeName for ButtonBaseAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ButtonBaseAutomationPeer"; } impl ::core::convert::From<ButtonBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: ButtonBaseAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ButtonBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ButtonBaseAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ButtonBaseAutomationPeer { 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 ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ButtonBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: ButtonBaseAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ButtonBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ButtonBaseAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ButtonBaseAutomationPeer { 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 ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ButtonBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ButtonBaseAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ButtonBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ButtonBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ButtonBaseAutomationPeer> for AutomationPeer { fn from(value: ButtonBaseAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ButtonBaseAutomationPeer> for AutomationPeer { fn from(value: &ButtonBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ButtonBaseAutomationPeer> for super::super::DependencyObject { fn from(value: ButtonBaseAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ButtonBaseAutomationPeer> for super::super::DependencyObject { fn from(value: &ButtonBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ButtonBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ButtonBaseAutomationPeer {} unsafe impl ::core::marker::Sync for ButtonBaseAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CalendarDatePickerAutomationPeer(pub ::windows::core::IInspectable); impl CalendarDatePickerAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Value(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn SetValue<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::CalendarDatePicker>>(owner: Param0) -> ::windows::core::Result<CalendarDatePickerAutomationPeer> { Self::ICalendarDatePickerAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<CalendarDatePickerAutomationPeer>(result__) }) } pub fn ICalendarDatePickerAutomationPeerFactory<R, F: FnOnce(&ICalendarDatePickerAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CalendarDatePickerAutomationPeer, ICalendarDatePickerAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CalendarDatePickerAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.CalendarDatePickerAutomationPeer;{40d8938e-db5e-4b03-beba-d10f62419787})"); } unsafe impl ::windows::core::Interface for CalendarDatePickerAutomationPeer { type Vtable = ICalendarDatePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40d8938e_db5e_4b03_beba_d10f62419787); } impl ::windows::core::RuntimeName for CalendarDatePickerAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.CalendarDatePickerAutomationPeer"; } impl ::core::convert::From<CalendarDatePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: CalendarDatePickerAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&CalendarDatePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: &CalendarDatePickerAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CalendarDatePickerAutomationPeer { 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 CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CalendarDatePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: CalendarDatePickerAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&CalendarDatePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: &CalendarDatePickerAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CalendarDatePickerAutomationPeer { 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 CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<CalendarDatePickerAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: CalendarDatePickerAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&CalendarDatePickerAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &CalendarDatePickerAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<CalendarDatePickerAutomationPeer> for super::Provider::IValueProvider { type Error = ::windows::core::Error; fn try_from(value: CalendarDatePickerAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&CalendarDatePickerAutomationPeer> for super::Provider::IValueProvider { type Error = ::windows::core::Error; fn try_from(value: &CalendarDatePickerAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IValueProvider> for CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IValueProvider> for &CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IValueProvider> { ::core::convert::TryInto::<super::Provider::IValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CalendarDatePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: CalendarDatePickerAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&CalendarDatePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &CalendarDatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CalendarDatePickerAutomationPeer> for AutomationPeer { fn from(value: CalendarDatePickerAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&CalendarDatePickerAutomationPeer> for AutomationPeer { fn from(value: &CalendarDatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CalendarDatePickerAutomationPeer> for super::super::DependencyObject { fn from(value: CalendarDatePickerAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&CalendarDatePickerAutomationPeer> for super::super::DependencyObject { fn from(value: &CalendarDatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &CalendarDatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CalendarDatePickerAutomationPeer {} unsafe impl ::core::marker::Sync for CalendarDatePickerAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CaptureElementAutomationPeer(pub ::windows::core::IInspectable); impl CaptureElementAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::CaptureElement>>(owner: Param0) -> ::windows::core::Result<CaptureElementAutomationPeer> { Self::ICaptureElementAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<CaptureElementAutomationPeer>(result__) }) } pub fn ICaptureElementAutomationPeerFactory<R, F: FnOnce(&ICaptureElementAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CaptureElementAutomationPeer, ICaptureElementAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CaptureElementAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.CaptureElementAutomationPeer;{dcc44ee0-fa45-45c6-8bb7-320d808f5958})"); } unsafe impl ::windows::core::Interface for CaptureElementAutomationPeer { type Vtable = ICaptureElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdcc44ee0_fa45_45c6_8bb7_320d808f5958); } impl ::windows::core::RuntimeName for CaptureElementAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.CaptureElementAutomationPeer"; } impl ::core::convert::From<CaptureElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: CaptureElementAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&CaptureElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: &CaptureElementAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CaptureElementAutomationPeer { 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 CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CaptureElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: CaptureElementAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&CaptureElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: &CaptureElementAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CaptureElementAutomationPeer { 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 CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<CaptureElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: CaptureElementAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&CaptureElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &CaptureElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CaptureElementAutomationPeer> for AutomationPeer { fn from(value: CaptureElementAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&CaptureElementAutomationPeer> for AutomationPeer { fn from(value: &CaptureElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CaptureElementAutomationPeer> for super::super::DependencyObject { fn from(value: CaptureElementAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&CaptureElementAutomationPeer> for super::super::DependencyObject { fn from(value: &CaptureElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &CaptureElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CaptureElementAutomationPeer {} unsafe impl ::core::marker::Sync for CaptureElementAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CheckBoxAutomationPeer(pub ::windows::core::IInspectable); impl CheckBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::CheckBox>>(owner: Param0) -> ::windows::core::Result<CheckBoxAutomationPeer> { Self::ICheckBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<CheckBoxAutomationPeer>(result__) }) } pub fn ICheckBoxAutomationPeerFactory<R, F: FnOnce(&ICheckBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CheckBoxAutomationPeer, ICheckBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CheckBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.CheckBoxAutomationPeer;{eb15bc42-c0a9-46c6-ac24-b83de429c733})"); } unsafe impl ::windows::core::Interface for CheckBoxAutomationPeer { type Vtable = ICheckBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb15bc42_c0a9_46c6_ac24_b83de429c733); } impl ::windows::core::RuntimeName for CheckBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.CheckBoxAutomationPeer"; } impl ::core::convert::From<CheckBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: CheckBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&CheckBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &CheckBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CheckBoxAutomationPeer { 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 CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CheckBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: CheckBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&CheckBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &CheckBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CheckBoxAutomationPeer { 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 CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<CheckBoxAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: CheckBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&CheckBoxAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &CheckBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<CheckBoxAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: CheckBoxAutomationPeer) -> Self { ::core::convert::Into::<ToggleButtonAutomationPeer>::into(&value) } } impl ::core::convert::From<&CheckBoxAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: &CheckBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CheckBoxAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: CheckBoxAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&CheckBoxAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &CheckBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CheckBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: CheckBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&CheckBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &CheckBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CheckBoxAutomationPeer> for AutomationPeer { fn from(value: CheckBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&CheckBoxAutomationPeer> for AutomationPeer { fn from(value: &CheckBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<CheckBoxAutomationPeer> for super::super::DependencyObject { fn from(value: CheckBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&CheckBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &CheckBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &CheckBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for CheckBoxAutomationPeer {} unsafe impl ::core::marker::Sync for CheckBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ColorPickerSliderAutomationPeer(pub ::windows::core::IInspectable); impl ColorPickerSliderAutomationPeer { #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::ColorPickerSlider>>(owner: Param0) -> ::windows::core::Result<ColorPickerSliderAutomationPeer> { Self::IColorPickerSliderAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ColorPickerSliderAutomationPeer>(result__) }) } pub fn IColorPickerSliderAutomationPeerFactory<R, F: FnOnce(&IColorPickerSliderAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ColorPickerSliderAutomationPeer, IColorPickerSliderAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ColorPickerSliderAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ColorPickerSliderAutomationPeer;{a514215a-7293-4577-924c-47d4e0bf9b90})"); } unsafe impl ::windows::core::Interface for ColorPickerSliderAutomationPeer { type Vtable = IColorPickerSliderAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa514215a_7293_4577_924c_47d4e0bf9b90); } impl ::windows::core::RuntimeName for ColorPickerSliderAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ColorPickerSliderAutomationPeer"; } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for ::windows::core::IUnknown { fn from(value: ColorPickerSliderAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ColorPickerSliderAutomationPeer { 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 ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for ::windows::core::IInspectable { fn from(value: ColorPickerSliderAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ColorPickerSliderAutomationPeer { 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 ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ColorPickerSliderAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: ColorPickerSliderAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ColorPickerSliderAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: &ColorPickerSliderAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::core::convert::TryInto::<super::Provider::IRangeValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for SliderAutomationPeer { fn from(value: ColorPickerSliderAutomationPeer) -> Self { ::core::convert::Into::<SliderAutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for SliderAutomationPeer { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SliderAutomationPeer> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SliderAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SliderAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SliderAutomationPeer> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SliderAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SliderAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for RangeBaseAutomationPeer { fn from(value: ColorPickerSliderAutomationPeer) -> Self { ::core::convert::Into::<RangeBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for RangeBaseAutomationPeer { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ColorPickerSliderAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for AutomationPeer { fn from(value: ColorPickerSliderAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for AutomationPeer { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorPickerSliderAutomationPeer> for super::super::DependencyObject { fn from(value: ColorPickerSliderAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ColorPickerSliderAutomationPeer> for super::super::DependencyObject { fn from(value: &ColorPickerSliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ColorPickerSliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ColorPickerSliderAutomationPeer {} unsafe impl ::core::marker::Sync for ColorPickerSliderAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ColorSpectrumAutomationPeer(pub ::windows::core::IInspectable); impl ColorSpectrumAutomationPeer { #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::ColorSpectrum>>(owner: Param0) -> ::windows::core::Result<ColorSpectrumAutomationPeer> { Self::IColorSpectrumAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ColorSpectrumAutomationPeer>(result__) }) } pub fn IColorSpectrumAutomationPeerFactory<R, F: FnOnce(&IColorSpectrumAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ColorSpectrumAutomationPeer, IColorSpectrumAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ColorSpectrumAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ColorSpectrumAutomationPeer;{15d5ba03-010d-4ff7-9087-f4dd09f831b7})"); } unsafe impl ::windows::core::Interface for ColorSpectrumAutomationPeer { type Vtable = IColorSpectrumAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15d5ba03_010d_4ff7_9087_f4dd09f831b7); } impl ::windows::core::RuntimeName for ColorSpectrumAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ColorSpectrumAutomationPeer"; } impl ::core::convert::From<ColorSpectrumAutomationPeer> for ::windows::core::IUnknown { fn from(value: ColorSpectrumAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ColorSpectrumAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ColorSpectrumAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ColorSpectrumAutomationPeer { 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 ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ColorSpectrumAutomationPeer> for ::windows::core::IInspectable { fn from(value: ColorSpectrumAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ColorSpectrumAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ColorSpectrumAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ColorSpectrumAutomationPeer { 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 ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ColorSpectrumAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ColorSpectrumAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorSpectrumAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ColorSpectrumAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorSpectrumAutomationPeer> for AutomationPeer { fn from(value: ColorSpectrumAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ColorSpectrumAutomationPeer> for AutomationPeer { fn from(value: &ColorSpectrumAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ColorSpectrumAutomationPeer> for super::super::DependencyObject { fn from(value: ColorSpectrumAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ColorSpectrumAutomationPeer> for super::super::DependencyObject { fn from(value: &ColorSpectrumAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ColorSpectrumAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ColorSpectrumAutomationPeer {} unsafe impl ::core::marker::Sync for ColorSpectrumAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ComboBoxAutomationPeer(pub ::windows::core::IInspectable); impl ComboBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Value(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn SetValue<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IValueProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsModal(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsTopmost(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn Maximizable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Minimizable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn InteractionState(&self) -> ::windows::core::Result<super::WindowInteractionState> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: super::WindowInteractionState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::WindowInteractionState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VisualState(&self) -> ::windows::core::Result<super::WindowVisualState> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: super::WindowVisualState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::WindowVisualState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetVisualState(&self, state: super::WindowVisualState) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), state).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn WaitForInputIdle(&self, milliseconds: i32) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IWindowProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), milliseconds, &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ComboBox>>(owner: Param0) -> ::windows::core::Result<ComboBoxAutomationPeer> { Self::IComboBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ComboBoxAutomationPeer>(result__) }) } pub fn IComboBoxAutomationPeerFactory<R, F: FnOnce(&IComboBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ComboBoxAutomationPeer, IComboBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ComboBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ComboBoxAutomationPeer;{7eb40d0b-75c5-4263-ba6a-d4a54fb0f239})"); } unsafe impl ::windows::core::Interface for ComboBoxAutomationPeer { type Vtable = IComboBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7eb40d0b_75c5_4263_ba6a_d4a54fb0f239); } impl ::windows::core::RuntimeName for ComboBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ComboBoxAutomationPeer"; } impl ::core::convert::From<ComboBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: ComboBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ComboBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ComboBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ComboBoxAutomationPeer { 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 ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ComboBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: ComboBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ComboBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ComboBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ComboBoxAutomationPeer { 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 ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxAutomationPeer> for super::Provider::IValueProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxAutomationPeer> for super::Provider::IValueProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IValueProvider> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IValueProvider> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IValueProvider> { ::core::convert::TryInto::<super::Provider::IValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxAutomationPeer> for super::Provider::IWindowProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxAutomationPeer> for super::Provider::IWindowProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IWindowProvider> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IWindowProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IWindowProvider> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IWindowProvider> { ::core::convert::TryInto::<super::Provider::IWindowProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ComboBoxAutomationPeer> for SelectorAutomationPeer { fn from(value: ComboBoxAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxAutomationPeer> for SelectorAutomationPeer { fn from(value: &ComboBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxAutomationPeer> for ItemsControlAutomationPeer { fn from(value: ComboBoxAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &ComboBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ComboBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ComboBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxAutomationPeer> for AutomationPeer { fn from(value: ComboBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxAutomationPeer> for AutomationPeer { fn from(value: &ComboBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxAutomationPeer> for super::super::DependencyObject { fn from(value: ComboBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ComboBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &ComboBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ComboBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ComboBoxAutomationPeer {} unsafe impl ::core::marker::Sync for ComboBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ComboBoxItemAutomationPeer(pub ::windows::core::IInspectable); impl ComboBoxItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ComboBoxItem>>(owner: Param0) -> ::windows::core::Result<ComboBoxItemAutomationPeer> { Self::IComboBoxItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ComboBoxItemAutomationPeer>(result__) }) } pub fn IComboBoxItemAutomationPeerFactory<R, F: FnOnce(&IComboBoxItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ComboBoxItemAutomationPeer, IComboBoxItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ComboBoxItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ComboBoxItemAutomationPeer;{12ddc76e-9552-446a-82ee-938cc371800f})"); } unsafe impl ::windows::core::Interface for ComboBoxItemAutomationPeer { type Vtable = IComboBoxItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x12ddc76e_9552_446a_82ee_938cc371800f); } impl ::windows::core::RuntimeName for ComboBoxItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ComboBoxItemAutomationPeer"; } impl ::core::convert::From<ComboBoxItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ComboBoxItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ComboBoxItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ComboBoxItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ComboBoxItemAutomationPeer { 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 ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ComboBoxItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ComboBoxItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ComboBoxItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ComboBoxItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ComboBoxItemAutomationPeer { 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 ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ComboBoxItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ComboBoxItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ComboBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxItemAutomationPeer> for AutomationPeer { fn from(value: ComboBoxItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxItemAutomationPeer> for AutomationPeer { fn from(value: &ComboBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxItemAutomationPeer> for super::super::DependencyObject { fn from(value: ComboBoxItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ComboBoxItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ComboBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ComboBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ComboBoxItemAutomationPeer {} unsafe impl ::core::marker::Sync for ComboBoxItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ComboBoxItemDataAutomationPeer(pub ::windows::core::IInspectable); impl ComboBoxItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, ComboBoxAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<ComboBoxItemDataAutomationPeer> { Self::IComboBoxItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ComboBoxItemDataAutomationPeer>(result__) }) } pub fn IComboBoxItemDataAutomationPeerFactory<R, F: FnOnce(&IComboBoxItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ComboBoxItemDataAutomationPeer, IComboBoxItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ComboBoxItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ComboBoxItemDataAutomationPeer;{4fef6df2-289c-4c04-831b-5a668c6d7104})"); } unsafe impl ::windows::core::Interface for ComboBoxItemDataAutomationPeer { type Vtable = IComboBoxItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4fef6df2_289c_4c04_831b_5a668c6d7104); } impl ::windows::core::RuntimeName for ComboBoxItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ComboBoxItemDataAutomationPeer"; } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ComboBoxItemDataAutomationPeer { 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 ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ComboBoxItemDataAutomationPeer { 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 ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ComboBoxItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ComboBoxItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ComboBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<SelectorItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for AutomationPeer { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for AutomationPeer { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ComboBoxItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: ComboBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ComboBoxItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &ComboBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ComboBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ComboBoxItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for ComboBoxItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct DatePickerAutomationPeer(pub ::windows::core::IInspectable); impl DatePickerAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::DatePicker>>(owner: Param0) -> ::windows::core::Result<DatePickerAutomationPeer> { Self::IDatePickerAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<DatePickerAutomationPeer>(result__) }) } pub fn IDatePickerAutomationPeerFactory<R, F: FnOnce(&IDatePickerAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<DatePickerAutomationPeer, IDatePickerAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for DatePickerAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.DatePickerAutomationPeer;{d07d357f-a0b9-45dc-991a-76c505e7d0f5})"); } unsafe impl ::windows::core::Interface for DatePickerAutomationPeer { type Vtable = IDatePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd07d357f_a0b9_45dc_991a_76c505e7d0f5); } impl ::windows::core::RuntimeName for DatePickerAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.DatePickerAutomationPeer"; } impl ::core::convert::From<DatePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: DatePickerAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&DatePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: &DatePickerAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for DatePickerAutomationPeer { 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 DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<DatePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: DatePickerAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&DatePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: &DatePickerAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for DatePickerAutomationPeer { 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 DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<DatePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: DatePickerAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&DatePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &DatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DatePickerAutomationPeer> for AutomationPeer { fn from(value: DatePickerAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&DatePickerAutomationPeer> for AutomationPeer { fn from(value: &DatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DatePickerAutomationPeer> for super::super::DependencyObject { fn from(value: DatePickerAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&DatePickerAutomationPeer> for super::super::DependencyObject { fn from(value: &DatePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &DatePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for DatePickerAutomationPeer {} unsafe impl ::core::marker::Sync for DatePickerAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct DatePickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl DatePickerFlyoutPresenterAutomationPeer {} unsafe impl ::windows::core::RuntimeType for DatePickerFlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.DatePickerFlyoutPresenterAutomationPeer;{752aed38-c2bf-4880-82b2-a6c05e90c135})"); } unsafe impl ::windows::core::Interface for DatePickerFlyoutPresenterAutomationPeer { type Vtable = IDatePickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x752aed38_c2bf_4880_82b2_a6c05e90c135); } impl ::windows::core::RuntimeName for DatePickerFlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.DatePickerFlyoutPresenterAutomationPeer"; } impl ::core::convert::From<DatePickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: DatePickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&DatePickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &DatePickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for DatePickerFlyoutPresenterAutomationPeer { 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 DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<DatePickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: DatePickerFlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&DatePickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &DatePickerFlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for DatePickerFlyoutPresenterAutomationPeer { 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 DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<DatePickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: DatePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&DatePickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &DatePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DatePickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: DatePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&DatePickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &DatePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<DatePickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: DatePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&DatePickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &DatePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &DatePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for DatePickerFlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for DatePickerFlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct FlipViewAutomationPeer(pub ::windows::core::IInspectable); impl FlipViewAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::FlipView>>(owner: Param0) -> ::windows::core::Result<FlipViewAutomationPeer> { Self::IFlipViewAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<FlipViewAutomationPeer>(result__) }) } pub fn IFlipViewAutomationPeerFactory<R, F: FnOnce(&IFlipViewAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FlipViewAutomationPeer, IFlipViewAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for FlipViewAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.FlipViewAutomationPeer;{8ec0353a-4284-4b00-aef8-a2688ea5e3c4})"); } unsafe impl ::windows::core::Interface for FlipViewAutomationPeer { type Vtable = IFlipViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8ec0353a_4284_4b00_aef8_a2688ea5e3c4); } impl ::windows::core::RuntimeName for FlipViewAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.FlipViewAutomationPeer"; } impl ::core::convert::From<FlipViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: FlipViewAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&FlipViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: &FlipViewAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for FlipViewAutomationPeer { 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 FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<FlipViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: FlipViewAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&FlipViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: &FlipViewAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for FlipViewAutomationPeer { 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 FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<FlipViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: FlipViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&FlipViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &FlipViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<FlipViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: FlipViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&FlipViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &FlipViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<FlipViewAutomationPeer> for SelectorAutomationPeer { fn from(value: FlipViewAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewAutomationPeer> for SelectorAutomationPeer { fn from(value: &FlipViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: FlipViewAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &FlipViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: FlipViewAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &FlipViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewAutomationPeer> for AutomationPeer { fn from(value: FlipViewAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewAutomationPeer> for AutomationPeer { fn from(value: &FlipViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewAutomationPeer> for super::super::DependencyObject { fn from(value: FlipViewAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&FlipViewAutomationPeer> for super::super::DependencyObject { fn from(value: &FlipViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &FlipViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for FlipViewAutomationPeer {} unsafe impl ::core::marker::Sync for FlipViewAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct FlipViewItemAutomationPeer(pub ::windows::core::IInspectable); impl FlipViewItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::FlipViewItem>>(owner: Param0) -> ::windows::core::Result<FlipViewItemAutomationPeer> { Self::IFlipViewItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<FlipViewItemAutomationPeer>(result__) }) } pub fn IFlipViewItemAutomationPeerFactory<R, F: FnOnce(&IFlipViewItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FlipViewItemAutomationPeer, IFlipViewItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for FlipViewItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.FlipViewItemAutomationPeer;{c83034de-fa08-4bd3-aeb2-d2e5bfa04df9})"); } unsafe impl ::windows::core::Interface for FlipViewItemAutomationPeer { type Vtable = IFlipViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc83034de_fa08_4bd3_aeb2_d2e5bfa04df9); } impl ::windows::core::RuntimeName for FlipViewItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.FlipViewItemAutomationPeer"; } impl ::core::convert::From<FlipViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: FlipViewItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&FlipViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &FlipViewItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for FlipViewItemAutomationPeer { 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 FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<FlipViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: FlipViewItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&FlipViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &FlipViewItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for FlipViewItemAutomationPeer { 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 FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<FlipViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: FlipViewItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &FlipViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewItemAutomationPeer> for AutomationPeer { fn from(value: FlipViewItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewItemAutomationPeer> for AutomationPeer { fn from(value: &FlipViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: FlipViewItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&FlipViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: &FlipViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &FlipViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for FlipViewItemAutomationPeer {} unsafe impl ::core::marker::Sync for FlipViewItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct FlipViewItemDataAutomationPeer(pub ::windows::core::IInspectable); impl FlipViewItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, FlipViewAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<FlipViewItemDataAutomationPeer> { Self::IFlipViewItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<FlipViewItemDataAutomationPeer>(result__) }) } pub fn IFlipViewItemDataAutomationPeerFactory<R, F: FnOnce(&IFlipViewItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FlipViewItemDataAutomationPeer, IFlipViewItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for FlipViewItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.FlipViewItemDataAutomationPeer;{b0986175-00bc-4118-8a6f-16ee9c15d968})"); } unsafe impl ::windows::core::Interface for FlipViewItemDataAutomationPeer { type Vtable = IFlipViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb0986175_00bc_4118_8a6f_16ee9c15d968); } impl ::windows::core::RuntimeName for FlipViewItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.FlipViewItemDataAutomationPeer"; } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: FlipViewItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for FlipViewItemDataAutomationPeer { 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 FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: FlipViewItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for FlipViewItemDataAutomationPeer { 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 FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<FlipViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&FlipViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<FlipViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&FlipViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<FlipViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&FlipViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &FlipViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: FlipViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<SelectorItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: FlipViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for AutomationPeer { fn from(value: FlipViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for AutomationPeer { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlipViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: FlipViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&FlipViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &FlipViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &FlipViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for FlipViewItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for FlipViewItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct FlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl FlyoutPresenterAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::FlyoutPresenter>>(owner: Param0) -> ::windows::core::Result<FlyoutPresenterAutomationPeer> { Self::IFlyoutPresenterAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<FlyoutPresenterAutomationPeer>(result__) }) } pub fn IFlyoutPresenterAutomationPeerFactory<R, F: FnOnce(&IFlyoutPresenterAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FlyoutPresenterAutomationPeer, IFlyoutPresenterAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for FlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.FlyoutPresenterAutomationPeer;{a01840b4-5fca-456f-98ea-300eb40b585e})"); } unsafe impl ::windows::core::Interface for FlyoutPresenterAutomationPeer { type Vtable = IFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa01840b4_5fca_456f_98ea_300eb40b585e); } impl ::windows::core::RuntimeName for FlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.FlyoutPresenterAutomationPeer"; } impl ::core::convert::From<FlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: FlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&FlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &FlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for FlyoutPresenterAutomationPeer { 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 FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<FlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: FlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&FlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &FlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for FlyoutPresenterAutomationPeer { 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 FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<FlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: FlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&FlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &FlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: FlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&FlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &FlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: FlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&FlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &FlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &FlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for FlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for FlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct FrameworkElementAutomationPeer(pub ::windows::core::IInspectable); impl FrameworkElementAutomationPeer { pub fn Owner(&self) -> ::windows::core::Result<super::super::UIElement> { 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::UIElement>(result__) } } pub fn FromElement<'a, Param0: ::windows::core::IntoParam<'a, super::super::UIElement>>(element: Param0) -> ::windows::core::Result<AutomationPeer> { Self::IFrameworkElementAutomationPeerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), element.into_param().abi(), &mut result__).from_abi::<AutomationPeer>(result__) }) } pub fn CreatePeerForElement<'a, Param0: ::windows::core::IntoParam<'a, super::super::UIElement>>(element: Param0) -> ::windows::core::Result<AutomationPeer> { Self::IFrameworkElementAutomationPeerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), element.into_param().abi(), &mut result__).from_abi::<AutomationPeer>(result__) }) } pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::FrameworkElement>>(owner: Param0) -> ::windows::core::Result<FrameworkElementAutomationPeer> { Self::IFrameworkElementAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<FrameworkElementAutomationPeer>(result__) }) } pub fn IFrameworkElementAutomationPeerStatics<R, F: FnOnce(&IFrameworkElementAutomationPeerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FrameworkElementAutomationPeer, IFrameworkElementAutomationPeerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IFrameworkElementAutomationPeerFactory<R, F: FnOnce(&IFrameworkElementAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<FrameworkElementAutomationPeer, IFrameworkElementAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for FrameworkElementAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer;{b90ad781-bfeb-4451-bd47-9f3a63ebd24a})"); } unsafe impl ::windows::core::Interface for FrameworkElementAutomationPeer { type Vtable = IFrameworkElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb90ad781_bfeb_4451_bd47_9f3a63ebd24a); } impl ::windows::core::RuntimeName for FrameworkElementAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer"; } impl ::core::convert::From<FrameworkElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: FrameworkElementAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&FrameworkElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: &FrameworkElementAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for FrameworkElementAutomationPeer { 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 FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<FrameworkElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: FrameworkElementAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&FrameworkElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: &FrameworkElementAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for FrameworkElementAutomationPeer { 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 FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<FrameworkElementAutomationPeer> for AutomationPeer { fn from(value: FrameworkElementAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&FrameworkElementAutomationPeer> for AutomationPeer { fn from(value: &FrameworkElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<FrameworkElementAutomationPeer> for super::super::DependencyObject { fn from(value: FrameworkElementAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&FrameworkElementAutomationPeer> for super::super::DependencyObject { fn from(value: &FrameworkElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &FrameworkElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for FrameworkElementAutomationPeer {} unsafe impl ::core::marker::Sync for FrameworkElementAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct GridViewAutomationPeer(pub ::windows::core::IInspectable); impl GridViewAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::GridView>>(owner: Param0) -> ::windows::core::Result<GridViewAutomationPeer> { Self::IGridViewAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<GridViewAutomationPeer>(result__) }) } pub fn IGridViewAutomationPeerFactory<R, F: FnOnce(&IGridViewAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<GridViewAutomationPeer, IGridViewAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for GridViewAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.GridViewAutomationPeer;{1c4401a4-d951-49ca-8f82-c7f3c60681b0})"); } unsafe impl ::windows::core::Interface for GridViewAutomationPeer { type Vtable = IGridViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1c4401a4_d951_49ca_8f82_c7f3c60681b0); } impl ::windows::core::RuntimeName for GridViewAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.GridViewAutomationPeer"; } impl ::core::convert::From<GridViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: GridViewAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&GridViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: &GridViewAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for GridViewAutomationPeer { 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 GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<GridViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: GridViewAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&GridViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: &GridViewAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for GridViewAutomationPeer { 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 GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::core::convert::TryInto::<super::Provider::IDropTargetProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<GridViewAutomationPeer> for ListViewBaseAutomationPeer { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<ListViewBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for ListViewBaseAutomationPeer { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseAutomationPeer> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseAutomationPeer> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewAutomationPeer> for SelectorAutomationPeer { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for SelectorAutomationPeer { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewAutomationPeer> for AutomationPeer { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for AutomationPeer { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewAutomationPeer> for super::super::DependencyObject { fn from(value: GridViewAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&GridViewAutomationPeer> for super::super::DependencyObject { fn from(value: &GridViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &GridViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for GridViewAutomationPeer {} unsafe impl ::core::marker::Sync for GridViewAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct GridViewHeaderItemAutomationPeer(pub ::windows::core::IInspectable); impl GridViewHeaderItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::GridViewHeaderItem>>(owner: Param0) -> ::windows::core::Result<GridViewHeaderItemAutomationPeer> { Self::IGridViewHeaderItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<GridViewHeaderItemAutomationPeer>(result__) }) } pub fn IGridViewHeaderItemAutomationPeerFactory<R, F: FnOnce(&IGridViewHeaderItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<GridViewHeaderItemAutomationPeer, IGridViewHeaderItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for GridViewHeaderItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.GridViewHeaderItemAutomationPeer;{e3dcef3a-e08a-48e7-b23a-2be5b66e474e})"); } unsafe impl ::windows::core::Interface for GridViewHeaderItemAutomationPeer { type Vtable = IGridViewHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe3dcef3a_e08a_48e7_b23a_2be5b66e474e); } impl ::windows::core::RuntimeName for GridViewHeaderItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.GridViewHeaderItemAutomationPeer"; } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for GridViewHeaderItemAutomationPeer { 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 GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for GridViewHeaderItemAutomationPeer { 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 GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseHeaderItemAutomationPeer> for GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseHeaderItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseHeaderItemAutomationPeer> for &GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseHeaderItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for AutomationPeer { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for AutomationPeer { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: GridViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&GridViewHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: &GridViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &GridViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for GridViewHeaderItemAutomationPeer {} unsafe impl ::core::marker::Sync for GridViewHeaderItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct GridViewItemAutomationPeer(pub ::windows::core::IInspectable); impl GridViewItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::GridViewItem>>(owner: Param0) -> ::windows::core::Result<GridViewItemAutomationPeer> { Self::IGridViewItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<GridViewItemAutomationPeer>(result__) }) } pub fn IGridViewItemAutomationPeerFactory<R, F: FnOnce(&IGridViewItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<GridViewItemAutomationPeer, IGridViewItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for GridViewItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.GridViewItemAutomationPeer;{93ef2d07-346c-4166-a4ba-bc6a181e7f33})"); } unsafe impl ::windows::core::Interface for GridViewItemAutomationPeer { type Vtable = IGridViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93ef2d07_346c_4166_a4ba_bc6a181e7f33); } impl ::windows::core::RuntimeName for GridViewItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.GridViewItemAutomationPeer"; } impl ::core::convert::From<GridViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: GridViewItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&GridViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &GridViewItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for GridViewItemAutomationPeer { 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 GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<GridViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: GridViewItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&GridViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &GridViewItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for GridViewItemAutomationPeer { 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 GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<GridViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: GridViewItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &GridViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewItemAutomationPeer> for AutomationPeer { fn from(value: GridViewItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewItemAutomationPeer> for AutomationPeer { fn from(value: &GridViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: GridViewItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&GridViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: &GridViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &GridViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for GridViewItemAutomationPeer {} unsafe impl ::core::marker::Sync for GridViewItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct GridViewItemDataAutomationPeer(pub ::windows::core::IInspectable); impl GridViewItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, GridViewAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<GridViewItemDataAutomationPeer> { Self::IGridViewItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<GridViewItemDataAutomationPeer>(result__) }) } pub fn IGridViewItemDataAutomationPeerFactory<R, F: FnOnce(&IGridViewItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<GridViewItemDataAutomationPeer, IGridViewItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for GridViewItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.GridViewItemDataAutomationPeer;{f3f4868f-29d4-4094-8c54-ea61a88294a4})"); } unsafe impl ::windows::core::Interface for GridViewItemDataAutomationPeer { type Vtable = IGridViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3f4868f_29d4_4094_8c54_ea61a88294a4); } impl ::windows::core::RuntimeName for GridViewItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.GridViewItemDataAutomationPeer"; } impl ::core::convert::From<GridViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: GridViewItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &GridViewItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for GridViewItemDataAutomationPeer { 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 GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<GridViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: GridViewItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &GridViewItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for GridViewItemDataAutomationPeer { 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 GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<GridViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&GridViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &GridViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<GridViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: GridViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<SelectorItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: &GridViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: GridViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &GridViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewItemDataAutomationPeer> for AutomationPeer { fn from(value: GridViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for AutomationPeer { fn from(value: &GridViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GridViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: GridViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&GridViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &GridViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &GridViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for GridViewItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for GridViewItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct GroupItemAutomationPeer(pub ::windows::core::IInspectable); impl GroupItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::GroupItem>>(owner: Param0) -> ::windows::core::Result<GroupItemAutomationPeer> { Self::IGroupItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<GroupItemAutomationPeer>(result__) }) } pub fn IGroupItemAutomationPeerFactory<R, F: FnOnce(&IGroupItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<GroupItemAutomationPeer, IGroupItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for GroupItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.GroupItemAutomationPeer;{1914fe6d-0740-4236-9ee1-38cf19c1c388})"); } unsafe impl ::windows::core::Interface for GroupItemAutomationPeer { type Vtable = IGroupItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1914fe6d_0740_4236_9ee1_38cf19c1c388); } impl ::windows::core::RuntimeName for GroupItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.GroupItemAutomationPeer"; } impl ::core::convert::From<GroupItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: GroupItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&GroupItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &GroupItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for GroupItemAutomationPeer { 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 GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<GroupItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: GroupItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&GroupItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &GroupItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for GroupItemAutomationPeer { 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 GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<GroupItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: GroupItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&GroupItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &GroupItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GroupItemAutomationPeer> for AutomationPeer { fn from(value: GroupItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&GroupItemAutomationPeer> for AutomationPeer { fn from(value: &GroupItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<GroupItemAutomationPeer> for super::super::DependencyObject { fn from(value: GroupItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&GroupItemAutomationPeer> for super::super::DependencyObject { fn from(value: &GroupItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &GroupItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for GroupItemAutomationPeer {} unsafe impl ::core::marker::Sync for GroupItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct HubAutomationPeer(pub ::windows::core::IInspectable); impl HubAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Hub>>(owner: Param0) -> ::windows::core::Result<HubAutomationPeer> { Self::IHubAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<HubAutomationPeer>(result__) }) } pub fn IHubAutomationPeerFactory<R, F: FnOnce(&IHubAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<HubAutomationPeer, IHubAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for HubAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.HubAutomationPeer;{4ddee056-4ebc-4620-a05d-903e3c9a4ead})"); } unsafe impl ::windows::core::Interface for HubAutomationPeer { type Vtable = IHubAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4ddee056_4ebc_4620_a05d_903e3c9a4ead); } impl ::windows::core::RuntimeName for HubAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.HubAutomationPeer"; } impl ::core::convert::From<HubAutomationPeer> for ::windows::core::IUnknown { fn from(value: HubAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&HubAutomationPeer> for ::windows::core::IUnknown { fn from(value: &HubAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for HubAutomationPeer { 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 HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<HubAutomationPeer> for ::windows::core::IInspectable { fn from(value: HubAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&HubAutomationPeer> for ::windows::core::IInspectable { fn from(value: &HubAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for HubAutomationPeer { 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 HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<HubAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: HubAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&HubAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &HubAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HubAutomationPeer> for AutomationPeer { fn from(value: HubAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&HubAutomationPeer> for AutomationPeer { fn from(value: &HubAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HubAutomationPeer> for super::super::DependencyObject { fn from(value: HubAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&HubAutomationPeer> for super::super::DependencyObject { fn from(value: &HubAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &HubAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for HubAutomationPeer {} unsafe impl ::core::marker::Sync for HubAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct HubSectionAutomationPeer(pub ::windows::core::IInspectable); impl HubSectionAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::HubSection>>(owner: Param0) -> ::windows::core::Result<HubSectionAutomationPeer> { Self::IHubSectionAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<HubSectionAutomationPeer>(result__) }) } pub fn IHubSectionAutomationPeerFactory<R, F: FnOnce(&IHubSectionAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<HubSectionAutomationPeer, IHubSectionAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for HubSectionAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.HubSectionAutomationPeer;{16d91ff7-7431-4d82-83ce-cfa3192b0f18})"); } unsafe impl ::windows::core::Interface for HubSectionAutomationPeer { type Vtable = IHubSectionAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x16d91ff7_7431_4d82_83ce_cfa3192b0f18); } impl ::windows::core::RuntimeName for HubSectionAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.HubSectionAutomationPeer"; } impl ::core::convert::From<HubSectionAutomationPeer> for ::windows::core::IUnknown { fn from(value: HubSectionAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&HubSectionAutomationPeer> for ::windows::core::IUnknown { fn from(value: &HubSectionAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for HubSectionAutomationPeer { 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 HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<HubSectionAutomationPeer> for ::windows::core::IInspectable { fn from(value: HubSectionAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&HubSectionAutomationPeer> for ::windows::core::IInspectable { fn from(value: &HubSectionAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for HubSectionAutomationPeer { 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 HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<HubSectionAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: HubSectionAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&HubSectionAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &HubSectionAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<HubSectionAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: HubSectionAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&HubSectionAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &HubSectionAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HubSectionAutomationPeer> for AutomationPeer { fn from(value: HubSectionAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&HubSectionAutomationPeer> for AutomationPeer { fn from(value: &HubSectionAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HubSectionAutomationPeer> for super::super::DependencyObject { fn from(value: HubSectionAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&HubSectionAutomationPeer> for super::super::DependencyObject { fn from(value: &HubSectionAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &HubSectionAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for HubSectionAutomationPeer {} unsafe impl ::core::marker::Sync for HubSectionAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct HyperlinkButtonAutomationPeer(pub ::windows::core::IInspectable); impl HyperlinkButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::HyperlinkButton>>(owner: Param0) -> ::windows::core::Result<HyperlinkButtonAutomationPeer> { Self::IHyperlinkButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<HyperlinkButtonAutomationPeer>(result__) }) } pub fn IHyperlinkButtonAutomationPeerFactory<R, F: FnOnce(&IHyperlinkButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<HyperlinkButtonAutomationPeer, IHyperlinkButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for HyperlinkButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.HyperlinkButtonAutomationPeer;{aa7afcb1-0edf-46d9-aa9e-0eb21d140097})"); } unsafe impl ::windows::core::Interface for HyperlinkButtonAutomationPeer { type Vtable = IHyperlinkButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa7afcb1_0edf_46d9_aa9e_0eb21d140097); } impl ::windows::core::RuntimeName for HyperlinkButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.HyperlinkButtonAutomationPeer"; } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: HyperlinkButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for HyperlinkButtonAutomationPeer { 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 HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: HyperlinkButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for HyperlinkButtonAutomationPeer { 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 HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<HyperlinkButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: HyperlinkButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&HyperlinkButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &HyperlinkButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: HyperlinkButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: HyperlinkButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for AutomationPeer { fn from(value: HyperlinkButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for AutomationPeer { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<HyperlinkButtonAutomationPeer> for super::super::DependencyObject { fn from(value: HyperlinkButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&HyperlinkButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &HyperlinkButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &HyperlinkButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for HyperlinkButtonAutomationPeer {} unsafe impl ::core::marker::Sync for HyperlinkButtonAutomationPeer {} #[repr(transparent)] #[doc(hidden)] pub struct IAppBarAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarAutomationPeer { type Vtable = IAppBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8b4acfeb_89fa_4f13_84be_35ca5b7c9590); } #[repr(C)] #[doc(hidden)] pub struct IAppBarAutomationPeer_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 IAppBarAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarAutomationPeerFactory { type Vtable = IAppBarAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8360f4e2_e396_4517_af5d_f4cf34c54edf); } #[repr(C)] #[doc(hidden)] pub struct IAppBarAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IAppBarButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarButtonAutomationPeer { type Vtable = IAppBarButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x443262b2_4f6d_4b76_9d2e_3eff777e8864); } #[repr(C)] #[doc(hidden)] pub struct IAppBarButtonAutomationPeer_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 IAppBarButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarButtonAutomationPeerFactory { type Vtable = IAppBarButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaef0342a_acb7_42dc_97e3_847071865fd6); } #[repr(C)] #[doc(hidden)] pub struct IAppBarButtonAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IAppBarToggleButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarToggleButtonAutomationPeer { type Vtable = IAppBarToggleButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8464efad_9655_4aff_9550_63ae9ec8fe9c); } #[repr(C)] #[doc(hidden)] pub struct IAppBarToggleButtonAutomationPeer_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 IAppBarToggleButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAppBarToggleButtonAutomationPeerFactory { type Vtable = IAppBarToggleButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd6f9139d_02c1_4221_9591_7d4efeb74701); } #[repr(C)] #[doc(hidden)] pub struct IAppBarToggleButtonAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutoSuggestBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutoSuggestBoxAutomationPeer { type Vtable = IAutoSuggestBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2f32c302_f99b_491d_9726_a5e181643efa); } #[repr(C)] #[doc(hidden)] pub struct IAutoSuggestBoxAutomationPeer_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 IAutoSuggestBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutoSuggestBoxAutomationPeerFactory { type Vtable = IAutoSuggestBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x80046849_18e7_4475_b362_4bbd53d24562); } #[repr(C)] #[doc(hidden)] pub struct IAutoSuggestBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer { type Vtable = IAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x35aac87a_62ee_4d3e_a24c_2bc8432d68b7); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer_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, patterninterface: PatternInterface, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventid: AutomationEvents) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, automationproperty: ::windows::core::RawPtr, oldvalue: ::windows::core::RawPtr, newvalue: ::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, 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, result__: *mut AutomationControlType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::Rect) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[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 ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::Point) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, 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, 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, result__: *mut AutomationOrientation) -> ::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, 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, 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, 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, result__: *mut ::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, point: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AutomationLiveSetting) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer2 { type Vtable = IAutomationPeer2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xea1f89c7_ebf5_4ab8_88f7_680d821dac61); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer2_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 IAutomationPeer3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer3 { type Vtable = IAutomationPeer3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd3cfb977_0084_41d7_a221_28158d3bc32c); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer3_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, direction: AutomationNavigationDirection, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pointinwindowcoordinates: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] 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) -> ::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, #[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, peer: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, automationtexteditchangetype: super::AutomationTextEditChangeType, changeddata: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, 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 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, structurechangetype: AutomationStructureChangeType, child: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer4 { type Vtable = IAutomationPeer4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x761ce752_73c1_4f44_be75_43c49ec0d4d5); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer4_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 AutomationLandmarkType) -> ::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 IAutomationPeer5(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer5 { type Vtable = IAutomationPeer5_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf632e1c6_0a3f_4574_9fef_cdc151765674); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer5_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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer6(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer6 { type Vtable = IAutomationPeer6_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcaf8608f_13ff_42fb_866d_22206434cc6b); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer6_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 IAutomationPeer7(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer7 { type Vtable = IAutomationPeer7_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x796b3287_e642_48ab_b223_5208b41da9d6); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer7_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, notificationkind: AutomationNotificationKind, notificationprocessing: AutomationNotificationProcessing, displaystring: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, activityid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer8(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer8 { type Vtable = IAutomationPeer8_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5c6a1fe6_9a55_4d7f_9498_cfe429e92da8); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer8_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 AutomationHeadingLevel) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeer9(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeer9 { type Vtable = IAutomationPeer9_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdf2e0265_1d74_57fa_8094_f81c2f626b8c); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeer9_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerAnnotation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerAnnotation { type Vtable = IAutomationPeerAnnotation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0c456061_52cf_43fa_82f8_07f137351e5a); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerAnnotation_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::AnnotationType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::AnnotationType) -> ::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 IAutomationPeerAnnotationFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerAnnotationFactory { type Vtable = IAutomationPeerAnnotationFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf59c439e_c65b_43cd_9009_03fc023363a7); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerAnnotationFactory_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, r#type: super::AnnotationType, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, r#type: super::AnnotationType, peer: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerAnnotationStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerAnnotationStatics { type Vtable = IAutomationPeerAnnotationStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8809a87d_09b2_4d45_b78b_1d3b3b09f661); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerAnnotationStatics_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerFactory { type Vtable = IAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x20c27545_a88b_43c8_bc24_cea9dafd04a3); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerFactory_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, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerOverrides(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides { type Vtable = IAutomationPeerOverrides_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbea93e67_dbee_4f7b_af0d_a79aae5333bf); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides_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, patterninterface: PatternInterface, 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, 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, result__: *mut AutomationControlType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::Rect) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[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 ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::Point) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, 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, 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, result__: *mut AutomationOrientation) -> ::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, 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, 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, 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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, point: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AutomationLiveSetting) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerOverrides2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides2 { type Vtable = IAutomationPeerOverrides2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2603682a_9da6_4023_b496_496e5ef228d2); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides2_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, #[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 IAutomationPeerOverrides3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides3 { type Vtable = IAutomationPeerOverrides3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb6f0c4ad_4d39_49e6_bb91_d924eefd8538); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides3_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, direction: AutomationNavigationDirection, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pointinwindowcoordinates: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::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 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 i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerOverrides4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides4 { type Vtable = IAutomationPeerOverrides4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb186cda2_5d46_4bcd_a811_269ad15b3aee); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides4_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 AutomationLandmarkType) -> ::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 IAutomationPeerOverrides5(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides5 { type Vtable = IAutomationPeerOverrides5_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2c847c85_781e_49f7_9fef_b9e14d014707); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides5_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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, #[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, #[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 IAutomationPeerOverrides6(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides6 { type Vtable = IAutomationPeerOverrides6_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe98babe7_f6ff_444c_9c0d_277eaf0ad9c0); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides6_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 IAutomationPeerOverrides8(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides8 { type Vtable = IAutomationPeerOverrides8_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0e1ebbd4_a003_4936_8175_f5457c07f0c6); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides8_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 AutomationHeadingLevel) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerOverrides9(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerOverrides9 { type Vtable = IAutomationPeerOverrides9_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3709e8b_091a_5db5_b896_ff78f01990c9); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerOverrides9_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerProtected(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerProtected { type Vtable = IAutomationPeerProtected_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf4b40e52_642f_4629_a54a_ea5d2349c448); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerProtected_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 = "UI_Xaml_Automation_Provider")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, provider: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Automation_Provider"))] usize, #[cfg(feature = "UI_Xaml_Automation_Provider")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, peer: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Automation_Provider"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerStatics { type Vtable = IAutomationPeerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x562f7fb0_a331_4a9c_9dec_bfb7586fffff); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerStatics_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, eventid: AutomationEvents, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutomationPeerStatics3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutomationPeerStatics3 { type Vtable = IAutomationPeerStatics3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x572c5714_7f87_4271_819f_6cf4c4d022d0); } #[repr(C)] #[doc(hidden)] pub struct IAutomationPeerStatics3_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 RawElementProviderRuntimeId) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IButtonAutomationPeer { type Vtable = IButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfb77efbe_39ec_4508_8ac3_51a1424027d7); } #[repr(C)] #[doc(hidden)] pub struct IButtonAutomationPeer_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 IButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IButtonAutomationPeerFactory { type Vtable = IButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3fdb9f49_f4ab_4780_8644_03376299a175); } #[repr(C)] #[doc(hidden)] pub struct IButtonAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IButtonBaseAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IButtonBaseAutomationPeer { type Vtable = IButtonBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa4f3b5b6_7585_4e0b_96d2_08cf6f28befa); } #[repr(C)] #[doc(hidden)] pub struct IButtonBaseAutomationPeer_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 IButtonBaseAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IButtonBaseAutomationPeerFactory { type Vtable = IButtonBaseAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8a04091e_e6b2_4c60_a759_c13ca45165ed); } #[repr(C)] #[doc(hidden)] pub struct IButtonBaseAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICalendarDatePickerAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICalendarDatePickerAutomationPeer { type Vtable = ICalendarDatePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40d8938e_db5e_4b03_beba_d10f62419787); } #[repr(C)] #[doc(hidden)] pub struct ICalendarDatePickerAutomationPeer_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 ICalendarDatePickerAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICalendarDatePickerAutomationPeerFactory { type Vtable = ICalendarDatePickerAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab705dd2_d293_45bf_9f19_26f7603a5e9b); } #[repr(C)] #[doc(hidden)] pub struct ICalendarDatePickerAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICaptureElementAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICaptureElementAutomationPeer { type Vtable = ICaptureElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdcc44ee0_fa45_45c6_8bb7_320d808f5958); } #[repr(C)] #[doc(hidden)] pub struct ICaptureElementAutomationPeer_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 ICaptureElementAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICaptureElementAutomationPeerFactory { type Vtable = ICaptureElementAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b92ef48_85e9_4869_b175_8f7cf45a6d9f); } #[repr(C)] #[doc(hidden)] pub struct ICaptureElementAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ICheckBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICheckBoxAutomationPeer { type Vtable = ICheckBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb15bc42_c0a9_46c6_ac24_b83de429c733); } #[repr(C)] #[doc(hidden)] pub struct ICheckBoxAutomationPeer_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 ICheckBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICheckBoxAutomationPeerFactory { type Vtable = ICheckBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb75c775d_eb8f_44ef_a27c_e26ac7de8333); } #[repr(C)] #[doc(hidden)] pub struct ICheckBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IColorPickerSliderAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IColorPickerSliderAutomationPeer { type Vtable = IColorPickerSliderAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa514215a_7293_4577_924c_47d4e0bf9b90); } #[repr(C)] #[doc(hidden)] pub struct IColorPickerSliderAutomationPeer_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 IColorPickerSliderAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IColorPickerSliderAutomationPeerFactory { type Vtable = IColorPickerSliderAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a55c77e_9dd6_45a3_9042_b40200fea1a9); } #[repr(C)] #[doc(hidden)] pub struct IColorPickerSliderAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IColorSpectrumAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IColorSpectrumAutomationPeer { type Vtable = IColorSpectrumAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15d5ba03_010d_4ff7_9087_f4dd09f831b7); } #[repr(C)] #[doc(hidden)] pub struct IColorSpectrumAutomationPeer_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 IColorSpectrumAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IColorSpectrumAutomationPeerFactory { type Vtable = IColorSpectrumAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0ac400e1_b743_4496_837a_8889e6ac6497); } #[repr(C)] #[doc(hidden)] pub struct IColorSpectrumAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IComboBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxAutomationPeer { type Vtable = IComboBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7eb40d0b_75c5_4263_ba6a_d4a54fb0f239); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxAutomationPeer_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 IComboBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxAutomationPeerFactory { type Vtable = IComboBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x098e5b0d_1b90_40b9_9be3_b23267eb13cf); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IComboBoxItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxItemAutomationPeer { type Vtable = IComboBoxItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x12ddc76e_9552_446a_82ee_938cc371800f); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxItemAutomationPeer_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 IComboBoxItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxItemAutomationPeerFactory { type Vtable = IComboBoxItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x134ac7fc_397a_403f_a6ec_1ce8beda15e5); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IComboBoxItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxItemDataAutomationPeer { type Vtable = IComboBoxItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4fef6df2_289c_4c04_831b_5a668c6d7104); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxItemDataAutomationPeer_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 IComboBoxItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IComboBoxItemDataAutomationPeerFactory { type Vtable = IComboBoxItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x14a8d4f6_469a_41ba_9d93_44a1a55da872); } #[repr(C)] #[doc(hidden)] pub struct IComboBoxItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IDatePickerAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDatePickerAutomationPeer { type Vtable = IDatePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd07d357f_a0b9_45dc_991a_76c505e7d0f5); } #[repr(C)] #[doc(hidden)] pub struct IDatePickerAutomationPeer_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 IDatePickerAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDatePickerAutomationPeerFactory { type Vtable = IDatePickerAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5667d19_9157_4436_9f4d_7fb99174b48e); } #[repr(C)] #[doc(hidden)] pub struct IDatePickerAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IDatePickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IDatePickerFlyoutPresenterAutomationPeer { type Vtable = IDatePickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x752aed38_c2bf_4880_82b2_a6c05e90c135); } #[repr(C)] #[doc(hidden)] pub struct IDatePickerFlyoutPresenterAutomationPeer_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 IFlipViewAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewAutomationPeer { type Vtable = IFlipViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8ec0353a_4284_4b00_aef8_a2688ea5e3c4); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewAutomationPeer_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 IFlipViewAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewAutomationPeerFactory { type Vtable = IFlipViewAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4395ab0d_8d83_483c_88eb_e2617b0d293f); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IFlipViewItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewItemAutomationPeer { type Vtable = IFlipViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc83034de_fa08_4bd3_aeb2_d2e5bfa04df9); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewItemAutomationPeer_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 IFlipViewItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewItemAutomationPeerFactory { type Vtable = IFlipViewItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69109356_d0e5_4c10_a09c_ad0bf1b0cb01); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IFlipViewItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewItemDataAutomationPeer { type Vtable = IFlipViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb0986175_00bc_4118_8a6f_16ee9c15d968); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewItemDataAutomationPeer_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 IFlipViewItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlipViewItemDataAutomationPeerFactory { type Vtable = IFlipViewItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3c864393_0aea_4e78_bc11_b775cac4114c); } #[repr(C)] #[doc(hidden)] pub struct IFlipViewItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlyoutPresenterAutomationPeer { type Vtable = IFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa01840b4_5fca_456f_98ea_300eb40b585e); } #[repr(C)] #[doc(hidden)] pub struct IFlyoutPresenterAutomationPeer_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 IFlyoutPresenterAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFlyoutPresenterAutomationPeerFactory { type Vtable = IFlyoutPresenterAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf350155f_8924_44c0_ba44_653fe79f1efb); } #[repr(C)] #[doc(hidden)] pub struct IFlyoutPresenterAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IFrameworkElementAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFrameworkElementAutomationPeer { type Vtable = IFrameworkElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb90ad781_bfeb_4451_bd47_9f3a63ebd24a); } #[repr(C)] #[doc(hidden)] pub struct IFrameworkElementAutomationPeer_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 IFrameworkElementAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFrameworkElementAutomationPeerFactory { type Vtable = IFrameworkElementAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0db9b8bc_b812_48e3_af1f_dbc57600c325); } #[repr(C)] #[doc(hidden)] pub struct IFrameworkElementAutomationPeerFactory_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, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IFrameworkElementAutomationPeerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IFrameworkElementAutomationPeerStatics { type Vtable = IFrameworkElementAutomationPeerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9c0b997_2820_44a1_a5a8_9b801edc269e); } #[repr(C)] #[doc(hidden)] pub struct IFrameworkElementAutomationPeerStatics_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, element: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, element: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IGridViewAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewAutomationPeer { type Vtable = IGridViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1c4401a4_d951_49ca_8f82_c7f3c60681b0); } #[repr(C)] #[doc(hidden)] pub struct IGridViewAutomationPeer_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 IGridViewAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewAutomationPeerFactory { type Vtable = IGridViewAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8aca59dd_22a7_4800_894b_c1f485f38953); } #[repr(C)] #[doc(hidden)] pub struct IGridViewAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IGridViewHeaderItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewHeaderItemAutomationPeer { type Vtable = IGridViewHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe3dcef3a_e08a_48e7_b23a_2be5b66e474e); } #[repr(C)] #[doc(hidden)] pub struct IGridViewHeaderItemAutomationPeer_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 IGridViewHeaderItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewHeaderItemAutomationPeerFactory { type Vtable = IGridViewHeaderItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2c80b4d2_ffc2_4157_88dd_59cd92e39715); } #[repr(C)] #[doc(hidden)] pub struct IGridViewHeaderItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IGridViewItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewItemAutomationPeer { type Vtable = IGridViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93ef2d07_346c_4166_a4ba_bc6a181e7f33); } #[repr(C)] #[doc(hidden)] pub struct IGridViewItemAutomationPeer_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 IGridViewItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewItemAutomationPeerFactory { type Vtable = IGridViewItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfafec376_f22e_466d_913c_ae24ccdb160f); } #[repr(C)] #[doc(hidden)] pub struct IGridViewItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IGridViewItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewItemDataAutomationPeer { type Vtable = IGridViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3f4868f_29d4_4094_8c54_ea61a88294a4); } #[repr(C)] #[doc(hidden)] pub struct IGridViewItemDataAutomationPeer_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 IGridViewItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGridViewItemDataAutomationPeerFactory { type Vtable = IGridViewItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa65e7a88_770d_402c_996f_67506af2a4af); } #[repr(C)] #[doc(hidden)] pub struct IGridViewItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IGroupItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGroupItemAutomationPeer { type Vtable = IGroupItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1914fe6d_0740_4236_9ee1_38cf19c1c388); } #[repr(C)] #[doc(hidden)] pub struct IGroupItemAutomationPeer_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 IGroupItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IGroupItemAutomationPeerFactory { type Vtable = IGroupItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56a64567_f21c_4c90_b379_15a27c7f8409); } #[repr(C)] #[doc(hidden)] pub struct IGroupItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IHubAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHubAutomationPeer { type Vtable = IHubAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4ddee056_4ebc_4620_a05d_903e3c9a4ead); } #[repr(C)] #[doc(hidden)] pub struct IHubAutomationPeer_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 IHubAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHubAutomationPeerFactory { type Vtable = IHubAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc762d43f_79dd_43ee_8777_8d08b39aa065); } #[repr(C)] #[doc(hidden)] pub struct IHubAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IHubSectionAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHubSectionAutomationPeer { type Vtable = IHubSectionAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x16d91ff7_7431_4d82_83ce_cfa3192b0f18); } #[repr(C)] #[doc(hidden)] pub struct IHubSectionAutomationPeer_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 IHubSectionAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHubSectionAutomationPeerFactory { type Vtable = IHubSectionAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc68e27e8_17ec_4329_91ae_2d0b2339d498); } #[repr(C)] #[doc(hidden)] pub struct IHubSectionAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IHyperlinkButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHyperlinkButtonAutomationPeer { type Vtable = IHyperlinkButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa7afcb1_0edf_46d9_aa9e_0eb21d140097); } #[repr(C)] #[doc(hidden)] pub struct IHyperlinkButtonAutomationPeer_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 IHyperlinkButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IHyperlinkButtonAutomationPeerFactory { type Vtable = IHyperlinkButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x59bc1661_c182_49af_9526_44b88e628455); } #[repr(C)] #[doc(hidden)] pub struct IHyperlinkButtonAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IImageAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IImageAutomationPeer { type Vtable = IImageAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b0bbf8c_60a2_48bf_ab2c_1a52a451d2d4); } #[repr(C)] #[doc(hidden)] pub struct IImageAutomationPeer_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 IImageAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IImageAutomationPeerFactory { type Vtable = IImageAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x90304003_687d_47bf_b3a2_4babcad8ef50); } #[repr(C)] #[doc(hidden)] pub struct IImageAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IInkToolbarAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IInkToolbarAutomationPeer { type Vtable = IInkToolbarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x123baaa4_f2e8_4bcb_9382_5dfdd11fe45f); } #[repr(C)] #[doc(hidden)] pub struct IInkToolbarAutomationPeer_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 IItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemAutomationPeer { type Vtable = IItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x953c34f6_3b31_47a7_b3bf_25d3ae99c317); } #[repr(C)] #[doc(hidden)] pub struct IItemAutomationPeer_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemAutomationPeerFactory { type Vtable = IItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x29065073_de3d_4d3f_97b4_4d6f9d53444d); } #[repr(C)] #[doc(hidden)] pub struct IItemAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IItemsControlAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemsControlAutomationPeer { type Vtable = IItemsControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x96e76bf1_37f7_4088_925d_65268e83e34d); } #[repr(C)] #[doc(hidden)] pub struct IItemsControlAutomationPeer_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 IItemsControlAutomationPeer2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemsControlAutomationPeer2 { type Vtable = IItemsControlAutomationPeer2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc48d8917_95a8_47b8_a517_bf891a6c039b); } #[repr(C)] #[doc(hidden)] pub struct IItemsControlAutomationPeer2_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, item: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IItemsControlAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemsControlAutomationPeerFactory { type Vtable = IItemsControlAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4038a259_2e1a_49ca_a533_c64f181577e6); } #[repr(C)] #[doc(hidden)] pub struct IItemsControlAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IItemsControlAutomationPeerOverrides2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IItemsControlAutomationPeerOverrides2 { type Vtable = IItemsControlAutomationPeerOverrides2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x361dc0e8_b56f_45e9_80fe_10a0fb0fe177); } #[repr(C)] #[doc(hidden)] pub struct IItemsControlAutomationPeerOverrides2_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, item: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IListBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxAutomationPeer { type Vtable = IListBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cd0d608_b402_4a6e_bd9a_343f8845eb32); } #[repr(C)] #[doc(hidden)] pub struct IListBoxAutomationPeer_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 IListBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxAutomationPeerFactory { type Vtable = IListBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2362185_7df6_49f7_8abc_4c33f1a3d46e); } #[repr(C)] #[doc(hidden)] pub struct IListBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListBoxItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxItemAutomationPeer { type Vtable = IListBoxItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1bc6e1c6_2997_42df_99eb_92bc1dd149fb); } #[repr(C)] #[doc(hidden)] pub struct IListBoxItemAutomationPeer_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 IListBoxItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxItemAutomationPeerFactory { type Vtable = IListBoxItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x509f9dd8_b0aa_443f_a110_41209af44f1c); } #[repr(C)] #[doc(hidden)] pub struct IListBoxItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListBoxItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxItemDataAutomationPeer { type Vtable = IListBoxItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd7d5fee_fde0_482a_8084_dcebba5b9806); } #[repr(C)] #[doc(hidden)] pub struct IListBoxItemDataAutomationPeer_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 IListBoxItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListBoxItemDataAutomationPeerFactory { type Vtable = IListBoxItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7924e16_bd8d_4662_a995_20ff9a056093); } #[repr(C)] #[doc(hidden)] pub struct IListBoxItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IListPickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListPickerFlyoutPresenterAutomationPeer { type Vtable = IListPickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56dfdc58_2395_4060_8047_8ea463698a24); } #[repr(C)] #[doc(hidden)] pub struct IListPickerFlyoutPresenterAutomationPeer_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 IListViewAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewAutomationPeer { type Vtable = IListViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x73cecc87_c0dc_4260_9148_75e9864a7230); } #[repr(C)] #[doc(hidden)] pub struct IListViewAutomationPeer_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 IListViewAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewAutomationPeerFactory { type Vtable = IListViewAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x65f39174_eaa2_4e44_8be6_4cca28cd0288); } #[repr(C)] #[doc(hidden)] pub struct IListViewAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListViewBaseAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewBaseAutomationPeer { type Vtable = IListViewBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x87ec7649_b83d_4e55_9afd_bd835e748f5c); } #[repr(C)] #[doc(hidden)] pub struct IListViewBaseAutomationPeer_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 IListViewBaseAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewBaseAutomationPeerFactory { type Vtable = IListViewBaseAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x70d3c2be_8950_4647_9362_fd002f8ff82e); } #[repr(C)] #[doc(hidden)] pub struct IListViewBaseAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListViewBaseHeaderItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewBaseHeaderItemAutomationPeer { type Vtable = IListViewBaseHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cb8b732_c1f0_4a3c_bc14_85dd48dedb85); } #[repr(C)] #[doc(hidden)] pub struct IListViewBaseHeaderItemAutomationPeer_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 IListViewBaseHeaderItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewBaseHeaderItemAutomationPeerFactory { type Vtable = IListViewBaseHeaderItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40ec995f_d631_4004_832e_6d8643e51561); } #[repr(C)] #[doc(hidden)] pub struct IListViewBaseHeaderItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListViewHeaderItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewHeaderItemAutomationPeer { type Vtable = IListViewHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x67ab1e4b_ad61_4c88_ba45_0f3a8d061f8f); } #[repr(C)] #[doc(hidden)] pub struct IListViewHeaderItemAutomationPeer_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 IListViewHeaderItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewHeaderItemAutomationPeerFactory { type Vtable = IListViewHeaderItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x07668694_2ca5_4be4_a8b9_592d48f76087); } #[repr(C)] #[doc(hidden)] pub struct IListViewHeaderItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListViewItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewItemAutomationPeer { type Vtable = IListViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca114e70_a16d_4d09_a1cf_1856ef98a9ec); } #[repr(C)] #[doc(hidden)] pub struct IListViewItemAutomationPeer_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 IListViewItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewItemAutomationPeerFactory { type Vtable = IListViewItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc47dfbc0_facc_4024_a73b_17ec4e662654); } #[repr(C)] #[doc(hidden)] pub struct IListViewItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IListViewItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewItemDataAutomationPeer { type Vtable = IListViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15a8d7fd_d7a5_4a6c_963c_6f7ce464671a); } #[repr(C)] #[doc(hidden)] pub struct IListViewItemDataAutomationPeer_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 IListViewItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IListViewItemDataAutomationPeerFactory { type Vtable = IListViewItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0db12bb_d715_4523_acc0_1e1072d8e32b); } #[repr(C)] #[doc(hidden)] pub struct IListViewItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILoopingSelectorAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILoopingSelectorAutomationPeer { type Vtable = ILoopingSelectorAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50b406ca_bae9_4816_8a3a_0cb4f96478a2); } #[repr(C)] #[doc(hidden)] pub struct ILoopingSelectorAutomationPeer_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 ILoopingSelectorItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILoopingSelectorItemAutomationPeer { type Vtable = ILoopingSelectorItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd3fa68bf_04cf_4f4c_8d3e_4780a19d4788); } #[repr(C)] #[doc(hidden)] pub struct ILoopingSelectorItemAutomationPeer_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 ILoopingSelectorItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILoopingSelectorItemDataAutomationPeer { type Vtable = ILoopingSelectorItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef567e32_7cd2_4d32_9590_1f588d5ef38d); } #[repr(C)] #[doc(hidden)] pub struct ILoopingSelectorItemDataAutomationPeer_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 IMapControlAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMapControlAutomationPeer { type Vtable = IMapControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x425beee4_f2e8_4bcb_9382_5dfdd11fe45f); } #[repr(C)] #[doc(hidden)] pub struct IMapControlAutomationPeer_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 IMediaElementAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaElementAutomationPeer { type Vtable = IMediaElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba0b9fc2_a6e2_41a5_b17a_d1594613efba); } #[repr(C)] #[doc(hidden)] pub struct IMediaElementAutomationPeer_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 IMediaElementAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaElementAutomationPeerFactory { type Vtable = IMediaElementAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb2ad3b28_7575_4173_9bc7_80367a164ed2); } #[repr(C)] #[doc(hidden)] pub struct IMediaElementAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaPlayerElementAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaPlayerElementAutomationPeer { type Vtable = IMediaPlayerElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02bed209_3f65_4fdd_b5ca_c4750d4e6ea4); } #[repr(C)] #[doc(hidden)] pub struct IMediaPlayerElementAutomationPeer_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 IMediaPlayerElementAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaPlayerElementAutomationPeerFactory { type Vtable = IMediaPlayerElementAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08848077_82af_4d19_b170_282a9e0e7f37); } #[repr(C)] #[doc(hidden)] pub struct IMediaPlayerElementAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaTransportControlsAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaTransportControlsAutomationPeer { type Vtable = IMediaTransportControlsAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa3ad8d93_79f8_4958_a3c8_980defb83d15); } #[repr(C)] #[doc(hidden)] pub struct IMediaTransportControlsAutomationPeer_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 IMediaTransportControlsAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaTransportControlsAutomationPeerFactory { type Vtable = IMediaTransportControlsAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf41cb003_e103_4ab0_812a_a08fbdb570ce); } #[repr(C)] #[doc(hidden)] pub struct IMediaTransportControlsAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMenuBarAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuBarAutomationPeer { type Vtable = IMenuBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b6adcf1_f274_5592_85a8_7b099e99b320); } #[repr(C)] #[doc(hidden)] pub struct IMenuBarAutomationPeer_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 IMenuBarAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuBarAutomationPeerFactory { type Vtable = IMenuBarAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2a094871_4a9b_5a0b_9fda_7bc3ae957c53); } #[repr(C)] #[doc(hidden)] pub struct IMenuBarAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMenuBarItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuBarItemAutomationPeer { type Vtable = IMenuBarItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0fce49b4_cff5_5c4b_98ee_e75fdddf799a); } #[repr(C)] #[doc(hidden)] pub struct IMenuBarItemAutomationPeer_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 IMenuBarItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuBarItemAutomationPeerFactory { type Vtable = IMenuBarItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc9c77746_130f_5b19_83a6_61db584613aa); } #[repr(C)] #[doc(hidden)] pub struct IMenuBarItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMenuFlyoutItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuFlyoutItemAutomationPeer { type Vtable = IMenuFlyoutItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1fc19462_21df_456e_aa11_8fac6b4b2af6); } #[repr(C)] #[doc(hidden)] pub struct IMenuFlyoutItemAutomationPeer_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 IMenuFlyoutItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuFlyoutItemAutomationPeerFactory { type Vtable = IMenuFlyoutItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd08bfcb8_20d1_45d8_a2c2_2f130df714e0); } #[repr(C)] #[doc(hidden)] pub struct IMenuFlyoutItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMenuFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuFlyoutPresenterAutomationPeer { type Vtable = IMenuFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe244a871_fcbb_48fc_8a93_41ea134b53ce); } #[repr(C)] #[doc(hidden)] pub struct IMenuFlyoutPresenterAutomationPeer_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 IMenuFlyoutPresenterAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMenuFlyoutPresenterAutomationPeerFactory { type Vtable = IMenuFlyoutPresenterAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x07b5172d_761d_452b_9e6d_fa2a8be0ad26); } #[repr(C)] #[doc(hidden)] pub struct IMenuFlyoutPresenterAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct INavigationViewItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for INavigationViewItemAutomationPeer { type Vtable = INavigationViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x309847a5_9971_4d8d_a81c_085c7086a1b9); } #[repr(C)] #[doc(hidden)] pub struct INavigationViewItemAutomationPeer_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 INavigationViewItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for INavigationViewItemAutomationPeerFactory { type Vtable = INavigationViewItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bc2835d_aa38_4f97_9664_e6fc821d81ed); } #[repr(C)] #[doc(hidden)] pub struct INavigationViewItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPasswordBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPasswordBoxAutomationPeer { type Vtable = IPasswordBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x684f065e_3df3_4b9f_82ad_8819db3b218a); } #[repr(C)] #[doc(hidden)] pub struct IPasswordBoxAutomationPeer_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 IPasswordBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPasswordBoxAutomationPeerFactory { type Vtable = IPasswordBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xac3d7ede_dca4_481c_b520_4a9b3f3b179c); } #[repr(C)] #[doc(hidden)] pub struct IPasswordBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPersonPictureAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPersonPictureAutomationPeer { type Vtable = IPersonPictureAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27156d4c_a66f_4aaf_8286_4f796d30628c); } #[repr(C)] #[doc(hidden)] pub struct IPersonPictureAutomationPeer_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 IPersonPictureAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPersonPictureAutomationPeerFactory { type Vtable = IPersonPictureAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa95f1f6d_2524_44a4_97fd_1181130100ad); } #[repr(C)] #[doc(hidden)] pub struct IPersonPictureAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPickerFlyoutPresenterAutomationPeer { type Vtable = IPickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x28414bf7_8382_4eae_93c1_d6f035aa8155); } #[repr(C)] #[doc(hidden)] pub struct IPickerFlyoutPresenterAutomationPeer_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 IPivotAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotAutomationPeer { type Vtable = IPivotAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe715a8f8_3b9d_402c_81e2_6e912ef58981); } #[repr(C)] #[doc(hidden)] pub struct IPivotAutomationPeer_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 IPivotAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotAutomationPeerFactory { type Vtable = IPivotAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3efe0f94_0c91_4341_b9ac_1b56b4e6b84f); } #[repr(C)] #[doc(hidden)] pub struct IPivotAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPivotItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotItemAutomationPeer { type Vtable = IPivotItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a4241ad_5d55_4d27_b40f_2d37506fbe78); } #[repr(C)] #[doc(hidden)] pub struct IPivotItemAutomationPeer_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 IPivotItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotItemAutomationPeerFactory { type Vtable = IPivotItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2810471_183f_416b_b41a_1e5a958a91f4); } #[repr(C)] #[doc(hidden)] pub struct IPivotItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPivotItemDataAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotItemDataAutomationPeer { type Vtable = IPivotItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa2a3b788_ea1d_48b7_88ee_f08b6aa07fee); } #[repr(C)] #[doc(hidden)] pub struct IPivotItemDataAutomationPeer_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 IPivotItemDataAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPivotItemDataAutomationPeerFactory { type Vtable = IPivotItemDataAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x517a2480_d3b6_412e_82b6_94a0a84c13b0); } #[repr(C)] #[doc(hidden)] pub struct IPivotItemDataAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IProgressBarAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IProgressBarAutomationPeer { type Vtable = IProgressBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93f48f86_d840_4fb6_ac2f_5f779b854b0d); } #[repr(C)] #[doc(hidden)] pub struct IProgressBarAutomationPeer_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 IProgressBarAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IProgressBarAutomationPeerFactory { type Vtable = IProgressBarAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x364679ab_b80f_41b4_8eea_2f5251bc739c); } #[repr(C)] #[doc(hidden)] pub struct IProgressBarAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IProgressRingAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IProgressRingAutomationPeer { type Vtable = IProgressRingAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbc305eee_39d3_4eeb_ac33_2394de123e2e); } #[repr(C)] #[doc(hidden)] pub struct IProgressRingAutomationPeer_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 IProgressRingAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IProgressRingAutomationPeerFactory { type Vtable = IProgressRingAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3db204b_157e_40bc_9593_55bc5c71a4f6); } #[repr(C)] #[doc(hidden)] pub struct IProgressRingAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRadioButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRadioButtonAutomationPeer { type Vtable = IRadioButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e6a5ed8_0b30_4743_b102_dcdf548e3131); } #[repr(C)] #[doc(hidden)] pub struct IRadioButtonAutomationPeer_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 IRadioButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRadioButtonAutomationPeerFactory { type Vtable = IRadioButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4940c4fd_3d88_49ca_8f31_924187af0bfe); } #[repr(C)] #[doc(hidden)] pub struct IRadioButtonAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRangeBaseAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRangeBaseAutomationPeer { type Vtable = IRangeBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe454b549_4b2c_42ad_b04b_d35947d1ee50); } #[repr(C)] #[doc(hidden)] pub struct IRangeBaseAutomationPeer_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 IRangeBaseAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRangeBaseAutomationPeerFactory { type Vtable = IRangeBaseAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x827c7601_3078_4479_95ea_91374ca06207); } #[repr(C)] #[doc(hidden)] pub struct IRangeBaseAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRatingControlAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRatingControlAutomationPeer { type Vtable = IRatingControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d14349a_9963_4a47_823c_f457cb3209d5); } #[repr(C)] #[doc(hidden)] pub struct IRatingControlAutomationPeer_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 IRatingControlAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRatingControlAutomationPeerFactory { type Vtable = IRatingControlAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf179f272_9846_4632_8b9c_be6fa8d3c9bb); } #[repr(C)] #[doc(hidden)] pub struct IRatingControlAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRepeatButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRepeatButtonAutomationPeer { type Vtable = IRepeatButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x29e41ad5_a8ac_4e8a_83d8_09e37e054257); } #[repr(C)] #[doc(hidden)] pub struct IRepeatButtonAutomationPeer_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 IRepeatButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRepeatButtonAutomationPeerFactory { type Vtable = IRepeatButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6a6ff9d4_575e_4e60_bdd6_ec14419b4ff6); } #[repr(C)] #[doc(hidden)] pub struct IRepeatButtonAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRichEditBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichEditBoxAutomationPeer { type Vtable = IRichEditBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc69f5c04_16ee_467a_a833_c3da8458ad64); } #[repr(C)] #[doc(hidden)] pub struct IRichEditBoxAutomationPeer_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 IRichEditBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichEditBoxAutomationPeerFactory { type Vtable = IRichEditBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x752c8399_d296_4d87_9020_a4750e885b3c); } #[repr(C)] #[doc(hidden)] pub struct IRichEditBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRichTextBlockAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichTextBlockAutomationPeer { type Vtable = IRichTextBlockAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93a01a9c_9609_41fa_82f3_909c09f49a72); } #[repr(C)] #[doc(hidden)] pub struct IRichTextBlockAutomationPeer_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 IRichTextBlockAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichTextBlockAutomationPeerFactory { type Vtable = IRichTextBlockAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2038ae61_1389_467a_aed6_37334da9622b); } #[repr(C)] #[doc(hidden)] pub struct IRichTextBlockAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IRichTextBlockOverflowAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichTextBlockOverflowAutomationPeer { type Vtable = IRichTextBlockOverflowAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8c9a409a_2736_437b_ab36_a16a202f105d); } #[repr(C)] #[doc(hidden)] pub struct IRichTextBlockOverflowAutomationPeer_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 IRichTextBlockOverflowAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IRichTextBlockOverflowAutomationPeerFactory { type Vtable = IRichTextBlockOverflowAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbd5eb663_2c14_4665_adef_f2b033947beb); } #[repr(C)] #[doc(hidden)] pub struct IRichTextBlockOverflowAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IScrollBarAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScrollBarAutomationPeer { type Vtable = IScrollBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69e0c369_bbe7_41f2_87ca_aad813fe550e); } #[repr(C)] #[doc(hidden)] pub struct IScrollBarAutomationPeer_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 IScrollBarAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScrollBarAutomationPeerFactory { type Vtable = IScrollBarAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe1302110_afeb_4595_8e3d_edc0844a2b21); } #[repr(C)] #[doc(hidden)] pub struct IScrollBarAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IScrollViewerAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScrollViewerAutomationPeer { type Vtable = IScrollViewerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd985f259_1b09_4e88_88fd_421750dc6b45); } #[repr(C)] #[doc(hidden)] pub struct IScrollViewerAutomationPeer_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 IScrollViewerAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IScrollViewerAutomationPeerFactory { type Vtable = IScrollViewerAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x270dff7d_d96d_48f9_a36a_c252aa9c4670); } #[repr(C)] #[doc(hidden)] pub struct IScrollViewerAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISearchBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISearchBoxAutomationPeer { type Vtable = ISearchBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x854011a4_18a6_4f30_939b_8871afa3f5e9); } #[repr(C)] #[doc(hidden)] pub struct ISearchBoxAutomationPeer_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 ISearchBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISearchBoxAutomationPeerFactory { type Vtable = ISearchBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3c01430_7faa_41bb_8e91_7c761c5267f1); } #[repr(C)] #[doc(hidden)] pub struct ISearchBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISelectorAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISelectorAutomationPeer { type Vtable = ISelectorAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x162ac829_7115_43ec_b383_a7b71644069d); } #[repr(C)] #[doc(hidden)] pub struct ISelectorAutomationPeer_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 ISelectorAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISelectorAutomationPeerFactory { type Vtable = ISelectorAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b525646_829b_4dcc_bd52_5a8d0399387a); } #[repr(C)] #[doc(hidden)] pub struct ISelectorAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISelectorItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISelectorItemAutomationPeer { type Vtable = ISelectorItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xae8b3477_860a_45bb_bf7c_e1b27419d1dd); } #[repr(C)] #[doc(hidden)] pub struct ISelectorItemAutomationPeer_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 ISelectorItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISelectorItemAutomationPeerFactory { type Vtable = ISelectorItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66d7edfb_786d_4362_a964_ebfb21776c30); } #[repr(C)] #[doc(hidden)] pub struct ISelectorItemAutomationPeerFactory_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, item: ::windows::core::RawPtr, parent: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISemanticZoomAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISemanticZoomAutomationPeer { type Vtable = ISemanticZoomAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3c2fac6c_a977_47fc_b44e_2754c0b2bea9); } #[repr(C)] #[doc(hidden)] pub struct ISemanticZoomAutomationPeer_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 ISemanticZoomAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISemanticZoomAutomationPeerFactory { type Vtable = ISemanticZoomAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf518d44d_a493_4496_b077_9674c7f4c5fa); } #[repr(C)] #[doc(hidden)] pub struct ISemanticZoomAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISettingsFlyoutAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISettingsFlyoutAutomationPeer { type Vtable = ISettingsFlyoutAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0de0cdb_30cf_47a6_a5eb_9c77f0b0d6dd); } #[repr(C)] #[doc(hidden)] pub struct ISettingsFlyoutAutomationPeer_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 ISettingsFlyoutAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISettingsFlyoutAutomationPeerFactory { type Vtable = ISettingsFlyoutAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf94762bd_8a14_40e4_94a7_3f33c922e945); } #[repr(C)] #[doc(hidden)] pub struct ISettingsFlyoutAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISliderAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISliderAutomationPeer { type Vtable = ISliderAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xec30015a_d611_46d0_ae4f_6ecf27dfbaa5); } #[repr(C)] #[doc(hidden)] pub struct ISliderAutomationPeer_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 ISliderAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISliderAutomationPeerFactory { type Vtable = ISliderAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x971b8056_9a7a_4df9_95fa_6f5c04c91cac); } #[repr(C)] #[doc(hidden)] pub struct ISliderAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITextBlockAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITextBlockAutomationPeer { type Vtable = ITextBlockAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe2057f5_6715_4e69_a050_92bd0ce232a9); } #[repr(C)] #[doc(hidden)] pub struct ITextBlockAutomationPeer_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 ITextBlockAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITextBlockAutomationPeerFactory { type Vtable = ITextBlockAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76bf924b_7ca0_4b01_bc5c_a8cf4d3691de); } #[repr(C)] #[doc(hidden)] pub struct ITextBlockAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITextBoxAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITextBoxAutomationPeer { type Vtable = ITextBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a4f1ca0_5e5d_4d26_9067_e740bf657a9f); } #[repr(C)] #[doc(hidden)] pub struct ITextBoxAutomationPeer_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 ITextBoxAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITextBoxAutomationPeerFactory { type Vtable = ITextBoxAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x01f0c067_966b_4130_b872_469e42bd4a7f); } #[repr(C)] #[doc(hidden)] pub struct ITextBoxAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IThumbAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IThumbAutomationPeer { type Vtable = IThumbAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc2949b5_b45e_4d6d_892f_d9422c950efb); } #[repr(C)] #[doc(hidden)] pub struct IThumbAutomationPeer_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 IThumbAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IThumbAutomationPeerFactory { type Vtable = IThumbAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x970743ff_af41_4600_b55d_26d43df860e1); } #[repr(C)] #[doc(hidden)] pub struct IThumbAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITimePickerAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITimePickerAutomationPeer { type Vtable = ITimePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa43d44ef_3285_4df7_b4a4_e4cdf36a3a17); } #[repr(C)] #[doc(hidden)] pub struct ITimePickerAutomationPeer_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 ITimePickerAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITimePickerAutomationPeerFactory { type Vtable = ITimePickerAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x978f6671_47f8_40a7_9e21_68128b16b4fd); } #[repr(C)] #[doc(hidden)] pub struct ITimePickerAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITimePickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITimePickerFlyoutPresenterAutomationPeer { type Vtable = ITimePickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda93ee27_82f1_4701_8706_be297bf06043); } #[repr(C)] #[doc(hidden)] pub struct ITimePickerFlyoutPresenterAutomationPeer_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 IToggleButtonAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleButtonAutomationPeer { type Vtable = IToggleButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x62dbe6c5_bc0a_45bb_bf77_ea0f1502891f); } #[repr(C)] #[doc(hidden)] pub struct IToggleButtonAutomationPeer_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 IToggleButtonAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleButtonAutomationPeerFactory { type Vtable = IToggleButtonAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc9218cc4_ad4b_4d03_a6a4_7d59e6360004); } #[repr(C)] #[doc(hidden)] pub struct IToggleButtonAutomationPeerFactory_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 = "UI_Xaml_Controls_Primitives")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls_Primitives"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IToggleMenuFlyoutItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleMenuFlyoutItemAutomationPeer { type Vtable = IToggleMenuFlyoutItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6b57eafe_6af1_4903_8373_3437bf352345); } #[repr(C)] #[doc(hidden)] pub struct IToggleMenuFlyoutItemAutomationPeer_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 IToggleMenuFlyoutItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleMenuFlyoutItemAutomationPeerFactory { type Vtable = IToggleMenuFlyoutItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x94364b77_8f6c_4837_aae3_94d010d8d162); } #[repr(C)] #[doc(hidden)] pub struct IToggleMenuFlyoutItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IToggleSwitchAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleSwitchAutomationPeer { type Vtable = IToggleSwitchAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc011f174_e89e_4790_bf9a_78ebb5f59e9f); } #[repr(C)] #[doc(hidden)] pub struct IToggleSwitchAutomationPeer_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 IToggleSwitchAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IToggleSwitchAutomationPeerFactory { type Vtable = IToggleSwitchAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x31f933e3_fef8_4419_9df5_d9ef7196ea34); } #[repr(C)] #[doc(hidden)] pub struct IToggleSwitchAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITreeViewItemAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITreeViewItemAutomationPeer { type Vtable = ITreeViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2331d648_b617_437f_920c_71d450503e65); } #[repr(C)] #[doc(hidden)] pub struct ITreeViewItemAutomationPeer_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 ITreeViewItemAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITreeViewItemAutomationPeerFactory { type Vtable = ITreeViewItemAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x73d388bf_1d01_4159_82c0_2b2996dbfdce); } #[repr(C)] #[doc(hidden)] pub struct ITreeViewItemAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ITreeViewListAutomationPeer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITreeViewListAutomationPeer { type Vtable = ITreeViewListAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x71c1b5bc_bb29_4479_a8a8_606be6b823ae); } #[repr(C)] #[doc(hidden)] pub struct ITreeViewListAutomationPeer_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 ITreeViewListAutomationPeerFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ITreeViewListAutomationPeerFactory { type Vtable = ITreeViewListAutomationPeerFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00f597e2_f811_475a_bfe6_290fe707fa88); } #[repr(C)] #[doc(hidden)] pub struct ITreeViewListAutomationPeerFactory_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 = "UI_Xaml_Controls")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, owner: ::windows::core::RawPtr, baseinterface: ::windows::core::RawPtr, innerinterface: *mut ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "UI_Xaml_Controls"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ImageAutomationPeer(pub ::windows::core::IInspectable); impl ImageAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Image>>(owner: Param0) -> ::windows::core::Result<ImageAutomationPeer> { Self::IImageAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ImageAutomationPeer>(result__) }) } pub fn IImageAutomationPeerFactory<R, F: FnOnce(&IImageAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ImageAutomationPeer, IImageAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ImageAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ImageAutomationPeer;{9b0bbf8c-60a2-48bf-ab2c-1a52a451d2d4})"); } unsafe impl ::windows::core::Interface for ImageAutomationPeer { type Vtable = IImageAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b0bbf8c_60a2_48bf_ab2c_1a52a451d2d4); } impl ::windows::core::RuntimeName for ImageAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ImageAutomationPeer"; } impl ::core::convert::From<ImageAutomationPeer> for ::windows::core::IUnknown { fn from(value: ImageAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ImageAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ImageAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ImageAutomationPeer { 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 ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ImageAutomationPeer> for ::windows::core::IInspectable { fn from(value: ImageAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ImageAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ImageAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ImageAutomationPeer { 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 ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ImageAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ImageAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ImageAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ImageAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ImageAutomationPeer> for AutomationPeer { fn from(value: ImageAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ImageAutomationPeer> for AutomationPeer { fn from(value: &ImageAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ImageAutomationPeer> for super::super::DependencyObject { fn from(value: ImageAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ImageAutomationPeer> for super::super::DependencyObject { fn from(value: &ImageAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ImageAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ImageAutomationPeer {} unsafe impl ::core::marker::Sync for ImageAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct InkToolbarAutomationPeer(pub ::windows::core::IInspectable); impl InkToolbarAutomationPeer {} unsafe impl ::windows::core::RuntimeType for InkToolbarAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.InkToolbarAutomationPeer;{123baaa4-f2e8-4bcb-9382-5dfdd11fe45f})"); } unsafe impl ::windows::core::Interface for InkToolbarAutomationPeer { type Vtable = IInkToolbarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x123baaa4_f2e8_4bcb_9382_5dfdd11fe45f); } impl ::windows::core::RuntimeName for InkToolbarAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.InkToolbarAutomationPeer"; } impl ::core::convert::From<InkToolbarAutomationPeer> for ::windows::core::IUnknown { fn from(value: InkToolbarAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&InkToolbarAutomationPeer> for ::windows::core::IUnknown { fn from(value: &InkToolbarAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for InkToolbarAutomationPeer { 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 InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<InkToolbarAutomationPeer> for ::windows::core::IInspectable { fn from(value: InkToolbarAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&InkToolbarAutomationPeer> for ::windows::core::IInspectable { fn from(value: &InkToolbarAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for InkToolbarAutomationPeer { 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 InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<InkToolbarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: InkToolbarAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&InkToolbarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &InkToolbarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<InkToolbarAutomationPeer> for AutomationPeer { fn from(value: InkToolbarAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&InkToolbarAutomationPeer> for AutomationPeer { fn from(value: &InkToolbarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<InkToolbarAutomationPeer> for super::super::DependencyObject { fn from(value: InkToolbarAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&InkToolbarAutomationPeer> for super::super::DependencyObject { fn from(value: &InkToolbarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &InkToolbarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for InkToolbarAutomationPeer {} unsafe impl ::core::marker::Sync for InkToolbarAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ItemAutomationPeer(pub ::windows::core::IInspectable); impl ItemAutomationPeer { pub fn Item(&self) -> ::windows::core::Result<::windows::core::IInspectable> { 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::<::windows::core::IInspectable>(result__) } } pub fn ItemsControlAutomationPeer(&self) -> ::windows::core::Result<ItemsControlAutomationPeer> { 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::<ItemsControlAutomationPeer>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Realize(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IVirtualizedItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, ItemsControlAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<ItemAutomationPeer> { Self::IItemAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ItemAutomationPeer>(result__) }) } pub fn IItemAutomationPeerFactory<R, F: FnOnce(&IItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ItemAutomationPeer, IItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ItemAutomationPeer;{953c34f6-3b31-47a7-b3bf-25d3ae99c317})"); } unsafe impl ::windows::core::Interface for ItemAutomationPeer { type Vtable = IItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x953c34f6_3b31_47a7_b3bf_25d3ae99c317); } impl ::windows::core::RuntimeName for ItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ItemAutomationPeer"; } impl ::core::convert::From<ItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ItemAutomationPeer { 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 ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ItemAutomationPeer { 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 ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ItemAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: ItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ItemAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ItemAutomationPeer> for AutomationPeer { fn from(value: ItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ItemAutomationPeer> for AutomationPeer { fn from(value: &ItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ItemAutomationPeer> for super::super::DependencyObject { fn from(value: ItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ItemAutomationPeer {} unsafe impl ::core::marker::Sync for ItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ItemsControlAutomationPeer(pub ::windows::core::IInspectable); impl ItemsControlAutomationPeer { pub fn CreateItemAutomationPeer<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>>(&self, item: Param0) -> ::windows::core::Result<ItemAutomationPeer> { let this = &::windows::core::Interface::cast::<IItemsControlAutomationPeer2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), &mut result__).from_abi::<ItemAutomationPeer>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn FindItemByProperty<'a, Param0: ::windows::core::IntoParam<'a, super::Provider::IRawElementProviderSimple>, Param1: ::windows::core::IntoParam<'a, super::AutomationProperty>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>>(&self, startafter: Param0, automationproperty: Param1, value: Param2) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::IItemContainerProvider>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), startafter.into_param().abi(), automationproperty.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<super::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ItemsControl>>(owner: Param0) -> ::windows::core::Result<ItemsControlAutomationPeer> { Self::IItemsControlAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ItemsControlAutomationPeer>(result__) }) } pub fn IItemsControlAutomationPeerFactory<R, F: FnOnce(&IItemsControlAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ItemsControlAutomationPeer, IItemsControlAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ItemsControlAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ItemsControlAutomationPeer;{96e76bf1-37f7-4088-925d-65268e83e34d})"); } unsafe impl ::windows::core::Interface for ItemsControlAutomationPeer { type Vtable = IItemsControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x96e76bf1_37f7_4088_925d_65268e83e34d); } impl ::windows::core::RuntimeName for ItemsControlAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ItemsControlAutomationPeer"; } impl ::core::convert::From<ItemsControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: ItemsControlAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ItemsControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ItemsControlAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ItemsControlAutomationPeer { 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 ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ItemsControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: ItemsControlAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ItemsControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ItemsControlAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ItemsControlAutomationPeer { 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 ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ItemsControlAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: ItemsControlAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ItemsControlAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &ItemsControlAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ItemsControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ItemsControlAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ItemsControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ItemsControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ItemsControlAutomationPeer> for AutomationPeer { fn from(value: ItemsControlAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ItemsControlAutomationPeer> for AutomationPeer { fn from(value: &ItemsControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ItemsControlAutomationPeer> for super::super::DependencyObject { fn from(value: ItemsControlAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ItemsControlAutomationPeer> for super::super::DependencyObject { fn from(value: &ItemsControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ItemsControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ItemsControlAutomationPeer {} unsafe impl ::core::marker::Sync for ItemsControlAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListBoxAutomationPeer(pub ::windows::core::IInspectable); impl ListBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListBox>>(owner: Param0) -> ::windows::core::Result<ListBoxAutomationPeer> { Self::IListBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListBoxAutomationPeer>(result__) }) } pub fn IListBoxAutomationPeerFactory<R, F: FnOnce(&IListBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListBoxAutomationPeer, IListBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListBoxAutomationPeer;{8cd0d608-b402-4a6e-bd9a-343f8845eb32})"); } unsafe impl ::windows::core::Interface for ListBoxAutomationPeer { type Vtable = IListBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cd0d608_b402_4a6e_bd9a_343f8845eb32); } impl ::windows::core::RuntimeName for ListBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListBoxAutomationPeer"; } impl ::core::convert::From<ListBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListBoxAutomationPeer { 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 ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListBoxAutomationPeer { 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 ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListBoxAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: ListBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListBoxAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &ListBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListBoxAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: ListBoxAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListBoxAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &ListBoxAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ListBoxAutomationPeer> for SelectorAutomationPeer { fn from(value: ListBoxAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxAutomationPeer> for SelectorAutomationPeer { fn from(value: &ListBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxAutomationPeer> for ItemsControlAutomationPeer { fn from(value: ListBoxAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &ListBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxAutomationPeer> for AutomationPeer { fn from(value: ListBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxAutomationPeer> for AutomationPeer { fn from(value: &ListBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxAutomationPeer> for super::super::DependencyObject { fn from(value: ListBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &ListBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListBoxAutomationPeer {} unsafe impl ::core::marker::Sync for ListBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListBoxItemAutomationPeer(pub ::windows::core::IInspectable); impl ListBoxItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListBoxItem>>(owner: Param0) -> ::windows::core::Result<ListBoxItemAutomationPeer> { Self::IListBoxItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListBoxItemAutomationPeer>(result__) }) } pub fn IListBoxItemAutomationPeerFactory<R, F: FnOnce(&IListBoxItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListBoxItemAutomationPeer, IListBoxItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListBoxItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListBoxItemAutomationPeer;{1bc6e1c6-2997-42df-99eb-92bc1dd149fb})"); } unsafe impl ::windows::core::Interface for ListBoxItemAutomationPeer { type Vtable = IListBoxItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1bc6e1c6_2997_42df_99eb_92bc1dd149fb); } impl ::windows::core::RuntimeName for ListBoxItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListBoxItemAutomationPeer"; } impl ::core::convert::From<ListBoxItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListBoxItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListBoxItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListBoxItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListBoxItemAutomationPeer { 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 ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListBoxItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListBoxItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListBoxItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListBoxItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListBoxItemAutomationPeer { 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 ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ListBoxItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListBoxItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxItemAutomationPeer> for AutomationPeer { fn from(value: ListBoxItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxItemAutomationPeer> for AutomationPeer { fn from(value: &ListBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxItemAutomationPeer> for super::super::DependencyObject { fn from(value: ListBoxItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListBoxItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ListBoxItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListBoxItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListBoxItemAutomationPeer {} unsafe impl ::core::marker::Sync for ListBoxItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListBoxItemDataAutomationPeer(pub ::windows::core::IInspectable); impl ListBoxItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, ListBoxAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<ListBoxItemDataAutomationPeer> { Self::IListBoxItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListBoxItemDataAutomationPeer>(result__) }) } pub fn IListBoxItemDataAutomationPeerFactory<R, F: FnOnce(&IListBoxItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListBoxItemDataAutomationPeer, IListBoxItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListBoxItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListBoxItemDataAutomationPeer;{fd7d5fee-fde0-482a-8084-dcebba5b9806})"); } unsafe impl ::windows::core::Interface for ListBoxItemDataAutomationPeer { type Vtable = IListBoxItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd7d5fee_fde0_482a_8084_dcebba5b9806); } impl ::windows::core::RuntimeName for ListBoxItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListBoxItemDataAutomationPeer"; } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListBoxItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListBoxItemDataAutomationPeer { 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 ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListBoxItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListBoxItemDataAutomationPeer { 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 ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListBoxItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListBoxItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListBoxItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListBoxItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListBoxItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListBoxItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListBoxItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: ListBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<SelectorItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: ListBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for AutomationPeer { fn from(value: ListBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for AutomationPeer { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListBoxItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: ListBoxItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListBoxItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &ListBoxItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListBoxItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListBoxItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for ListBoxItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListPickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl ListPickerFlyoutPresenterAutomationPeer {} unsafe impl ::windows::core::RuntimeType for ListPickerFlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListPickerFlyoutPresenterAutomationPeer;{56dfdc58-2395-4060-8047-8ea463698a24})"); } unsafe impl ::windows::core::Interface for ListPickerFlyoutPresenterAutomationPeer { type Vtable = IListPickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56dfdc58_2395_4060_8047_8ea463698a24); } impl ::windows::core::RuntimeName for ListPickerFlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListPickerFlyoutPresenterAutomationPeer"; } impl ::core::convert::From<ListPickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListPickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListPickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListPickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListPickerFlyoutPresenterAutomationPeer { 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 ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListPickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListPickerFlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListPickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListPickerFlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListPickerFlyoutPresenterAutomationPeer { 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 ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ListPickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListPickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListPickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListPickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListPickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: ListPickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListPickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &ListPickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListPickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: ListPickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListPickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &ListPickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListPickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListPickerFlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for ListPickerFlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewAutomationPeer(pub ::windows::core::IInspectable); impl ListViewAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListView>>(owner: Param0) -> ::windows::core::Result<ListViewAutomationPeer> { Self::IListViewAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListViewAutomationPeer>(result__) }) } pub fn IListViewAutomationPeerFactory<R, F: FnOnce(&IListViewAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListViewAutomationPeer, IListViewAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListViewAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewAutomationPeer;{73cecc87-c0dc-4260-9148-75e9864a7230})"); } unsafe impl ::windows::core::Interface for ListViewAutomationPeer { type Vtable = IListViewAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x73cecc87_c0dc_4260_9148_75e9864a7230); } impl ::windows::core::RuntimeName for ListViewAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewAutomationPeer"; } impl ::core::convert::From<ListViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewAutomationPeer { 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 ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewAutomationPeer { 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 ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::core::convert::TryInto::<super::Provider::IDropTargetProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ListViewAutomationPeer> for ListViewBaseAutomationPeer { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<ListViewBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for ListViewBaseAutomationPeer { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseAutomationPeer> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseAutomationPeer> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewAutomationPeer> for SelectorAutomationPeer { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for SelectorAutomationPeer { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewAutomationPeer> for AutomationPeer { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for AutomationPeer { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewBaseAutomationPeer(pub ::windows::core::IInspectable); impl ListViewBaseAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn DropEffect(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<super::Provider::IDropTargetProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn DropEffects(&self) -> ::windows::core::Result<::windows::core::Array<::windows::core::HSTRING>> { let this = &::windows::core::Interface::cast::<super::Provider::IDropTargetProvider>(self)?; unsafe { let mut result__: ::windows::core::Array<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), ::windows::core::Array::<::windows::core::HSTRING>::set_abi_len(&mut result__), &mut result__ as *mut _ as _).and_then(|| result__) } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListViewBase>>(owner: Param0) -> ::windows::core::Result<ListViewBaseAutomationPeer> { Self::IListViewBaseAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListViewBaseAutomationPeer>(result__) }) } pub fn IListViewBaseAutomationPeerFactory<R, F: FnOnce(&IListViewBaseAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListViewBaseAutomationPeer, IListViewBaseAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListViewBaseAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewBaseAutomationPeer;{87ec7649-b83d-4e55-9afd-bd835e748f5c})"); } unsafe impl ::windows::core::Interface for ListViewBaseAutomationPeer { type Vtable = IListViewBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x87ec7649_b83d_4e55_9afd_bd835e748f5c); } impl ::windows::core::RuntimeName for ListViewBaseAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewBaseAutomationPeer"; } impl ::core::convert::From<ListViewBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewBaseAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewBaseAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewBaseAutomationPeer { 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 ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewBaseAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewBaseAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewBaseAutomationPeer { 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 ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewBaseAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewBaseAutomationPeer> for super::Provider::IDropTargetProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IDropTargetProvider> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IDropTargetProvider> { ::core::convert::TryInto::<super::Provider::IDropTargetProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewBaseAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewBaseAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewBaseAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewBaseAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewBaseAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for SelectorAutomationPeer { fn from(value: ListViewBaseAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for SelectorAutomationPeer { fn from(value: &ListViewBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for ItemsControlAutomationPeer { fn from(value: ListViewBaseAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &ListViewBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListViewBaseAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListViewBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for AutomationPeer { fn from(value: ListViewBaseAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for AutomationPeer { fn from(value: &ListViewBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewBaseAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewBaseAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewBaseAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewBaseAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewBaseHeaderItemAutomationPeer(pub ::windows::core::IInspectable); impl ListViewBaseHeaderItemAutomationPeer {} unsafe impl ::windows::core::RuntimeType for ListViewBaseHeaderItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewBaseHeaderItemAutomationPeer;{7cb8b732-c1f0-4a3c-bc14-85dd48dedb85})"); } unsafe impl ::windows::core::Interface for ListViewBaseHeaderItemAutomationPeer { type Vtable = IListViewBaseHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cb8b732_c1f0_4a3c_bc14_85dd48dedb85); } impl ::windows::core::RuntimeName for ListViewBaseHeaderItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewBaseHeaderItemAutomationPeer"; } impl ::core::convert::From<ListViewBaseHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewBaseHeaderItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewBaseHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewBaseHeaderItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewBaseHeaderItemAutomationPeer { 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 ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewBaseHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewBaseHeaderItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewBaseHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewBaseHeaderItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewBaseHeaderItemAutomationPeer { 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 ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ListViewBaseHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListViewBaseHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListViewBaseHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseHeaderItemAutomationPeer> for AutomationPeer { fn from(value: ListViewBaseHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewBaseHeaderItemAutomationPeer> for AutomationPeer { fn from(value: &ListViewBaseHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewBaseHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewBaseHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewBaseHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewBaseHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewBaseHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewBaseHeaderItemAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewBaseHeaderItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewHeaderItemAutomationPeer(pub ::windows::core::IInspectable); impl ListViewHeaderItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListViewHeaderItem>>(owner: Param0) -> ::windows::core::Result<ListViewHeaderItemAutomationPeer> { Self::IListViewHeaderItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListViewHeaderItemAutomationPeer>(result__) }) } pub fn IListViewHeaderItemAutomationPeerFactory<R, F: FnOnce(&IListViewHeaderItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListViewHeaderItemAutomationPeer, IListViewHeaderItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListViewHeaderItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewHeaderItemAutomationPeer;{67ab1e4b-ad61-4c88-ba45-0f3a8d061f8f})"); } unsafe impl ::windows::core::Interface for ListViewHeaderItemAutomationPeer { type Vtable = IListViewHeaderItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x67ab1e4b_ad61_4c88_ba45_0f3a8d061f8f); } impl ::windows::core::RuntimeName for ListViewHeaderItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewHeaderItemAutomationPeer"; } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewHeaderItemAutomationPeer { 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 ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewHeaderItemAutomationPeer { 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 ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for ListViewBaseHeaderItemAutomationPeer { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseHeaderItemAutomationPeer> for ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseHeaderItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewBaseHeaderItemAutomationPeer> for &ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewBaseHeaderItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewBaseHeaderItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for AutomationPeer { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for AutomationPeer { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewHeaderItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewHeaderItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewHeaderItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewHeaderItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewHeaderItemAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewHeaderItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewItemAutomationPeer(pub ::windows::core::IInspectable); impl ListViewItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ListViewItem>>(owner: Param0) -> ::windows::core::Result<ListViewItemAutomationPeer> { Self::IListViewItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListViewItemAutomationPeer>(result__) }) } pub fn IListViewItemAutomationPeerFactory<R, F: FnOnce(&IListViewItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListViewItemAutomationPeer, IListViewItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListViewItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewItemAutomationPeer;{ca114e70-a16d-4d09-a1cf-1856ef98a9ec})"); } unsafe impl ::windows::core::Interface for ListViewItemAutomationPeer { type Vtable = IListViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca114e70_a16d_4d09_a1cf_1856ef98a9ec); } impl ::windows::core::RuntimeName for ListViewItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewItemAutomationPeer"; } impl ::core::convert::From<ListViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewItemAutomationPeer { 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 ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewItemAutomationPeer { 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 ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ListViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ListViewItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ListViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewItemAutomationPeer> for AutomationPeer { fn from(value: ListViewItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewItemAutomationPeer> for AutomationPeer { fn from(value: &ListViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewItemAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ListViewItemDataAutomationPeer(pub ::windows::core::IInspectable); impl ListViewItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, ListViewBaseAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<ListViewItemDataAutomationPeer> { Self::IListViewItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ListViewItemDataAutomationPeer>(result__) }) } pub fn IListViewItemDataAutomationPeerFactory<R, F: FnOnce(&IListViewItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ListViewItemDataAutomationPeer, IListViewItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ListViewItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ListViewItemDataAutomationPeer;{15a8d7fd-d7a5-4a6c-963c-6f7ce464671a})"); } unsafe impl ::windows::core::Interface for ListViewItemDataAutomationPeer { type Vtable = IListViewItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15a8d7fd_d7a5_4a6c_963c_6f7ce464671a); } impl ::windows::core::RuntimeName for ListViewItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ListViewItemDataAutomationPeer"; } impl ::core::convert::From<ListViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: ListViewItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ListViewItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ListViewItemDataAutomationPeer { 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 ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ListViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: ListViewItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ListViewItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ListViewItemDataAutomationPeer { 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 ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ListViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ListViewItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &ListViewItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ListViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: ListViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<SelectorItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for SelectorItemAutomationPeer { fn from(value: &ListViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorItemAutomationPeer> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: ListViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &ListViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewItemDataAutomationPeer> for AutomationPeer { fn from(value: ListViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for AutomationPeer { fn from(value: &ListViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ListViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: ListViewItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ListViewItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &ListViewItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ListViewItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ListViewItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for ListViewItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LoopingSelectorAutomationPeer(pub ::windows::core::IInspectable); impl LoopingSelectorAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn FindItemByProperty<'a, Param0: ::windows::core::IntoParam<'a, super::Provider::IRawElementProviderSimple>, Param1: ::windows::core::IntoParam<'a, super::AutomationProperty>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>>(&self, startafter: Param0, automationproperty: Param1, value: Param2) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::IItemContainerProvider>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), startafter.into_param().abi(), automationproperty.into_param().abi(), value.into_param().abi(), &mut result__).from_abi::<super::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Scroll(&self, horizontalamount: super::ScrollAmount, verticalamount: super::ScrollAmount) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), horizontalamount, verticalamount).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetScrollPercent(&self, horizontalpercent: f64, verticalpercent: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), horizontalpercent, verticalpercent).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanSelectMultiple(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelectionRequired(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn GetSelection(&self) -> ::windows::core::Result<::windows::core::Array<super::Provider::IRawElementProviderSimple>> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(self)?; unsafe { let mut result__: ::windows::core::Array<super::Provider::IRawElementProviderSimple> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), ::windows::core::Array::<super::Provider::IRawElementProviderSimple>::set_abi_len(&mut result__), &mut result__ as *mut _ as _).and_then(|| result__) } } } unsafe impl ::windows::core::RuntimeType for LoopingSelectorAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.LoopingSelectorAutomationPeer;{50b406ca-bae9-4816-8a3a-0cb4f96478a2})"); } unsafe impl ::windows::core::Interface for LoopingSelectorAutomationPeer { type Vtable = ILoopingSelectorAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50b406ca_bae9_4816_8a3a_0cb4f96478a2); } impl ::windows::core::RuntimeName for LoopingSelectorAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.LoopingSelectorAutomationPeer"; } impl ::core::convert::From<LoopingSelectorAutomationPeer> for ::windows::core::IUnknown { fn from(value: LoopingSelectorAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&LoopingSelectorAutomationPeer> for ::windows::core::IUnknown { fn from(value: &LoopingSelectorAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LoopingSelectorAutomationPeer { 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 LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LoopingSelectorAutomationPeer> for ::windows::core::IInspectable { fn from(value: LoopingSelectorAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&LoopingSelectorAutomationPeer> for ::windows::core::IInspectable { fn from(value: &LoopingSelectorAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LoopingSelectorAutomationPeer { 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 LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::core::convert::TryInto::<super::Provider::IScrollProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<LoopingSelectorAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: LoopingSelectorAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&LoopingSelectorAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &LoopingSelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LoopingSelectorAutomationPeer> for AutomationPeer { fn from(value: LoopingSelectorAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&LoopingSelectorAutomationPeer> for AutomationPeer { fn from(value: &LoopingSelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LoopingSelectorAutomationPeer> for super::super::DependencyObject { fn from(value: LoopingSelectorAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&LoopingSelectorAutomationPeer> for super::super::DependencyObject { fn from(value: &LoopingSelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &LoopingSelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for LoopingSelectorAutomationPeer {} unsafe impl ::core::marker::Sync for LoopingSelectorAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LoopingSelectorItemAutomationPeer(pub ::windows::core::IInspectable); impl LoopingSelectorItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelected(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SelectionContainer(&self) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn AddToSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn RemoveFromSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Select(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this)).ok() } } } unsafe impl ::windows::core::RuntimeType for LoopingSelectorItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.LoopingSelectorItemAutomationPeer;{d3fa68bf-04cf-4f4c-8d3e-4780a19d4788})"); } unsafe impl ::windows::core::Interface for LoopingSelectorItemAutomationPeer { type Vtable = ILoopingSelectorItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd3fa68bf_04cf_4f4c_8d3e_4780a19d4788); } impl ::windows::core::RuntimeName for LoopingSelectorItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.LoopingSelectorItemAutomationPeer"; } impl ::core::convert::From<LoopingSelectorItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: LoopingSelectorItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&LoopingSelectorItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &LoopingSelectorItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LoopingSelectorItemAutomationPeer { 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 LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LoopingSelectorItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: LoopingSelectorItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&LoopingSelectorItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &LoopingSelectorItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LoopingSelectorItemAutomationPeer { 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 LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorItemAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorItemAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorItemAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorItemAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<LoopingSelectorItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: LoopingSelectorItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&LoopingSelectorItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &LoopingSelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LoopingSelectorItemAutomationPeer> for AutomationPeer { fn from(value: LoopingSelectorItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&LoopingSelectorItemAutomationPeer> for AutomationPeer { fn from(value: &LoopingSelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LoopingSelectorItemAutomationPeer> for super::super::DependencyObject { fn from(value: LoopingSelectorItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&LoopingSelectorItemAutomationPeer> for super::super::DependencyObject { fn from(value: &LoopingSelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &LoopingSelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for LoopingSelectorItemAutomationPeer {} unsafe impl ::core::marker::Sync for LoopingSelectorItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LoopingSelectorItemDataAutomationPeer(pub ::windows::core::IInspectable); impl LoopingSelectorItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Realize(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IVirtualizedItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } } unsafe impl ::windows::core::RuntimeType for LoopingSelectorItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.LoopingSelectorItemDataAutomationPeer;{ef567e32-7cd2-4d32-9590-1f588d5ef38d})"); } unsafe impl ::windows::core::Interface for LoopingSelectorItemDataAutomationPeer { type Vtable = ILoopingSelectorItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef567e32_7cd2_4d32_9590_1f588d5ef38d); } impl ::windows::core::RuntimeName for LoopingSelectorItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.LoopingSelectorItemDataAutomationPeer"; } impl ::core::convert::From<LoopingSelectorItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: LoopingSelectorItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&LoopingSelectorItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &LoopingSelectorItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LoopingSelectorItemDataAutomationPeer { 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 LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LoopingSelectorItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: LoopingSelectorItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&LoopingSelectorItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &LoopingSelectorItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LoopingSelectorItemDataAutomationPeer { 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 LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<LoopingSelectorItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: LoopingSelectorItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&LoopingSelectorItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &LoopingSelectorItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<LoopingSelectorItemDataAutomationPeer> for AutomationPeer { fn from(value: LoopingSelectorItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&LoopingSelectorItemDataAutomationPeer> for AutomationPeer { fn from(value: &LoopingSelectorItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<LoopingSelectorItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: LoopingSelectorItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&LoopingSelectorItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &LoopingSelectorItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &LoopingSelectorItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for LoopingSelectorItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for LoopingSelectorItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MapControlAutomationPeer(pub ::windows::core::IInspectable); impl MapControlAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Scroll(&self, horizontalamount: super::ScrollAmount, verticalamount: super::ScrollAmount) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), horizontalamount, verticalamount).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetScrollPercent(&self, horizontalpercent: f64, verticalpercent: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), horizontalpercent, verticalpercent).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanMove(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanResize(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn CanRotate(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Move(&self, x: f64, y: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), x, y).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Resize(&self, width: f64, height: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), width, height).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Rotate(&self, degrees: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), degrees).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanZoom(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ZoomLevel(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn MaxZoom(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn MinZoom(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Zoom(&self, zoom: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), zoom).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ZoomByUnit(&self, zoomunit: super::ZoomUnit) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ITransformProvider2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), zoomunit).ok() } } } unsafe impl ::windows::core::RuntimeType for MapControlAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MapControlAutomationPeer;{425beee4-f2e8-4bcb-9382-5dfdd11fe45f})"); } unsafe impl ::windows::core::Interface for MapControlAutomationPeer { type Vtable = IMapControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x425beee4_f2e8_4bcb_9382_5dfdd11fe45f); } impl ::windows::core::RuntimeName for MapControlAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MapControlAutomationPeer"; } impl ::core::convert::From<MapControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: MapControlAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MapControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MapControlAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MapControlAutomationPeer { 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 MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MapControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: MapControlAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MapControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MapControlAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MapControlAutomationPeer { 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 MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MapControlAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MapControlAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: &MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::core::convert::TryInto::<super::Provider::IScrollProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MapControlAutomationPeer> for super::Provider::ITransformProvider { type Error = ::windows::core::Error; fn try_from(value: MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MapControlAutomationPeer> for super::Provider::ITransformProvider { type Error = ::windows::core::Error; fn try_from(value: &MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ITransformProvider> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ITransformProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ITransformProvider> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ITransformProvider> { ::core::convert::TryInto::<super::Provider::ITransformProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MapControlAutomationPeer> for super::Provider::ITransformProvider2 { type Error = ::windows::core::Error; fn try_from(value: MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MapControlAutomationPeer> for super::Provider::ITransformProvider2 { type Error = ::windows::core::Error; fn try_from(value: &MapControlAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ITransformProvider2> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ITransformProvider2> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ITransformProvider2> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ITransformProvider2> { ::core::convert::TryInto::<super::Provider::ITransformProvider2>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<MapControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MapControlAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MapControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MapControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MapControlAutomationPeer> for AutomationPeer { fn from(value: MapControlAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MapControlAutomationPeer> for AutomationPeer { fn from(value: &MapControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MapControlAutomationPeer> for super::super::DependencyObject { fn from(value: MapControlAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MapControlAutomationPeer> for super::super::DependencyObject { fn from(value: &MapControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MapControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MapControlAutomationPeer {} unsafe impl ::core::marker::Sync for MapControlAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaElementAutomationPeer(pub ::windows::core::IInspectable); impl MediaElementAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MediaElement>>(owner: Param0) -> ::windows::core::Result<MediaElementAutomationPeer> { Self::IMediaElementAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MediaElementAutomationPeer>(result__) }) } pub fn IMediaElementAutomationPeerFactory<R, F: FnOnce(&IMediaElementAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaElementAutomationPeer, IMediaElementAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MediaElementAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MediaElementAutomationPeer;{ba0b9fc2-a6e2-41a5-b17a-d1594613efba})"); } unsafe impl ::windows::core::Interface for MediaElementAutomationPeer { type Vtable = IMediaElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba0b9fc2_a6e2_41a5_b17a_d1594613efba); } impl ::windows::core::RuntimeName for MediaElementAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MediaElementAutomationPeer"; } impl ::core::convert::From<MediaElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: MediaElementAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MediaElementAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaElementAutomationPeer { 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 MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: MediaElementAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MediaElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MediaElementAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaElementAutomationPeer { 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 MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<MediaElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MediaElementAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MediaElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaElementAutomationPeer> for AutomationPeer { fn from(value: MediaElementAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaElementAutomationPeer> for AutomationPeer { fn from(value: &MediaElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaElementAutomationPeer> for super::super::DependencyObject { fn from(value: MediaElementAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MediaElementAutomationPeer> for super::super::DependencyObject { fn from(value: &MediaElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MediaElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MediaElementAutomationPeer {} unsafe impl ::core::marker::Sync for MediaElementAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaPlayerElementAutomationPeer(pub ::windows::core::IInspectable); impl MediaPlayerElementAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MediaPlayerElement>>(owner: Param0) -> ::windows::core::Result<MediaPlayerElementAutomationPeer> { Self::IMediaPlayerElementAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MediaPlayerElementAutomationPeer>(result__) }) } pub fn IMediaPlayerElementAutomationPeerFactory<R, F: FnOnce(&IMediaPlayerElementAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaPlayerElementAutomationPeer, IMediaPlayerElementAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MediaPlayerElementAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MediaPlayerElementAutomationPeer;{02bed209-3f65-4fdd-b5ca-c4750d4e6ea4})"); } unsafe impl ::windows::core::Interface for MediaPlayerElementAutomationPeer { type Vtable = IMediaPlayerElementAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x02bed209_3f65_4fdd_b5ca_c4750d4e6ea4); } impl ::windows::core::RuntimeName for MediaPlayerElementAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MediaPlayerElementAutomationPeer"; } impl ::core::convert::From<MediaPlayerElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: MediaPlayerElementAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaPlayerElementAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MediaPlayerElementAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayerElementAutomationPeer { 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 MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaPlayerElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: MediaPlayerElementAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MediaPlayerElementAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MediaPlayerElementAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayerElementAutomationPeer { 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 MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<MediaPlayerElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MediaPlayerElementAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaPlayerElementAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MediaPlayerElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaPlayerElementAutomationPeer> for AutomationPeer { fn from(value: MediaPlayerElementAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaPlayerElementAutomationPeer> for AutomationPeer { fn from(value: &MediaPlayerElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaPlayerElementAutomationPeer> for super::super::DependencyObject { fn from(value: MediaPlayerElementAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MediaPlayerElementAutomationPeer> for super::super::DependencyObject { fn from(value: &MediaPlayerElementAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MediaPlayerElementAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MediaPlayerElementAutomationPeer {} unsafe impl ::core::marker::Sync for MediaPlayerElementAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaTransportControlsAutomationPeer(pub ::windows::core::IInspectable); impl MediaTransportControlsAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MediaTransportControls>>(owner: Param0) -> ::windows::core::Result<MediaTransportControlsAutomationPeer> { Self::IMediaTransportControlsAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MediaTransportControlsAutomationPeer>(result__) }) } pub fn IMediaTransportControlsAutomationPeerFactory<R, F: FnOnce(&IMediaTransportControlsAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaTransportControlsAutomationPeer, IMediaTransportControlsAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MediaTransportControlsAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MediaTransportControlsAutomationPeer;{a3ad8d93-79f8-4958-a3c8-980defb83d15})"); } unsafe impl ::windows::core::Interface for MediaTransportControlsAutomationPeer { type Vtable = IMediaTransportControlsAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa3ad8d93_79f8_4958_a3c8_980defb83d15); } impl ::windows::core::RuntimeName for MediaTransportControlsAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MediaTransportControlsAutomationPeer"; } impl ::core::convert::From<MediaTransportControlsAutomationPeer> for ::windows::core::IUnknown { fn from(value: MediaTransportControlsAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaTransportControlsAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MediaTransportControlsAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaTransportControlsAutomationPeer { 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 MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaTransportControlsAutomationPeer> for ::windows::core::IInspectable { fn from(value: MediaTransportControlsAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MediaTransportControlsAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MediaTransportControlsAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaTransportControlsAutomationPeer { 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 MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<MediaTransportControlsAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MediaTransportControlsAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaTransportControlsAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MediaTransportControlsAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaTransportControlsAutomationPeer> for AutomationPeer { fn from(value: MediaTransportControlsAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MediaTransportControlsAutomationPeer> for AutomationPeer { fn from(value: &MediaTransportControlsAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MediaTransportControlsAutomationPeer> for super::super::DependencyObject { fn from(value: MediaTransportControlsAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MediaTransportControlsAutomationPeer> for super::super::DependencyObject { fn from(value: &MediaTransportControlsAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MediaTransportControlsAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MediaTransportControlsAutomationPeer {} unsafe impl ::core::marker::Sync for MediaTransportControlsAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MenuBarAutomationPeer(pub ::windows::core::IInspectable); impl MenuBarAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MenuBar>>(owner: Param0) -> ::windows::core::Result<MenuBarAutomationPeer> { Self::IMenuBarAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MenuBarAutomationPeer>(result__) }) } pub fn IMenuBarAutomationPeerFactory<R, F: FnOnce(&IMenuBarAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MenuBarAutomationPeer, IMenuBarAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MenuBarAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MenuBarAutomationPeer;{4b6adcf1-f274-5592-85a8-7b099e99b320})"); } unsafe impl ::windows::core::Interface for MenuBarAutomationPeer { type Vtable = IMenuBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b6adcf1_f274_5592_85a8_7b099e99b320); } impl ::windows::core::RuntimeName for MenuBarAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MenuBarAutomationPeer"; } impl ::core::convert::From<MenuBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: MenuBarAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MenuBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MenuBarAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MenuBarAutomationPeer { 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 MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MenuBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: MenuBarAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MenuBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MenuBarAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MenuBarAutomationPeer { 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 MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<MenuBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MenuBarAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MenuBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuBarAutomationPeer> for AutomationPeer { fn from(value: MenuBarAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuBarAutomationPeer> for AutomationPeer { fn from(value: &MenuBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuBarAutomationPeer> for super::super::DependencyObject { fn from(value: MenuBarAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MenuBarAutomationPeer> for super::super::DependencyObject { fn from(value: &MenuBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MenuBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MenuBarAutomationPeer {} unsafe impl ::core::marker::Sync for MenuBarAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MenuBarItemAutomationPeer(pub ::windows::core::IInspectable); impl MenuBarItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MenuBarItem>>(owner: Param0) -> ::windows::core::Result<MenuBarItemAutomationPeer> { Self::IMenuBarItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MenuBarItemAutomationPeer>(result__) }) } pub fn IMenuBarItemAutomationPeerFactory<R, F: FnOnce(&IMenuBarItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MenuBarItemAutomationPeer, IMenuBarItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MenuBarItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MenuBarItemAutomationPeer;{0fce49b4-cff5-5c4b-98ee-e75fdddf799a})"); } unsafe impl ::windows::core::Interface for MenuBarItemAutomationPeer { type Vtable = IMenuBarItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0fce49b4_cff5_5c4b_98ee_e75fdddf799a); } impl ::windows::core::RuntimeName for MenuBarItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MenuBarItemAutomationPeer"; } impl ::core::convert::From<MenuBarItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: MenuBarItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MenuBarItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MenuBarItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MenuBarItemAutomationPeer { 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 MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MenuBarItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: MenuBarItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MenuBarItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MenuBarItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MenuBarItemAutomationPeer { 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 MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MenuBarItemAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: MenuBarItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MenuBarItemAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &MenuBarItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MenuBarItemAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: MenuBarItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MenuBarItemAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &MenuBarItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<MenuBarItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MenuBarItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuBarItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MenuBarItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuBarItemAutomationPeer> for AutomationPeer { fn from(value: MenuBarItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuBarItemAutomationPeer> for AutomationPeer { fn from(value: &MenuBarItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuBarItemAutomationPeer> for super::super::DependencyObject { fn from(value: MenuBarItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MenuBarItemAutomationPeer> for super::super::DependencyObject { fn from(value: &MenuBarItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MenuBarItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MenuBarItemAutomationPeer {} unsafe impl ::core::marker::Sync for MenuBarItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MenuFlyoutItemAutomationPeer(pub ::windows::core::IInspectable); impl MenuFlyoutItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MenuFlyoutItem>>(owner: Param0) -> ::windows::core::Result<MenuFlyoutItemAutomationPeer> { Self::IMenuFlyoutItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MenuFlyoutItemAutomationPeer>(result__) }) } pub fn IMenuFlyoutItemAutomationPeerFactory<R, F: FnOnce(&IMenuFlyoutItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MenuFlyoutItemAutomationPeer, IMenuFlyoutItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MenuFlyoutItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MenuFlyoutItemAutomationPeer;{1fc19462-21df-456e-aa11-8fac6b4b2af6})"); } unsafe impl ::windows::core::Interface for MenuFlyoutItemAutomationPeer { type Vtable = IMenuFlyoutItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1fc19462_21df_456e_aa11_8fac6b4b2af6); } impl ::windows::core::RuntimeName for MenuFlyoutItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MenuFlyoutItemAutomationPeer"; } impl ::core::convert::From<MenuFlyoutItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: MenuFlyoutItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MenuFlyoutItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MenuFlyoutItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MenuFlyoutItemAutomationPeer { 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 MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MenuFlyoutItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: MenuFlyoutItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MenuFlyoutItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MenuFlyoutItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MenuFlyoutItemAutomationPeer { 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 MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MenuFlyoutItemAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: MenuFlyoutItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MenuFlyoutItemAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &MenuFlyoutItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<MenuFlyoutItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuFlyoutItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuFlyoutItemAutomationPeer> for AutomationPeer { fn from(value: MenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuFlyoutItemAutomationPeer> for AutomationPeer { fn from(value: &MenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuFlyoutItemAutomationPeer> for super::super::DependencyObject { fn from(value: MenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MenuFlyoutItemAutomationPeer> for super::super::DependencyObject { fn from(value: &MenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MenuFlyoutItemAutomationPeer {} unsafe impl ::core::marker::Sync for MenuFlyoutItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MenuFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl MenuFlyoutPresenterAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::MenuFlyoutPresenter>>(owner: Param0) -> ::windows::core::Result<MenuFlyoutPresenterAutomationPeer> { Self::IMenuFlyoutPresenterAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<MenuFlyoutPresenterAutomationPeer>(result__) }) } pub fn IMenuFlyoutPresenterAutomationPeerFactory<R, F: FnOnce(&IMenuFlyoutPresenterAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MenuFlyoutPresenterAutomationPeer, IMenuFlyoutPresenterAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MenuFlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.MenuFlyoutPresenterAutomationPeer;{e244a871-fcbb-48fc-8a93-41ea134b53ce})"); } unsafe impl ::windows::core::Interface for MenuFlyoutPresenterAutomationPeer { type Vtable = IMenuFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe244a871_fcbb_48fc_8a93_41ea134b53ce); } impl ::windows::core::RuntimeName for MenuFlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.MenuFlyoutPresenterAutomationPeer"; } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MenuFlyoutPresenterAutomationPeer { 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 MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MenuFlyoutPresenterAutomationPeer { 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 MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<MenuFlyoutPresenterAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: MenuFlyoutPresenterAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&MenuFlyoutPresenterAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &MenuFlyoutPresenterAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for ItemsControlAutomationPeer { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<MenuFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: MenuFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&MenuFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &MenuFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &MenuFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for MenuFlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for MenuFlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct NavigationViewItemAutomationPeer(pub ::windows::core::IInspectable); impl NavigationViewItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::NavigationViewItem>>(owner: Param0) -> ::windows::core::Result<NavigationViewItemAutomationPeer> { Self::INavigationViewItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<NavigationViewItemAutomationPeer>(result__) }) } pub fn INavigationViewItemAutomationPeerFactory<R, F: FnOnce(&INavigationViewItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<NavigationViewItemAutomationPeer, INavigationViewItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for NavigationViewItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.NavigationViewItemAutomationPeer;{309847a5-9971-4d8d-a81c-085c7086a1b9})"); } unsafe impl ::windows::core::Interface for NavigationViewItemAutomationPeer { type Vtable = INavigationViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x309847a5_9971_4d8d_a81c_085c7086a1b9); } impl ::windows::core::RuntimeName for NavigationViewItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.NavigationViewItemAutomationPeer"; } impl ::core::convert::From<NavigationViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: NavigationViewItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &NavigationViewItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for NavigationViewItemAutomationPeer { 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 NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<NavigationViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: NavigationViewItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &NavigationViewItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for NavigationViewItemAutomationPeer { 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 NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<NavigationViewItemAutomationPeer> for ListViewItemAutomationPeer { fn from(value: NavigationViewItemAutomationPeer) -> Self { ::core::convert::Into::<ListViewItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for ListViewItemAutomationPeer { fn from(value: &NavigationViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewItemAutomationPeer> for NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewItemAutomationPeer> for &NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<NavigationViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: NavigationViewItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &NavigationViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<NavigationViewItemAutomationPeer> for AutomationPeer { fn from(value: NavigationViewItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for AutomationPeer { fn from(value: &NavigationViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<NavigationViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: NavigationViewItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&NavigationViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: &NavigationViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &NavigationViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for NavigationViewItemAutomationPeer {} unsafe impl ::core::marker::Sync for NavigationViewItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PasswordBoxAutomationPeer(pub ::windows::core::IInspectable); impl PasswordBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::PasswordBox>>(owner: Param0) -> ::windows::core::Result<PasswordBoxAutomationPeer> { Self::IPasswordBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<PasswordBoxAutomationPeer>(result__) }) } pub fn IPasswordBoxAutomationPeerFactory<R, F: FnOnce(&IPasswordBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PasswordBoxAutomationPeer, IPasswordBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PasswordBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PasswordBoxAutomationPeer;{684f065e-3df3-4b9f-82ad-8819db3b218a})"); } unsafe impl ::windows::core::Interface for PasswordBoxAutomationPeer { type Vtable = IPasswordBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x684f065e_3df3_4b9f_82ad_8819db3b218a); } impl ::windows::core::RuntimeName for PasswordBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PasswordBoxAutomationPeer"; } impl ::core::convert::From<PasswordBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: PasswordBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PasswordBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PasswordBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PasswordBoxAutomationPeer { 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 PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PasswordBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: PasswordBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PasswordBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PasswordBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PasswordBoxAutomationPeer { 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 PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<PasswordBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: PasswordBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&PasswordBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &PasswordBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PasswordBoxAutomationPeer> for AutomationPeer { fn from(value: PasswordBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PasswordBoxAutomationPeer> for AutomationPeer { fn from(value: &PasswordBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PasswordBoxAutomationPeer> for super::super::DependencyObject { fn from(value: PasswordBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PasswordBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &PasswordBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PasswordBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PasswordBoxAutomationPeer {} unsafe impl ::core::marker::Sync for PasswordBoxAutomationPeer {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PatternInterface(pub i32); impl PatternInterface { pub const Invoke: PatternInterface = PatternInterface(0i32); pub const Selection: PatternInterface = PatternInterface(1i32); pub const Value: PatternInterface = PatternInterface(2i32); pub const RangeValue: PatternInterface = PatternInterface(3i32); pub const Scroll: PatternInterface = PatternInterface(4i32); pub const ScrollItem: PatternInterface = PatternInterface(5i32); pub const ExpandCollapse: PatternInterface = PatternInterface(6i32); pub const Grid: PatternInterface = PatternInterface(7i32); pub const GridItem: PatternInterface = PatternInterface(8i32); pub const MultipleView: PatternInterface = PatternInterface(9i32); pub const Window: PatternInterface = PatternInterface(10i32); pub const SelectionItem: PatternInterface = PatternInterface(11i32); pub const Dock: PatternInterface = PatternInterface(12i32); pub const Table: PatternInterface = PatternInterface(13i32); pub const TableItem: PatternInterface = PatternInterface(14i32); pub const Toggle: PatternInterface = PatternInterface(15i32); pub const Transform: PatternInterface = PatternInterface(16i32); pub const Text: PatternInterface = PatternInterface(17i32); pub const ItemContainer: PatternInterface = PatternInterface(18i32); pub const VirtualizedItem: PatternInterface = PatternInterface(19i32); pub const Text2: PatternInterface = PatternInterface(20i32); pub const TextChild: PatternInterface = PatternInterface(21i32); pub const TextRange: PatternInterface = PatternInterface(22i32); pub const Annotation: PatternInterface = PatternInterface(23i32); pub const Drag: PatternInterface = PatternInterface(24i32); pub const DropTarget: PatternInterface = PatternInterface(25i32); pub const ObjectModel: PatternInterface = PatternInterface(26i32); pub const Spreadsheet: PatternInterface = PatternInterface(27i32); pub const SpreadsheetItem: PatternInterface = PatternInterface(28i32); pub const Styles: PatternInterface = PatternInterface(29i32); pub const Transform2: PatternInterface = PatternInterface(30i32); pub const SynchronizedInput: PatternInterface = PatternInterface(31i32); pub const TextEdit: PatternInterface = PatternInterface(32i32); pub const CustomNavigation: PatternInterface = PatternInterface(33i32); } impl ::core::convert::From<i32> for PatternInterface { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PatternInterface { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PatternInterface { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.UI.Xaml.Automation.Peers.PatternInterface;i4)"); } impl ::windows::core::DefaultType for PatternInterface { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PersonPictureAutomationPeer(pub ::windows::core::IInspectable); impl PersonPictureAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::PersonPicture>>(owner: Param0) -> ::windows::core::Result<PersonPictureAutomationPeer> { Self::IPersonPictureAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<PersonPictureAutomationPeer>(result__) }) } pub fn IPersonPictureAutomationPeerFactory<R, F: FnOnce(&IPersonPictureAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PersonPictureAutomationPeer, IPersonPictureAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PersonPictureAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PersonPictureAutomationPeer;{27156d4c-a66f-4aaf-8286-4f796d30628c})"); } unsafe impl ::windows::core::Interface for PersonPictureAutomationPeer { type Vtable = IPersonPictureAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27156d4c_a66f_4aaf_8286_4f796d30628c); } impl ::windows::core::RuntimeName for PersonPictureAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PersonPictureAutomationPeer"; } impl ::core::convert::From<PersonPictureAutomationPeer> for ::windows::core::IUnknown { fn from(value: PersonPictureAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PersonPictureAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PersonPictureAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PersonPictureAutomationPeer { 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 PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PersonPictureAutomationPeer> for ::windows::core::IInspectable { fn from(value: PersonPictureAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PersonPictureAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PersonPictureAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PersonPictureAutomationPeer { 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 PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<PersonPictureAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: PersonPictureAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&PersonPictureAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &PersonPictureAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PersonPictureAutomationPeer> for AutomationPeer { fn from(value: PersonPictureAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PersonPictureAutomationPeer> for AutomationPeer { fn from(value: &PersonPictureAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PersonPictureAutomationPeer> for super::super::DependencyObject { fn from(value: PersonPictureAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PersonPictureAutomationPeer> for super::super::DependencyObject { fn from(value: &PersonPictureAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PersonPictureAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PersonPictureAutomationPeer {} unsafe impl ::core::marker::Sync for PersonPictureAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl PickerFlyoutPresenterAutomationPeer {} unsafe impl ::windows::core::RuntimeType for PickerFlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PickerFlyoutPresenterAutomationPeer;{28414bf7-8382-4eae-93c1-d6f035aa8155})"); } unsafe impl ::windows::core::Interface for PickerFlyoutPresenterAutomationPeer { type Vtable = IPickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x28414bf7_8382_4eae_93c1_d6f035aa8155); } impl ::windows::core::RuntimeName for PickerFlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PickerFlyoutPresenterAutomationPeer"; } impl ::core::convert::From<PickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: PickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PickerFlyoutPresenterAutomationPeer { 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 PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: PickerFlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PickerFlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PickerFlyoutPresenterAutomationPeer { 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 PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<PickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: PickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&PickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &PickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: PickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &PickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: PickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &PickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PickerFlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for PickerFlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PivotAutomationPeer(pub ::windows::core::IInspectable); impl PivotAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Scroll(&self, horizontalamount: super::ScrollAmount, verticalamount: super::ScrollAmount) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), horizontalamount, verticalamount).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetScrollPercent(&self, horizontalpercent: f64, verticalpercent: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), horizontalpercent, verticalpercent).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanSelectMultiple(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelectionRequired(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn GetSelection(&self) -> ::windows::core::Result<::windows::core::Array<super::Provider::IRawElementProviderSimple>> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(self)?; unsafe { let mut result__: ::windows::core::Array<super::Provider::IRawElementProviderSimple> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), ::windows::core::Array::<super::Provider::IRawElementProviderSimple>::set_abi_len(&mut result__), &mut result__ as *mut _ as _).and_then(|| result__) } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Pivot>>(owner: Param0) -> ::windows::core::Result<PivotAutomationPeer> { Self::IPivotAutomationPeerFactory(|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(), &mut result__).from_abi::<PivotAutomationPeer>(result__) }) } pub fn IPivotAutomationPeerFactory<R, F: FnOnce(&IPivotAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PivotAutomationPeer, IPivotAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PivotAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PivotAutomationPeer;{e715a8f8-3b9d-402c-81e2-6e912ef58981})"); } unsafe impl ::windows::core::Interface for PivotAutomationPeer { type Vtable = IPivotAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe715a8f8_3b9d_402c_81e2_6e912ef58981); } impl ::windows::core::RuntimeName for PivotAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PivotAutomationPeer"; } impl ::core::convert::From<PivotAutomationPeer> for ::windows::core::IUnknown { fn from(value: PivotAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PivotAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PivotAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PivotAutomationPeer { 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 PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PivotAutomationPeer> for ::windows::core::IInspectable { fn from(value: PivotAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PivotAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PivotAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PivotAutomationPeer { 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 PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: PivotAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::core::convert::TryInto::<super::Provider::IScrollProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: PivotAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: PivotAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<PivotAutomationPeer> for ItemsControlAutomationPeer { fn from(value: PivotAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &PivotAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: PivotAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &PivotAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotAutomationPeer> for AutomationPeer { fn from(value: PivotAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotAutomationPeer> for AutomationPeer { fn from(value: &PivotAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotAutomationPeer> for super::super::DependencyObject { fn from(value: PivotAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PivotAutomationPeer> for super::super::DependencyObject { fn from(value: &PivotAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PivotAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PivotAutomationPeer {} unsafe impl ::core::marker::Sync for PivotAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PivotItemAutomationPeer(pub ::windows::core::IInspectable); impl PivotItemAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::PivotItem>>(owner: Param0) -> ::windows::core::Result<PivotItemAutomationPeer> { Self::IPivotItemAutomationPeerFactory(|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(), &mut result__).from_abi::<PivotItemAutomationPeer>(result__) }) } pub fn IPivotItemAutomationPeerFactory<R, F: FnOnce(&IPivotItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PivotItemAutomationPeer, IPivotItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PivotItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PivotItemAutomationPeer;{1a4241ad-5d55-4d27-b40f-2d37506fbe78})"); } unsafe impl ::windows::core::Interface for PivotItemAutomationPeer { type Vtable = IPivotItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a4241ad_5d55_4d27_b40f_2d37506fbe78); } impl ::windows::core::RuntimeName for PivotItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PivotItemAutomationPeer"; } impl ::core::convert::From<PivotItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: PivotItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PivotItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PivotItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PivotItemAutomationPeer { 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 PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PivotItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: PivotItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PivotItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PivotItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PivotItemAutomationPeer { 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 PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<PivotItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: PivotItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &PivotItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotItemAutomationPeer> for AutomationPeer { fn from(value: PivotItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotItemAutomationPeer> for AutomationPeer { fn from(value: &PivotItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotItemAutomationPeer> for super::super::DependencyObject { fn from(value: PivotItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PivotItemAutomationPeer> for super::super::DependencyObject { fn from(value: &PivotItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PivotItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PivotItemAutomationPeer {} unsafe impl ::core::marker::Sync for PivotItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PivotItemDataAutomationPeer(pub ::windows::core::IInspectable); impl PivotItemDataAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ScrollIntoView(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelected(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SelectionContainer(&self) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn AddToSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn RemoveFromSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Select(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Realize(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IVirtualizedItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, PivotAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<PivotItemDataAutomationPeer> { Self::IPivotItemDataAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), &mut result__).from_abi::<PivotItemDataAutomationPeer>(result__) }) } pub fn IPivotItemDataAutomationPeerFactory<R, F: FnOnce(&IPivotItemDataAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PivotItemDataAutomationPeer, IPivotItemDataAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PivotItemDataAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.PivotItemDataAutomationPeer;{a2a3b788-ea1d-48b7-88ee-f08b6aa07fee})"); } unsafe impl ::windows::core::Interface for PivotItemDataAutomationPeer { type Vtable = IPivotItemDataAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa2a3b788_ea1d_48b7_88ee_f08b6aa07fee); } impl ::windows::core::RuntimeName for PivotItemDataAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.PivotItemDataAutomationPeer"; } impl ::core::convert::From<PivotItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: PivotItemDataAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&PivotItemDataAutomationPeer> for ::windows::core::IUnknown { fn from(value: &PivotItemDataAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PivotItemDataAutomationPeer { 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 PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PivotItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: PivotItemDataAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&PivotItemDataAutomationPeer> for ::windows::core::IInspectable { fn from(value: &PivotItemDataAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PivotItemDataAutomationPeer { 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 PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotItemDataAutomationPeer> for super::Provider::IScrollItemProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollItemProvider> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollItemProvider> { ::core::convert::TryInto::<super::Provider::IScrollItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotItemDataAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<PivotItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&PivotItemDataAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &PivotItemDataAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<PivotItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: PivotItemDataAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotItemDataAutomationPeer> for ItemAutomationPeer { fn from(value: &PivotItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotItemDataAutomationPeer> for AutomationPeer { fn from(value: PivotItemDataAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&PivotItemDataAutomationPeer> for AutomationPeer { fn from(value: &PivotItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<PivotItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: PivotItemDataAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&PivotItemDataAutomationPeer> for super::super::DependencyObject { fn from(value: &PivotItemDataAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &PivotItemDataAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for PivotItemDataAutomationPeer {} unsafe impl ::core::marker::Sync for PivotItemDataAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ProgressBarAutomationPeer(pub ::windows::core::IInspectable); impl ProgressBarAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ProgressBar>>(owner: Param0) -> ::windows::core::Result<ProgressBarAutomationPeer> { Self::IProgressBarAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ProgressBarAutomationPeer>(result__) }) } pub fn IProgressBarAutomationPeerFactory<R, F: FnOnce(&IProgressBarAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ProgressBarAutomationPeer, IProgressBarAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ProgressBarAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ProgressBarAutomationPeer;{93f48f86-d840-4fb6-ac2f-5f779b854b0d})"); } unsafe impl ::windows::core::Interface for ProgressBarAutomationPeer { type Vtable = IProgressBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93f48f86_d840_4fb6_ac2f_5f779b854b0d); } impl ::windows::core::RuntimeName for ProgressBarAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ProgressBarAutomationPeer"; } impl ::core::convert::From<ProgressBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: ProgressBarAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ProgressBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ProgressBarAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ProgressBarAutomationPeer { 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 ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ProgressBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: ProgressBarAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ProgressBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ProgressBarAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ProgressBarAutomationPeer { 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 ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ProgressBarAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: ProgressBarAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ProgressBarAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: &ProgressBarAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for &ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::core::convert::TryInto::<super::Provider::IRangeValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ProgressBarAutomationPeer> for RangeBaseAutomationPeer { fn from(value: ProgressBarAutomationPeer) -> Self { ::core::convert::Into::<RangeBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ProgressBarAutomationPeer> for RangeBaseAutomationPeer { fn from(value: &ProgressBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for &ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ProgressBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ProgressBarAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ProgressBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ProgressBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ProgressBarAutomationPeer> for AutomationPeer { fn from(value: ProgressBarAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ProgressBarAutomationPeer> for AutomationPeer { fn from(value: &ProgressBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ProgressBarAutomationPeer> for super::super::DependencyObject { fn from(value: ProgressBarAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ProgressBarAutomationPeer> for super::super::DependencyObject { fn from(value: &ProgressBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ProgressBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ProgressBarAutomationPeer {} unsafe impl ::core::marker::Sync for ProgressBarAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ProgressRingAutomationPeer(pub ::windows::core::IInspectable); impl ProgressRingAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ProgressRing>>(owner: Param0) -> ::windows::core::Result<ProgressRingAutomationPeer> { Self::IProgressRingAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ProgressRingAutomationPeer>(result__) }) } pub fn IProgressRingAutomationPeerFactory<R, F: FnOnce(&IProgressRingAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ProgressRingAutomationPeer, IProgressRingAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ProgressRingAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ProgressRingAutomationPeer;{bc305eee-39d3-4eeb-ac33-2394de123e2e})"); } unsafe impl ::windows::core::Interface for ProgressRingAutomationPeer { type Vtable = IProgressRingAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbc305eee_39d3_4eeb_ac33_2394de123e2e); } impl ::windows::core::RuntimeName for ProgressRingAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ProgressRingAutomationPeer"; } impl ::core::convert::From<ProgressRingAutomationPeer> for ::windows::core::IUnknown { fn from(value: ProgressRingAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ProgressRingAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ProgressRingAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ProgressRingAutomationPeer { 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 ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ProgressRingAutomationPeer> for ::windows::core::IInspectable { fn from(value: ProgressRingAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ProgressRingAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ProgressRingAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ProgressRingAutomationPeer { 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 ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ProgressRingAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ProgressRingAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ProgressRingAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ProgressRingAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ProgressRingAutomationPeer> for AutomationPeer { fn from(value: ProgressRingAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ProgressRingAutomationPeer> for AutomationPeer { fn from(value: &ProgressRingAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ProgressRingAutomationPeer> for super::super::DependencyObject { fn from(value: ProgressRingAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ProgressRingAutomationPeer> for super::super::DependencyObject { fn from(value: &ProgressRingAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ProgressRingAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ProgressRingAutomationPeer {} unsafe impl ::core::marker::Sync for ProgressRingAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RadioButtonAutomationPeer(pub ::windows::core::IInspectable); impl RadioButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelected(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SelectionContainer(&self) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn AddToSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn RemoveFromSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Select(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::RadioButton>>(owner: Param0) -> ::windows::core::Result<RadioButtonAutomationPeer> { Self::IRadioButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RadioButtonAutomationPeer>(result__) }) } pub fn IRadioButtonAutomationPeerFactory<R, F: FnOnce(&IRadioButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RadioButtonAutomationPeer, IRadioButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RadioButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RadioButtonAutomationPeer;{7e6a5ed8-0b30-4743-b102-dcdf548e3131})"); } unsafe impl ::windows::core::Interface for RadioButtonAutomationPeer { type Vtable = IRadioButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e6a5ed8_0b30_4743_b102_dcdf548e3131); } impl ::windows::core::RuntimeName for RadioButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RadioButtonAutomationPeer"; } impl ::core::convert::From<RadioButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: RadioButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RadioButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RadioButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RadioButtonAutomationPeer { 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 RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RadioButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: RadioButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RadioButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RadioButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RadioButtonAutomationPeer { 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 RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<RadioButtonAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: RadioButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&RadioButtonAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &RadioButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<RadioButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: RadioButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&RadioButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &RadioButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RadioButtonAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: RadioButtonAutomationPeer) -> Self { ::core::convert::Into::<ToggleButtonAutomationPeer>::into(&value) } } impl ::core::convert::From<&RadioButtonAutomationPeer> for ToggleButtonAutomationPeer { fn from(value: &RadioButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ToggleButtonAutomationPeer> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ToggleButtonAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ToggleButtonAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RadioButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: RadioButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&RadioButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &RadioButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RadioButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RadioButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RadioButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RadioButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RadioButtonAutomationPeer> for AutomationPeer { fn from(value: RadioButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RadioButtonAutomationPeer> for AutomationPeer { fn from(value: &RadioButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RadioButtonAutomationPeer> for super::super::DependencyObject { fn from(value: RadioButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RadioButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &RadioButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RadioButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RadioButtonAutomationPeer {} unsafe impl ::core::marker::Sync for RadioButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RangeBaseAutomationPeer(pub ::windows::core::IInspectable); impl RangeBaseAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn LargeChange(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Maximum(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Minimum(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SmallChange(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Value(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetValue(&self, value: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IRangeValueProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::RangeBase>>(owner: Param0) -> ::windows::core::Result<RangeBaseAutomationPeer> { Self::IRangeBaseAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RangeBaseAutomationPeer>(result__) }) } pub fn IRangeBaseAutomationPeerFactory<R, F: FnOnce(&IRangeBaseAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RangeBaseAutomationPeer, IRangeBaseAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RangeBaseAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RangeBaseAutomationPeer;{e454b549-4b2c-42ad-b04b-d35947d1ee50})"); } unsafe impl ::windows::core::Interface for RangeBaseAutomationPeer { type Vtable = IRangeBaseAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe454b549_4b2c_42ad_b04b_d35947d1ee50); } impl ::windows::core::RuntimeName for RangeBaseAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RangeBaseAutomationPeer"; } impl ::core::convert::From<RangeBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: RangeBaseAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RangeBaseAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RangeBaseAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RangeBaseAutomationPeer { 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 RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RangeBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: RangeBaseAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RangeBaseAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RangeBaseAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RangeBaseAutomationPeer { 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 RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<RangeBaseAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: RangeBaseAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&RangeBaseAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: &RangeBaseAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for &RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::core::convert::TryInto::<super::Provider::IRangeValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RangeBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RangeBaseAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RangeBaseAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RangeBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RangeBaseAutomationPeer> for AutomationPeer { fn from(value: RangeBaseAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RangeBaseAutomationPeer> for AutomationPeer { fn from(value: &RangeBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RangeBaseAutomationPeer> for super::super::DependencyObject { fn from(value: RangeBaseAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RangeBaseAutomationPeer> for super::super::DependencyObject { fn from(value: &RangeBaseAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RangeBaseAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RangeBaseAutomationPeer {} unsafe impl ::core::marker::Sync for RangeBaseAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RatingControlAutomationPeer(pub ::windows::core::IInspectable); impl RatingControlAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::RatingControl>>(owner: Param0) -> ::windows::core::Result<RatingControlAutomationPeer> { Self::IRatingControlAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RatingControlAutomationPeer>(result__) }) } pub fn IRatingControlAutomationPeerFactory<R, F: FnOnce(&IRatingControlAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RatingControlAutomationPeer, IRatingControlAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RatingControlAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RatingControlAutomationPeer;{3d14349a-9963-4a47-823c-f457cb3209d5})"); } unsafe impl ::windows::core::Interface for RatingControlAutomationPeer { type Vtable = IRatingControlAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d14349a_9963_4a47_823c_f457cb3209d5); } impl ::windows::core::RuntimeName for RatingControlAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RatingControlAutomationPeer"; } impl ::core::convert::From<RatingControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: RatingControlAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RatingControlAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RatingControlAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RatingControlAutomationPeer { 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 RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RatingControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: RatingControlAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RatingControlAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RatingControlAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RatingControlAutomationPeer { 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 RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<RatingControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RatingControlAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RatingControlAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RatingControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RatingControlAutomationPeer> for AutomationPeer { fn from(value: RatingControlAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RatingControlAutomationPeer> for AutomationPeer { fn from(value: &RatingControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RatingControlAutomationPeer> for super::super::DependencyObject { fn from(value: RatingControlAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RatingControlAutomationPeer> for super::super::DependencyObject { fn from(value: &RatingControlAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RatingControlAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RatingControlAutomationPeer {} unsafe impl ::core::marker::Sync for RatingControlAutomationPeer {} #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct RawElementProviderRuntimeId { pub Part1: u32, pub Part2: u32, } impl RawElementProviderRuntimeId {} impl ::core::default::Default for RawElementProviderRuntimeId { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for RawElementProviderRuntimeId { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RawElementProviderRuntimeId").field("Part1", &self.Part1).field("Part2", &self.Part2).finish() } } impl ::core::cmp::PartialEq for RawElementProviderRuntimeId { fn eq(&self, other: &Self) -> bool { self.Part1 == other.Part1 && self.Part2 == other.Part2 } } impl ::core::cmp::Eq for RawElementProviderRuntimeId {} unsafe impl ::windows::core::Abi for RawElementProviderRuntimeId { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for RawElementProviderRuntimeId { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"struct(Windows.UI.Xaml.Automation.Peers.RawElementProviderRuntimeId;u4;u4)"); } impl ::windows::core::DefaultType for RawElementProviderRuntimeId { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RepeatButtonAutomationPeer(pub ::windows::core::IInspectable); impl RepeatButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Invoke(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IInvokeProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::RepeatButton>>(owner: Param0) -> ::windows::core::Result<RepeatButtonAutomationPeer> { Self::IRepeatButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RepeatButtonAutomationPeer>(result__) }) } pub fn IRepeatButtonAutomationPeerFactory<R, F: FnOnce(&IRepeatButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RepeatButtonAutomationPeer, IRepeatButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RepeatButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RepeatButtonAutomationPeer;{29e41ad5-a8ac-4e8a-83d8-09e37e054257})"); } unsafe impl ::windows::core::Interface for RepeatButtonAutomationPeer { type Vtable = IRepeatButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x29e41ad5_a8ac_4e8a_83d8_09e37e054257); } impl ::windows::core::RuntimeName for RepeatButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RepeatButtonAutomationPeer"; } impl ::core::convert::From<RepeatButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: RepeatButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RepeatButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RepeatButtonAutomationPeer { 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 RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RepeatButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: RepeatButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RepeatButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RepeatButtonAutomationPeer { 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 RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<RepeatButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: RepeatButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&RepeatButtonAutomationPeer> for super::Provider::IInvokeProvider { type Error = ::windows::core::Error; fn try_from(value: &RepeatButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IInvokeProvider> for &RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IInvokeProvider> { ::core::convert::TryInto::<super::Provider::IInvokeProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<RepeatButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: RepeatButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &RepeatButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RepeatButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RepeatButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RepeatButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RepeatButtonAutomationPeer> for AutomationPeer { fn from(value: RepeatButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for AutomationPeer { fn from(value: &RepeatButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RepeatButtonAutomationPeer> for super::super::DependencyObject { fn from(value: RepeatButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RepeatButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &RepeatButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RepeatButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RepeatButtonAutomationPeer {} unsafe impl ::core::marker::Sync for RepeatButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RichEditBoxAutomationPeer(pub ::windows::core::IInspectable); impl RichEditBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::RichEditBox>>(owner: Param0) -> ::windows::core::Result<RichEditBoxAutomationPeer> { Self::IRichEditBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RichEditBoxAutomationPeer>(result__) }) } pub fn IRichEditBoxAutomationPeerFactory<R, F: FnOnce(&IRichEditBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RichEditBoxAutomationPeer, IRichEditBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RichEditBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RichEditBoxAutomationPeer;{c69f5c04-16ee-467a-a833-c3da8458ad64})"); } unsafe impl ::windows::core::Interface for RichEditBoxAutomationPeer { type Vtable = IRichEditBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc69f5c04_16ee_467a_a833_c3da8458ad64); } impl ::windows::core::RuntimeName for RichEditBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RichEditBoxAutomationPeer"; } impl ::core::convert::From<RichEditBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: RichEditBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RichEditBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RichEditBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RichEditBoxAutomationPeer { 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 RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RichEditBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: RichEditBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RichEditBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RichEditBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RichEditBoxAutomationPeer { 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 RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<RichEditBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RichEditBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RichEditBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RichEditBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichEditBoxAutomationPeer> for AutomationPeer { fn from(value: RichEditBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RichEditBoxAutomationPeer> for AutomationPeer { fn from(value: &RichEditBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichEditBoxAutomationPeer> for super::super::DependencyObject { fn from(value: RichEditBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RichEditBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &RichEditBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RichEditBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RichEditBoxAutomationPeer {} unsafe impl ::core::marker::Sync for RichEditBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RichTextBlockAutomationPeer(pub ::windows::core::IInspectable); impl RichTextBlockAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::RichTextBlock>>(owner: Param0) -> ::windows::core::Result<RichTextBlockAutomationPeer> { Self::IRichTextBlockAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RichTextBlockAutomationPeer>(result__) }) } pub fn IRichTextBlockAutomationPeerFactory<R, F: FnOnce(&IRichTextBlockAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RichTextBlockAutomationPeer, IRichTextBlockAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RichTextBlockAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RichTextBlockAutomationPeer;{93a01a9c-9609-41fa-82f3-909c09f49a72})"); } unsafe impl ::windows::core::Interface for RichTextBlockAutomationPeer { type Vtable = IRichTextBlockAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x93a01a9c_9609_41fa_82f3_909c09f49a72); } impl ::windows::core::RuntimeName for RichTextBlockAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RichTextBlockAutomationPeer"; } impl ::core::convert::From<RichTextBlockAutomationPeer> for ::windows::core::IUnknown { fn from(value: RichTextBlockAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RichTextBlockAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RichTextBlockAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RichTextBlockAutomationPeer { 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 RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RichTextBlockAutomationPeer> for ::windows::core::IInspectable { fn from(value: RichTextBlockAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RichTextBlockAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RichTextBlockAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RichTextBlockAutomationPeer { 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 RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<RichTextBlockAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RichTextBlockAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RichTextBlockAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RichTextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichTextBlockAutomationPeer> for AutomationPeer { fn from(value: RichTextBlockAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RichTextBlockAutomationPeer> for AutomationPeer { fn from(value: &RichTextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichTextBlockAutomationPeer> for super::super::DependencyObject { fn from(value: RichTextBlockAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RichTextBlockAutomationPeer> for super::super::DependencyObject { fn from(value: &RichTextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RichTextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RichTextBlockAutomationPeer {} unsafe impl ::core::marker::Sync for RichTextBlockAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct RichTextBlockOverflowAutomationPeer(pub ::windows::core::IInspectable); impl RichTextBlockOverflowAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::RichTextBlockOverflow>>(owner: Param0) -> ::windows::core::Result<RichTextBlockOverflowAutomationPeer> { Self::IRichTextBlockOverflowAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<RichTextBlockOverflowAutomationPeer>(result__) }) } pub fn IRichTextBlockOverflowAutomationPeerFactory<R, F: FnOnce(&IRichTextBlockOverflowAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<RichTextBlockOverflowAutomationPeer, IRichTextBlockOverflowAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for RichTextBlockOverflowAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.RichTextBlockOverflowAutomationPeer;{8c9a409a-2736-437b-ab36-a16a202f105d})"); } unsafe impl ::windows::core::Interface for RichTextBlockOverflowAutomationPeer { type Vtable = IRichTextBlockOverflowAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8c9a409a_2736_437b_ab36_a16a202f105d); } impl ::windows::core::RuntimeName for RichTextBlockOverflowAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.RichTextBlockOverflowAutomationPeer"; } impl ::core::convert::From<RichTextBlockOverflowAutomationPeer> for ::windows::core::IUnknown { fn from(value: RichTextBlockOverflowAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&RichTextBlockOverflowAutomationPeer> for ::windows::core::IUnknown { fn from(value: &RichTextBlockOverflowAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for RichTextBlockOverflowAutomationPeer { 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 RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<RichTextBlockOverflowAutomationPeer> for ::windows::core::IInspectable { fn from(value: RichTextBlockOverflowAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&RichTextBlockOverflowAutomationPeer> for ::windows::core::IInspectable { fn from(value: &RichTextBlockOverflowAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for RichTextBlockOverflowAutomationPeer { 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 RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<RichTextBlockOverflowAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: RichTextBlockOverflowAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&RichTextBlockOverflowAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &RichTextBlockOverflowAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichTextBlockOverflowAutomationPeer> for AutomationPeer { fn from(value: RichTextBlockOverflowAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&RichTextBlockOverflowAutomationPeer> for AutomationPeer { fn from(value: &RichTextBlockOverflowAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<RichTextBlockOverflowAutomationPeer> for super::super::DependencyObject { fn from(value: RichTextBlockOverflowAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&RichTextBlockOverflowAutomationPeer> for super::super::DependencyObject { fn from(value: &RichTextBlockOverflowAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &RichTextBlockOverflowAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for RichTextBlockOverflowAutomationPeer {} unsafe impl ::core::marker::Sync for RichTextBlockOverflowAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ScrollBarAutomationPeer(pub ::windows::core::IInspectable); impl ScrollBarAutomationPeer { #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::ScrollBar>>(owner: Param0) -> ::windows::core::Result<ScrollBarAutomationPeer> { Self::IScrollBarAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ScrollBarAutomationPeer>(result__) }) } pub fn IScrollBarAutomationPeerFactory<R, F: FnOnce(&IScrollBarAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ScrollBarAutomationPeer, IScrollBarAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ScrollBarAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ScrollBarAutomationPeer;{69e0c369-bbe7-41f2-87ca-aad813fe550e})"); } unsafe impl ::windows::core::Interface for ScrollBarAutomationPeer { type Vtable = IScrollBarAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69e0c369_bbe7_41f2_87ca_aad813fe550e); } impl ::windows::core::RuntimeName for ScrollBarAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ScrollBarAutomationPeer"; } impl ::core::convert::From<ScrollBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: ScrollBarAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ScrollBarAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ScrollBarAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ScrollBarAutomationPeer { 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 ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ScrollBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: ScrollBarAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ScrollBarAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ScrollBarAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ScrollBarAutomationPeer { 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 ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ScrollBarAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: ScrollBarAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ScrollBarAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: &ScrollBarAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for &ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::core::convert::TryInto::<super::Provider::IRangeValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ScrollBarAutomationPeer> for RangeBaseAutomationPeer { fn from(value: ScrollBarAutomationPeer) -> Self { ::core::convert::Into::<RangeBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ScrollBarAutomationPeer> for RangeBaseAutomationPeer { fn from(value: &ScrollBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for &ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScrollBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ScrollBarAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ScrollBarAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ScrollBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScrollBarAutomationPeer> for AutomationPeer { fn from(value: ScrollBarAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ScrollBarAutomationPeer> for AutomationPeer { fn from(value: &ScrollBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScrollBarAutomationPeer> for super::super::DependencyObject { fn from(value: ScrollBarAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ScrollBarAutomationPeer> for super::super::DependencyObject { fn from(value: &ScrollBarAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ScrollBarAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ScrollBarAutomationPeer {} unsafe impl ::core::marker::Sync for ScrollBarAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ScrollViewerAutomationPeer(pub ::windows::core::IInspectable); impl ScrollViewerAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn HorizontalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticallyScrollable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalScrollPercent(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn VerticalViewSize(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Scroll(&self, horizontalamount: super::ScrollAmount, verticalamount: super::ScrollAmount) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), horizontalamount, verticalamount).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SetScrollPercent(&self, horizontalpercent: f64, verticalpercent: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IScrollProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), horizontalpercent, verticalpercent).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ScrollViewer>>(owner: Param0) -> ::windows::core::Result<ScrollViewerAutomationPeer> { Self::IScrollViewerAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ScrollViewerAutomationPeer>(result__) }) } pub fn IScrollViewerAutomationPeerFactory<R, F: FnOnce(&IScrollViewerAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ScrollViewerAutomationPeer, IScrollViewerAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ScrollViewerAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ScrollViewerAutomationPeer;{d985f259-1b09-4e88-88fd-421750dc6b45})"); } unsafe impl ::windows::core::Interface for ScrollViewerAutomationPeer { type Vtable = IScrollViewerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd985f259_1b09_4e88_88fd_421750dc6b45); } impl ::windows::core::RuntimeName for ScrollViewerAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ScrollViewerAutomationPeer"; } impl ::core::convert::From<ScrollViewerAutomationPeer> for ::windows::core::IUnknown { fn from(value: ScrollViewerAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ScrollViewerAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ScrollViewerAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ScrollViewerAutomationPeer { 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 ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ScrollViewerAutomationPeer> for ::windows::core::IInspectable { fn from(value: ScrollViewerAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ScrollViewerAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ScrollViewerAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ScrollViewerAutomationPeer { 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 ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ScrollViewerAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: ScrollViewerAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ScrollViewerAutomationPeer> for super::Provider::IScrollProvider { type Error = ::windows::core::Error; fn try_from(value: &ScrollViewerAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IScrollProvider> for &ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IScrollProvider> { ::core::convert::TryInto::<super::Provider::IScrollProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ScrollViewerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ScrollViewerAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ScrollViewerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ScrollViewerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScrollViewerAutomationPeer> for AutomationPeer { fn from(value: ScrollViewerAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ScrollViewerAutomationPeer> for AutomationPeer { fn from(value: &ScrollViewerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ScrollViewerAutomationPeer> for super::super::DependencyObject { fn from(value: ScrollViewerAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ScrollViewerAutomationPeer> for super::super::DependencyObject { fn from(value: &ScrollViewerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ScrollViewerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ScrollViewerAutomationPeer {} unsafe impl ::core::marker::Sync for ScrollViewerAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SearchBoxAutomationPeer(pub ::windows::core::IInspectable); impl SearchBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::SearchBox>>(owner: Param0) -> ::windows::core::Result<SearchBoxAutomationPeer> { Self::ISearchBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SearchBoxAutomationPeer>(result__) }) } pub fn ISearchBoxAutomationPeerFactory<R, F: FnOnce(&ISearchBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SearchBoxAutomationPeer, ISearchBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SearchBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SearchBoxAutomationPeer;{854011a4-18a6-4f30-939b-8871afa3f5e9})"); } unsafe impl ::windows::core::Interface for SearchBoxAutomationPeer { type Vtable = ISearchBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x854011a4_18a6_4f30_939b_8871afa3f5e9); } impl ::windows::core::RuntimeName for SearchBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SearchBoxAutomationPeer"; } impl ::core::convert::From<SearchBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: SearchBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SearchBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SearchBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SearchBoxAutomationPeer { 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 SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SearchBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: SearchBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SearchBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SearchBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SearchBoxAutomationPeer { 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 SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<SearchBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: SearchBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&SearchBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &SearchBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SearchBoxAutomationPeer> for AutomationPeer { fn from(value: SearchBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SearchBoxAutomationPeer> for AutomationPeer { fn from(value: &SearchBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SearchBoxAutomationPeer> for super::super::DependencyObject { fn from(value: SearchBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SearchBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &SearchBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SearchBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SearchBoxAutomationPeer {} unsafe impl ::core::marker::Sync for SearchBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SelectorAutomationPeer(pub ::windows::core::IInspectable); impl SelectorAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn CanSelectMultiple(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelectionRequired(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(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 = "UI_Xaml_Automation_Provider")] pub fn GetSelection(&self) -> ::windows::core::Result<::windows::core::Array<super::Provider::IRawElementProviderSimple>> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionProvider>(self)?; unsafe { let mut result__: ::windows::core::Array<super::Provider::IRawElementProviderSimple> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), ::windows::core::Array::<super::Provider::IRawElementProviderSimple>::set_abi_len(&mut result__), &mut result__ as *mut _ as _).and_then(|| result__) } } #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::Selector>>(owner: Param0) -> ::windows::core::Result<SelectorAutomationPeer> { Self::ISelectorAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SelectorAutomationPeer>(result__) }) } pub fn ISelectorAutomationPeerFactory<R, F: FnOnce(&ISelectorAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SelectorAutomationPeer, ISelectorAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SelectorAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SelectorAutomationPeer;{162ac829-7115-43ec-b383-a7b71644069d})"); } unsafe impl ::windows::core::Interface for SelectorAutomationPeer { type Vtable = ISelectorAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x162ac829_7115_43ec_b383_a7b71644069d); } impl ::windows::core::RuntimeName for SelectorAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SelectorAutomationPeer"; } impl ::core::convert::From<SelectorAutomationPeer> for ::windows::core::IUnknown { fn from(value: SelectorAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SelectorAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SelectorAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SelectorAutomationPeer { 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 SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SelectorAutomationPeer> for ::windows::core::IInspectable { fn from(value: SelectorAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SelectorAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SelectorAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SelectorAutomationPeer { 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 SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SelectorAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: SelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SelectorAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &SelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SelectorAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: SelectorAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SelectorAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &SelectorAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SelectorAutomationPeer> for ItemsControlAutomationPeer { fn from(value: SelectorAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&SelectorAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &SelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SelectorAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: SelectorAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&SelectorAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &SelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SelectorAutomationPeer> for AutomationPeer { fn from(value: SelectorAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SelectorAutomationPeer> for AutomationPeer { fn from(value: &SelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SelectorAutomationPeer> for super::super::DependencyObject { fn from(value: SelectorAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SelectorAutomationPeer> for super::super::DependencyObject { fn from(value: &SelectorAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SelectorAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SelectorAutomationPeer {} unsafe impl ::core::marker::Sync for SelectorAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SelectorItemAutomationPeer(pub ::windows::core::IInspectable); impl SelectorItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn IsSelected(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn SelectionContainer(&self) -> ::windows::core::Result<super::Provider::IRawElementProviderSimple> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(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::Provider::IRawElementProviderSimple>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn AddToSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn RemoveFromSelection(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Select(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::ISelectionItemProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this)).ok() } } pub fn CreateInstanceWithParentAndItem<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IInspectable>, Param1: ::windows::core::IntoParam<'a, SelectorAutomationPeer>>(item: Param0, parent: Param1) -> ::windows::core::Result<SelectorItemAutomationPeer> { Self::ISelectorItemAutomationPeerFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), item.into_param().abi(), parent.into_param().abi(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SelectorItemAutomationPeer>(result__) }) } pub fn ISelectorItemAutomationPeerFactory<R, F: FnOnce(&ISelectorItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SelectorItemAutomationPeer, ISelectorItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SelectorItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SelectorItemAutomationPeer;{ae8b3477-860a-45bb-bf7c-e1b27419d1dd})"); } unsafe impl ::windows::core::Interface for SelectorItemAutomationPeer { type Vtable = ISelectorItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xae8b3477_860a_45bb_bf7c_e1b27419d1dd); } impl ::windows::core::RuntimeName for SelectorItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SelectorItemAutomationPeer"; } impl ::core::convert::From<SelectorItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: SelectorItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SelectorItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SelectorItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SelectorItemAutomationPeer { 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 SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SelectorItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: SelectorItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SelectorItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SelectorItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SelectorItemAutomationPeer { 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 SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SelectorItemAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: SelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SelectorItemAutomationPeer> for super::Provider::ISelectionItemProvider { type Error = ::windows::core::Error; fn try_from(value: &SelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionItemProvider> for &SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionItemProvider> { ::core::convert::TryInto::<super::Provider::ISelectionItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SelectorItemAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: SelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SelectorItemAutomationPeer> for super::Provider::IVirtualizedItemProvider { type Error = ::windows::core::Error; fn try_from(value: &SelectorItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IVirtualizedItemProvider> for &SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IVirtualizedItemProvider> { ::core::convert::TryInto::<super::Provider::IVirtualizedItemProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SelectorItemAutomationPeer> for ItemAutomationPeer { fn from(value: SelectorItemAutomationPeer) -> Self { ::core::convert::Into::<ItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&SelectorItemAutomationPeer> for ItemAutomationPeer { fn from(value: &SelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemAutomationPeer> for &SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SelectorItemAutomationPeer> for AutomationPeer { fn from(value: SelectorItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SelectorItemAutomationPeer> for AutomationPeer { fn from(value: &SelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SelectorItemAutomationPeer> for super::super::DependencyObject { fn from(value: SelectorItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SelectorItemAutomationPeer> for super::super::DependencyObject { fn from(value: &SelectorItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SelectorItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SelectorItemAutomationPeer {} unsafe impl ::core::marker::Sync for SelectorItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SemanticZoomAutomationPeer(pub ::windows::core::IInspectable); impl SemanticZoomAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ToggleState(&self) -> ::windows::core::Result<super::ToggleState> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { let mut result__: super::ToggleState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ToggleState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Toggle(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::SemanticZoom>>(owner: Param0) -> ::windows::core::Result<SemanticZoomAutomationPeer> { Self::ISemanticZoomAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SemanticZoomAutomationPeer>(result__) }) } pub fn ISemanticZoomAutomationPeerFactory<R, F: FnOnce(&ISemanticZoomAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SemanticZoomAutomationPeer, ISemanticZoomAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SemanticZoomAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SemanticZoomAutomationPeer;{3c2fac6c-a977-47fc-b44e-2754c0b2bea9})"); } unsafe impl ::windows::core::Interface for SemanticZoomAutomationPeer { type Vtable = ISemanticZoomAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3c2fac6c_a977_47fc_b44e_2754c0b2bea9); } impl ::windows::core::RuntimeName for SemanticZoomAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SemanticZoomAutomationPeer"; } impl ::core::convert::From<SemanticZoomAutomationPeer> for ::windows::core::IUnknown { fn from(value: SemanticZoomAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SemanticZoomAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SemanticZoomAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SemanticZoomAutomationPeer { 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 SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SemanticZoomAutomationPeer> for ::windows::core::IInspectable { fn from(value: SemanticZoomAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SemanticZoomAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SemanticZoomAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SemanticZoomAutomationPeer { 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 SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SemanticZoomAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: SemanticZoomAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SemanticZoomAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &SemanticZoomAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SemanticZoomAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: SemanticZoomAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&SemanticZoomAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &SemanticZoomAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SemanticZoomAutomationPeer> for AutomationPeer { fn from(value: SemanticZoomAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SemanticZoomAutomationPeer> for AutomationPeer { fn from(value: &SemanticZoomAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SemanticZoomAutomationPeer> for super::super::DependencyObject { fn from(value: SemanticZoomAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SemanticZoomAutomationPeer> for super::super::DependencyObject { fn from(value: &SemanticZoomAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SemanticZoomAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SemanticZoomAutomationPeer {} unsafe impl ::core::marker::Sync for SemanticZoomAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SettingsFlyoutAutomationPeer(pub ::windows::core::IInspectable); impl SettingsFlyoutAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::SettingsFlyout>>(owner: Param0) -> ::windows::core::Result<SettingsFlyoutAutomationPeer> { Self::ISettingsFlyoutAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SettingsFlyoutAutomationPeer>(result__) }) } pub fn ISettingsFlyoutAutomationPeerFactory<R, F: FnOnce(&ISettingsFlyoutAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SettingsFlyoutAutomationPeer, ISettingsFlyoutAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SettingsFlyoutAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SettingsFlyoutAutomationPeer;{d0de0cdb-30cf-47a6-a5eb-9c77f0b0d6dd})"); } unsafe impl ::windows::core::Interface for SettingsFlyoutAutomationPeer { type Vtable = ISettingsFlyoutAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0de0cdb_30cf_47a6_a5eb_9c77f0b0d6dd); } impl ::windows::core::RuntimeName for SettingsFlyoutAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SettingsFlyoutAutomationPeer"; } impl ::core::convert::From<SettingsFlyoutAutomationPeer> for ::windows::core::IUnknown { fn from(value: SettingsFlyoutAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SettingsFlyoutAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SettingsFlyoutAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SettingsFlyoutAutomationPeer { 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 SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SettingsFlyoutAutomationPeer> for ::windows::core::IInspectable { fn from(value: SettingsFlyoutAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SettingsFlyoutAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SettingsFlyoutAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SettingsFlyoutAutomationPeer { 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 SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<SettingsFlyoutAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: SettingsFlyoutAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&SettingsFlyoutAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &SettingsFlyoutAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SettingsFlyoutAutomationPeer> for AutomationPeer { fn from(value: SettingsFlyoutAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SettingsFlyoutAutomationPeer> for AutomationPeer { fn from(value: &SettingsFlyoutAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SettingsFlyoutAutomationPeer> for super::super::DependencyObject { fn from(value: SettingsFlyoutAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SettingsFlyoutAutomationPeer> for super::super::DependencyObject { fn from(value: &SettingsFlyoutAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SettingsFlyoutAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SettingsFlyoutAutomationPeer {} unsafe impl ::core::marker::Sync for SettingsFlyoutAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SliderAutomationPeer(pub ::windows::core::IInspectable); impl SliderAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Slider>>(owner: Param0) -> ::windows::core::Result<SliderAutomationPeer> { Self::ISliderAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<SliderAutomationPeer>(result__) }) } pub fn ISliderAutomationPeerFactory<R, F: FnOnce(&ISliderAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SliderAutomationPeer, ISliderAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SliderAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.SliderAutomationPeer;{ec30015a-d611-46d0-ae4f-6ecf27dfbaa5})"); } unsafe impl ::windows::core::Interface for SliderAutomationPeer { type Vtable = ISliderAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xec30015a_d611_46d0_ae4f_6ecf27dfbaa5); } impl ::windows::core::RuntimeName for SliderAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.SliderAutomationPeer"; } impl ::core::convert::From<SliderAutomationPeer> for ::windows::core::IUnknown { fn from(value: SliderAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&SliderAutomationPeer> for ::windows::core::IUnknown { fn from(value: &SliderAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SliderAutomationPeer { 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 SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SliderAutomationPeer> for ::windows::core::IInspectable { fn from(value: SliderAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&SliderAutomationPeer> for ::windows::core::IInspectable { fn from(value: &SliderAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SliderAutomationPeer { 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 SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<SliderAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: SliderAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&SliderAutomationPeer> for super::Provider::IRangeValueProvider { type Error = ::windows::core::Error; fn try_from(value: &SliderAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IRangeValueProvider> for &SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IRangeValueProvider> { ::core::convert::TryInto::<super::Provider::IRangeValueProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<SliderAutomationPeer> for RangeBaseAutomationPeer { fn from(value: SliderAutomationPeer) -> Self { ::core::convert::Into::<RangeBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&SliderAutomationPeer> for RangeBaseAutomationPeer { fn from(value: &SliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, RangeBaseAutomationPeer> for &SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, RangeBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<RangeBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SliderAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: SliderAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&SliderAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &SliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SliderAutomationPeer> for AutomationPeer { fn from(value: SliderAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&SliderAutomationPeer> for AutomationPeer { fn from(value: &SliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<SliderAutomationPeer> for super::super::DependencyObject { fn from(value: SliderAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&SliderAutomationPeer> for super::super::DependencyObject { fn from(value: &SliderAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &SliderAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for SliderAutomationPeer {} unsafe impl ::core::marker::Sync for SliderAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TextBlockAutomationPeer(pub ::windows::core::IInspectable); impl TextBlockAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::TextBlock>>(owner: Param0) -> ::windows::core::Result<TextBlockAutomationPeer> { Self::ITextBlockAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<TextBlockAutomationPeer>(result__) }) } pub fn ITextBlockAutomationPeerFactory<R, F: FnOnce(&ITextBlockAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<TextBlockAutomationPeer, ITextBlockAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for TextBlockAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TextBlockAutomationPeer;{be2057f5-6715-4e69-a050-92bd0ce232a9})"); } unsafe impl ::windows::core::Interface for TextBlockAutomationPeer { type Vtable = ITextBlockAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe2057f5_6715_4e69_a050_92bd0ce232a9); } impl ::windows::core::RuntimeName for TextBlockAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TextBlockAutomationPeer"; } impl ::core::convert::From<TextBlockAutomationPeer> for ::windows::core::IUnknown { fn from(value: TextBlockAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TextBlockAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TextBlockAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TextBlockAutomationPeer { 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 TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TextBlockAutomationPeer> for ::windows::core::IInspectable { fn from(value: TextBlockAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TextBlockAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TextBlockAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TextBlockAutomationPeer { 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 TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<TextBlockAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TextBlockAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TextBlockAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TextBlockAutomationPeer> for AutomationPeer { fn from(value: TextBlockAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TextBlockAutomationPeer> for AutomationPeer { fn from(value: &TextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TextBlockAutomationPeer> for super::super::DependencyObject { fn from(value: TextBlockAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TextBlockAutomationPeer> for super::super::DependencyObject { fn from(value: &TextBlockAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TextBlockAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TextBlockAutomationPeer {} unsafe impl ::core::marker::Sync for TextBlockAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TextBoxAutomationPeer(pub ::windows::core::IInspectable); impl TextBoxAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::TextBox>>(owner: Param0) -> ::windows::core::Result<TextBoxAutomationPeer> { Self::ITextBoxAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<TextBoxAutomationPeer>(result__) }) } pub fn ITextBoxAutomationPeerFactory<R, F: FnOnce(&ITextBoxAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<TextBoxAutomationPeer, ITextBoxAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for TextBoxAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TextBoxAutomationPeer;{3a4f1ca0-5e5d-4d26-9067-e740bf657a9f})"); } unsafe impl ::windows::core::Interface for TextBoxAutomationPeer { type Vtable = ITextBoxAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a4f1ca0_5e5d_4d26_9067_e740bf657a9f); } impl ::windows::core::RuntimeName for TextBoxAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TextBoxAutomationPeer"; } impl ::core::convert::From<TextBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: TextBoxAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TextBoxAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TextBoxAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TextBoxAutomationPeer { 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 TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TextBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: TextBoxAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TextBoxAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TextBoxAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TextBoxAutomationPeer { 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 TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<TextBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TextBoxAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TextBoxAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TextBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TextBoxAutomationPeer> for AutomationPeer { fn from(value: TextBoxAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TextBoxAutomationPeer> for AutomationPeer { fn from(value: &TextBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TextBoxAutomationPeer> for super::super::DependencyObject { fn from(value: TextBoxAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TextBoxAutomationPeer> for super::super::DependencyObject { fn from(value: &TextBoxAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TextBoxAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TextBoxAutomationPeer {} unsafe impl ::core::marker::Sync for TextBoxAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ThumbAutomationPeer(pub ::windows::core::IInspectable); impl ThumbAutomationPeer { #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::Thumb>>(owner: Param0) -> ::windows::core::Result<ThumbAutomationPeer> { Self::IThumbAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ThumbAutomationPeer>(result__) }) } pub fn IThumbAutomationPeerFactory<R, F: FnOnce(&IThumbAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ThumbAutomationPeer, IThumbAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ThumbAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ThumbAutomationPeer;{dc2949b5-b45e-4d6d-892f-d9422c950efb})"); } unsafe impl ::windows::core::Interface for ThumbAutomationPeer { type Vtable = IThumbAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc2949b5_b45e_4d6d_892f_d9422c950efb); } impl ::windows::core::RuntimeName for ThumbAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ThumbAutomationPeer"; } impl ::core::convert::From<ThumbAutomationPeer> for ::windows::core::IUnknown { fn from(value: ThumbAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ThumbAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ThumbAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ThumbAutomationPeer { 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 ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ThumbAutomationPeer> for ::windows::core::IInspectable { fn from(value: ThumbAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ThumbAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ThumbAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ThumbAutomationPeer { 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 ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ThumbAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ThumbAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ThumbAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ThumbAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ThumbAutomationPeer> for AutomationPeer { fn from(value: ThumbAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ThumbAutomationPeer> for AutomationPeer { fn from(value: &ThumbAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ThumbAutomationPeer> for super::super::DependencyObject { fn from(value: ThumbAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ThumbAutomationPeer> for super::super::DependencyObject { fn from(value: &ThumbAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ThumbAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ThumbAutomationPeer {} unsafe impl ::core::marker::Sync for ThumbAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TimePickerAutomationPeer(pub ::windows::core::IInspectable); impl TimePickerAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::TimePicker>>(owner: Param0) -> ::windows::core::Result<TimePickerAutomationPeer> { Self::ITimePickerAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<TimePickerAutomationPeer>(result__) }) } pub fn ITimePickerAutomationPeerFactory<R, F: FnOnce(&ITimePickerAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<TimePickerAutomationPeer, ITimePickerAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for TimePickerAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TimePickerAutomationPeer;{a43d44ef-3285-4df7-b4a4-e4cdf36a3a17})"); } unsafe impl ::windows::core::Interface for TimePickerAutomationPeer { type Vtable = ITimePickerAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa43d44ef_3285_4df7_b4a4_e4cdf36a3a17); } impl ::windows::core::RuntimeName for TimePickerAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TimePickerAutomationPeer"; } impl ::core::convert::From<TimePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: TimePickerAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TimePickerAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TimePickerAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TimePickerAutomationPeer { 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 TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TimePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: TimePickerAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TimePickerAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TimePickerAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TimePickerAutomationPeer { 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 TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<TimePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TimePickerAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TimePickerAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TimePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TimePickerAutomationPeer> for AutomationPeer { fn from(value: TimePickerAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TimePickerAutomationPeer> for AutomationPeer { fn from(value: &TimePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TimePickerAutomationPeer> for super::super::DependencyObject { fn from(value: TimePickerAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TimePickerAutomationPeer> for super::super::DependencyObject { fn from(value: &TimePickerAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TimePickerAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TimePickerAutomationPeer {} unsafe impl ::core::marker::Sync for TimePickerAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TimePickerFlyoutPresenterAutomationPeer(pub ::windows::core::IInspectable); impl TimePickerFlyoutPresenterAutomationPeer {} unsafe impl ::windows::core::RuntimeType for TimePickerFlyoutPresenterAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TimePickerFlyoutPresenterAutomationPeer;{da93ee27-82f1-4701-8706-be297bf06043})"); } unsafe impl ::windows::core::Interface for TimePickerFlyoutPresenterAutomationPeer { type Vtable = ITimePickerFlyoutPresenterAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda93ee27_82f1_4701_8706_be297bf06043); } impl ::windows::core::RuntimeName for TimePickerFlyoutPresenterAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TimePickerFlyoutPresenterAutomationPeer"; } impl ::core::convert::From<TimePickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: TimePickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TimePickerFlyoutPresenterAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TimePickerFlyoutPresenterAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TimePickerFlyoutPresenterAutomationPeer { 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 TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TimePickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: TimePickerFlyoutPresenterAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TimePickerFlyoutPresenterAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TimePickerFlyoutPresenterAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TimePickerFlyoutPresenterAutomationPeer { 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 TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<TimePickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TimePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TimePickerFlyoutPresenterAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TimePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TimePickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: TimePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TimePickerFlyoutPresenterAutomationPeer> for AutomationPeer { fn from(value: &TimePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TimePickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: TimePickerFlyoutPresenterAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TimePickerFlyoutPresenterAutomationPeer> for super::super::DependencyObject { fn from(value: &TimePickerFlyoutPresenterAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TimePickerFlyoutPresenterAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TimePickerFlyoutPresenterAutomationPeer {} unsafe impl ::core::marker::Sync for TimePickerFlyoutPresenterAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ToggleButtonAutomationPeer(pub ::windows::core::IInspectable); impl ToggleButtonAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ToggleState(&self) -> ::windows::core::Result<super::ToggleState> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { let mut result__: super::ToggleState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ToggleState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Toggle(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls_Primitives")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::Primitives::ToggleButton>>(owner: Param0) -> ::windows::core::Result<ToggleButtonAutomationPeer> { Self::IToggleButtonAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ToggleButtonAutomationPeer>(result__) }) } pub fn IToggleButtonAutomationPeerFactory<R, F: FnOnce(&IToggleButtonAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ToggleButtonAutomationPeer, IToggleButtonAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ToggleButtonAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ToggleButtonAutomationPeer;{62dbe6c5-bc0a-45bb-bf77-ea0f1502891f})"); } unsafe impl ::windows::core::Interface for ToggleButtonAutomationPeer { type Vtable = IToggleButtonAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x62dbe6c5_bc0a_45bb_bf77_ea0f1502891f); } impl ::windows::core::RuntimeName for ToggleButtonAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ToggleButtonAutomationPeer"; } impl ::core::convert::From<ToggleButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: ToggleButtonAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ToggleButtonAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ToggleButtonAutomationPeer { 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 ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ToggleButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: ToggleButtonAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ToggleButtonAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ToggleButtonAutomationPeer { 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 ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ToggleButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: ToggleButtonAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ToggleButtonAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &ToggleButtonAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ToggleButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: ToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<ButtonBaseAutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for ButtonBaseAutomationPeer { fn from(value: &ToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ButtonBaseAutomationPeer> for &ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ButtonBaseAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ButtonBaseAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleButtonAutomationPeer> for AutomationPeer { fn from(value: ToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for AutomationPeer { fn from(value: &ToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleButtonAutomationPeer> for super::super::DependencyObject { fn from(value: ToggleButtonAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ToggleButtonAutomationPeer> for super::super::DependencyObject { fn from(value: &ToggleButtonAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ToggleButtonAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ToggleButtonAutomationPeer {} unsafe impl ::core::marker::Sync for ToggleButtonAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ToggleMenuFlyoutItemAutomationPeer(pub ::windows::core::IInspectable); impl ToggleMenuFlyoutItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ToggleState(&self) -> ::windows::core::Result<super::ToggleState> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { let mut result__: super::ToggleState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ToggleState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Toggle(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ToggleMenuFlyoutItem>>(owner: Param0) -> ::windows::core::Result<ToggleMenuFlyoutItemAutomationPeer> { Self::IToggleMenuFlyoutItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ToggleMenuFlyoutItemAutomationPeer>(result__) }) } pub fn IToggleMenuFlyoutItemAutomationPeerFactory<R, F: FnOnce(&IToggleMenuFlyoutItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ToggleMenuFlyoutItemAutomationPeer, IToggleMenuFlyoutItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ToggleMenuFlyoutItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ToggleMenuFlyoutItemAutomationPeer;{6b57eafe-6af1-4903-8373-3437bf352345})"); } unsafe impl ::windows::core::Interface for ToggleMenuFlyoutItemAutomationPeer { type Vtable = IToggleMenuFlyoutItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6b57eafe_6af1_4903_8373_3437bf352345); } impl ::windows::core::RuntimeName for ToggleMenuFlyoutItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ToggleMenuFlyoutItemAutomationPeer"; } impl ::core::convert::From<ToggleMenuFlyoutItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: ToggleMenuFlyoutItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ToggleMenuFlyoutItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ToggleMenuFlyoutItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ToggleMenuFlyoutItemAutomationPeer { 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 ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ToggleMenuFlyoutItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: ToggleMenuFlyoutItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ToggleMenuFlyoutItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ToggleMenuFlyoutItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ToggleMenuFlyoutItemAutomationPeer { 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 ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ToggleMenuFlyoutItemAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: ToggleMenuFlyoutItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ToggleMenuFlyoutItemAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &ToggleMenuFlyoutItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ToggleMenuFlyoutItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ToggleMenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleMenuFlyoutItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ToggleMenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleMenuFlyoutItemAutomationPeer> for AutomationPeer { fn from(value: ToggleMenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleMenuFlyoutItemAutomationPeer> for AutomationPeer { fn from(value: &ToggleMenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleMenuFlyoutItemAutomationPeer> for super::super::DependencyObject { fn from(value: ToggleMenuFlyoutItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ToggleMenuFlyoutItemAutomationPeer> for super::super::DependencyObject { fn from(value: &ToggleMenuFlyoutItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ToggleMenuFlyoutItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ToggleMenuFlyoutItemAutomationPeer {} unsafe impl ::core::marker::Sync for ToggleMenuFlyoutItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ToggleSwitchAutomationPeer(pub ::windows::core::IInspectable); impl ToggleSwitchAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ToggleState(&self) -> ::windows::core::Result<super::ToggleState> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { let mut result__: super::ToggleState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ToggleState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Toggle(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IToggleProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::ToggleSwitch>>(owner: Param0) -> ::windows::core::Result<ToggleSwitchAutomationPeer> { Self::IToggleSwitchAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<ToggleSwitchAutomationPeer>(result__) }) } pub fn IToggleSwitchAutomationPeerFactory<R, F: FnOnce(&IToggleSwitchAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ToggleSwitchAutomationPeer, IToggleSwitchAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ToggleSwitchAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.ToggleSwitchAutomationPeer;{c011f174-e89e-4790-bf9a-78ebb5f59e9f})"); } unsafe impl ::windows::core::Interface for ToggleSwitchAutomationPeer { type Vtable = IToggleSwitchAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc011f174_e89e_4790_bf9a_78ebb5f59e9f); } impl ::windows::core::RuntimeName for ToggleSwitchAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.ToggleSwitchAutomationPeer"; } impl ::core::convert::From<ToggleSwitchAutomationPeer> for ::windows::core::IUnknown { fn from(value: ToggleSwitchAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&ToggleSwitchAutomationPeer> for ::windows::core::IUnknown { fn from(value: &ToggleSwitchAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ToggleSwitchAutomationPeer { 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 ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ToggleSwitchAutomationPeer> for ::windows::core::IInspectable { fn from(value: ToggleSwitchAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&ToggleSwitchAutomationPeer> for ::windows::core::IInspectable { fn from(value: &ToggleSwitchAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ToggleSwitchAutomationPeer { 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 ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<ToggleSwitchAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: ToggleSwitchAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&ToggleSwitchAutomationPeer> for super::Provider::IToggleProvider { type Error = ::windows::core::Error; fn try_from(value: &ToggleSwitchAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IToggleProvider> for &ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IToggleProvider> { ::core::convert::TryInto::<super::Provider::IToggleProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<ToggleSwitchAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: ToggleSwitchAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleSwitchAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &ToggleSwitchAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleSwitchAutomationPeer> for AutomationPeer { fn from(value: ToggleSwitchAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&ToggleSwitchAutomationPeer> for AutomationPeer { fn from(value: &ToggleSwitchAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<ToggleSwitchAutomationPeer> for super::super::DependencyObject { fn from(value: ToggleSwitchAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&ToggleSwitchAutomationPeer> for super::super::DependencyObject { fn from(value: &ToggleSwitchAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &ToggleSwitchAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for ToggleSwitchAutomationPeer {} unsafe impl ::core::marker::Sync for ToggleSwitchAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TreeViewItemAutomationPeer(pub ::windows::core::IInspectable); impl TreeViewItemAutomationPeer { #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn ExpandCollapseState(&self) -> ::windows::core::Result<super::ExpandCollapseState> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { let mut result__: super::ExpandCollapseState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::ExpandCollapseState>(result__) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Collapse(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Automation_Provider")] pub fn Expand(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Provider::IExpandCollapseProvider>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::TreeViewItem>>(owner: Param0) -> ::windows::core::Result<TreeViewItemAutomationPeer> { Self::ITreeViewItemAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<TreeViewItemAutomationPeer>(result__) }) } pub fn ITreeViewItemAutomationPeerFactory<R, F: FnOnce(&ITreeViewItemAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<TreeViewItemAutomationPeer, ITreeViewItemAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for TreeViewItemAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TreeViewItemAutomationPeer;{2331d648-b617-437f-920c-71d450503e65})"); } unsafe impl ::windows::core::Interface for TreeViewItemAutomationPeer { type Vtable = ITreeViewItemAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2331d648_b617_437f_920c_71d450503e65); } impl ::windows::core::RuntimeName for TreeViewItemAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TreeViewItemAutomationPeer"; } impl ::core::convert::From<TreeViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: TreeViewItemAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TreeViewItemAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TreeViewItemAutomationPeer { 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 TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TreeViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: TreeViewItemAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TreeViewItemAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TreeViewItemAutomationPeer { 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 TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<TreeViewItemAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: TreeViewItemAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&TreeViewItemAutomationPeer> for super::Provider::IExpandCollapseProvider { type Error = ::windows::core::Error; fn try_from(value: &TreeViewItemAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IExpandCollapseProvider> for &TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IExpandCollapseProvider> { ::core::convert::TryInto::<super::Provider::IExpandCollapseProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<TreeViewItemAutomationPeer> for ListViewItemAutomationPeer { fn from(value: TreeViewItemAutomationPeer) -> Self { ::core::convert::Into::<ListViewItemAutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for ListViewItemAutomationPeer { fn from(value: &TreeViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ListViewItemAutomationPeer> for TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewItemAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ListViewItemAutomationPeer> for &TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ListViewItemAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ListViewItemAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TreeViewItemAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TreeViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewItemAutomationPeer> for AutomationPeer { fn from(value: TreeViewItemAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for AutomationPeer { fn from(value: &TreeViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: TreeViewItemAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TreeViewItemAutomationPeer> for super::super::DependencyObject { fn from(value: &TreeViewItemAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TreeViewItemAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TreeViewItemAutomationPeer {} unsafe impl ::core::marker::Sync for TreeViewItemAutomationPeer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct TreeViewListAutomationPeer(pub ::windows::core::IInspectable); impl TreeViewListAutomationPeer { #[cfg(feature = "UI_Xaml_Controls")] pub fn CreateInstanceWithOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Controls::TreeViewList>>(owner: Param0) -> ::windows::core::Result<TreeViewListAutomationPeer> { Self::ITreeViewListAutomationPeerFactory(|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(), ::core::ptr::null_mut(), &mut ::core::option::Option::<::windows::core::IInspectable>::None as *mut _ as _, &mut result__).from_abi::<TreeViewListAutomationPeer>(result__) }) } pub fn ITreeViewListAutomationPeerFactory<R, F: FnOnce(&ITreeViewListAutomationPeerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<TreeViewListAutomationPeer, ITreeViewListAutomationPeerFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for TreeViewListAutomationPeer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.UI.Xaml.Automation.Peers.TreeViewListAutomationPeer;{71c1b5bc-bb29-4479-a8a8-606be6b823ae})"); } unsafe impl ::windows::core::Interface for TreeViewListAutomationPeer { type Vtable = ITreeViewListAutomationPeer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x71c1b5bc_bb29_4479_a8a8_606be6b823ae); } impl ::windows::core::RuntimeName for TreeViewListAutomationPeer { const NAME: &'static str = "Windows.UI.Xaml.Automation.Peers.TreeViewListAutomationPeer"; } impl ::core::convert::From<TreeViewListAutomationPeer> for ::windows::core::IUnknown { fn from(value: TreeViewListAutomationPeer) -> Self { value.0 .0 } } impl ::core::convert::From<&TreeViewListAutomationPeer> for ::windows::core::IUnknown { fn from(value: &TreeViewListAutomationPeer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TreeViewListAutomationPeer { 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 TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<TreeViewListAutomationPeer> for ::windows::core::IInspectable { fn from(value: TreeViewListAutomationPeer) -> Self { value.0 } } impl ::core::convert::From<&TreeViewListAutomationPeer> for ::windows::core::IInspectable { fn from(value: &TreeViewListAutomationPeer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TreeViewListAutomationPeer { 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 TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<TreeViewListAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: TreeViewListAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&TreeViewListAutomationPeer> for super::Provider::IItemContainerProvider { type Error = ::windows::core::Error; fn try_from(value: &TreeViewListAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::IItemContainerProvider> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::IItemContainerProvider> { ::core::convert::TryInto::<super::Provider::IItemContainerProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<TreeViewListAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: TreeViewListAutomationPeer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl ::core::convert::TryFrom<&TreeViewListAutomationPeer> for super::Provider::ISelectionProvider { type Error = ::windows::core::Error; fn try_from(value: &TreeViewListAutomationPeer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "UI_Xaml_Automation_Provider")] impl<'a> ::windows::core::IntoParam<'a, super::Provider::ISelectionProvider> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::Provider::ISelectionProvider> { ::core::convert::TryInto::<super::Provider::ISelectionProvider>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::From<TreeViewListAutomationPeer> for SelectorAutomationPeer { fn from(value: TreeViewListAutomationPeer) -> Self { ::core::convert::Into::<SelectorAutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewListAutomationPeer> for SelectorAutomationPeer { fn from(value: &TreeViewListAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, SelectorAutomationPeer> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, SelectorAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<SelectorAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewListAutomationPeer> for ItemsControlAutomationPeer { fn from(value: TreeViewListAutomationPeer) -> Self { ::core::convert::Into::<ItemsControlAutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewListAutomationPeer> for ItemsControlAutomationPeer { fn from(value: &TreeViewListAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, ItemsControlAutomationPeer> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, ItemsControlAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<ItemsControlAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewListAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: TreeViewListAutomationPeer) -> Self { ::core::convert::Into::<FrameworkElementAutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewListAutomationPeer> for FrameworkElementAutomationPeer { fn from(value: &TreeViewListAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, FrameworkElementAutomationPeer> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, FrameworkElementAutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<FrameworkElementAutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewListAutomationPeer> for AutomationPeer { fn from(value: TreeViewListAutomationPeer) -> Self { ::core::convert::Into::<AutomationPeer>::into(&value) } } impl ::core::convert::From<&TreeViewListAutomationPeer> for AutomationPeer { fn from(value: &TreeViewListAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, AutomationPeer> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, AutomationPeer> { ::windows::core::Param::Owned(::core::convert::Into::<AutomationPeer>::into(::core::clone::Clone::clone(self))) } } impl ::core::convert::From<TreeViewListAutomationPeer> for super::super::DependencyObject { fn from(value: TreeViewListAutomationPeer) -> Self { ::core::convert::Into::<super::super::DependencyObject>::into(&value) } } impl ::core::convert::From<&TreeViewListAutomationPeer> for super::super::DependencyObject { fn from(value: &TreeViewListAutomationPeer) -> Self { ::windows::core::Interface::cast(value).unwrap() } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(self)) } } impl<'a> ::windows::core::IntoParam<'a, super::super::DependencyObject> for &TreeViewListAutomationPeer { fn into_param(self) -> ::windows::core::Param<'a, super::super::DependencyObject> { ::windows::core::Param::Owned(::core::convert::Into::<super::super::DependencyObject>::into(::core::clone::Clone::clone(self))) } } unsafe impl ::core::marker::Send for TreeViewListAutomationPeer {} unsafe impl ::core::marker::Sync for TreeViewListAutomationPeer {}
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(feature = "Devices_PointOfService_Provider")] pub mod Provider; #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScanner(pub ::windows::core::IInspectable); impl BarcodeScanner { pub fn DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<BarcodeScannerCapabilities> { 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::<BarcodeScannerCapabilities>(result__) } } #[cfg(feature = "Foundation")] pub fn ClaimScannerAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedBarcodeScanner>> { 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::IAsyncOperation<ClaimedBarcodeScanner>>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::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), level, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn GetSupportedSymbologiesAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<u32>>> { 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::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<u32>>>(result__) } } #[cfg(feature = "Foundation")] pub fn IsSymbologySupportedAsync(&self, barcodesymbology: u32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), barcodesymbology, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams"))] pub fn RetrieveStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn GetSupportedProfiles(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>> { 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::<super::super::Foundation::Collections::IVectorView<::windows::core::HSTRING>>(result__) } } pub fn IsProfileSupported<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, profile: Param0) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), profile.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn StatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<BarcodeScanner, BarcodeScannerStatusUpdatedEventArgs>>>(&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).15)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStatusUpdated<'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).16)(::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() } } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<BarcodeScanner>> { Self::IBarcodeScannerStatics(|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::<super::super::Foundation::IAsyncOperation<BarcodeScanner>>(result__) }) } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<BarcodeScanner>> { Self::IBarcodeScannerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<BarcodeScanner>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IBarcodeScannerStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn VideoDeviceId(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IBarcodeScanner2>(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 GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IBarcodeScannerStatics2(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn IBarcodeScannerStatics<R, F: FnOnce(&IBarcodeScannerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<BarcodeScanner, IBarcodeScannerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IBarcodeScannerStatics2<R, F: FnOnce(&IBarcodeScannerStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<BarcodeScanner, IBarcodeScannerStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScanner { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScanner;{bea33e06-b264-4f03-a9c1-45b20f01134f})"); } unsafe impl ::windows::core::Interface for BarcodeScanner { type Vtable = IBarcodeScanner_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbea33e06_b264_4f03_a9c1_45b20f01134f); } impl ::windows::core::RuntimeName for BarcodeScanner { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScanner"; } impl ::core::convert::From<BarcodeScanner> for ::windows::core::IUnknown { fn from(value: BarcodeScanner) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScanner> for ::windows::core::IUnknown { fn from(value: &BarcodeScanner) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScanner { 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 BarcodeScanner { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScanner> for ::windows::core::IInspectable { fn from(value: BarcodeScanner) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScanner> for ::windows::core::IInspectable { fn from(value: &BarcodeScanner) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScanner { 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 BarcodeScanner { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<BarcodeScanner> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: BarcodeScanner) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&BarcodeScanner> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &BarcodeScanner) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for BarcodeScanner { 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 &BarcodeScanner { 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 BarcodeScanner {} unsafe impl ::core::marker::Sync for BarcodeScanner {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerCapabilities(pub ::windows::core::IInspectable); impl BarcodeScannerCapabilities { pub fn PowerReportingType(&self) -> ::windows::core::Result<UnifiedPosPowerReportingType> { let this = self; unsafe { let mut result__: UnifiedPosPowerReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosPowerReportingType>(result__) } } pub fn IsStatisticsReportingSupported(&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 IsStatisticsUpdatingSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsImagePreviewSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsSoftwareTriggerSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IBarcodeScannerCapabilities1>(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 IsVideoPreviewSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IBarcodeScannerCapabilities2>(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__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerCapabilities;{c60691e4-f2c8-4420-a307-b12ef6622857})"); } unsafe impl ::windows::core::Interface for BarcodeScannerCapabilities { type Vtable = IBarcodeScannerCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc60691e4_f2c8_4420_a307_b12ef6622857); } impl ::windows::core::RuntimeName for BarcodeScannerCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerCapabilities"; } impl ::core::convert::From<BarcodeScannerCapabilities> for ::windows::core::IUnknown { fn from(value: BarcodeScannerCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerCapabilities> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerCapabilities { 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 BarcodeScannerCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerCapabilities> for ::windows::core::IInspectable { fn from(value: BarcodeScannerCapabilities) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerCapabilities> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerCapabilities { 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 BarcodeScannerCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerCapabilities {} unsafe impl ::core::marker::Sync for BarcodeScannerCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerDataReceivedEventArgs(pub ::windows::core::IInspectable); impl BarcodeScannerDataReceivedEventArgs { pub fn Report(&self) -> ::windows::core::Result<BarcodeScannerReport> { 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::<BarcodeScannerReport>(result__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerDataReceivedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerDataReceivedEventArgs;{4234a7e2-ed97-467d-ad2b-01e44313a929})"); } unsafe impl ::windows::core::Interface for BarcodeScannerDataReceivedEventArgs { type Vtable = IBarcodeScannerDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4234a7e2_ed97_467d_ad2b_01e44313a929); } impl ::windows::core::RuntimeName for BarcodeScannerDataReceivedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerDataReceivedEventArgs"; } impl ::core::convert::From<BarcodeScannerDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: BarcodeScannerDataReceivedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerDataReceivedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerDataReceivedEventArgs { 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 BarcodeScannerDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: BarcodeScannerDataReceivedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerDataReceivedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerDataReceivedEventArgs { 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 BarcodeScannerDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerDataReceivedEventArgs {} unsafe impl ::core::marker::Sync for BarcodeScannerDataReceivedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerErrorOccurredEventArgs(pub ::windows::core::IInspectable); impl BarcodeScannerErrorOccurredEventArgs { pub fn PartialInputData(&self) -> ::windows::core::Result<BarcodeScannerReport> { 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::<BarcodeScannerReport>(result__) } } pub fn IsRetriable(&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 ErrorData(&self) -> ::windows::core::Result<UnifiedPosErrorData> { 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::<UnifiedPosErrorData>(result__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerErrorOccurredEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerErrorOccurredEventArgs;{2cd2602f-cf3a-4002-a75a-c5ec468f0a20})"); } unsafe impl ::windows::core::Interface for BarcodeScannerErrorOccurredEventArgs { type Vtable = IBarcodeScannerErrorOccurredEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2cd2602f_cf3a_4002_a75a_c5ec468f0a20); } impl ::windows::core::RuntimeName for BarcodeScannerErrorOccurredEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerErrorOccurredEventArgs"; } impl ::core::convert::From<BarcodeScannerErrorOccurredEventArgs> for ::windows::core::IUnknown { fn from(value: BarcodeScannerErrorOccurredEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerErrorOccurredEventArgs> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerErrorOccurredEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerErrorOccurredEventArgs { 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 BarcodeScannerErrorOccurredEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerErrorOccurredEventArgs> for ::windows::core::IInspectable { fn from(value: BarcodeScannerErrorOccurredEventArgs) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerErrorOccurredEventArgs> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerErrorOccurredEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerErrorOccurredEventArgs { 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 BarcodeScannerErrorOccurredEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerErrorOccurredEventArgs {} unsafe impl ::core::marker::Sync for BarcodeScannerErrorOccurredEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerImagePreviewReceivedEventArgs(pub ::windows::core::IInspectable); impl BarcodeScannerImagePreviewReceivedEventArgs { #[cfg(feature = "Storage_Streams")] pub fn Preview(&self) -> ::windows::core::Result<super::super::Storage::Streams::IRandomAccessStreamWithContentType> { 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::Storage::Streams::IRandomAccessStreamWithContentType>(result__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerImagePreviewReceivedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerImagePreviewReceivedEventArgs;{f3b7de85-6e8b-434e-9f58-06ef26bc4baf})"); } unsafe impl ::windows::core::Interface for BarcodeScannerImagePreviewReceivedEventArgs { type Vtable = IBarcodeScannerImagePreviewReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3b7de85_6e8b_434e_9f58_06ef26bc4baf); } impl ::windows::core::RuntimeName for BarcodeScannerImagePreviewReceivedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerImagePreviewReceivedEventArgs"; } impl ::core::convert::From<BarcodeScannerImagePreviewReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: BarcodeScannerImagePreviewReceivedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerImagePreviewReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerImagePreviewReceivedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerImagePreviewReceivedEventArgs { 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 BarcodeScannerImagePreviewReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerImagePreviewReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: BarcodeScannerImagePreviewReceivedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerImagePreviewReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerImagePreviewReceivedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerImagePreviewReceivedEventArgs { 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 BarcodeScannerImagePreviewReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerImagePreviewReceivedEventArgs {} unsafe impl ::core::marker::Sync for BarcodeScannerImagePreviewReceivedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerReport(pub ::windows::core::IInspectable); impl BarcodeScannerReport { pub fn ScanDataType(&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 = "Storage_Streams")] pub fn ScanData(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::super::Storage::Streams::IBuffer>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn ScanDataLabel(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::Storage::Streams::IBuffer>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn CreateInstance<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>, Param2: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(scandatatype: u32, scandata: Param1, scandatalabel: Param2) -> ::windows::core::Result<BarcodeScannerReport> { Self::IBarcodeScannerReportFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), scandatatype, scandata.into_param().abi(), scandatalabel.into_param().abi(), &mut result__).from_abi::<BarcodeScannerReport>(result__) }) } pub fn IBarcodeScannerReportFactory<R, F: FnOnce(&IBarcodeScannerReportFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<BarcodeScannerReport, IBarcodeScannerReportFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerReport { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerReport;{5ce4d8b0-a489-4b96-86c4-f0bf8a37753d})"); } unsafe impl ::windows::core::Interface for BarcodeScannerReport { type Vtable = IBarcodeScannerReport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ce4d8b0_a489_4b96_86c4_f0bf8a37753d); } impl ::windows::core::RuntimeName for BarcodeScannerReport { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerReport"; } impl ::core::convert::From<BarcodeScannerReport> for ::windows::core::IUnknown { fn from(value: BarcodeScannerReport) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerReport> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerReport) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerReport { 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 BarcodeScannerReport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerReport> for ::windows::core::IInspectable { fn from(value: BarcodeScannerReport) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerReport> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerReport) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerReport { 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 BarcodeScannerReport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerReport {} unsafe impl ::core::marker::Sync for BarcodeScannerReport {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BarcodeScannerStatus(pub i32); impl BarcodeScannerStatus { pub const Online: BarcodeScannerStatus = BarcodeScannerStatus(0i32); pub const Off: BarcodeScannerStatus = BarcodeScannerStatus(1i32); pub const Offline: BarcodeScannerStatus = BarcodeScannerStatus(2i32); pub const OffOrOffline: BarcodeScannerStatus = BarcodeScannerStatus(3i32); pub const Extended: BarcodeScannerStatus = BarcodeScannerStatus(4i32); } impl ::core::convert::From<i32> for BarcodeScannerStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BarcodeScannerStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for BarcodeScannerStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.BarcodeScannerStatus;i4)"); } impl ::windows::core::DefaultType for BarcodeScannerStatus { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeScannerStatusUpdatedEventArgs(pub ::windows::core::IInspectable); impl BarcodeScannerStatusUpdatedEventArgs { pub fn Status(&self) -> ::windows::core::Result<BarcodeScannerStatus> { let this = self; unsafe { let mut result__: BarcodeScannerStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BarcodeScannerStatus>(result__) } } pub fn ExtendedStatus(&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__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeScannerStatusUpdatedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeScannerStatusUpdatedEventArgs;{355d8586-9c43-462b-a91a-816dc97f452c})"); } unsafe impl ::windows::core::Interface for BarcodeScannerStatusUpdatedEventArgs { type Vtable = IBarcodeScannerStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x355d8586_9c43_462b_a91a_816dc97f452c); } impl ::windows::core::RuntimeName for BarcodeScannerStatusUpdatedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeScannerStatusUpdatedEventArgs"; } impl ::core::convert::From<BarcodeScannerStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: BarcodeScannerStatusUpdatedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeScannerStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: &BarcodeScannerStatusUpdatedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeScannerStatusUpdatedEventArgs { 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 BarcodeScannerStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeScannerStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: BarcodeScannerStatusUpdatedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&BarcodeScannerStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: &BarcodeScannerStatusUpdatedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeScannerStatusUpdatedEventArgs { 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 BarcodeScannerStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeScannerStatusUpdatedEventArgs {} unsafe impl ::core::marker::Sync for BarcodeScannerStatusUpdatedEventArgs {} pub struct BarcodeSymbologies {} impl BarcodeSymbologies { pub fn Unknown() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| 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__) }) } pub fn Ean8() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| 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__) }) } pub fn Ean8Add2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean8Add5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Eanv() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn EanvAdd2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn EanvAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean13() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean13Add2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean13Add5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Isbn() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IsbnAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ismn() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IsmnAdd2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IsmnAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Issn() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IssnAdd2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IssnAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean99() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean99Add2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ean99Add5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Upca() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UpcaAdd2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UpcaAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Upce() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UpceAdd2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UpceAdd5() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UpcCoupon() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfStd() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfDis() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfInt() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfInd() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfMat() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn TfIata() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).39)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Gs1DatabarType1() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).40)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Gs1DatabarType2() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).41)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Gs1DatabarType3() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).42)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code39() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).43)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code39Ex() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).44)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Trioptic39() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).45)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code32() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).46)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Pzn() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).47)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code93() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).48)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code93Ex() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).49)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code128() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).50)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Gs1128() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).51)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Gs1128Coupon() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).52)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UccEan128() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).53)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Sisac() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).54)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Isbt() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).55)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Codabar() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).56)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code11() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).57)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Msi() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).58)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Plessey() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).59)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Telepen() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).60)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code16k() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).61)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn CodablockA() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).62)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn CodablockF() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).63)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Codablock128() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).64)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Code49() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).65)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Aztec() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).66)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn DataCode() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).67)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn DataMatrix() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).68)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn HanXin() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).69)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Maxicode() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).70)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn MicroPdf417() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).71)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn MicroQr() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).72)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Pdf417() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).73)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Qr() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).74)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn MsTag() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).75)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ccab() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).76)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Ccc() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).77)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Tlc39() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).78)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn AusPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).79)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn CanPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).80)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn ChinaPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).81)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn DutchKix() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).82)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn InfoMail() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).83)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn ItalianPost25() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).84)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn ItalianPost39() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).85)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn JapanPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).86)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn KoreanPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).87)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn SwedenPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).88)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UkPost() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).89)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UsIntelligent() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).90)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UsIntelligentPkg() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).91)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UsPlanet() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).92)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn UsPostNet() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).93)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Us4StateFics() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).94)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn OcrA() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).95)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn OcrB() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).96)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn Micr() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).97)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn ExtendedBase() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).98)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn GetName(scandatatype: u32) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IBarcodeSymbologiesStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).99)(::core::mem::transmute_copy(this), scandatatype, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn Gs1DWCode() -> ::windows::core::Result<u32> { Self::IBarcodeSymbologiesStatics2(|this| 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__) }) } pub fn IBarcodeSymbologiesStatics<R, F: FnOnce(&IBarcodeSymbologiesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<BarcodeSymbologies, IBarcodeSymbologiesStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IBarcodeSymbologiesStatics2<R, F: FnOnce(&IBarcodeSymbologiesStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<BarcodeSymbologies, IBarcodeSymbologiesStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for BarcodeSymbologies { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeSymbologies"; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct BarcodeSymbologyAttributes(pub ::windows::core::IInspectable); impl BarcodeSymbologyAttributes { pub fn IsCheckDigitValidationEnabled(&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 SetIsCheckDigitValidationEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsCheckDigitValidationSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsCheckDigitTransmissionEnabled(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsCheckDigitTransmissionEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsCheckDigitTransmissionSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn DecodeLength1(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetDecodeLength1(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn DecodeLength2(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetDecodeLength2(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn DecodeLengthKind(&self) -> ::windows::core::Result<BarcodeSymbologyDecodeLengthKind> { let this = self; unsafe { let mut result__: BarcodeSymbologyDecodeLengthKind = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<BarcodeSymbologyDecodeLengthKind>(result__) } } pub fn SetDecodeLengthKind(&self, value: BarcodeSymbologyDecodeLengthKind) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDecodeLengthSupported(&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__) } } } unsafe impl ::windows::core::RuntimeType for BarcodeSymbologyAttributes { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.BarcodeSymbologyAttributes;{66413a78-ab7a-4ada-8ece-936014b2ead7})"); } unsafe impl ::windows::core::Interface for BarcodeSymbologyAttributes { type Vtable = IBarcodeSymbologyAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66413a78_ab7a_4ada_8ece_936014b2ead7); } impl ::windows::core::RuntimeName for BarcodeSymbologyAttributes { const NAME: &'static str = "Windows.Devices.PointOfService.BarcodeSymbologyAttributes"; } impl ::core::convert::From<BarcodeSymbologyAttributes> for ::windows::core::IUnknown { fn from(value: BarcodeSymbologyAttributes) -> Self { value.0 .0 } } impl ::core::convert::From<&BarcodeSymbologyAttributes> for ::windows::core::IUnknown { fn from(value: &BarcodeSymbologyAttributes) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for BarcodeSymbologyAttributes { 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 BarcodeSymbologyAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<BarcodeSymbologyAttributes> for ::windows::core::IInspectable { fn from(value: BarcodeSymbologyAttributes) -> Self { value.0 } } impl ::core::convert::From<&BarcodeSymbologyAttributes> for ::windows::core::IInspectable { fn from(value: &BarcodeSymbologyAttributes) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for BarcodeSymbologyAttributes { 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 BarcodeSymbologyAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for BarcodeSymbologyAttributes {} unsafe impl ::core::marker::Sync for BarcodeSymbologyAttributes {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BarcodeSymbologyDecodeLengthKind(pub i32); impl BarcodeSymbologyDecodeLengthKind { pub const AnyLength: BarcodeSymbologyDecodeLengthKind = BarcodeSymbologyDecodeLengthKind(0i32); pub const Discrete: BarcodeSymbologyDecodeLengthKind = BarcodeSymbologyDecodeLengthKind(1i32); pub const Range: BarcodeSymbologyDecodeLengthKind = BarcodeSymbologyDecodeLengthKind(2i32); } impl ::core::convert::From<i32> for BarcodeSymbologyDecodeLengthKind { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BarcodeSymbologyDecodeLengthKind { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for BarcodeSymbologyDecodeLengthKind { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.BarcodeSymbologyDecodeLengthKind;i4)"); } impl ::windows::core::DefaultType for BarcodeSymbologyDecodeLengthKind { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawer(pub ::windows::core::IInspectable); impl CashDrawer { pub fn DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<CashDrawerCapabilities> { 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::<CashDrawerCapabilities>(result__) } } pub fn Status(&self) -> ::windows::core::Result<CashDrawerStatus> { 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::<CashDrawerStatus>(result__) } } pub fn IsDrawerOpen(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn DrawerEventSource(&self) -> ::windows::core::Result<CashDrawerEventSource> { 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::<CashDrawerEventSource>(result__) } } #[cfg(feature = "Foundation")] pub fn ClaimDrawerAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedCashDrawer>> { let this = 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::<super::super::Foundation::IAsyncOperation<ClaimedCashDrawer>>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), level, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn GetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation")] pub fn StatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CashDrawer, CashDrawerStatusUpdatedEventArgs>>>(&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).14)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStatusUpdated<'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).15)(::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() } } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<CashDrawer>> { Self::ICashDrawerStatics(|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::<super::super::Foundation::IAsyncOperation<CashDrawer>>(result__) }) } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<CashDrawer>> { Self::ICashDrawerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<CashDrawer>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::ICashDrawerStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::ICashDrawerStatics2(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn ICashDrawerStatics<R, F: FnOnce(&ICashDrawerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CashDrawer, ICashDrawerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn ICashDrawerStatics2<R, F: FnOnce(&ICashDrawerStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<CashDrawer, ICashDrawerStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for CashDrawer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawer;{9f88f5c8-de54-4aee-a890-920bcbfe30fc})"); } unsafe impl ::windows::core::Interface for CashDrawer { type Vtable = ICashDrawer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f88f5c8_de54_4aee_a890_920bcbfe30fc); } impl ::windows::core::RuntimeName for CashDrawer { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawer"; } impl ::core::convert::From<CashDrawer> for ::windows::core::IUnknown { fn from(value: CashDrawer) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawer> for ::windows::core::IUnknown { fn from(value: &CashDrawer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawer { 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 CashDrawer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawer> for ::windows::core::IInspectable { fn from(value: CashDrawer) -> Self { value.0 } } impl ::core::convert::From<&CashDrawer> for ::windows::core::IInspectable { fn from(value: &CashDrawer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawer { 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 CashDrawer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<CashDrawer> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: CashDrawer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&CashDrawer> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &CashDrawer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for CashDrawer { 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 &CashDrawer { 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 CashDrawer {} unsafe impl ::core::marker::Sync for CashDrawer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerCapabilities(pub ::windows::core::IInspectable); impl CashDrawerCapabilities { pub fn PowerReportingType(&self) -> ::windows::core::Result<UnifiedPosPowerReportingType> { let this = self; unsafe { let mut result__: UnifiedPosPowerReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosPowerReportingType>(result__) } } pub fn IsStatisticsReportingSupported(&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 IsStatisticsUpdatingSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsStatusReportingSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsStatusMultiDrawerDetectSupported(&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 IsDrawerOpenSensorAvailable(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerCapabilities;{0bc6de0b-e8e7-4b1f-b1d1-3e501ad08247})"); } unsafe impl ::windows::core::Interface for CashDrawerCapabilities { type Vtable = ICashDrawerCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bc6de0b_e8e7_4b1f_b1d1_3e501ad08247); } impl ::windows::core::RuntimeName for CashDrawerCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerCapabilities"; } impl ::core::convert::From<CashDrawerCapabilities> for ::windows::core::IUnknown { fn from(value: CashDrawerCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerCapabilities> for ::windows::core::IUnknown { fn from(value: &CashDrawerCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerCapabilities { 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 CashDrawerCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerCapabilities> for ::windows::core::IInspectable { fn from(value: CashDrawerCapabilities) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerCapabilities> for ::windows::core::IInspectable { fn from(value: &CashDrawerCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerCapabilities { 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 CashDrawerCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CashDrawerCapabilities {} unsafe impl ::core::marker::Sync for CashDrawerCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerCloseAlarm(pub ::windows::core::IInspectable); impl CashDrawerCloseAlarm { #[cfg(feature = "Foundation")] pub fn SetAlarmTimeout<'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).6)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn AlarmTimeout(&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).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } pub fn SetBeepFrequency(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn BeepFrequency(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation")] pub fn SetBeepDuration<'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).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn BeepDuration(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetBeepDelay<'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).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn BeepDelay(&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).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn AlarmTimeoutExpired<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CashDrawerCloseAlarm, ::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).14)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveAlarmTimeoutExpired<'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).15)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn StartAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerCloseAlarm { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerCloseAlarm;{6bf88cc7-6f63-430e-ab3b-95d75ffbe87f})"); } unsafe impl ::windows::core::Interface for CashDrawerCloseAlarm { type Vtable = ICashDrawerCloseAlarm_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bf88cc7_6f63_430e_ab3b_95d75ffbe87f); } impl ::windows::core::RuntimeName for CashDrawerCloseAlarm { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerCloseAlarm"; } impl ::core::convert::From<CashDrawerCloseAlarm> for ::windows::core::IUnknown { fn from(value: CashDrawerCloseAlarm) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerCloseAlarm> for ::windows::core::IUnknown { fn from(value: &CashDrawerCloseAlarm) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerCloseAlarm { 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 CashDrawerCloseAlarm { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerCloseAlarm> for ::windows::core::IInspectable { fn from(value: CashDrawerCloseAlarm) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerCloseAlarm> for ::windows::core::IInspectable { fn from(value: &CashDrawerCloseAlarm) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerCloseAlarm { 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 CashDrawerCloseAlarm { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CashDrawerCloseAlarm {} unsafe impl ::core::marker::Sync for CashDrawerCloseAlarm {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerClosedEventArgs(pub ::windows::core::IInspectable); impl CashDrawerClosedEventArgs { pub fn CashDrawer(&self) -> ::windows::core::Result<CashDrawer> { 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::<CashDrawer>(result__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerClosedEventArgs;{69cb3bc1-147f-421c-9c23-090123bb786c})"); } unsafe impl ::windows::core::Interface for CashDrawerClosedEventArgs { type Vtable = ICashDrawerEventSourceEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69cb3bc1_147f_421c_9c23_090123bb786c); } impl ::windows::core::RuntimeName for CashDrawerClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerClosedEventArgs"; } impl ::core::convert::From<CashDrawerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: CashDrawerClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &CashDrawerClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerClosedEventArgs { 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 CashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: CashDrawerClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &CashDrawerClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerClosedEventArgs { 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 CashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<CashDrawerClosedEventArgs> for ICashDrawerEventSourceEventArgs { fn from(value: CashDrawerClosedEventArgs) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&CashDrawerClosedEventArgs> for ICashDrawerEventSourceEventArgs { fn from(value: &CashDrawerClosedEventArgs) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, ICashDrawerEventSourceEventArgs> for CashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ICashDrawerEventSourceEventArgs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, ICashDrawerEventSourceEventArgs> for &CashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ICashDrawerEventSourceEventArgs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } unsafe impl ::core::marker::Send for CashDrawerClosedEventArgs {} unsafe impl ::core::marker::Sync for CashDrawerClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerEventSource(pub ::windows::core::IInspectable); impl CashDrawerEventSource { #[cfg(feature = "Foundation")] pub fn DrawerClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CashDrawerEventSource, CashDrawerClosedEventArgs>>>(&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).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveDrawerClosed<'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).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn DrawerOpened<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<CashDrawerEventSource, CashDrawerOpenedEventArgs>>>(&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 RemoveDrawerOpened<'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() } } } unsafe impl ::windows::core::RuntimeType for CashDrawerEventSource { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerEventSource;{e006e46c-f2f9-442f-8dd6-06c10a4227ba})"); } unsafe impl ::windows::core::Interface for CashDrawerEventSource { type Vtable = ICashDrawerEventSource_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe006e46c_f2f9_442f_8dd6_06c10a4227ba); } impl ::windows::core::RuntimeName for CashDrawerEventSource { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerEventSource"; } impl ::core::convert::From<CashDrawerEventSource> for ::windows::core::IUnknown { fn from(value: CashDrawerEventSource) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerEventSource> for ::windows::core::IUnknown { fn from(value: &CashDrawerEventSource) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerEventSource { 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 CashDrawerEventSource { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerEventSource> for ::windows::core::IInspectable { fn from(value: CashDrawerEventSource) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerEventSource> for ::windows::core::IInspectable { fn from(value: &CashDrawerEventSource) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerEventSource { 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 CashDrawerEventSource { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CashDrawerEventSource {} unsafe impl ::core::marker::Sync for CashDrawerEventSource {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerOpenedEventArgs(pub ::windows::core::IInspectable); impl CashDrawerOpenedEventArgs { pub fn CashDrawer(&self) -> ::windows::core::Result<CashDrawer> { 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::<CashDrawer>(result__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerOpenedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerOpenedEventArgs;{69cb3bc1-147f-421c-9c23-090123bb786c})"); } unsafe impl ::windows::core::Interface for CashDrawerOpenedEventArgs { type Vtable = ICashDrawerEventSourceEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69cb3bc1_147f_421c_9c23_090123bb786c); } impl ::windows::core::RuntimeName for CashDrawerOpenedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerOpenedEventArgs"; } impl ::core::convert::From<CashDrawerOpenedEventArgs> for ::windows::core::IUnknown { fn from(value: CashDrawerOpenedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerOpenedEventArgs> for ::windows::core::IUnknown { fn from(value: &CashDrawerOpenedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerOpenedEventArgs { 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 CashDrawerOpenedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerOpenedEventArgs> for ::windows::core::IInspectable { fn from(value: CashDrawerOpenedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerOpenedEventArgs> for ::windows::core::IInspectable { fn from(value: &CashDrawerOpenedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerOpenedEventArgs { 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 CashDrawerOpenedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<CashDrawerOpenedEventArgs> for ICashDrawerEventSourceEventArgs { fn from(value: CashDrawerOpenedEventArgs) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&CashDrawerOpenedEventArgs> for ICashDrawerEventSourceEventArgs { fn from(value: &CashDrawerOpenedEventArgs) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, ICashDrawerEventSourceEventArgs> for CashDrawerOpenedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ICashDrawerEventSourceEventArgs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, ICashDrawerEventSourceEventArgs> for &CashDrawerOpenedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ICashDrawerEventSourceEventArgs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } unsafe impl ::core::marker::Send for CashDrawerOpenedEventArgs {} unsafe impl ::core::marker::Sync for CashDrawerOpenedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerStatus(pub ::windows::core::IInspectable); impl CashDrawerStatus { pub fn StatusKind(&self) -> ::windows::core::Result<CashDrawerStatusKind> { let this = self; unsafe { let mut result__: CashDrawerStatusKind = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<CashDrawerStatusKind>(result__) } } pub fn ExtendedStatus(&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__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerStatus;{6bbd78bf-dca1-4e06-99eb-5af6a5aec108})"); } unsafe impl ::windows::core::Interface for CashDrawerStatus { type Vtable = ICashDrawerStatus_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bbd78bf_dca1_4e06_99eb_5af6a5aec108); } impl ::windows::core::RuntimeName for CashDrawerStatus { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerStatus"; } impl ::core::convert::From<CashDrawerStatus> for ::windows::core::IUnknown { fn from(value: CashDrawerStatus) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerStatus> for ::windows::core::IUnknown { fn from(value: &CashDrawerStatus) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerStatus { 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 CashDrawerStatus { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerStatus> for ::windows::core::IInspectable { fn from(value: CashDrawerStatus) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerStatus> for ::windows::core::IInspectable { fn from(value: &CashDrawerStatus) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerStatus { 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 CashDrawerStatus { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CashDrawerStatus {} unsafe impl ::core::marker::Sync for CashDrawerStatus {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CashDrawerStatusKind(pub i32); impl CashDrawerStatusKind { pub const Online: CashDrawerStatusKind = CashDrawerStatusKind(0i32); pub const Off: CashDrawerStatusKind = CashDrawerStatusKind(1i32); pub const Offline: CashDrawerStatusKind = CashDrawerStatusKind(2i32); pub const OffOrOffline: CashDrawerStatusKind = CashDrawerStatusKind(3i32); pub const Extended: CashDrawerStatusKind = CashDrawerStatusKind(4i32); } impl ::core::convert::From<i32> for CashDrawerStatusKind { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CashDrawerStatusKind { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for CashDrawerStatusKind { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.CashDrawerStatusKind;i4)"); } impl ::windows::core::DefaultType for CashDrawerStatusKind { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct CashDrawerStatusUpdatedEventArgs(pub ::windows::core::IInspectable); impl CashDrawerStatusUpdatedEventArgs { pub fn Status(&self) -> ::windows::core::Result<CashDrawerStatus> { 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::<CashDrawerStatus>(result__) } } } unsafe impl ::windows::core::RuntimeType for CashDrawerStatusUpdatedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.CashDrawerStatusUpdatedEventArgs;{30aae98a-0d70-459c-9553-87e124c52488})"); } unsafe impl ::windows::core::Interface for CashDrawerStatusUpdatedEventArgs { type Vtable = ICashDrawerStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30aae98a_0d70_459c_9553_87e124c52488); } impl ::windows::core::RuntimeName for CashDrawerStatusUpdatedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.CashDrawerStatusUpdatedEventArgs"; } impl ::core::convert::From<CashDrawerStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: CashDrawerStatusUpdatedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&CashDrawerStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: &CashDrawerStatusUpdatedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CashDrawerStatusUpdatedEventArgs { 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 CashDrawerStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<CashDrawerStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: CashDrawerStatusUpdatedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&CashDrawerStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: &CashDrawerStatusUpdatedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CashDrawerStatusUpdatedEventArgs { 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 CashDrawerStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for CashDrawerStatusUpdatedEventArgs {} unsafe impl ::core::marker::Sync for CashDrawerStatusUpdatedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedBarcodeScanner(pub ::windows::core::IInspectable); impl ClaimedBarcodeScanner { pub fn DeviceId(&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 IsEnabled(&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 SetIsDisabledOnDataReceived(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDisabledOnDataReceived(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsDecodeDataEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDecodeDataEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn EnableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { 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::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn DisableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { 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::<super::super::Foundation::IAsyncAction>(result__) } } pub fn RetainDevice(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn SetActiveSymbologiesAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<u32>>>(&self, symbologies: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), symbologies.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn ResetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn UpdateStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>>(&self, statistics: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), statistics.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn SetActiveProfileAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, profile: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), profile.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn DataReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedBarcodeScanner, BarcodeScannerDataReceivedEventArgs>>>(&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).19)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveDataReceived<'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).20)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn TriggerPressed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<ClaimedBarcodeScanner>>>(&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).21)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveTriggerPressed<'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).22)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn TriggerReleased<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<ClaimedBarcodeScanner>>>(&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).23)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveTriggerReleased<'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).24)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ReleaseDeviceRequested<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<ClaimedBarcodeScanner>>>(&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).25)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveReleaseDeviceRequested<'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).26)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ImagePreviewReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedBarcodeScanner, BarcodeScannerImagePreviewReceivedEventArgs>>>(&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).27)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveImagePreviewReceived<'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).28)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ErrorOccurred<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedBarcodeScanner, BarcodeScannerErrorOccurredEventArgs>>>(&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).29)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveErrorOccurred<'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).30)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn StartSoftwareTriggerAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner1>(self)?; unsafe { 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::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn StopSoftwareTriggerAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner1>(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::super::Foundation::IAsyncAction>(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() } } #[cfg(feature = "Foundation")] pub fn GetSymbologyAttributesAsync(&self, barcodesymbology: u32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<BarcodeSymbologyAttributes>> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), barcodesymbology, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<BarcodeSymbologyAttributes>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetSymbologyAttributesAsync<'a, Param1: ::windows::core::IntoParam<'a, BarcodeSymbologyAttributes>>(&self, barcodesymbology: u32, attributes: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), barcodesymbology, attributes.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn ShowVideoPreviewAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner3>(self)?; unsafe { 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::IAsyncOperation<bool>>(result__) } } pub fn HideVideoPreview(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } pub fn SetIsVideoPreviewShownOnEnable(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner3>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsVideoPreviewShownOnEnable(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner3>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn Closed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedBarcodeScanner, ClaimedBarcodeScannerClosedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner4>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedBarcodeScanner4>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ClaimedBarcodeScanner { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedBarcodeScanner;{4a63b49c-8fa4-4332-bb26-945d11d81e0f})"); } unsafe impl ::windows::core::Interface for ClaimedBarcodeScanner { type Vtable = IClaimedBarcodeScanner_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4a63b49c_8fa4_4332_bb26_945d11d81e0f); } impl ::windows::core::RuntimeName for ClaimedBarcodeScanner { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedBarcodeScanner"; } impl ::core::convert::From<ClaimedBarcodeScanner> for ::windows::core::IUnknown { fn from(value: ClaimedBarcodeScanner) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedBarcodeScanner> for ::windows::core::IUnknown { fn from(value: &ClaimedBarcodeScanner) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedBarcodeScanner { 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 ClaimedBarcodeScanner { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedBarcodeScanner> for ::windows::core::IInspectable { fn from(value: ClaimedBarcodeScanner) -> Self { value.0 } } impl ::core::convert::From<&ClaimedBarcodeScanner> for ::windows::core::IInspectable { fn from(value: &ClaimedBarcodeScanner) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedBarcodeScanner { 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 ClaimedBarcodeScanner { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ClaimedBarcodeScanner> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ClaimedBarcodeScanner) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ClaimedBarcodeScanner> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ClaimedBarcodeScanner) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ClaimedBarcodeScanner { 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 &ClaimedBarcodeScanner { 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 ClaimedBarcodeScanner {} unsafe impl ::core::marker::Sync for ClaimedBarcodeScanner {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedBarcodeScannerClosedEventArgs(pub ::windows::core::IInspectable); impl ClaimedBarcodeScannerClosedEventArgs {} unsafe impl ::windows::core::RuntimeType for ClaimedBarcodeScannerClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedBarcodeScannerClosedEventArgs;{cf7d5489-a22c-4c65-a901-88d77d833954})"); } unsafe impl ::windows::core::Interface for ClaimedBarcodeScannerClosedEventArgs { type Vtable = IClaimedBarcodeScannerClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcf7d5489_a22c_4c65_a901_88d77d833954); } impl ::windows::core::RuntimeName for ClaimedBarcodeScannerClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedBarcodeScannerClosedEventArgs"; } impl ::core::convert::From<ClaimedBarcodeScannerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: ClaimedBarcodeScannerClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedBarcodeScannerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &ClaimedBarcodeScannerClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedBarcodeScannerClosedEventArgs { 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 ClaimedBarcodeScannerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedBarcodeScannerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: ClaimedBarcodeScannerClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ClaimedBarcodeScannerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &ClaimedBarcodeScannerClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedBarcodeScannerClosedEventArgs { 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 ClaimedBarcodeScannerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ClaimedBarcodeScannerClosedEventArgs {} unsafe impl ::core::marker::Sync for ClaimedBarcodeScannerClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedCashDrawer(pub ::windows::core::IInspectable); impl ClaimedCashDrawer { pub fn DeviceId(&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 IsEnabled(&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 IsDrawerOpen(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn CloseAlarm(&self) -> ::windows::core::Result<CashDrawerCloseAlarm> { 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::<CashDrawerCloseAlarm>(result__) } } #[cfg(feature = "Foundation")] pub fn OpenDrawerAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn EnableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn DisableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn RetainDeviceAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn ResetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn UpdateStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>>(&self, statistics: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), statistics.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn ReleaseDeviceRequested<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedCashDrawer, ::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).16)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveReleaseDeviceRequested<'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).17)(::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() } } #[cfg(feature = "Foundation")] pub fn Closed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedCashDrawer, ClaimedCashDrawerClosedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedCashDrawer2>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedCashDrawer2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ClaimedCashDrawer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedCashDrawer;{ca3f99af-abb8-42c1-8a84-5c66512f5a75})"); } unsafe impl ::windows::core::Interface for ClaimedCashDrawer { type Vtable = IClaimedCashDrawer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca3f99af_abb8_42c1_8a84_5c66512f5a75); } impl ::windows::core::RuntimeName for ClaimedCashDrawer { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedCashDrawer"; } impl ::core::convert::From<ClaimedCashDrawer> for ::windows::core::IUnknown { fn from(value: ClaimedCashDrawer) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedCashDrawer> for ::windows::core::IUnknown { fn from(value: &ClaimedCashDrawer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedCashDrawer { 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 ClaimedCashDrawer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedCashDrawer> for ::windows::core::IInspectable { fn from(value: ClaimedCashDrawer) -> Self { value.0 } } impl ::core::convert::From<&ClaimedCashDrawer> for ::windows::core::IInspectable { fn from(value: &ClaimedCashDrawer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedCashDrawer { 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 ClaimedCashDrawer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ClaimedCashDrawer> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ClaimedCashDrawer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ClaimedCashDrawer> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ClaimedCashDrawer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ClaimedCashDrawer { 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 &ClaimedCashDrawer { 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 ClaimedCashDrawer {} unsafe impl ::core::marker::Sync for ClaimedCashDrawer {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedCashDrawerClosedEventArgs(pub ::windows::core::IInspectable); impl ClaimedCashDrawerClosedEventArgs {} unsafe impl ::windows::core::RuntimeType for ClaimedCashDrawerClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedCashDrawerClosedEventArgs;{cc573f33-3f34-4c5c-baae-deadf16cd7fa})"); } unsafe impl ::windows::core::Interface for ClaimedCashDrawerClosedEventArgs { type Vtable = IClaimedCashDrawerClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcc573f33_3f34_4c5c_baae_deadf16cd7fa); } impl ::windows::core::RuntimeName for ClaimedCashDrawerClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedCashDrawerClosedEventArgs"; } impl ::core::convert::From<ClaimedCashDrawerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: ClaimedCashDrawerClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedCashDrawerClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &ClaimedCashDrawerClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedCashDrawerClosedEventArgs { 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 ClaimedCashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedCashDrawerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: ClaimedCashDrawerClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ClaimedCashDrawerClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &ClaimedCashDrawerClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedCashDrawerClosedEventArgs { 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 ClaimedCashDrawerClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ClaimedCashDrawerClosedEventArgs {} unsafe impl ::core::marker::Sync for ClaimedCashDrawerClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedJournalPrinter(pub ::windows::core::IInspectable); impl ClaimedJournalPrinter { pub fn CreateJob(&self) -> ::windows::core::Result<JournalPrintJob> { 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::<JournalPrintJob>(result__) } } pub fn SetCharactersPerLine(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharactersPerLine(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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__) } } pub fn SetLineHeight(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineHeight(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetLineSpacing(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineSpacing(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn LineWidth(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetIsLetterQuality(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsLetterQuality(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEnd(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetColorCartridge(&self, value: PosPrinterColorCartridge) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn ColorCartridge(&self) -> ::windows::core::Result<PosPrinterColorCartridge> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: PosPrinterColorCartridge = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCartridge>(result__) } } pub fn IsCoverOpen(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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 IsCartridgeRemoved(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsCartridgeEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsHeadCleaning(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReadyToPrint(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn ValidateData<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), data.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ClaimedJournalPrinter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedJournalPrinter;{67ea0630-517d-487f-9fdf-d2e0a0a264a5})"); } unsafe impl ::windows::core::Interface for ClaimedJournalPrinter { type Vtable = IClaimedJournalPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x67ea0630_517d_487f_9fdf_d2e0a0a264a5); } impl ::windows::core::RuntimeName for ClaimedJournalPrinter { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedJournalPrinter"; } impl ::core::convert::From<ClaimedJournalPrinter> for ::windows::core::IUnknown { fn from(value: ClaimedJournalPrinter) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedJournalPrinter> for ::windows::core::IUnknown { fn from(value: &ClaimedJournalPrinter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedJournalPrinter { 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 ClaimedJournalPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedJournalPrinter> for ::windows::core::IInspectable { fn from(value: ClaimedJournalPrinter) -> Self { value.0 } } impl ::core::convert::From<&ClaimedJournalPrinter> for ::windows::core::IInspectable { fn from(value: &ClaimedJournalPrinter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedJournalPrinter { 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 ClaimedJournalPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ClaimedJournalPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: ClaimedJournalPrinter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ClaimedJournalPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: &ClaimedJournalPrinter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for ClaimedJournalPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for &ClaimedJournalPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::core::convert::TryInto::<ICommonClaimedPosPrinterStation>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for ClaimedJournalPrinter {} unsafe impl ::core::marker::Sync for ClaimedJournalPrinter {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedLineDisplay(pub ::windows::core::IInspectable); impl ClaimedLineDisplay { #[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 DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<LineDisplayCapabilities> { 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::<LineDisplayCapabilities>(result__) } } pub fn PhysicalDeviceName(&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).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn PhysicalDeviceDescription(&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).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceControlDescription(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceControlVersion(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceServiceVersion(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DefaultWindow(&self) -> ::windows::core::Result<LineDisplayWindow> { 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::<LineDisplayWindow>(result__) } } pub fn RetainDevice(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ReleaseDeviceRequested<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedLineDisplay, ::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).15)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveReleaseDeviceRequested<'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).16)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedLineDisplay>> { Self::IClaimedLineDisplayStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<ClaimedLineDisplay>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IClaimedLineDisplayStatics(|this| 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 GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IClaimedLineDisplayStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn GetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), level, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckPowerStatusAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayPowerStatus>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::IAsyncOperation<LineDisplayPowerStatus>>(result__) } } #[cfg(feature = "Foundation")] pub fn StatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedLineDisplay, LineDisplayStatusUpdatedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn SupportedScreenSizesInCharacters(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<super::super::Foundation::Size>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::<super::super::Foundation::Collections::IVectorView<super::super::Foundation::Size>>(result__) } } #[cfg(feature = "Foundation")] pub fn MaxBitmapSizeInPixels(&self) -> ::windows::core::Result<super::super::Foundation::Size> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: super::super::Foundation::Size = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharacterSets(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<i32>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::<super::super::Foundation::Collections::IVectorView<i32>>(result__) } } pub fn CustomGlyphs(&self) -> ::windows::core::Result<LineDisplayCustomGlyphs> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::<LineDisplayCustomGlyphs>(result__) } } pub fn GetAttributes(&self) -> ::windows::core::Result<LineDisplayAttributes> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::<LineDisplayAttributes>(result__) } } #[cfg(feature = "Foundation")] pub fn TryUpdateAttributesAsync<'a, Param0: ::windows::core::IntoParam<'a, LineDisplayAttributes>>(&self, attributes: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), attributes.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TrySetDescriptorAsync(&self, descriptor: u32, descriptorstate: LineDisplayDescriptorState) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), descriptor, descriptorstate, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryClearDescriptorsAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryCreateWindowAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Size>>(&self, viewport: Param0, windowsize: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayWindow>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), viewport.into_param().abi(), windowsize.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<LineDisplayWindow>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryStoreStorageFileBitmapAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryStoreStorageFileBitmapWithAlignmentAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), horizontalalignment, verticalalignment, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryStoreStorageFileBitmapWithAlignmentAndWidthAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), horizontalalignment, verticalalignment, widthinpixels, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<LineDisplayStoredBitmap>>(result__) } } #[cfg(feature = "Foundation")] pub fn Closed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedLineDisplay, ClaimedLineDisplayClosedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay3>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedLineDisplay3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } pub fn IClaimedLineDisplayStatics<R, F: FnOnce(&IClaimedLineDisplayStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<ClaimedLineDisplay, IClaimedLineDisplayStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for ClaimedLineDisplay { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedLineDisplay;{120ac970-9a75-4acf-aae7-09972bcf8794})"); } unsafe impl ::windows::core::Interface for ClaimedLineDisplay { type Vtable = IClaimedLineDisplay_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x120ac970_9a75_4acf_aae7_09972bcf8794); } impl ::windows::core::RuntimeName for ClaimedLineDisplay { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedLineDisplay"; } impl ::core::convert::From<ClaimedLineDisplay> for ::windows::core::IUnknown { fn from(value: ClaimedLineDisplay) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedLineDisplay> for ::windows::core::IUnknown { fn from(value: &ClaimedLineDisplay) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedLineDisplay { 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 ClaimedLineDisplay { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedLineDisplay> for ::windows::core::IInspectable { fn from(value: ClaimedLineDisplay) -> Self { value.0 } } impl ::core::convert::From<&ClaimedLineDisplay> for ::windows::core::IInspectable { fn from(value: &ClaimedLineDisplay) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedLineDisplay { 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 ClaimedLineDisplay { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ClaimedLineDisplay> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ClaimedLineDisplay) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ClaimedLineDisplay> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ClaimedLineDisplay) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ClaimedLineDisplay { 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 &ClaimedLineDisplay { 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 ClaimedLineDisplay {} unsafe impl ::core::marker::Sync for ClaimedLineDisplay {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedLineDisplayClosedEventArgs(pub ::windows::core::IInspectable); impl ClaimedLineDisplayClosedEventArgs {} unsafe impl ::windows::core::RuntimeType for ClaimedLineDisplayClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedLineDisplayClosedEventArgs;{f915f364-d3d5-4f10-b511-90939edfacd8})"); } unsafe impl ::windows::core::Interface for ClaimedLineDisplayClosedEventArgs { type Vtable = IClaimedLineDisplayClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf915f364_d3d5_4f10_b511_90939edfacd8); } impl ::windows::core::RuntimeName for ClaimedLineDisplayClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedLineDisplayClosedEventArgs"; } impl ::core::convert::From<ClaimedLineDisplayClosedEventArgs> for ::windows::core::IUnknown { fn from(value: ClaimedLineDisplayClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedLineDisplayClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &ClaimedLineDisplayClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedLineDisplayClosedEventArgs { 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 ClaimedLineDisplayClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedLineDisplayClosedEventArgs> for ::windows::core::IInspectable { fn from(value: ClaimedLineDisplayClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ClaimedLineDisplayClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &ClaimedLineDisplayClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedLineDisplayClosedEventArgs { 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 ClaimedLineDisplayClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ClaimedLineDisplayClosedEventArgs {} unsafe impl ::core::marker::Sync for ClaimedLineDisplayClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedMagneticStripeReader(pub ::windows::core::IInspectable); impl ClaimedMagneticStripeReader { pub fn DeviceId(&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 IsEnabled(&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 SetIsDisabledOnDataReceived(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDisabledOnDataReceived(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsDecodeDataEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDecodeDataEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDeviceAuthenticated(&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 SetDataEncryptionAlgorithm(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn DataEncryptionAlgorithm(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetTracksToRead(&self, value: MagneticStripeReaderTrackIds) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn TracksToRead(&self) -> ::windows::core::Result<MagneticStripeReaderTrackIds> { let this = self; unsafe { let mut result__: MagneticStripeReaderTrackIds = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderTrackIds>(result__) } } pub fn SetIsTransmitSentinelsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsTransmitSentinelsEnabled(&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__) } } #[cfg(feature = "Foundation")] pub fn EnableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { 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::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn DisableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { 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::<super::super::Foundation::IAsyncAction>(result__) } } pub fn RetainDevice(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this)).ok() } } pub fn SetErrorReportingType(&self, value: MagneticStripeReaderErrorReportingType) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] pub fn RetrieveDeviceAuthenticationDataAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>> { 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::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>>(result__) } } #[cfg(feature = "Foundation")] pub fn AuthenticateDeviceAsync(&self, responsetoken: &[<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), responsetoken.len() as u32, ::core::mem::transmute(responsetoken.as_ptr()), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn DeAuthenticateDeviceAsync(&self, responsetoken: &[<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), responsetoken.len() as u32, ::core::mem::transmute(responsetoken.as_ptr()), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn UpdateKeyAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, key: Param0, keyname: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), key.into_param().abi(), keyname.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn ResetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn UpdateStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>>(&self, statistics: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), statistics.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Foundation")] pub fn BankCardDataReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedMagneticStripeReader, MagneticStripeReaderBankCardDataReceivedEventArgs>>>(&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).29)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveBankCardDataReceived<'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).30)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn AamvaCardDataReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedMagneticStripeReader, MagneticStripeReaderAamvaCardDataReceivedEventArgs>>>(&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).31)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveAamvaCardDataReceived<'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).32)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn VendorSpecificDataReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedMagneticStripeReader, MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs>>>(&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).33)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveVendorSpecificDataReceived<'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).34)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ReleaseDeviceRequested<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<ClaimedMagneticStripeReader>>>(&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).35)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveReleaseDeviceRequested<'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).36)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ErrorOccurred<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedMagneticStripeReader, MagneticStripeReaderErrorOccurredEventArgs>>>(&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).37)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveErrorOccurred<'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).38)(::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() } } #[cfg(feature = "Foundation")] pub fn Closed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedMagneticStripeReader, ClaimedMagneticStripeReaderClosedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedMagneticStripeReader2>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedMagneticStripeReader2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ClaimedMagneticStripeReader { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedMagneticStripeReader;{475ca8f3-9417-48bc-b9d7-4163a7844c02})"); } unsafe impl ::windows::core::Interface for ClaimedMagneticStripeReader { type Vtable = IClaimedMagneticStripeReader_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x475ca8f3_9417_48bc_b9d7_4163a7844c02); } impl ::windows::core::RuntimeName for ClaimedMagneticStripeReader { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedMagneticStripeReader"; } impl ::core::convert::From<ClaimedMagneticStripeReader> for ::windows::core::IUnknown { fn from(value: ClaimedMagneticStripeReader) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedMagneticStripeReader> for ::windows::core::IUnknown { fn from(value: &ClaimedMagneticStripeReader) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedMagneticStripeReader { 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 ClaimedMagneticStripeReader { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedMagneticStripeReader> for ::windows::core::IInspectable { fn from(value: ClaimedMagneticStripeReader) -> Self { value.0 } } impl ::core::convert::From<&ClaimedMagneticStripeReader> for ::windows::core::IInspectable { fn from(value: &ClaimedMagneticStripeReader) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedMagneticStripeReader { 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 ClaimedMagneticStripeReader { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ClaimedMagneticStripeReader> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ClaimedMagneticStripeReader) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ClaimedMagneticStripeReader> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ClaimedMagneticStripeReader) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ClaimedMagneticStripeReader { 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 &ClaimedMagneticStripeReader { 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 ClaimedMagneticStripeReader {} unsafe impl ::core::marker::Sync for ClaimedMagneticStripeReader {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedMagneticStripeReaderClosedEventArgs(pub ::windows::core::IInspectable); impl ClaimedMagneticStripeReaderClosedEventArgs {} unsafe impl ::windows::core::RuntimeType for ClaimedMagneticStripeReaderClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedMagneticStripeReaderClosedEventArgs;{14ada93a-adcd-4c80-acda-c3eaed2647e1})"); } unsafe impl ::windows::core::Interface for ClaimedMagneticStripeReaderClosedEventArgs { type Vtable = IClaimedMagneticStripeReaderClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x14ada93a_adcd_4c80_acda_c3eaed2647e1); } impl ::windows::core::RuntimeName for ClaimedMagneticStripeReaderClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedMagneticStripeReaderClosedEventArgs"; } impl ::core::convert::From<ClaimedMagneticStripeReaderClosedEventArgs> for ::windows::core::IUnknown { fn from(value: ClaimedMagneticStripeReaderClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedMagneticStripeReaderClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &ClaimedMagneticStripeReaderClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedMagneticStripeReaderClosedEventArgs { 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 ClaimedMagneticStripeReaderClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedMagneticStripeReaderClosedEventArgs> for ::windows::core::IInspectable { fn from(value: ClaimedMagneticStripeReaderClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ClaimedMagneticStripeReaderClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &ClaimedMagneticStripeReaderClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedMagneticStripeReaderClosedEventArgs { 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 ClaimedMagneticStripeReaderClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ClaimedMagneticStripeReaderClosedEventArgs {} unsafe impl ::core::marker::Sync for ClaimedMagneticStripeReaderClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedPosPrinter(pub ::windows::core::IInspectable); impl ClaimedPosPrinter { pub fn DeviceId(&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 IsEnabled(&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 SetCharacterSet(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharacterSet(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn IsCoverOpen(&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 SetIsCharacterSetMappingEnabled(&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 IsCharacterSetMappingEnabled(&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 SetMapMode(&self, value: PosPrinterMapMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn MapMode(&self) -> ::windows::core::Result<PosPrinterMapMode> { let this = self; unsafe { let mut result__: PosPrinterMapMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterMapMode>(result__) } } pub fn Receipt(&self) -> ::windows::core::Result<ClaimedReceiptPrinter> { 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::<ClaimedReceiptPrinter>(result__) } } pub fn Slip(&self) -> ::windows::core::Result<ClaimedSlipPrinter> { let this = 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::<ClaimedSlipPrinter>(result__) } } pub fn Journal(&self) -> ::windows::core::Result<ClaimedJournalPrinter> { 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::<ClaimedJournalPrinter>(result__) } } #[cfg(feature = "Foundation")] pub fn EnableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn DisableAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn RetainDeviceAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn ResetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn UpdateStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::super::Foundation::Collections::IKeyValuePair<::windows::core::HSTRING, ::windows::core::HSTRING>>>>(&self, statistics: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), statistics.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn ReleaseDeviceRequested<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs>>>(&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).23)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveReleaseDeviceRequested<'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).24)(::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() } } #[cfg(feature = "Foundation")] pub fn Closed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<ClaimedPosPrinter, ClaimedPosPrinterClosedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IClaimedPosPrinter2>(self)?; unsafe { let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveClosed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IClaimedPosPrinter2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ClaimedPosPrinter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedPosPrinter;{6d64ce0c-e03e-4b14-a38e-c28c34b86353})"); } unsafe impl ::windows::core::Interface for ClaimedPosPrinter { type Vtable = IClaimedPosPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6d64ce0c_e03e_4b14_a38e_c28c34b86353); } impl ::windows::core::RuntimeName for ClaimedPosPrinter { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedPosPrinter"; } impl ::core::convert::From<ClaimedPosPrinter> for ::windows::core::IUnknown { fn from(value: ClaimedPosPrinter) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedPosPrinter> for ::windows::core::IUnknown { fn from(value: &ClaimedPosPrinter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedPosPrinter { 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 ClaimedPosPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedPosPrinter> for ::windows::core::IInspectable { fn from(value: ClaimedPosPrinter) -> Self { value.0 } } impl ::core::convert::From<&ClaimedPosPrinter> for ::windows::core::IInspectable { fn from(value: &ClaimedPosPrinter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedPosPrinter { 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 ClaimedPosPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<ClaimedPosPrinter> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: ClaimedPosPrinter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&ClaimedPosPrinter> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &ClaimedPosPrinter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for ClaimedPosPrinter { 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 &ClaimedPosPrinter { 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 ClaimedPosPrinter {} unsafe impl ::core::marker::Sync for ClaimedPosPrinter {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedPosPrinterClosedEventArgs(pub ::windows::core::IInspectable); impl ClaimedPosPrinterClosedEventArgs {} unsafe impl ::windows::core::RuntimeType for ClaimedPosPrinterClosedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedPosPrinterClosedEventArgs;{e2b7a27b-4d40-471d-92ed-63375b18c788})"); } unsafe impl ::windows::core::Interface for ClaimedPosPrinterClosedEventArgs { type Vtable = IClaimedPosPrinterClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2b7a27b_4d40_471d_92ed_63375b18c788); } impl ::windows::core::RuntimeName for ClaimedPosPrinterClosedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedPosPrinterClosedEventArgs"; } impl ::core::convert::From<ClaimedPosPrinterClosedEventArgs> for ::windows::core::IUnknown { fn from(value: ClaimedPosPrinterClosedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedPosPrinterClosedEventArgs> for ::windows::core::IUnknown { fn from(value: &ClaimedPosPrinterClosedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedPosPrinterClosedEventArgs { 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 ClaimedPosPrinterClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedPosPrinterClosedEventArgs> for ::windows::core::IInspectable { fn from(value: ClaimedPosPrinterClosedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ClaimedPosPrinterClosedEventArgs> for ::windows::core::IInspectable { fn from(value: &ClaimedPosPrinterClosedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedPosPrinterClosedEventArgs { 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 ClaimedPosPrinterClosedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ClaimedPosPrinterClosedEventArgs {} unsafe impl ::core::marker::Sync for ClaimedPosPrinterClosedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedReceiptPrinter(pub ::windows::core::IInspectable); impl ClaimedReceiptPrinter { pub fn SidewaysMaxLines(&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__) } } pub fn SidewaysMaxChars(&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__) } } pub fn LinesToPaperCut(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Foundation")] pub fn PageSize(&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).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation")] pub fn PrintArea(&self) -> ::windows::core::Result<super::super::Foundation::Rect> { let this = self; unsafe { let mut result__: super::super::Foundation::Rect = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Rect>(result__) } } pub fn CreateJob(&self) -> ::windows::core::Result<ReceiptPrintJob> { let this = 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::<ReceiptPrintJob>(result__) } } pub fn SetCharactersPerLine(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharactersPerLine(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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__) } } pub fn SetLineHeight(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineHeight(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetLineSpacing(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineSpacing(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn LineWidth(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetIsLetterQuality(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsLetterQuality(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEnd(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetColorCartridge(&self, value: PosPrinterColorCartridge) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn ColorCartridge(&self) -> ::windows::core::Result<PosPrinterColorCartridge> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: PosPrinterColorCartridge = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCartridge>(result__) } } pub fn IsCoverOpen(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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 IsCartridgeRemoved(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsCartridgeEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsHeadCleaning(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReadyToPrint(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn ValidateData<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), data.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ClaimedReceiptPrinter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedReceiptPrinter;{9ad27a74-dd61-4ee2-9837-5b5d72d538b9})"); } unsafe impl ::windows::core::Interface for ClaimedReceiptPrinter { type Vtable = IClaimedReceiptPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ad27a74_dd61_4ee2_9837_5b5d72d538b9); } impl ::windows::core::RuntimeName for ClaimedReceiptPrinter { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedReceiptPrinter"; } impl ::core::convert::From<ClaimedReceiptPrinter> for ::windows::core::IUnknown { fn from(value: ClaimedReceiptPrinter) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedReceiptPrinter> for ::windows::core::IUnknown { fn from(value: &ClaimedReceiptPrinter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedReceiptPrinter { 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 ClaimedReceiptPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedReceiptPrinter> for ::windows::core::IInspectable { fn from(value: ClaimedReceiptPrinter) -> Self { value.0 } } impl ::core::convert::From<&ClaimedReceiptPrinter> for ::windows::core::IInspectable { fn from(value: &ClaimedReceiptPrinter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedReceiptPrinter { 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 ClaimedReceiptPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ClaimedReceiptPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: ClaimedReceiptPrinter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ClaimedReceiptPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: &ClaimedReceiptPrinter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for ClaimedReceiptPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for &ClaimedReceiptPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::core::convert::TryInto::<ICommonClaimedPosPrinterStation>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for ClaimedReceiptPrinter {} unsafe impl ::core::marker::Sync for ClaimedReceiptPrinter {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ClaimedSlipPrinter(pub ::windows::core::IInspectable); impl ClaimedSlipPrinter { pub fn SidewaysMaxLines(&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__) } } pub fn SidewaysMaxChars(&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__) } } pub fn MaxLines(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn LinesNearEndToEnd(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn PrintSide(&self) -> ::windows::core::Result<PosPrinterPrintSide> { let this = self; unsafe { let mut result__: PosPrinterPrintSide = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterPrintSide>(result__) } } #[cfg(feature = "Foundation")] pub fn PageSize(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation")] pub fn PrintArea(&self) -> ::windows::core::Result<super::super::Foundation::Rect> { let this = self; unsafe { let mut result__: super::super::Foundation::Rect = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Rect>(result__) } } pub fn OpenJaws(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this)).ok() } } pub fn CloseJaws(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn InsertSlipAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, timeout: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), timeout.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveSlipAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, timeout: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), timeout.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } pub fn ChangePrintSide(&self, printside: PosPrinterPrintSide) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), printside).ok() } } pub fn CreateJob(&self) -> ::windows::core::Result<SlipPrintJob> { 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::<SlipPrintJob>(result__) } } pub fn SetCharactersPerLine(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharactersPerLine(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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__) } } pub fn SetLineHeight(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineHeight(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetLineSpacing(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineSpacing(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn LineWidth(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetIsLetterQuality(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsLetterQuality(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEnd(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetColorCartridge(&self, value: PosPrinterColorCartridge) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn ColorCartridge(&self) -> ::windows::core::Result<PosPrinterColorCartridge> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: PosPrinterColorCartridge = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCartridge>(result__) } } pub fn IsCoverOpen(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(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 IsCartridgeRemoved(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsCartridgeEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsHeadCleaning(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmpty(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReadyToPrint(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn ValidateData<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonClaimedPosPrinterStation>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), data.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ClaimedSlipPrinter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ClaimedSlipPrinter;{bd5deff2-af90-4e8a-b77b-e3ae9ca63a7f})"); } unsafe impl ::windows::core::Interface for ClaimedSlipPrinter { type Vtable = IClaimedSlipPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbd5deff2_af90_4e8a_b77b_e3ae9ca63a7f); } impl ::windows::core::RuntimeName for ClaimedSlipPrinter { const NAME: &'static str = "Windows.Devices.PointOfService.ClaimedSlipPrinter"; } impl ::core::convert::From<ClaimedSlipPrinter> for ::windows::core::IUnknown { fn from(value: ClaimedSlipPrinter) -> Self { value.0 .0 } } impl ::core::convert::From<&ClaimedSlipPrinter> for ::windows::core::IUnknown { fn from(value: &ClaimedSlipPrinter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ClaimedSlipPrinter { 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 ClaimedSlipPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ClaimedSlipPrinter> for ::windows::core::IInspectable { fn from(value: ClaimedSlipPrinter) -> Self { value.0 } } impl ::core::convert::From<&ClaimedSlipPrinter> for ::windows::core::IInspectable { fn from(value: &ClaimedSlipPrinter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ClaimedSlipPrinter { 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 ClaimedSlipPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ClaimedSlipPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: ClaimedSlipPrinter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ClaimedSlipPrinter> for ICommonClaimedPosPrinterStation { type Error = ::windows::core::Error; fn try_from(value: &ClaimedSlipPrinter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for ClaimedSlipPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonClaimedPosPrinterStation> for &ClaimedSlipPrinter { fn into_param(self) -> ::windows::core::Param<'a, ICommonClaimedPosPrinterStation> { ::core::convert::TryInto::<ICommonClaimedPosPrinterStation>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for ClaimedSlipPrinter {} unsafe impl ::core::marker::Sync for ClaimedSlipPrinter {} #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScanner(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScanner { type Vtable = IBarcodeScanner_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbea33e06_b264_4f03_a9c1_45b20f01134f); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScanner_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, 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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, level: UnifiedPosHealthCheckLevel, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, barcodesymbology: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams")))] usize, #[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, profile: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, 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 IBarcodeScanner2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScanner2 { type Vtable = IBarcodeScanner2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x89215167_8cee_436d_89ab_8dfb43bb4286); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScanner2_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 IBarcodeScannerCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerCapabilities { type Vtable = IBarcodeScannerCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc60691e4_f2c8_4420_a307_b12ef6622857); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerCapabilities_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 UnifiedPosPowerReportingType) -> ::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, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerCapabilities1(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerCapabilities1 { type Vtable = IBarcodeScannerCapabilities1_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8e5ab3e9_0e2c_472f_a1cc_ee8054b6a684); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerCapabilities1_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerCapabilities2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerCapabilities2 { type Vtable = IBarcodeScannerCapabilities2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf211cfec_e1a1_4ea8_9abc_92b1596270ab); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerCapabilities2_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerDataReceivedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerDataReceivedEventArgs { type Vtable = IBarcodeScannerDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4234a7e2_ed97_467d_ad2b_01e44313a929); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerDataReceivedEventArgs_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 IBarcodeScannerErrorOccurredEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerErrorOccurredEventArgs { type Vtable = IBarcodeScannerErrorOccurredEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2cd2602f_cf3a_4002_a75a_c5ec468f0a20); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerErrorOccurredEventArgs_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 bool) -> ::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 IBarcodeScannerImagePreviewReceivedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerImagePreviewReceivedEventArgs { type Vtable = IBarcodeScannerImagePreviewReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3b7de85_6e8b_434e_9f58_06ef26bc4baf); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerImagePreviewReceivedEventArgs_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 = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerReport(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerReport { type Vtable = IBarcodeScannerReport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ce4d8b0_a489_4b96_86c4_f0bf8a37753d); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerReport_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 = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerReportFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerReportFactory { type Vtable = IBarcodeScannerReportFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa2547326_2013_457c_8963_49c15dca78ce); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerReportFactory_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 = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, scandatatype: u32, scandata: ::windows::core::RawPtr, scandatalabel: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerStatics { type Vtable = IBarcodeScannerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d115f6f_da49_41e8_8c8c_f0cb62a9c4fc); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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 IBarcodeScannerStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerStatics2 { type Vtable = IBarcodeScannerStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8652473_a36f_4007_b1d0_279ebe92a656); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerStatics2_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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeScannerStatusUpdatedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeScannerStatusUpdatedEventArgs { type Vtable = IBarcodeScannerStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x355d8586_9c43_462b_a91a_816dc97f452c); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeScannerStatusUpdatedEventArgs_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 BarcodeScannerStatus) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeSymbologiesStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeSymbologiesStatics { type Vtable = IBarcodeSymbologiesStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca8549bb_06d2_43f4_a44b_c620679fd8d0); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeSymbologiesStatics_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, scandatatype: u32, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeSymbologiesStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeSymbologiesStatics2 { type Vtable = IBarcodeSymbologiesStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8b7518f4_99d0_40bf_9424_b91d6dd4c6e0); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeSymbologiesStatics2_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, ); #[repr(transparent)] #[doc(hidden)] pub struct IBarcodeSymbologyAttributes(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IBarcodeSymbologyAttributes { type Vtable = IBarcodeSymbologyAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66413a78_ab7a_4ada_8ece_936014b2ead7); } #[repr(C)] #[doc(hidden)] pub struct IBarcodeSymbologyAttributes_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, 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, 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, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut BarcodeSymbologyDecodeLengthKind) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: BarcodeSymbologyDecodeLengthKind) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICashDrawer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawer { type Vtable = ICashDrawer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f88f5c8_de54_4aee_a890_920bcbfe30fc); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawer_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, 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 bool) -> ::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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, level: UnifiedPosHealthCheckLevel, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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 ICashDrawerCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerCapabilities { type Vtable = ICashDrawerCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bc6de0b_e8e7_4b1f_b1d1_3e501ad08247); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerCapabilities_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 UnifiedPosPowerReportingType) -> ::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, 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, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICashDrawerCloseAlarm(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerCloseAlarm { type Vtable = ICashDrawerCloseAlarm_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bf88cc7_6f63_430e_ab3b_95d75ffbe87f); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerCloseAlarm_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, 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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, #[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, #[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, 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, #[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 ICashDrawerEventSource(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerEventSource { type Vtable = ICashDrawerEventSource_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe006e46c_f2f9_442f_8dd6_06c10a4227ba); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerEventSource_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, 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, #[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)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICashDrawerEventSourceEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerEventSourceEventArgs { type Vtable = ICashDrawerEventSourceEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69cb3bc1_147f_421c_9c23_090123bb786c); } impl ICashDrawerEventSourceEventArgs { pub fn CashDrawer(&self) -> ::windows::core::Result<CashDrawer> { 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::<CashDrawer>(result__) } } } unsafe impl ::windows::core::RuntimeType for ICashDrawerEventSourceEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{69cb3bc1-147f-421c-9c23-090123bb786c}"); } impl ::core::convert::From<ICashDrawerEventSourceEventArgs> for ::windows::core::IUnknown { fn from(value: ICashDrawerEventSourceEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ICashDrawerEventSourceEventArgs> for ::windows::core::IUnknown { fn from(value: &ICashDrawerEventSourceEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICashDrawerEventSourceEventArgs { 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 ICashDrawerEventSourceEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICashDrawerEventSourceEventArgs> for ::windows::core::IInspectable { fn from(value: ICashDrawerEventSourceEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ICashDrawerEventSourceEventArgs> for ::windows::core::IInspectable { fn from(value: &ICashDrawerEventSourceEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICashDrawerEventSourceEventArgs { 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 ICashDrawerEventSourceEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerEventSourceEventArgs_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 ICashDrawerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerStatics { type Vtable = ICashDrawerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdfa0955a_d437_4fff_b547_dda969a4f883); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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 ICashDrawerStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerStatics2 { type Vtable = ICashDrawerStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3e818121_8c42_40e8_9c0e_40297048104c); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerStatics2_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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICashDrawerStatus(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerStatus { type Vtable = ICashDrawerStatus_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bbd78bf_dca1_4e06_99eb_5af6a5aec108); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerStatus_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 CashDrawerStatusKind) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ICashDrawerStatusUpdatedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICashDrawerStatusUpdatedEventArgs { type Vtable = ICashDrawerStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30aae98a_0d70_459c_9553_87e124c52488); } #[repr(C)] #[doc(hidden)] pub struct ICashDrawerStatusUpdatedEventArgs_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 IClaimedBarcodeScanner(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScanner { type Vtable = IClaimedBarcodeScanner_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4a63b49c_8fa4_4332_bb26_945d11d81e0f); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScanner_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, 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 bool) -> ::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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, symbologies: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statistics: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, profile: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, 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, 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, #[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, #[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, #[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, #[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, #[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 IClaimedBarcodeScanner1(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScanner1 { type Vtable = IClaimedBarcodeScanner1_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf61aad0c_8551_42b4_998c_970c20210a22); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScanner1_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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedBarcodeScanner2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScanner2 { type Vtable = IClaimedBarcodeScanner2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe3b59e8c_2d8b_4f70_8af3_3448bedd5fe2); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScanner2_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, barcodesymbology: u32, 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, barcodesymbology: u32, attributes: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedBarcodeScanner3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScanner3 { type Vtable = IClaimedBarcodeScanner3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe6ceb430_712e_45fc_8b86_cd55f5aef79d); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScanner3_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::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, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedBarcodeScanner4(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScanner4 { type Vtable = IClaimedBarcodeScanner4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d501f97_376a_41a8_a230_2f37c1949dde); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScanner4_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, 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 IClaimedBarcodeScannerClosedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedBarcodeScannerClosedEventArgs { type Vtable = IClaimedBarcodeScannerClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcf7d5489_a22c_4c65_a901_88d77d833954); } #[repr(C)] #[doc(hidden)] pub struct IClaimedBarcodeScannerClosedEventArgs_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 IClaimedCashDrawer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedCashDrawer { type Vtable = IClaimedCashDrawer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xca3f99af_abb8_42c1_8a84_5c66512f5a75); } #[repr(C)] #[doc(hidden)] pub struct IClaimedCashDrawer_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, 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, 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, #[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, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statistics: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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 IClaimedCashDrawer2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedCashDrawer2 { type Vtable = IClaimedCashDrawer2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9cbab5a2_de42_4d5b_b0c1_9b57a2ba89c3); } #[repr(C)] #[doc(hidden)] pub struct IClaimedCashDrawer2_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, 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 IClaimedCashDrawerClosedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedCashDrawerClosedEventArgs { type Vtable = IClaimedCashDrawerClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcc573f33_3f34_4c5c_baae_deadf16cd7fa); } #[repr(C)] #[doc(hidden)] pub struct IClaimedCashDrawerClosedEventArgs_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 IClaimedJournalPrinter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedJournalPrinter { type Vtable = IClaimedJournalPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x67ea0630_517d_487f_9fdf_d2e0a0a264a5); } #[repr(C)] #[doc(hidden)] pub struct IClaimedJournalPrinter_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 IClaimedLineDisplay(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedLineDisplay { type Vtable = IClaimedLineDisplay_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x120ac970_9a75_4acf_aae7_09972bcf8794); } #[repr(C)] #[doc(hidden)] pub struct IClaimedLineDisplay_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, 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, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::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) -> ::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 IClaimedLineDisplay2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedLineDisplay2 { type Vtable = IClaimedLineDisplay2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa31c75ed_41f5_4e76_a074_795e47a46e97); } #[repr(C)] #[doc(hidden)] pub struct IClaimedLineDisplay2_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_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, level: UnifiedPosHealthCheckLevel, 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, 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, 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, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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, #[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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, attributes: ::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, descriptor: u32, descriptorstate: LineDisplayDescriptorState, 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, 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, viewport: super::super::Foundation::Rect, windowsize: super::super::Foundation::Size, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedLineDisplay3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedLineDisplay3 { type Vtable = IClaimedLineDisplay3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x642ecd92_e9d4_4ecc_af75_329c274cd18f); } #[repr(C)] #[doc(hidden)] pub struct IClaimedLineDisplay3_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, 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 IClaimedLineDisplayClosedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedLineDisplayClosedEventArgs { type Vtable = IClaimedLineDisplayClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf915f364_d3d5_4f10_b511_90939edfacd8); } #[repr(C)] #[doc(hidden)] pub struct IClaimedLineDisplayClosedEventArgs_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 IClaimedLineDisplayStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedLineDisplayStatics { type Vtable = IClaimedLineDisplayStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x78ca98fb_8b6b_4973_86f0_3e570c351825); } #[repr(C)] #[doc(hidden)] pub struct IClaimedLineDisplayStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedMagneticStripeReader(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedMagneticStripeReader { type Vtable = IClaimedMagneticStripeReader_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x475ca8f3_9417_48bc_b9d7_4163a7844c02); } #[repr(C)] #[doc(hidden)] pub struct IClaimedMagneticStripeReader_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, 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 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: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MagneticStripeReaderTrackIds) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderTrackIds) -> ::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, #[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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MagneticStripeReaderErrorReportingType) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, responseToken_array_size: u32, responsetoken: *const u8, 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, responseToken_array_size: u32, responsetoken: *const u8, 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, key: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, keyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statistics: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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, #[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, #[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, #[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, #[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 IClaimedMagneticStripeReader2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedMagneticStripeReader2 { type Vtable = IClaimedMagneticStripeReader2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x236fafdf_e2dc_4d7d_9c78_060df2bf2928); } #[repr(C)] #[doc(hidden)] pub struct IClaimedMagneticStripeReader2_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, 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 IClaimedMagneticStripeReaderClosedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedMagneticStripeReaderClosedEventArgs { type Vtable = IClaimedMagneticStripeReaderClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x14ada93a_adcd_4c80_acda_c3eaed2647e1); } #[repr(C)] #[doc(hidden)] pub struct IClaimedMagneticStripeReaderClosedEventArgs_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 IClaimedPosPrinter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedPosPrinter { type Vtable = IClaimedPosPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6d64ce0c_e03e_4b14_a38e_c28c34b86353); } #[repr(C)] #[doc(hidden)] pub struct IClaimedPosPrinter_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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::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: PosPrinterMapMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut PosPrinterMapMode) -> ::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, #[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, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statistics: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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 IClaimedPosPrinter2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedPosPrinter2 { type Vtable = IClaimedPosPrinter2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5bf7a3d5_5198_437a_82df_589993fa77e1); } #[repr(C)] #[doc(hidden)] pub struct IClaimedPosPrinter2_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, 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 IClaimedPosPrinterClosedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedPosPrinterClosedEventArgs { type Vtable = IClaimedPosPrinterClosedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2b7a27b_4d40_471d_92ed_63375b18c788); } #[repr(C)] #[doc(hidden)] pub struct IClaimedPosPrinterClosedEventArgs_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 IClaimedReceiptPrinter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedReceiptPrinter { type Vtable = IClaimedReceiptPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ad27a74_dd61_4ee2_9837_5b5d72d538b9); } #[repr(C)] #[doc(hidden)] pub struct IClaimedReceiptPrinter_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, #[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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Rect) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IClaimedSlipPrinter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IClaimedSlipPrinter { type Vtable = IClaimedSlipPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbd5deff2_af90_4e8a_b77b_e3ae9ca63a7f); } #[repr(C)] #[doc(hidden)] pub struct IClaimedSlipPrinter_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut PosPrinterPrintSide) -> ::windows::core::HRESULT, #[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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Rect) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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, timeout: super::super::Foundation::TimeSpan, 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, timeout: super::super::Foundation::TimeSpan, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, printside: PosPrinterPrintSide) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICommonClaimedPosPrinterStation(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICommonClaimedPosPrinterStation { type Vtable = ICommonClaimedPosPrinterStation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7eb66a8_fe8a_4cfb_8b42_e35b280cb27c); } impl ICommonClaimedPosPrinterStation { pub fn SetCharactersPerLine(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharactersPerLine(&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__) } } pub fn SetLineHeight(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineHeight(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetLineSpacing(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() } } pub fn LineSpacing(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn LineWidth(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetIsLetterQuality(&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 IsLetterQuality(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEnd(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetColorCartridge(&self, value: PosPrinterColorCartridge) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() } } pub fn ColorCartridge(&self) -> ::windows::core::Result<PosPrinterColorCartridge> { let this = self; unsafe { let mut result__: PosPrinterColorCartridge = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCartridge>(result__) } } pub fn IsCoverOpen(&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 IsCartridgeRemoved(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsCartridgeEmpty(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsHeadCleaning(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmpty(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReadyToPrint(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn ValidateData<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), data.into_param().abi(), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ICommonClaimedPosPrinterStation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{b7eb66a8-fe8a-4cfb-8b42-e35b280cb27c}"); } impl ::core::convert::From<ICommonClaimedPosPrinterStation> for ::windows::core::IUnknown { fn from(value: ICommonClaimedPosPrinterStation) -> Self { value.0 .0 } } impl ::core::convert::From<&ICommonClaimedPosPrinterStation> for ::windows::core::IUnknown { fn from(value: &ICommonClaimedPosPrinterStation) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICommonClaimedPosPrinterStation { 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 ICommonClaimedPosPrinterStation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICommonClaimedPosPrinterStation> for ::windows::core::IInspectable { fn from(value: ICommonClaimedPosPrinterStation) -> Self { value.0 } } impl ::core::convert::From<&ICommonClaimedPosPrinterStation> for ::windows::core::IInspectable { fn from(value: &ICommonClaimedPosPrinterStation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICommonClaimedPosPrinterStation { 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 ICommonClaimedPosPrinterStation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICommonClaimedPosPrinterStation_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: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: PosPrinterColorCartridge) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut PosPrinterColorCartridge) -> ::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, 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, 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, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICommonPosPrintStationCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICommonPosPrintStationCapabilities { type Vtable = ICommonPosPrintStationCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xde5b52ca_e02e_40e9_9e5e_1b488e6aacfc); } impl ICommonPosPrintStationCapabilities { pub fn IsPrinterPresent(&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 IsDualColorSupported(&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 ColorCartridgeCapabilities(&self) -> ::windows::core::Result<PosPrinterColorCapabilities> { let this = self; unsafe { let mut result__: PosPrinterColorCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCapabilities>(result__) } } pub fn CartridgeSensors(&self) -> ::windows::core::Result<PosPrinterCartridgeSensors> { let this = self; unsafe { let mut result__: PosPrinterCartridgeSensors = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterCartridgeSensors>(result__) } } pub fn IsBoldSupported(&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 IsItalicSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&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 IsDoubleHighPrintSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleHighDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmptySensorSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEndSensorSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharactersPerLine(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { 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::<super::super::Foundation::Collections::IVectorView<u32>>(result__) } } } unsafe impl ::windows::core::RuntimeType for ICommonPosPrintStationCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{de5b52ca-e02e-40e9-9e5e-1b488e6aacfc}"); } impl ::core::convert::From<ICommonPosPrintStationCapabilities> for ::windows::core::IUnknown { fn from(value: ICommonPosPrintStationCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&ICommonPosPrintStationCapabilities> for ::windows::core::IUnknown { fn from(value: &ICommonPosPrintStationCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICommonPosPrintStationCapabilities { 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 ICommonPosPrintStationCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICommonPosPrintStationCapabilities> for ::windows::core::IInspectable { fn from(value: ICommonPosPrintStationCapabilities) -> Self { value.0 } } impl ::core::convert::From<&ICommonPosPrintStationCapabilities> for ::windows::core::IInspectable { fn from(value: &ICommonPosPrintStationCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICommonPosPrintStationCapabilities { 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 ICommonPosPrintStationCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICommonPosPrintStationCapabilities_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, result__: *mut PosPrinterColorCapabilities) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut PosPrinterCartridgeSensors) -> ::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, 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, 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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::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)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICommonReceiptSlipCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ICommonReceiptSlipCapabilities { type Vtable = ICommonReceiptSlipCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x09286b8b_9873_4d05_bfbe_4727a6038f69); } impl ICommonReceiptSlipCapabilities { pub fn IsBarcodeSupported(&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 IsBitmapSupported(&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 IsLeft90RotationSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsRight90RotationSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn Is180RotationSupported(&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 IsPrintAreaSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn RuledLineCapabilities(&self) -> ::windows::core::Result<PosPrinterRuledLineCapabilities> { let this = self; unsafe { let mut result__: PosPrinterRuledLineCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterRuledLineCapabilities>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBarcodeRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { 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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBitmapRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { 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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } pub fn IsPrinterPresent(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDualColorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 ColorCartridgeCapabilities(&self) -> ::windows::core::Result<PosPrinterColorCapabilities> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterColorCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCapabilities>(result__) } } pub fn CartridgeSensors(&self) -> ::windows::core::Result<PosPrinterCartridgeSensors> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterCartridgeSensors = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterCartridgeSensors>(result__) } } pub fn IsBoldSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsItalicSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDoubleHighPrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleHighDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmptySensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEndSensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharactersPerLine(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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::<super::super::Foundation::Collections::IVectorView<u32>>(result__) } } } unsafe impl ::windows::core::RuntimeType for ICommonReceiptSlipCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{09286b8b-9873-4d05-bfbe-4727a6038f69}"); } impl ::core::convert::From<ICommonReceiptSlipCapabilities> for ::windows::core::IUnknown { fn from(value: ICommonReceiptSlipCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&ICommonReceiptSlipCapabilities> for ::windows::core::IUnknown { fn from(value: &ICommonReceiptSlipCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICommonReceiptSlipCapabilities { 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 ICommonReceiptSlipCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ICommonReceiptSlipCapabilities> for ::windows::core::IInspectable { fn from(value: ICommonReceiptSlipCapabilities) -> Self { value.0 } } impl ::core::convert::From<&ICommonReceiptSlipCapabilities> for ::windows::core::IInspectable { fn from(value: &ICommonReceiptSlipCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ICommonReceiptSlipCapabilities { 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 ICommonReceiptSlipCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ICommonReceiptSlipCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: ICommonReceiptSlipCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ICommonReceiptSlipCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: &ICommonReceiptSlipCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for ICommonReceiptSlipCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for &ICommonReceiptSlipCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::core::convert::TryInto::<ICommonPosPrintStationCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[repr(C)] #[doc(hidden)] pub struct ICommonReceiptSlipCapabilities_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, 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, 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, result__: *mut PosPrinterRuledLineCapabilities) -> ::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, #[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 IJournalPrintJob(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IJournalPrintJob { type Vtable = IJournalPrintJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f4f2864_f3f0_55d0_8c39_74cc91783eed); } #[repr(C)] #[doc(hidden)] pub struct IJournalPrintJob_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, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, printoptions: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, linecount: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, distance: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IJournalPrinterCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IJournalPrinterCapabilities { type Vtable = IJournalPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3b5ccc43_e047_4463_bb58_17b5ba1d8056); } #[repr(C)] #[doc(hidden)] pub struct IJournalPrinterCapabilities_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 IJournalPrinterCapabilities2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IJournalPrinterCapabilities2 { type Vtable = IJournalPrinterCapabilities2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x03b0b645_33b8_533b_baaa_a4389283ab0a); } #[repr(C)] #[doc(hidden)] pub struct IJournalPrinterCapabilities2_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, 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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplay(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplay { type Vtable = ILineDisplay_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x24f5df4e_3c99_44e2_b73f_e51be3637a8c); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplay_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, 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, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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 ILineDisplay2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplay2 { type Vtable = ILineDisplay2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc296a628_ef44_40f3_bd1c_b04c6a5cdc7d); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplay2_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, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayAttributes(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayAttributes { type Vtable = ILineDisplayAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc17de99c_229a_4c14_a6f1_b4e4b1fead92); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayAttributes_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, 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, #[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::Size) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Size) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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 ::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 ILineDisplayCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayCapabilities { type Vtable = ILineDisplayCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5a15b5d1_8dc5_4b9c_9172_303e47b70c55); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayCapabilities_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, result__: *mut UnifiedPosPowerReportingType) -> ::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, 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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut LineDisplayTextAttributeGranularity) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut LineDisplayTextAttributeGranularity) -> ::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, 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, 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, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayCursor(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayCursor { type Vtable = ILineDisplayCursor_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xecdffc45_754a_4e3b_ab2b_151181085605); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayCursor_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, 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, 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, result__: *mut bool) -> ::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, attributes: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayCursorAttributes(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayCursorAttributes { type Vtable = ILineDisplayCursorAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4e2d54fe_4ffd_4190_aae1_ce285f20c896); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayCursorAttributes_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut LineDisplayCursorType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: LineDisplayCursorType) -> ::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")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Point) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayCustomGlyphs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayCustomGlyphs { type Vtable = ILineDisplayCustomGlyphs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2257f63c_f263_44f1_a1a0_e750a6a0ec54); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayCustomGlyphs_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::Size) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[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, #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, glyphcode: u32, glyphdata: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayMarquee(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayMarquee { type Vtable = ILineDisplayMarquee_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa3d33e3e_f46a_4b7a_bc21_53eb3b57f8b4); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayMarquee_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 LineDisplayMarqueeFormat) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: LineDisplayMarqueeFormat) -> ::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, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, direction: LineDisplayScrollDirection, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayStatics { type Vtable = ILineDisplayStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x022dc0b6_11b0_4690_9547_0b39c5af2114); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayStatics2 { type Vtable = ILineDisplayStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x600c3f1c_77ab_4968_a7de_c02ff169f2cc); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayStatics2_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 ILineDisplayStatisticsCategorySelector(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayStatisticsCategorySelector { type Vtable = ILineDisplayStatisticsCategorySelector_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb521c46b_9274_4d24_94f3_b6017b832444); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayStatisticsCategorySelector_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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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 ILineDisplayStatusUpdatedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayStatusUpdatedEventArgs { type Vtable = ILineDisplayStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xddd57c1a_86fb_4eba_93d1_6f5eda52b752); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayStatusUpdatedEventArgs_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 LineDisplayPowerStatus) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayStoredBitmap(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayStoredBitmap { type Vtable = ILineDisplayStoredBitmap_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf621515b_d81e_43ba_bf1b_bcfa3c785ba0); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayStoredBitmap_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, #[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 ILineDisplayWindow(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayWindow { type Vtable = ILineDisplayWindow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd21feef4_2364_4be5_bee1_851680af4964); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayWindow_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::Size) -> ::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, #[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, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, displayattribute: LineDisplayTextAttribute, 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, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, displayattribute: LineDisplayTextAttribute, startposition: super::super::Foundation::Point, 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, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, 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, direction: LineDisplayScrollDirection, numberofcolumnsorrows: u32, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ILineDisplayWindow2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ILineDisplayWindow2 { type Vtable = ILineDisplayWindow2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa95ce2e6_bdd8_4365_8e11_de94de8dff02); } #[repr(C)] #[doc(hidden)] pub struct ILineDisplayWindow2_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, #[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, bitmap: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, offsetinpixels: super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, offsetinpixels: super::super::Foundation::Point, widthinpixels: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReader(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReader { type Vtable = IMagneticStripeReader_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a92b015_47c3_468a_9333_0c6517574883); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReader_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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result_size__: *mut u32, result__: *mut *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderAuthenticationProtocol) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, level: UnifiedPosHealthCheckLevel, 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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderErrorReportingType) -> ::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 IMagneticStripeReaderAamvaCardDataReceivedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderAamvaCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderAamvaCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a4bbd51_c316_4910_87f3_7a62ba862d31); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderAamvaCardDataReceivedEventArgs_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, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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 IMagneticStripeReaderBankCardDataReceivedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderBankCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderBankCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2e958823_a31a_4763_882c_23725e39b08e); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderBankCardDataReceivedEventArgs_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, 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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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 IMagneticStripeReaderCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderCapabilities { type Vtable = IMagneticStripeReaderCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7128809c_c440_44a2_a467_469175d02896); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderCapabilities_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, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderAuthenticationLevel) -> ::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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut UnifiedPosPowerReportingType) -> ::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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderCardTypesStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderCardTypesStatics { type Vtable = IMagneticStripeReaderCardTypesStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x528f2c5d_2986_474f_8454_7ccd05928d5f); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderCardTypesStatics_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderEncryptionAlgorithmsStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderEncryptionAlgorithmsStatics { type Vtable = IMagneticStripeReaderEncryptionAlgorithmsStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x53b57350_c3db_4754_9c00_41392374a109); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderEncryptionAlgorithmsStatics_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderErrorOccurredEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderErrorOccurredEventArgs { type Vtable = IMagneticStripeReaderErrorOccurredEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1fedf95d_2c84_41ad_b778_f2356a789ab1); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderErrorOccurredEventArgs_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 MagneticStripeReaderTrackErrorType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderTrackErrorType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderTrackErrorType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MagneticStripeReaderTrackErrorType) -> ::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 IMagneticStripeReaderReport(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderReport { type Vtable = IMagneticStripeReaderReport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6a5b6047_99b0_4188_bef1_eddf79f78fe6); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderReport_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, 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, #[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, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderStatics { type Vtable = IMagneticStripeReaderStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc45fab4a_efd7_4760_a5ce_15b0e47e94eb); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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 IMagneticStripeReaderStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderStatics2 { type Vtable = IMagneticStripeReaderStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cadc362_d667_48fa_86bc_f5ae1189262b); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderStatics2_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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderStatusUpdatedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderStatusUpdatedEventArgs { type Vtable = IMagneticStripeReaderStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x09cc6bb0_3262_401d_9e8a_e80d6358906b); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderStatusUpdatedEventArgs_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 MagneticStripeReaderStatus) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderTrackData(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderTrackData { type Vtable = IMagneticStripeReaderTrackData_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x104cf671_4a9d_446e_abc5_20402307ba36); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderTrackData_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 = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaf0a5514_59cc_4a60_99e8_99a53dace5aa); } #[repr(C)] #[doc(hidden)] pub struct IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs_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 IPosPrinter(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinter { type Vtable = IPosPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2a03c10e_9a19_4a01_994f_12dfad6adcbf); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinter_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, result__: *mut ::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, #[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, #[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, level: UnifiedPosHealthCheckLevel, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statisticscategories: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] 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 IPosPrinter2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinter2 { type Vtable = IPosPrinter2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x248475e8_8b98_5517_8e48_760e86f68987); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinter2_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, typeface: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterCapabilities { type Vtable = IPosPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcde95721_4380_4985_adc5_39db30cd93bc); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterCapabilities_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 UnifiedPosPowerReportingType) -> ::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, result__: *mut u32) -> ::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, result__: *mut 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, 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 IPosPrinterCharacterSetIdsStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterCharacterSetIdsStatics { type Vtable = IPosPrinterCharacterSetIdsStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5c709eff_709a_4fe7_b215_06a748a38b39); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterCharacterSetIdsStatics_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterFontProperty(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterFontProperty { type Vtable = IPosPrinterFontProperty_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa7f4e93a_f8ac_5f04_84d2_29b16d8a633c); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterFontProperty_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, result__: *mut bool) -> ::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)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPosPrinterJob(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterJob { type Vtable = IPosPrinterJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9a94005c_0615_4591_a58f_30f87edfe2e4); } impl IPosPrinterJob { pub fn Print<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintNewline(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ExecuteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for IPosPrinterJob { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{9a94005c-0615-4591-a58f-30f87edfe2e4}"); } impl ::core::convert::From<IPosPrinterJob> for ::windows::core::IUnknown { fn from(value: IPosPrinterJob) -> Self { value.0 .0 } } impl ::core::convert::From<&IPosPrinterJob> for ::windows::core::IUnknown { fn from(value: &IPosPrinterJob) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPosPrinterJob { 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 IPosPrinterJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IPosPrinterJob> for ::windows::core::IInspectable { fn from(value: IPosPrinterJob) -> Self { value.0 } } impl ::core::convert::From<&IPosPrinterJob> for ::windows::core::IInspectable { fn from(value: &IPosPrinterJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IPosPrinterJob { 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 IPosPrinterJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterJob_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, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::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, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterPrintOptions(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterPrintOptions { type Vtable = IPosPrinterPrintOptions_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a2e16fd_1d02_5a58_9d59_bfcde76fde86); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterPrintOptions_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 u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::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 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 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 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 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 PosPrinterAlignment) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: PosPrinterAlignment) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterReleaseDeviceRequestedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterReleaseDeviceRequestedEventArgs { type Vtable = IPosPrinterReleaseDeviceRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2bcba359_1cef_40b2_9ecb_f927f856ae3c); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterReleaseDeviceRequestedEventArgs_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 IPosPrinterStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterStatics { type Vtable = IPosPrinterStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8ce0d4ea_132f_4cdf_a64a_2d0d7c96a85b); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterStatics_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, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, 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 IPosPrinterStatics2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterStatics2 { type Vtable = IPosPrinterStatics2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeecd2c1c_b0d0_42e7_b137_b89b16244d41); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterStatics2_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, connectiontypes: PosConnectionTypes, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterStatus(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterStatus { type Vtable = IPosPrinterStatus_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd1f0c730_da40_4328_bf76_5156fa33b747); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterStatus_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 PosPrinterStatusKind) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPosPrinterStatusUpdatedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPosPrinterStatusUpdatedEventArgs { type Vtable = IPosPrinterStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2edb87df_13a6_428d_ba81_b0e7c3e5a3cd); } #[repr(C)] #[doc(hidden)] pub struct IPosPrinterStatusUpdatedEventArgs_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)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IReceiptOrSlipJob(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IReceiptOrSlipJob { type Vtable = IReceiptOrSlipJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x532199be_c8c3_4dc2_89e9_5c4a37b34ddc); } impl IReceiptOrSlipJob { pub fn SetBarcodeRotation(&self, value: PosPrinterRotation) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn SetPrintRotation(&self, value: PosPrinterRotation, includebitmaps: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value, includebitmaps).ok() } } #[cfg(feature = "Foundation")] pub fn SetPrintArea<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&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 = "Graphics_Imaging")] pub fn SetBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthStandardAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetCustomAlignedBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthCustomAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), bitmapnumber).ok() } } pub fn DrawRuledLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, positionlist: Param0, linedirection: PosPrinterLineDirection, linewidth: u32, linestyle: PosPrinterLineStyle, linecolor: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), positionlist.into_param().abi(), linedirection, linewidth, linestyle, linecolor).ok() } } pub fn PrintBarcode<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignment).ok() } } pub fn PrintBarcodeCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthStandardAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintCustomAlignedBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn Print<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintNewline(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ExecuteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(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::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for IReceiptOrSlipJob { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{532199be-c8c3-4dc2-89e9-5c4a37b34ddc}"); } impl ::core::convert::From<IReceiptOrSlipJob> for ::windows::core::IUnknown { fn from(value: IReceiptOrSlipJob) -> Self { value.0 .0 } } impl ::core::convert::From<&IReceiptOrSlipJob> for ::windows::core::IUnknown { fn from(value: &IReceiptOrSlipJob) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IReceiptOrSlipJob { 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 IReceiptOrSlipJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IReceiptOrSlipJob> for ::windows::core::IInspectable { fn from(value: IReceiptOrSlipJob) -> Self { value.0 } } impl ::core::convert::From<&IReceiptOrSlipJob> for ::windows::core::IInspectable { fn from(value: &IReceiptOrSlipJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IReceiptOrSlipJob { 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 IReceiptOrSlipJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<IReceiptOrSlipJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: IReceiptOrSlipJob) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&IReceiptOrSlipJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: &IReceiptOrSlipJob) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for IReceiptOrSlipJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for &IReceiptOrSlipJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::core::convert::TryInto::<IPosPrinterJob>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[repr(C)] #[doc(hidden)] pub struct IReceiptOrSlipJob_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: PosPrinterRotation) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: PosPrinterRotation, includebitmaps: bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Rect) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignmentdistance: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignmentdistance: u32, width: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmapnumber: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, positionlist: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, linedirection: PosPrinterLineDirection, linewidth: u32, linestyle: PosPrinterLineStyle, linecolor: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignmentdistance: u32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, alignmentdistance: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, alignmentdistance: u32, width: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IReceiptPrintJob(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IReceiptPrintJob { type Vtable = IReceiptPrintJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa96066e_acad_4b79_9d0f_c0cfc08dc77b); } #[repr(C)] #[doc(hidden)] pub struct IReceiptPrintJob_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, kind: PosPrinterMarkFeedKind) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, percentage: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IReceiptPrintJob2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IReceiptPrintJob2 { type Vtable = IReceiptPrintJob2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cbc12e3_9e29_5179_bcd8_1811d3b9a10e); } #[repr(C)] #[doc(hidden)] pub struct IReceiptPrintJob2_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, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, printoptions: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, linecount: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, distance: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IReceiptPrinterCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IReceiptPrinterCapabilities { type Vtable = IReceiptPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8f0b58f_51a8_43fc_9bd5_8de272a6415b); } #[repr(C)] #[doc(hidden)] pub struct IReceiptPrinterCapabilities_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, result__: *mut PosPrinterMarkFeedCapabilities) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IReceiptPrinterCapabilities2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IReceiptPrinterCapabilities2 { type Vtable = IReceiptPrinterCapabilities2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x20030638_8a2c_55ac_9a7b_7576d8869e99); } #[repr(C)] #[doc(hidden)] pub struct IReceiptPrinterCapabilities2_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, 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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISlipPrintJob(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISlipPrintJob { type Vtable = ISlipPrintJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d88f95d_6131_5a4b_b7d5_8ef2da7b4165); } #[repr(C)] #[doc(hidden)] pub struct ISlipPrintJob_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, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, printoptions: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, linecount: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, distance: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISlipPrinterCapabilities(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISlipPrinterCapabilities { type Vtable = ISlipPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99b16399_488c_4157_8ac2_9f57f708d3db); } #[repr(C)] #[doc(hidden)] pub struct ISlipPrinterCapabilities_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, ); #[repr(transparent)] #[doc(hidden)] pub struct ISlipPrinterCapabilities2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISlipPrinterCapabilities2 { type Vtable = ISlipPrinterCapabilities2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6ff89671_2d1a_5000_87c2_b0851bfdf07e); } #[repr(C)] #[doc(hidden)] pub struct ISlipPrinterCapabilities2_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, 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, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IUnifiedPosErrorData(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IUnifiedPosErrorData { type Vtable = IUnifiedPosErrorData_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2b998c3a_555c_4889_8ed8_c599bb3a712a); } #[repr(C)] #[doc(hidden)] pub struct IUnifiedPosErrorData_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, result__: *mut UnifiedPosErrorSeverity) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut UnifiedPosErrorReason) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IUnifiedPosErrorDataFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IUnifiedPosErrorDataFactory { type Vtable = IUnifiedPosErrorDataFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b982551_1ffe_451b_a368_63e0ce465f5a); } #[repr(C)] #[doc(hidden)] pub struct IUnifiedPosErrorDataFactory_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, message: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, severity: UnifiedPosErrorSeverity, reason: UnifiedPosErrorReason, extendedreason: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct JournalPrintJob(pub ::windows::core::IInspectable); impl JournalPrintJob { pub fn Print<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintNewline(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ExecuteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::IAsyncOperation<bool>>(result__) } } pub fn Print2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, PosPrinterPrintOptions>>(&self, data: Param0, printoptions: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IJournalPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi(), printoptions.into_param().abi()).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IJournalPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), linecount).ok() } } pub fn FeedPaperByMapModeUnit(&self, distance: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IJournalPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), distance).ok() } } } unsafe impl ::windows::core::RuntimeType for JournalPrintJob { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.JournalPrintJob;{9a94005c-0615-4591-a58f-30f87edfe2e4})"); } unsafe impl ::windows::core::Interface for JournalPrintJob { type Vtable = IPosPrinterJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9a94005c_0615_4591_a58f_30f87edfe2e4); } impl ::windows::core::RuntimeName for JournalPrintJob { const NAME: &'static str = "Windows.Devices.PointOfService.JournalPrintJob"; } impl ::core::convert::From<JournalPrintJob> for ::windows::core::IUnknown { fn from(value: JournalPrintJob) -> Self { value.0 .0 } } impl ::core::convert::From<&JournalPrintJob> for ::windows::core::IUnknown { fn from(value: &JournalPrintJob) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for JournalPrintJob { 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 JournalPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<JournalPrintJob> for ::windows::core::IInspectable { fn from(value: JournalPrintJob) -> Self { value.0 } } impl ::core::convert::From<&JournalPrintJob> for ::windows::core::IInspectable { fn from(value: &JournalPrintJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for JournalPrintJob { 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 JournalPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<JournalPrintJob> for IPosPrinterJob { fn from(value: JournalPrintJob) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&JournalPrintJob> for IPosPrinterJob { fn from(value: &JournalPrintJob) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for JournalPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for &JournalPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } unsafe impl ::core::marker::Send for JournalPrintJob {} unsafe impl ::core::marker::Sync for JournalPrintJob {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct JournalPrinterCapabilities(pub ::windows::core::IInspectable); impl JournalPrinterCapabilities { pub fn IsPrinterPresent(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDualColorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 ColorCartridgeCapabilities(&self) -> ::windows::core::Result<PosPrinterColorCapabilities> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterColorCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCapabilities>(result__) } } pub fn CartridgeSensors(&self) -> ::windows::core::Result<PosPrinterCartridgeSensors> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterCartridgeSensors = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterCartridgeSensors>(result__) } } pub fn IsBoldSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsItalicSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDoubleHighPrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleHighDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmptySensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEndSensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharactersPerLine(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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::<super::super::Foundation::Collections::IVectorView<u32>>(result__) } } pub fn IsReverseVideoSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(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 IsStrikethroughSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(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 IsSuperscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsSubscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReversePaperFeedByLineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(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 IsReversePaperFeedByMapModeUnitSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IJournalPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for JournalPrinterCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.JournalPrinterCapabilities;{3b5ccc43-e047-4463-bb58-17b5ba1d8056})"); } unsafe impl ::windows::core::Interface for JournalPrinterCapabilities { type Vtable = IJournalPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3b5ccc43_e047_4463_bb58_17b5ba1d8056); } impl ::windows::core::RuntimeName for JournalPrinterCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.JournalPrinterCapabilities"; } impl ::core::convert::From<JournalPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: JournalPrinterCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&JournalPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: &JournalPrinterCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for JournalPrinterCapabilities { 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 JournalPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<JournalPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: JournalPrinterCapabilities) -> Self { value.0 } } impl ::core::convert::From<&JournalPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: &JournalPrinterCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for JournalPrinterCapabilities { 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 JournalPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<JournalPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: JournalPrinterCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&JournalPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: &JournalPrinterCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for JournalPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for &JournalPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::core::convert::TryInto::<ICommonPosPrintStationCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for JournalPrinterCapabilities {} unsafe impl ::core::marker::Sync for JournalPrinterCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplay(pub ::windows::core::IInspectable); impl LineDisplay { #[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 DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<LineDisplayCapabilities> { 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::<LineDisplayCapabilities>(result__) } } pub fn PhysicalDeviceName(&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).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn PhysicalDeviceDescription(&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).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceControlDescription(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceControlVersion(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn DeviceServiceVersion(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } #[cfg(feature = "Foundation")] pub fn ClaimAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedLineDisplay>> { 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::<super::super::Foundation::IAsyncOperation<ClaimedLineDisplay>>(result__) } } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplay>> { Self::ILineDisplayStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<LineDisplay>>(result__) }) } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplay>> { Self::ILineDisplayStatics(|this| 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::super::Foundation::IAsyncOperation<LineDisplay>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::ILineDisplayStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::ILineDisplayStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } #[cfg(feature = "Foundation")] pub fn CheckPowerStatusAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<LineDisplayPowerStatus>> { let this = &::windows::core::Interface::cast::<ILineDisplay2>(self)?; unsafe { 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::IAsyncOperation<LineDisplayPowerStatus>>(result__) } } pub fn StatisticsCategorySelector() -> ::windows::core::Result<LineDisplayStatisticsCategorySelector> { Self::ILineDisplayStatics2(|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::<LineDisplayStatisticsCategorySelector>(result__) }) } pub fn ILineDisplayStatics<R, F: FnOnce(&ILineDisplayStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<LineDisplay, ILineDisplayStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn ILineDisplayStatics2<R, F: FnOnce(&ILineDisplayStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<LineDisplay, ILineDisplayStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for LineDisplay { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplay;{24f5df4e-3c99-44e2-b73f-e51be3637a8c})"); } unsafe impl ::windows::core::Interface for LineDisplay { type Vtable = ILineDisplay_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x24f5df4e_3c99_44e2_b73f_e51be3637a8c); } impl ::windows::core::RuntimeName for LineDisplay { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplay"; } impl ::core::convert::From<LineDisplay> for ::windows::core::IUnknown { fn from(value: LineDisplay) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplay> for ::windows::core::IUnknown { fn from(value: &LineDisplay) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplay { 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 LineDisplay { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplay> for ::windows::core::IInspectable { fn from(value: LineDisplay) -> Self { value.0 } } impl ::core::convert::From<&LineDisplay> for ::windows::core::IInspectable { fn from(value: &LineDisplay) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplay { 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 LineDisplay { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<LineDisplay> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: LineDisplay) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&LineDisplay> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &LineDisplay) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for LineDisplay { 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 &LineDisplay { 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 LineDisplay {} unsafe impl ::core::marker::Sync for LineDisplay {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayAttributes(pub ::windows::core::IInspectable); impl LineDisplayAttributes { pub fn IsPowerNotifyEnabled(&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 SetIsPowerNotifyEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Brightness(&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 SetBrightness(&self, value: i32) -> ::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 BlinkRate(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetBlinkRate<'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).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ScreenSizeInCharacters(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation")] pub fn SetScreenSizeInCharacters<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Size>>(&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 CharacterSet(&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 SetCharacterSet(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsCharacterSetMappingEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsCharacterSetMappingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn CurrentWindow(&self) -> ::windows::core::Result<LineDisplayWindow> { 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::<LineDisplayWindow>(result__) } } pub fn SetCurrentWindow<'a, Param0: ::windows::core::IntoParam<'a, LineDisplayWindow>>(&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() } } } unsafe impl ::windows::core::RuntimeType for LineDisplayAttributes { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayAttributes;{c17de99c-229a-4c14-a6f1-b4e4b1fead92})"); } unsafe impl ::windows::core::Interface for LineDisplayAttributes { type Vtable = ILineDisplayAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc17de99c_229a_4c14_a6f1_b4e4b1fead92); } impl ::windows::core::RuntimeName for LineDisplayAttributes { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayAttributes"; } impl ::core::convert::From<LineDisplayAttributes> for ::windows::core::IUnknown { fn from(value: LineDisplayAttributes) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayAttributes> for ::windows::core::IUnknown { fn from(value: &LineDisplayAttributes) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayAttributes { 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 LineDisplayAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayAttributes> for ::windows::core::IInspectable { fn from(value: LineDisplayAttributes) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayAttributes> for ::windows::core::IInspectable { fn from(value: &LineDisplayAttributes) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayAttributes { 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 LineDisplayAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayAttributes {} unsafe impl ::core::marker::Sync for LineDisplayAttributes {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayCapabilities(pub ::windows::core::IInspectable); impl LineDisplayCapabilities { pub fn IsStatisticsReportingSupported(&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 IsStatisticsUpdatingSupported(&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 PowerReportingType(&self) -> ::windows::core::Result<UnifiedPosPowerReportingType> { let this = self; unsafe { let mut result__: UnifiedPosPowerReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosPowerReportingType>(result__) } } pub fn CanChangeScreenSize(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn CanDisplayBitmaps(&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 CanReadCharacterAtCursor(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn CanMapCharacterSets(&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 CanDisplayCustomGlyphs(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn CanReverse(&self) -> ::windows::core::Result<LineDisplayTextAttributeGranularity> { let this = self; unsafe { let mut result__: LineDisplayTextAttributeGranularity = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayTextAttributeGranularity>(result__) } } pub fn CanBlink(&self) -> ::windows::core::Result<LineDisplayTextAttributeGranularity> { let this = self; unsafe { let mut result__: LineDisplayTextAttributeGranularity = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayTextAttributeGranularity>(result__) } } pub fn CanChangeBlinkRate(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsBrightnessSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsCursorSupported(&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 IsHorizontalMarqueeSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsVerticalMarqueeSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsInterCharacterWaitSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SupportedDescriptors(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SupportedWindows(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayCapabilities;{5a15b5d1-8dc5-4b9c-9172-303e47b70c55})"); } unsafe impl ::windows::core::Interface for LineDisplayCapabilities { type Vtable = ILineDisplayCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5a15b5d1_8dc5_4b9c_9172_303e47b70c55); } impl ::windows::core::RuntimeName for LineDisplayCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayCapabilities"; } impl ::core::convert::From<LineDisplayCapabilities> for ::windows::core::IUnknown { fn from(value: LineDisplayCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayCapabilities> for ::windows::core::IUnknown { fn from(value: &LineDisplayCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayCapabilities { 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 LineDisplayCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayCapabilities> for ::windows::core::IInspectable { fn from(value: LineDisplayCapabilities) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayCapabilities> for ::windows::core::IInspectable { fn from(value: &LineDisplayCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayCapabilities { 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 LineDisplayCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayCapabilities {} unsafe impl ::core::marker::Sync for LineDisplayCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayCursor(pub ::windows::core::IInspectable); impl LineDisplayCursor { pub fn CanCustomize(&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 IsBlinkSupported(&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 IsBlockSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsHalfBlockSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&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 IsReverseSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsOtherSupported(&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 GetAttributes(&self) -> ::windows::core::Result<LineDisplayCursorAttributes> { 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::<LineDisplayCursorAttributes>(result__) } } #[cfg(feature = "Foundation")] pub fn TryUpdateAttributesAsync<'a, Param0: ::windows::core::IntoParam<'a, LineDisplayCursorAttributes>>(&self, attributes: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), attributes.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayCursor { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayCursor;{ecdffc45-754a-4e3b-ab2b-151181085605})"); } unsafe impl ::windows::core::Interface for LineDisplayCursor { type Vtable = ILineDisplayCursor_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xecdffc45_754a_4e3b_ab2b_151181085605); } impl ::windows::core::RuntimeName for LineDisplayCursor { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayCursor"; } impl ::core::convert::From<LineDisplayCursor> for ::windows::core::IUnknown { fn from(value: LineDisplayCursor) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayCursor> for ::windows::core::IUnknown { fn from(value: &LineDisplayCursor) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayCursor { 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 LineDisplayCursor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayCursor> for ::windows::core::IInspectable { fn from(value: LineDisplayCursor) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayCursor> for ::windows::core::IInspectable { fn from(value: &LineDisplayCursor) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayCursor { 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 LineDisplayCursor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayCursor {} unsafe impl ::core::marker::Sync for LineDisplayCursor {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayCursorAttributes(pub ::windows::core::IInspectable); impl LineDisplayCursorAttributes { pub fn IsBlinkEnabled(&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 SetIsBlinkEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn CursorType(&self) -> ::windows::core::Result<LineDisplayCursorType> { let this = self; unsafe { let mut result__: LineDisplayCursorType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayCursorType>(result__) } } pub fn SetCursorType(&self, value: LineDisplayCursorType) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsAutoAdvanceEnabled(&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 SetIsAutoAdvanceEnabled(&self, value: bool) -> ::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 Position(&self) -> ::windows::core::Result<super::super::Foundation::Point> { let this = self; unsafe { let mut result__: super::super::Foundation::Point = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Point>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPosition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Point>>(&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() } } } unsafe impl ::windows::core::RuntimeType for LineDisplayCursorAttributes { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayCursorAttributes;{4e2d54fe-4ffd-4190-aae1-ce285f20c896})"); } unsafe impl ::windows::core::Interface for LineDisplayCursorAttributes { type Vtable = ILineDisplayCursorAttributes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4e2d54fe_4ffd_4190_aae1_ce285f20c896); } impl ::windows::core::RuntimeName for LineDisplayCursorAttributes { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayCursorAttributes"; } impl ::core::convert::From<LineDisplayCursorAttributes> for ::windows::core::IUnknown { fn from(value: LineDisplayCursorAttributes) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayCursorAttributes> for ::windows::core::IUnknown { fn from(value: &LineDisplayCursorAttributes) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayCursorAttributes { 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 LineDisplayCursorAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayCursorAttributes> for ::windows::core::IInspectable { fn from(value: LineDisplayCursorAttributes) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayCursorAttributes> for ::windows::core::IInspectable { fn from(value: &LineDisplayCursorAttributes) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayCursorAttributes { 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 LineDisplayCursorAttributes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayCursorAttributes {} unsafe impl ::core::marker::Sync for LineDisplayCursorAttributes {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct LineDisplayCursorType(pub i32); impl LineDisplayCursorType { pub const None: LineDisplayCursorType = LineDisplayCursorType(0i32); pub const Block: LineDisplayCursorType = LineDisplayCursorType(1i32); pub const HalfBlock: LineDisplayCursorType = LineDisplayCursorType(2i32); pub const Underline: LineDisplayCursorType = LineDisplayCursorType(3i32); pub const Reverse: LineDisplayCursorType = LineDisplayCursorType(4i32); pub const Other: LineDisplayCursorType = LineDisplayCursorType(5i32); } impl ::core::convert::From<i32> for LineDisplayCursorType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayCursorType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayCursorType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayCursorType;i4)"); } impl ::windows::core::DefaultType for LineDisplayCursorType { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayCustomGlyphs(pub ::windows::core::IInspectable); impl LineDisplayCustomGlyphs { #[cfg(feature = "Foundation")] pub fn SizeInPixels(&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).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedGlyphCodes(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { 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::super::Foundation::Collections::IVectorView<u32>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] pub fn TryRedefineAsync<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(&self, glyphcode: u32, glyphdata: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), glyphcode, glyphdata.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayCustomGlyphs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayCustomGlyphs;{2257f63c-f263-44f1-a1a0-e750a6a0ec54})"); } unsafe impl ::windows::core::Interface for LineDisplayCustomGlyphs { type Vtable = ILineDisplayCustomGlyphs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2257f63c_f263_44f1_a1a0_e750a6a0ec54); } impl ::windows::core::RuntimeName for LineDisplayCustomGlyphs { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayCustomGlyphs"; } impl ::core::convert::From<LineDisplayCustomGlyphs> for ::windows::core::IUnknown { fn from(value: LineDisplayCustomGlyphs) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayCustomGlyphs> for ::windows::core::IUnknown { fn from(value: &LineDisplayCustomGlyphs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayCustomGlyphs { 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 LineDisplayCustomGlyphs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayCustomGlyphs> for ::windows::core::IInspectable { fn from(value: LineDisplayCustomGlyphs) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayCustomGlyphs> for ::windows::core::IInspectable { fn from(value: &LineDisplayCustomGlyphs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayCustomGlyphs { 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 LineDisplayCustomGlyphs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayCustomGlyphs {} unsafe impl ::core::marker::Sync for LineDisplayCustomGlyphs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct LineDisplayDescriptorState(pub i32); impl LineDisplayDescriptorState { pub const Off: LineDisplayDescriptorState = LineDisplayDescriptorState(0i32); pub const On: LineDisplayDescriptorState = LineDisplayDescriptorState(1i32); pub const Blink: LineDisplayDescriptorState = LineDisplayDescriptorState(2i32); } impl ::core::convert::From<i32> for LineDisplayDescriptorState { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayDescriptorState { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayDescriptorState { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayDescriptorState;i4)"); } impl ::windows::core::DefaultType for LineDisplayDescriptorState { 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 LineDisplayHorizontalAlignment(pub i32); impl LineDisplayHorizontalAlignment { pub const Left: LineDisplayHorizontalAlignment = LineDisplayHorizontalAlignment(0i32); pub const Center: LineDisplayHorizontalAlignment = LineDisplayHorizontalAlignment(1i32); pub const Right: LineDisplayHorizontalAlignment = LineDisplayHorizontalAlignment(2i32); } impl ::core::convert::From<i32> for LineDisplayHorizontalAlignment { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayHorizontalAlignment { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayHorizontalAlignment { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayHorizontalAlignment;i4)"); } impl ::windows::core::DefaultType for LineDisplayHorizontalAlignment { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayMarquee(pub ::windows::core::IInspectable); impl LineDisplayMarquee { pub fn Format(&self) -> ::windows::core::Result<LineDisplayMarqueeFormat> { let this = self; unsafe { let mut result__: LineDisplayMarqueeFormat = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayMarqueeFormat>(result__) } } pub fn SetFormat(&self, value: LineDisplayMarqueeFormat) -> ::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 RepeatWaitInterval(&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 SetRepeatWaitInterval<'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 ScrollWaitInterval(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetScrollWaitInterval<'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).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn TryStartScrollingAsync(&self, direction: LineDisplayScrollDirection) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), direction, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryStopScrollingAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayMarquee { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayMarquee;{a3d33e3e-f46a-4b7a-bc21-53eb3b57f8b4})"); } unsafe impl ::windows::core::Interface for LineDisplayMarquee { type Vtable = ILineDisplayMarquee_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa3d33e3e_f46a_4b7a_bc21_53eb3b57f8b4); } impl ::windows::core::RuntimeName for LineDisplayMarquee { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayMarquee"; } impl ::core::convert::From<LineDisplayMarquee> for ::windows::core::IUnknown { fn from(value: LineDisplayMarquee) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayMarquee> for ::windows::core::IUnknown { fn from(value: &LineDisplayMarquee) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayMarquee { 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 LineDisplayMarquee { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayMarquee> for ::windows::core::IInspectable { fn from(value: LineDisplayMarquee) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayMarquee> for ::windows::core::IInspectable { fn from(value: &LineDisplayMarquee) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayMarquee { 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 LineDisplayMarquee { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayMarquee {} unsafe impl ::core::marker::Sync for LineDisplayMarquee {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct LineDisplayMarqueeFormat(pub i32); impl LineDisplayMarqueeFormat { pub const None: LineDisplayMarqueeFormat = LineDisplayMarqueeFormat(0i32); pub const Walk: LineDisplayMarqueeFormat = LineDisplayMarqueeFormat(1i32); pub const Place: LineDisplayMarqueeFormat = LineDisplayMarqueeFormat(2i32); } impl ::core::convert::From<i32> for LineDisplayMarqueeFormat { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayMarqueeFormat { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayMarqueeFormat { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayMarqueeFormat;i4)"); } impl ::windows::core::DefaultType for LineDisplayMarqueeFormat { 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 LineDisplayPowerStatus(pub i32); impl LineDisplayPowerStatus { pub const Unknown: LineDisplayPowerStatus = LineDisplayPowerStatus(0i32); pub const Online: LineDisplayPowerStatus = LineDisplayPowerStatus(1i32); pub const Off: LineDisplayPowerStatus = LineDisplayPowerStatus(2i32); pub const Offline: LineDisplayPowerStatus = LineDisplayPowerStatus(3i32); pub const OffOrOffline: LineDisplayPowerStatus = LineDisplayPowerStatus(4i32); } impl ::core::convert::From<i32> for LineDisplayPowerStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayPowerStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayPowerStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayPowerStatus;i4)"); } impl ::windows::core::DefaultType for LineDisplayPowerStatus { 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 LineDisplayScrollDirection(pub i32); impl LineDisplayScrollDirection { pub const Up: LineDisplayScrollDirection = LineDisplayScrollDirection(0i32); pub const Down: LineDisplayScrollDirection = LineDisplayScrollDirection(1i32); pub const Left: LineDisplayScrollDirection = LineDisplayScrollDirection(2i32); pub const Right: LineDisplayScrollDirection = LineDisplayScrollDirection(3i32); } impl ::core::convert::From<i32> for LineDisplayScrollDirection { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayScrollDirection { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayScrollDirection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayScrollDirection;i4)"); } impl ::windows::core::DefaultType for LineDisplayScrollDirection { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayStatisticsCategorySelector(pub ::windows::core::IInspectable); impl LineDisplayStatisticsCategorySelector { pub fn AllStatistics(&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 UnifiedPosStatistics(&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).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn ManufacturerStatistics(&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).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayStatisticsCategorySelector { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayStatisticsCategorySelector;{b521c46b-9274-4d24-94f3-b6017b832444})"); } unsafe impl ::windows::core::Interface for LineDisplayStatisticsCategorySelector { type Vtable = ILineDisplayStatisticsCategorySelector_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb521c46b_9274_4d24_94f3_b6017b832444); } impl ::windows::core::RuntimeName for LineDisplayStatisticsCategorySelector { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayStatisticsCategorySelector"; } impl ::core::convert::From<LineDisplayStatisticsCategorySelector> for ::windows::core::IUnknown { fn from(value: LineDisplayStatisticsCategorySelector) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayStatisticsCategorySelector> for ::windows::core::IUnknown { fn from(value: &LineDisplayStatisticsCategorySelector) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayStatisticsCategorySelector { 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 LineDisplayStatisticsCategorySelector { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayStatisticsCategorySelector> for ::windows::core::IInspectable { fn from(value: LineDisplayStatisticsCategorySelector) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayStatisticsCategorySelector> for ::windows::core::IInspectable { fn from(value: &LineDisplayStatisticsCategorySelector) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayStatisticsCategorySelector { 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 LineDisplayStatisticsCategorySelector { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayStatisticsCategorySelector {} unsafe impl ::core::marker::Sync for LineDisplayStatisticsCategorySelector {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayStatusUpdatedEventArgs(pub ::windows::core::IInspectable); impl LineDisplayStatusUpdatedEventArgs { pub fn Status(&self) -> ::windows::core::Result<LineDisplayPowerStatus> { let this = self; unsafe { let mut result__: LineDisplayPowerStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayPowerStatus>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayStatusUpdatedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayStatusUpdatedEventArgs;{ddd57c1a-86fb-4eba-93d1-6f5eda52b752})"); } unsafe impl ::windows::core::Interface for LineDisplayStatusUpdatedEventArgs { type Vtable = ILineDisplayStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xddd57c1a_86fb_4eba_93d1_6f5eda52b752); } impl ::windows::core::RuntimeName for LineDisplayStatusUpdatedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayStatusUpdatedEventArgs"; } impl ::core::convert::From<LineDisplayStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: LineDisplayStatusUpdatedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: &LineDisplayStatusUpdatedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayStatusUpdatedEventArgs { 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 LineDisplayStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: LineDisplayStatusUpdatedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: &LineDisplayStatusUpdatedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayStatusUpdatedEventArgs { 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 LineDisplayStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayStatusUpdatedEventArgs {} unsafe impl ::core::marker::Sync for LineDisplayStatusUpdatedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayStoredBitmap(pub ::windows::core::IInspectable); impl LineDisplayStoredBitmap { pub fn EscapeSequence(&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__) } } #[cfg(feature = "Foundation")] pub fn TryDeleteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayStoredBitmap { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayStoredBitmap;{f621515b-d81e-43ba-bf1b-bcfa3c785ba0})"); } unsafe impl ::windows::core::Interface for LineDisplayStoredBitmap { type Vtable = ILineDisplayStoredBitmap_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf621515b_d81e_43ba_bf1b_bcfa3c785ba0); } impl ::windows::core::RuntimeName for LineDisplayStoredBitmap { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayStoredBitmap"; } impl ::core::convert::From<LineDisplayStoredBitmap> for ::windows::core::IUnknown { fn from(value: LineDisplayStoredBitmap) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayStoredBitmap> for ::windows::core::IUnknown { fn from(value: &LineDisplayStoredBitmap) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayStoredBitmap { 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 LineDisplayStoredBitmap { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayStoredBitmap> for ::windows::core::IInspectable { fn from(value: LineDisplayStoredBitmap) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayStoredBitmap> for ::windows::core::IInspectable { fn from(value: &LineDisplayStoredBitmap) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayStoredBitmap { 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 LineDisplayStoredBitmap { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for LineDisplayStoredBitmap {} unsafe impl ::core::marker::Sync for LineDisplayStoredBitmap {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct LineDisplayTextAttribute(pub i32); impl LineDisplayTextAttribute { pub const Normal: LineDisplayTextAttribute = LineDisplayTextAttribute(0i32); pub const Blink: LineDisplayTextAttribute = LineDisplayTextAttribute(1i32); pub const Reverse: LineDisplayTextAttribute = LineDisplayTextAttribute(2i32); pub const ReverseBlink: LineDisplayTextAttribute = LineDisplayTextAttribute(3i32); } impl ::core::convert::From<i32> for LineDisplayTextAttribute { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayTextAttribute { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayTextAttribute { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayTextAttribute;i4)"); } impl ::windows::core::DefaultType for LineDisplayTextAttribute { 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 LineDisplayTextAttributeGranularity(pub i32); impl LineDisplayTextAttributeGranularity { pub const NotSupported: LineDisplayTextAttributeGranularity = LineDisplayTextAttributeGranularity(0i32); pub const EntireDisplay: LineDisplayTextAttributeGranularity = LineDisplayTextAttributeGranularity(1i32); pub const PerCharacter: LineDisplayTextAttributeGranularity = LineDisplayTextAttributeGranularity(2i32); } impl ::core::convert::From<i32> for LineDisplayTextAttributeGranularity { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayTextAttributeGranularity { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayTextAttributeGranularity { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayTextAttributeGranularity;i4)"); } impl ::windows::core::DefaultType for LineDisplayTextAttributeGranularity { 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 LineDisplayVerticalAlignment(pub i32); impl LineDisplayVerticalAlignment { pub const Top: LineDisplayVerticalAlignment = LineDisplayVerticalAlignment(0i32); pub const Center: LineDisplayVerticalAlignment = LineDisplayVerticalAlignment(1i32); pub const Bottom: LineDisplayVerticalAlignment = LineDisplayVerticalAlignment(2i32); } impl ::core::convert::From<i32> for LineDisplayVerticalAlignment { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LineDisplayVerticalAlignment { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for LineDisplayVerticalAlignment { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.LineDisplayVerticalAlignment;i4)"); } impl ::windows::core::DefaultType for LineDisplayVerticalAlignment { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct LineDisplayWindow(pub ::windows::core::IInspectable); impl LineDisplayWindow { #[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 = "Foundation")] pub fn SizeInCharacters(&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).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Size>(result__) } } #[cfg(feature = "Foundation")] pub fn InterCharacterWaitInterval(&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).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetInterCharacterWaitInterval<'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).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn TryRefreshAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryDisplayTextAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, text: Param0, displayattribute: LineDisplayTextAttribute) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), text.into_param().abi(), displayattribute, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryDisplayTextAtPositionAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::Point>>(&self, text: Param0, displayattribute: LineDisplayTextAttribute, startposition: Param2) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), text.into_param().abi(), displayattribute, startposition.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryDisplayTextNormalAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, text: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), text.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryScrollTextAsync(&self, direction: LineDisplayScrollDirection, numberofcolumnsorrows: u32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), direction, numberofcolumnsorrows, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryClearTextAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { 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::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } pub fn Cursor(&self) -> ::windows::core::Result<LineDisplayCursor> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<LineDisplayCursor>(result__) } } pub fn Marquee(&self) -> ::windows::core::Result<LineDisplayMarquee> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(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::<LineDisplayMarquee>(result__) } } #[cfg(feature = "Foundation")] pub fn ReadCharacterAtCursorAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<u32>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(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::IAsyncOperation<u32>>(result__) } } #[cfg(feature = "Foundation")] pub fn TryDisplayStoredBitmapAtCursorAsync<'a, Param0: ::windows::core::IntoParam<'a, LineDisplayStoredBitmap>>(&self, bitmap: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryDisplayStorageFileBitmapAtCursorAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), horizontalalignment, verticalalignment, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>>(&self, bitmap: Param0, horizontalalignment: LineDisplayHorizontalAlignment, verticalalignment: LineDisplayVerticalAlignment, widthinpixels: i32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), horizontalalignment, verticalalignment, widthinpixels, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryDisplayStorageFileBitmapAtPointAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Point>>(&self, bitmap: Param0, offsetinpixels: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), offsetinpixels.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn TryDisplayStorageFileBitmapAtPointWithWidthAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::StorageFile>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Point>>(&self, bitmap: Param0, offsetinpixels: Param1, widthinpixels: i32) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<ILineDisplayWindow2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), offsetinpixels.into_param().abi(), widthinpixels, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<bool>>(result__) } } } unsafe impl ::windows::core::RuntimeType for LineDisplayWindow { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.LineDisplayWindow;{d21feef4-2364-4be5-bee1-851680af4964})"); } unsafe impl ::windows::core::Interface for LineDisplayWindow { type Vtable = ILineDisplayWindow_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd21feef4_2364_4be5_bee1_851680af4964); } impl ::windows::core::RuntimeName for LineDisplayWindow { const NAME: &'static str = "Windows.Devices.PointOfService.LineDisplayWindow"; } impl ::core::convert::From<LineDisplayWindow> for ::windows::core::IUnknown { fn from(value: LineDisplayWindow) -> Self { value.0 .0 } } impl ::core::convert::From<&LineDisplayWindow> for ::windows::core::IUnknown { fn from(value: &LineDisplayWindow) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for LineDisplayWindow { 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 LineDisplayWindow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<LineDisplayWindow> for ::windows::core::IInspectable { fn from(value: LineDisplayWindow) -> Self { value.0 } } impl ::core::convert::From<&LineDisplayWindow> for ::windows::core::IInspectable { fn from(value: &LineDisplayWindow) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for LineDisplayWindow { 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 LineDisplayWindow { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<LineDisplayWindow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: LineDisplayWindow) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&LineDisplayWindow> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &LineDisplayWindow) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for LineDisplayWindow { 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 &LineDisplayWindow { 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 LineDisplayWindow {} unsafe impl ::core::marker::Sync for LineDisplayWindow {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReader(pub ::windows::core::IInspectable); impl MagneticStripeReader { pub fn DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<MagneticStripeReaderCapabilities> { 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::<MagneticStripeReaderCapabilities>(result__) } } pub fn SupportedCardTypes(&self) -> ::windows::core::Result<::windows::core::Array<u32>> { let this = self; unsafe { let mut result__: ::windows::core::Array<u32> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), ::windows::core::Array::<u32>::set_abi_len(&mut result__), &mut result__ as *mut _ as _).and_then(|| result__) } } pub fn DeviceAuthenticationProtocol(&self) -> ::windows::core::Result<MagneticStripeReaderAuthenticationProtocol> { let this = self; unsafe { let mut result__: MagneticStripeReaderAuthenticationProtocol = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderAuthenticationProtocol>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { 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::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation")] pub fn ClaimReaderAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedMagneticStripeReader>> { let this = 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::<super::super::Foundation::IAsyncOperation<ClaimedMagneticStripeReader>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections", feature = "Storage_Streams"))] pub fn RetrieveStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>>(result__) } } pub fn GetErrorReportingType(&self) -> ::windows::core::Result<MagneticStripeReaderErrorReportingType> { let this = self; unsafe { let mut result__: MagneticStripeReaderErrorReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderErrorReportingType>(result__) } } #[cfg(feature = "Foundation")] pub fn StatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MagneticStripeReader, MagneticStripeReaderStatusUpdatedEventArgs>>>(&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).14)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStatusUpdated<'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).15)(::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() } } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<MagneticStripeReader>> { Self::IMagneticStripeReaderStatics(|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::<super::super::Foundation::IAsyncOperation<MagneticStripeReader>>(result__) }) } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<MagneticStripeReader>> { Self::IMagneticStripeReaderStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<MagneticStripeReader>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IMagneticStripeReaderStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IMagneticStripeReaderStatics2(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn IMagneticStripeReaderStatics<R, F: FnOnce(&IMagneticStripeReaderStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MagneticStripeReader, IMagneticStripeReaderStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IMagneticStripeReaderStatics2<R, F: FnOnce(&IMagneticStripeReaderStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MagneticStripeReader, IMagneticStripeReaderStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReader { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReader;{1a92b015-47c3-468a-9333-0c6517574883})"); } unsafe impl ::windows::core::Interface for MagneticStripeReader { type Vtable = IMagneticStripeReader_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a92b015_47c3_468a_9333_0c6517574883); } impl ::windows::core::RuntimeName for MagneticStripeReader { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReader"; } impl ::core::convert::From<MagneticStripeReader> for ::windows::core::IUnknown { fn from(value: MagneticStripeReader) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReader> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReader) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReader { 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 MagneticStripeReader { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReader> for ::windows::core::IInspectable { fn from(value: MagneticStripeReader) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReader> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReader) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReader { 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 MagneticStripeReader { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<MagneticStripeReader> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: MagneticStripeReader) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&MagneticStripeReader> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &MagneticStripeReader) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for MagneticStripeReader { 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 &MagneticStripeReader { 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 MagneticStripeReader {} unsafe impl ::core::marker::Sync for MagneticStripeReader {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderAamvaCardDataReceivedEventArgs(pub ::windows::core::IInspectable); impl MagneticStripeReaderAamvaCardDataReceivedEventArgs { pub fn Report(&self) -> ::windows::core::Result<MagneticStripeReaderReport> { 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::<MagneticStripeReaderReport>(result__) } } pub fn LicenseNumber(&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).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn ExpirationDate(&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).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Restrictions(&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).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Class(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Endorsements(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn BirthDate(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn FirstName(&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).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Surname(&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).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Suffix(&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).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Gender(&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).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn HairColor(&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).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn EyeColor(&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).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Height(&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).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Weight(&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).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Address(&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).21)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn City(&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).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn State(&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).23)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn PostalCode(&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).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderAamvaCardDataReceivedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderAamvaCardDataReceivedEventArgs;{0a4bbd51-c316-4910-87f3-7a62ba862d31})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderAamvaCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderAamvaCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a4bbd51_c316_4910_87f3_7a62ba862d31); } impl ::windows::core::RuntimeName for MagneticStripeReaderAamvaCardDataReceivedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderAamvaCardDataReceivedEventArgs"; } impl ::core::convert::From<MagneticStripeReaderAamvaCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderAamvaCardDataReceivedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderAamvaCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderAamvaCardDataReceivedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderAamvaCardDataReceivedEventArgs { 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 MagneticStripeReaderAamvaCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderAamvaCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderAamvaCardDataReceivedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderAamvaCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderAamvaCardDataReceivedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderAamvaCardDataReceivedEventArgs { 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 MagneticStripeReaderAamvaCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderAamvaCardDataReceivedEventArgs {} unsafe impl ::core::marker::Sync for MagneticStripeReaderAamvaCardDataReceivedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MagneticStripeReaderAuthenticationLevel(pub i32); impl MagneticStripeReaderAuthenticationLevel { pub const NotSupported: MagneticStripeReaderAuthenticationLevel = MagneticStripeReaderAuthenticationLevel(0i32); pub const Optional: MagneticStripeReaderAuthenticationLevel = MagneticStripeReaderAuthenticationLevel(1i32); pub const Required: MagneticStripeReaderAuthenticationLevel = MagneticStripeReaderAuthenticationLevel(2i32); } impl ::core::convert::From<i32> for MagneticStripeReaderAuthenticationLevel { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderAuthenticationLevel { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderAuthenticationLevel { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderAuthenticationLevel;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderAuthenticationLevel { 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 MagneticStripeReaderAuthenticationProtocol(pub i32); impl MagneticStripeReaderAuthenticationProtocol { pub const None: MagneticStripeReaderAuthenticationProtocol = MagneticStripeReaderAuthenticationProtocol(0i32); pub const ChallengeResponse: MagneticStripeReaderAuthenticationProtocol = MagneticStripeReaderAuthenticationProtocol(1i32); } impl ::core::convert::From<i32> for MagneticStripeReaderAuthenticationProtocol { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderAuthenticationProtocol { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderAuthenticationProtocol { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderAuthenticationProtocol;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderAuthenticationProtocol { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderBankCardDataReceivedEventArgs(pub ::windows::core::IInspectable); impl MagneticStripeReaderBankCardDataReceivedEventArgs { pub fn Report(&self) -> ::windows::core::Result<MagneticStripeReaderReport> { 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::<MagneticStripeReaderReport>(result__) } } pub fn AccountNumber(&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).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn ExpirationDate(&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).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn ServiceCode(&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).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Title(&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).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn FirstName(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn MiddleInitial(&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).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Surname(&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).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Suffix(&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).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderBankCardDataReceivedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderBankCardDataReceivedEventArgs;{2e958823-a31a-4763-882c-23725e39b08e})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderBankCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderBankCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2e958823_a31a_4763_882c_23725e39b08e); } impl ::windows::core::RuntimeName for MagneticStripeReaderBankCardDataReceivedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderBankCardDataReceivedEventArgs"; } impl ::core::convert::From<MagneticStripeReaderBankCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderBankCardDataReceivedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderBankCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderBankCardDataReceivedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderBankCardDataReceivedEventArgs { 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 MagneticStripeReaderBankCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderBankCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderBankCardDataReceivedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderBankCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderBankCardDataReceivedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderBankCardDataReceivedEventArgs { 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 MagneticStripeReaderBankCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderBankCardDataReceivedEventArgs {} unsafe impl ::core::marker::Sync for MagneticStripeReaderBankCardDataReceivedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderCapabilities(pub ::windows::core::IInspectable); impl MagneticStripeReaderCapabilities { pub fn CardAuthentication(&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 SupportedEncryptionAlgorithms(&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__) } } pub fn AuthenticationLevel(&self) -> ::windows::core::Result<MagneticStripeReaderAuthenticationLevel> { let this = self; unsafe { let mut result__: MagneticStripeReaderAuthenticationLevel = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderAuthenticationLevel>(result__) } } pub fn IsIsoSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn IsJisOneSupported(&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 IsJisTwoSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn PowerReportingType(&self) -> ::windows::core::Result<UnifiedPosPowerReportingType> { let this = self; unsafe { let mut result__: UnifiedPosPowerReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosPowerReportingType>(result__) } } pub fn IsStatisticsReportingSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsStatisticsUpdatingSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsTrackDataMaskingSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsTransmitSentinelsSupported(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderCapabilities;{7128809c-c440-44a2-a467-469175d02896})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderCapabilities { type Vtable = IMagneticStripeReaderCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7128809c_c440_44a2_a467_469175d02896); } impl ::windows::core::RuntimeName for MagneticStripeReaderCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderCapabilities"; } impl ::core::convert::From<MagneticStripeReaderCapabilities> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderCapabilities> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderCapabilities { 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 MagneticStripeReaderCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderCapabilities> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderCapabilities) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderCapabilities> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderCapabilities { 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 MagneticStripeReaderCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderCapabilities {} unsafe impl ::core::marker::Sync for MagneticStripeReaderCapabilities {} pub struct MagneticStripeReaderCardTypes {} impl MagneticStripeReaderCardTypes { pub fn Unknown() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderCardTypesStatics(|this| 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__) }) } pub fn Bank() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderCardTypesStatics(|this| 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__) }) } pub fn Aamva() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderCardTypesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn ExtendedBase() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderCardTypesStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IMagneticStripeReaderCardTypesStatics<R, F: FnOnce(&IMagneticStripeReaderCardTypesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MagneticStripeReaderCardTypes, IMagneticStripeReaderCardTypesStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for MagneticStripeReaderCardTypes { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderCardTypes"; } pub struct MagneticStripeReaderEncryptionAlgorithms {} impl MagneticStripeReaderEncryptionAlgorithms { pub fn None() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderEncryptionAlgorithmsStatics(|this| 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__) }) } pub fn TripleDesDukpt() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderEncryptionAlgorithmsStatics(|this| 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__) }) } pub fn ExtendedBase() -> ::windows::core::Result<u32> { Self::IMagneticStripeReaderEncryptionAlgorithmsStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IMagneticStripeReaderEncryptionAlgorithmsStatics<R, F: FnOnce(&IMagneticStripeReaderEncryptionAlgorithmsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MagneticStripeReaderEncryptionAlgorithms, IMagneticStripeReaderEncryptionAlgorithmsStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for MagneticStripeReaderEncryptionAlgorithms { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderEncryptionAlgorithms"; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderErrorOccurredEventArgs(pub ::windows::core::IInspectable); impl MagneticStripeReaderErrorOccurredEventArgs { pub fn Track1Status(&self) -> ::windows::core::Result<MagneticStripeReaderTrackErrorType> { let this = self; unsafe { let mut result__: MagneticStripeReaderTrackErrorType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderTrackErrorType>(result__) } } pub fn Track2Status(&self) -> ::windows::core::Result<MagneticStripeReaderTrackErrorType> { let this = self; unsafe { let mut result__: MagneticStripeReaderTrackErrorType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderTrackErrorType>(result__) } } pub fn Track3Status(&self) -> ::windows::core::Result<MagneticStripeReaderTrackErrorType> { let this = self; unsafe { let mut result__: MagneticStripeReaderTrackErrorType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderTrackErrorType>(result__) } } pub fn Track4Status(&self) -> ::windows::core::Result<MagneticStripeReaderTrackErrorType> { let this = self; unsafe { let mut result__: MagneticStripeReaderTrackErrorType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderTrackErrorType>(result__) } } pub fn ErrorData(&self) -> ::windows::core::Result<UnifiedPosErrorData> { 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::<UnifiedPosErrorData>(result__) } } pub fn PartialInputData(&self) -> ::windows::core::Result<MagneticStripeReaderReport> { let this = 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::<MagneticStripeReaderReport>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderErrorOccurredEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderErrorOccurredEventArgs;{1fedf95d-2c84-41ad-b778-f2356a789ab1})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderErrorOccurredEventArgs { type Vtable = IMagneticStripeReaderErrorOccurredEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1fedf95d_2c84_41ad_b778_f2356a789ab1); } impl ::windows::core::RuntimeName for MagneticStripeReaderErrorOccurredEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderErrorOccurredEventArgs"; } impl ::core::convert::From<MagneticStripeReaderErrorOccurredEventArgs> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderErrorOccurredEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderErrorOccurredEventArgs> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderErrorOccurredEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderErrorOccurredEventArgs { 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 MagneticStripeReaderErrorOccurredEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderErrorOccurredEventArgs> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderErrorOccurredEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderErrorOccurredEventArgs> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderErrorOccurredEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderErrorOccurredEventArgs { 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 MagneticStripeReaderErrorOccurredEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderErrorOccurredEventArgs {} unsafe impl ::core::marker::Sync for MagneticStripeReaderErrorOccurredEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MagneticStripeReaderErrorReportingType(pub i32); impl MagneticStripeReaderErrorReportingType { pub const CardLevel: MagneticStripeReaderErrorReportingType = MagneticStripeReaderErrorReportingType(0i32); pub const TrackLevel: MagneticStripeReaderErrorReportingType = MagneticStripeReaderErrorReportingType(1i32); } impl ::core::convert::From<i32> for MagneticStripeReaderErrorReportingType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderErrorReportingType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderErrorReportingType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderErrorReportingType;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderErrorReportingType { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderReport(pub ::windows::core::IInspectable); impl MagneticStripeReaderReport { pub fn CardType(&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__) } } pub fn Track1(&self) -> ::windows::core::Result<MagneticStripeReaderTrackData> { 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::<MagneticStripeReaderTrackData>(result__) } } pub fn Track2(&self) -> ::windows::core::Result<MagneticStripeReaderTrackData> { 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::<MagneticStripeReaderTrackData>(result__) } } pub fn Track3(&self) -> ::windows::core::Result<MagneticStripeReaderTrackData> { 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::<MagneticStripeReaderTrackData>(result__) } } pub fn Track4(&self) -> ::windows::core::Result<MagneticStripeReaderTrackData> { 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::<MagneticStripeReaderTrackData>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn Properties(&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).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn CardAuthenticationData(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::<super::super::Storage::Streams::IBuffer>(result__) } } pub fn CardAuthenticationDataLength(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn AdditionalSecurityInformation(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::<super::super::Storage::Streams::IBuffer>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderReport { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderReport;{6a5b6047-99b0-4188-bef1-eddf79f78fe6})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderReport { type Vtable = IMagneticStripeReaderReport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6a5b6047_99b0_4188_bef1_eddf79f78fe6); } impl ::windows::core::RuntimeName for MagneticStripeReaderReport { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderReport"; } impl ::core::convert::From<MagneticStripeReaderReport> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderReport) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderReport> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderReport) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderReport { 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 MagneticStripeReaderReport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderReport> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderReport) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderReport> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderReport) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderReport { 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 MagneticStripeReaderReport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderReport {} unsafe impl ::core::marker::Sync for MagneticStripeReaderReport {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MagneticStripeReaderStatus(pub i32); impl MagneticStripeReaderStatus { pub const Unauthenticated: MagneticStripeReaderStatus = MagneticStripeReaderStatus(0i32); pub const Authenticated: MagneticStripeReaderStatus = MagneticStripeReaderStatus(1i32); pub const Extended: MagneticStripeReaderStatus = MagneticStripeReaderStatus(2i32); } impl ::core::convert::From<i32> for MagneticStripeReaderStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderStatus;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderStatus { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderStatusUpdatedEventArgs(pub ::windows::core::IInspectable); impl MagneticStripeReaderStatusUpdatedEventArgs { pub fn Status(&self) -> ::windows::core::Result<MagneticStripeReaderStatus> { let this = self; unsafe { let mut result__: MagneticStripeReaderStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MagneticStripeReaderStatus>(result__) } } pub fn ExtendedStatus(&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__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderStatusUpdatedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderStatusUpdatedEventArgs;{09cc6bb0-3262-401d-9e8a-e80d6358906b})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderStatusUpdatedEventArgs { type Vtable = IMagneticStripeReaderStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x09cc6bb0_3262_401d_9e8a_e80d6358906b); } impl ::windows::core::RuntimeName for MagneticStripeReaderStatusUpdatedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderStatusUpdatedEventArgs"; } impl ::core::convert::From<MagneticStripeReaderStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderStatusUpdatedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderStatusUpdatedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderStatusUpdatedEventArgs { 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 MagneticStripeReaderStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderStatusUpdatedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderStatusUpdatedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderStatusUpdatedEventArgs { 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 MagneticStripeReaderStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderStatusUpdatedEventArgs {} unsafe impl ::core::marker::Sync for MagneticStripeReaderStatusUpdatedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderTrackData(pub ::windows::core::IInspectable); impl MagneticStripeReaderTrackData { #[cfg(feature = "Storage_Streams")] pub fn Data(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::Storage::Streams::IBuffer>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn DiscretionaryData(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::super::Storage::Streams::IBuffer>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn EncryptedData(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> { 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::Storage::Streams::IBuffer>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderTrackData { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderTrackData;{104cf671-4a9d-446e-abc5-20402307ba36})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderTrackData { type Vtable = IMagneticStripeReaderTrackData_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x104cf671_4a9d_446e_abc5_20402307ba36); } impl ::windows::core::RuntimeName for MagneticStripeReaderTrackData { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderTrackData"; } impl ::core::convert::From<MagneticStripeReaderTrackData> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderTrackData) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderTrackData> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderTrackData) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderTrackData { 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 MagneticStripeReaderTrackData { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderTrackData> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderTrackData) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderTrackData> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderTrackData) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderTrackData { 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 MagneticStripeReaderTrackData { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderTrackData {} unsafe impl ::core::marker::Sync for MagneticStripeReaderTrackData {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MagneticStripeReaderTrackErrorType(pub i32); impl MagneticStripeReaderTrackErrorType { pub const None: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(0i32); pub const StartSentinelError: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(1i32); pub const EndSentinelError: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(2i32); pub const ParityError: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(3i32); pub const LrcError: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(4i32); pub const Unknown: MagneticStripeReaderTrackErrorType = MagneticStripeReaderTrackErrorType(-1i32); } impl ::core::convert::From<i32> for MagneticStripeReaderTrackErrorType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderTrackErrorType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderTrackErrorType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderTrackErrorType;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderTrackErrorType { 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 MagneticStripeReaderTrackIds(pub i32); impl MagneticStripeReaderTrackIds { pub const None: MagneticStripeReaderTrackIds = MagneticStripeReaderTrackIds(0i32); pub const Track1: MagneticStripeReaderTrackIds = MagneticStripeReaderTrackIds(1i32); pub const Track2: MagneticStripeReaderTrackIds = MagneticStripeReaderTrackIds(2i32); pub const Track3: MagneticStripeReaderTrackIds = MagneticStripeReaderTrackIds(4i32); pub const Track4: MagneticStripeReaderTrackIds = MagneticStripeReaderTrackIds(8i32); } impl ::core::convert::From<i32> for MagneticStripeReaderTrackIds { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MagneticStripeReaderTrackIds { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderTrackIds { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.MagneticStripeReaderTrackIds;i4)"); } impl ::windows::core::DefaultType for MagneticStripeReaderTrackIds { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs(pub ::windows::core::IInspectable); impl MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { pub fn Report(&self) -> ::windows::core::Result<MagneticStripeReaderReport> { 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::<MagneticStripeReaderReport>(result__) } } } unsafe impl ::windows::core::RuntimeType for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs;{af0a5514-59cc-4a60-99e8-99a53dace5aa})"); } unsafe impl ::windows::core::Interface for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { type Vtable = IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaf0a5514_59cc_4a60_99e8_99a53dace5aa); } impl ::windows::core::RuntimeName for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs"; } impl ::core::convert::From<MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs> for ::windows::core::IUnknown { fn from(value: &MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { 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 MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs> for ::windows::core::IInspectable { fn from(value: &MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { 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 MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs {} unsafe impl ::core::marker::Sync for MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosConnectionTypes(pub u32); impl PosConnectionTypes { pub const Local: PosConnectionTypes = PosConnectionTypes(1u32); pub const IP: PosConnectionTypes = PosConnectionTypes(2u32); pub const Bluetooth: PosConnectionTypes = PosConnectionTypes(4u32); pub const All: PosConnectionTypes = PosConnectionTypes(4294967295u32); } impl ::core::convert::From<u32> for PosConnectionTypes { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosConnectionTypes { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosConnectionTypes { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosConnectionTypes;u4)"); } impl ::windows::core::DefaultType for PosConnectionTypes { type DefaultType = Self; } impl ::core::ops::BitOr for PosConnectionTypes { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PosConnectionTypes { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PosConnectionTypes { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PosConnectionTypes { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PosConnectionTypes { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinter(pub ::windows::core::IInspectable); impl PosPrinter { pub fn DeviceId(&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 Capabilities(&self) -> ::windows::core::Result<PosPrinterCapabilities> { 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::<PosPrinterCapabilities>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharacterSets(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { 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<u32>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedTypeFaces(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<::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::IVectorView<::windows::core::HSTRING>>(result__) } } pub fn Status(&self) -> ::windows::core::Result<PosPrinterStatus> { 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::<PosPrinterStatus>(result__) } } #[cfg(feature = "Foundation")] pub fn ClaimPrinterAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<ClaimedPosPrinter>> { let this = 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::<super::super::Foundation::IAsyncOperation<ClaimedPosPrinter>>(result__) } } #[cfg(feature = "Foundation")] pub fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), level, &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub fn GetStatisticsAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>>(&self, statisticscategories: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), statisticscategories.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<::windows::core::HSTRING>>(result__) } } #[cfg(feature = "Foundation")] pub fn StatusUpdated<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<PosPrinter, PosPrinterStatusUpdatedEventArgs>>>(&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).14)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStatusUpdated<'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).15)(::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() } } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<PosPrinter>> { Self::IPosPrinterStatics(|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::<super::super::Foundation::IAsyncOperation<PosPrinter>>(result__) }) } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(deviceid: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<PosPrinter>> { Self::IPosPrinterStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<PosPrinter>>(result__) }) } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IPosPrinterStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetDeviceSelectorWithConnectionTypes(connectiontypes: PosConnectionTypes) -> ::windows::core::Result<::windows::core::HSTRING> { Self::IPosPrinterStatics2(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), connectiontypes, &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBarcodeSymbologies(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { let this = &::windows::core::Interface::cast::<IPosPrinter2>(self)?; unsafe { 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::IVectorView<u32>>(result__) } } pub fn GetFontProperty<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, typeface: Param0) -> ::windows::core::Result<PosPrinterFontProperty> { let this = &::windows::core::Interface::cast::<IPosPrinter2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), typeface.into_param().abi(), &mut result__).from_abi::<PosPrinterFontProperty>(result__) } } pub fn IPosPrinterStatics<R, F: FnOnce(&IPosPrinterStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PosPrinter, IPosPrinterStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IPosPrinterStatics2<R, F: FnOnce(&IPosPrinterStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PosPrinter, IPosPrinterStatics2> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for PosPrinter { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinter;{2a03c10e-9a19-4a01-994f-12dfad6adcbf})"); } unsafe impl ::windows::core::Interface for PosPrinter { type Vtable = IPosPrinter_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2a03c10e_9a19_4a01_994f_12dfad6adcbf); } impl ::windows::core::RuntimeName for PosPrinter { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinter"; } impl ::core::convert::From<PosPrinter> for ::windows::core::IUnknown { fn from(value: PosPrinter) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinter> for ::windows::core::IUnknown { fn from(value: &PosPrinter) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinter { 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 PosPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinter> for ::windows::core::IInspectable { fn from(value: PosPrinter) -> Self { value.0 } } impl ::core::convert::From<&PosPrinter> for ::windows::core::IInspectable { fn from(value: &PosPrinter) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinter { 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 PosPrinter { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<PosPrinter> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: PosPrinter) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&PosPrinter> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &PosPrinter) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for PosPrinter { 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 &PosPrinter { 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 PosPrinter {} unsafe impl ::core::marker::Sync for PosPrinter {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterAlignment(pub i32); impl PosPrinterAlignment { pub const Left: PosPrinterAlignment = PosPrinterAlignment(0i32); pub const Center: PosPrinterAlignment = PosPrinterAlignment(1i32); pub const Right: PosPrinterAlignment = PosPrinterAlignment(2i32); } impl ::core::convert::From<i32> for PosPrinterAlignment { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterAlignment { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterAlignment { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterAlignment;i4)"); } impl ::windows::core::DefaultType for PosPrinterAlignment { 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 PosPrinterBarcodeTextPosition(pub i32); impl PosPrinterBarcodeTextPosition { pub const None: PosPrinterBarcodeTextPosition = PosPrinterBarcodeTextPosition(0i32); pub const Above: PosPrinterBarcodeTextPosition = PosPrinterBarcodeTextPosition(1i32); pub const Below: PosPrinterBarcodeTextPosition = PosPrinterBarcodeTextPosition(2i32); } impl ::core::convert::From<i32> for PosPrinterBarcodeTextPosition { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterBarcodeTextPosition { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterBarcodeTextPosition { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterBarcodeTextPosition;i4)"); } impl ::windows::core::DefaultType for PosPrinterBarcodeTextPosition { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterCapabilities(pub ::windows::core::IInspectable); impl PosPrinterCapabilities { pub fn PowerReportingType(&self) -> ::windows::core::Result<UnifiedPosPowerReportingType> { let this = self; unsafe { let mut result__: UnifiedPosPowerReportingType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosPowerReportingType>(result__) } } pub fn IsStatisticsReportingSupported(&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 IsStatisticsUpdatingSupported(&self) -> ::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), &mut result__).from_abi::<bool>(result__) } } pub fn DefaultCharacterSet(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn HasCoverSensor(&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 CanMapCharacterSet(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsTransactionSupported(&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 Receipt(&self) -> ::windows::core::Result<ReceiptPrinterCapabilities> { 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::<ReceiptPrinterCapabilities>(result__) } } pub fn Slip(&self) -> ::windows::core::Result<SlipPrinterCapabilities> { 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::<SlipPrinterCapabilities>(result__) } } pub fn Journal(&self) -> ::windows::core::Result<JournalPrinterCapabilities> { 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::<JournalPrinterCapabilities>(result__) } } } unsafe impl ::windows::core::RuntimeType for PosPrinterCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterCapabilities;{cde95721-4380-4985-adc5-39db30cd93bc})"); } unsafe impl ::windows::core::Interface for PosPrinterCapabilities { type Vtable = IPosPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcde95721_4380_4985_adc5_39db30cd93bc); } impl ::windows::core::RuntimeName for PosPrinterCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterCapabilities"; } impl ::core::convert::From<PosPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: PosPrinterCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: &PosPrinterCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterCapabilities { 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 PosPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: PosPrinterCapabilities) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: &PosPrinterCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterCapabilities { 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 PosPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterCapabilities {} unsafe impl ::core::marker::Sync for PosPrinterCapabilities {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterCartridgeSensors(pub u32); impl PosPrinterCartridgeSensors { pub const None: PosPrinterCartridgeSensors = PosPrinterCartridgeSensors(0u32); pub const Removed: PosPrinterCartridgeSensors = PosPrinterCartridgeSensors(1u32); pub const Empty: PosPrinterCartridgeSensors = PosPrinterCartridgeSensors(2u32); pub const HeadCleaning: PosPrinterCartridgeSensors = PosPrinterCartridgeSensors(4u32); pub const NearEnd: PosPrinterCartridgeSensors = PosPrinterCartridgeSensors(8u32); } impl ::core::convert::From<u32> for PosPrinterCartridgeSensors { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterCartridgeSensors { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterCartridgeSensors { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterCartridgeSensors;u4)"); } impl ::windows::core::DefaultType for PosPrinterCartridgeSensors { type DefaultType = Self; } impl ::core::ops::BitOr for PosPrinterCartridgeSensors { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PosPrinterCartridgeSensors { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PosPrinterCartridgeSensors { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PosPrinterCartridgeSensors { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PosPrinterCartridgeSensors { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub struct PosPrinterCharacterSetIds {} impl PosPrinterCharacterSetIds { pub fn Utf16LE() -> ::windows::core::Result<u32> { Self::IPosPrinterCharacterSetIdsStatics(|this| 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__) }) } pub fn Ascii() -> ::windows::core::Result<u32> { Self::IPosPrinterCharacterSetIdsStatics(|this| 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__) }) } pub fn Ansi() -> ::windows::core::Result<u32> { Self::IPosPrinterCharacterSetIdsStatics(|this| unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) }) } pub fn IPosPrinterCharacterSetIdsStatics<R, F: FnOnce(&IPosPrinterCharacterSetIdsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<PosPrinterCharacterSetIds, IPosPrinterCharacterSetIdsStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for PosPrinterCharacterSetIds { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterCharacterSetIds"; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterColorCapabilities(pub u32); impl PosPrinterColorCapabilities { pub const None: PosPrinterColorCapabilities = PosPrinterColorCapabilities(0u32); pub const Primary: PosPrinterColorCapabilities = PosPrinterColorCapabilities(1u32); pub const Custom1: PosPrinterColorCapabilities = PosPrinterColorCapabilities(2u32); pub const Custom2: PosPrinterColorCapabilities = PosPrinterColorCapabilities(4u32); pub const Custom3: PosPrinterColorCapabilities = PosPrinterColorCapabilities(8u32); pub const Custom4: PosPrinterColorCapabilities = PosPrinterColorCapabilities(16u32); pub const Custom5: PosPrinterColorCapabilities = PosPrinterColorCapabilities(32u32); pub const Custom6: PosPrinterColorCapabilities = PosPrinterColorCapabilities(64u32); pub const Cyan: PosPrinterColorCapabilities = PosPrinterColorCapabilities(128u32); pub const Magenta: PosPrinterColorCapabilities = PosPrinterColorCapabilities(256u32); pub const Yellow: PosPrinterColorCapabilities = PosPrinterColorCapabilities(512u32); pub const Full: PosPrinterColorCapabilities = PosPrinterColorCapabilities(1024u32); } impl ::core::convert::From<u32> for PosPrinterColorCapabilities { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterColorCapabilities { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterColorCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterColorCapabilities;u4)"); } impl ::windows::core::DefaultType for PosPrinterColorCapabilities { type DefaultType = Self; } impl ::core::ops::BitOr for PosPrinterColorCapabilities { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PosPrinterColorCapabilities { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PosPrinterColorCapabilities { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PosPrinterColorCapabilities { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PosPrinterColorCapabilities { 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 PosPrinterColorCartridge(pub i32); impl PosPrinterColorCartridge { pub const Unknown: PosPrinterColorCartridge = PosPrinterColorCartridge(0i32); pub const Primary: PosPrinterColorCartridge = PosPrinterColorCartridge(1i32); pub const Custom1: PosPrinterColorCartridge = PosPrinterColorCartridge(2i32); pub const Custom2: PosPrinterColorCartridge = PosPrinterColorCartridge(3i32); pub const Custom3: PosPrinterColorCartridge = PosPrinterColorCartridge(4i32); pub const Custom4: PosPrinterColorCartridge = PosPrinterColorCartridge(5i32); pub const Custom5: PosPrinterColorCartridge = PosPrinterColorCartridge(6i32); pub const Custom6: PosPrinterColorCartridge = PosPrinterColorCartridge(7i32); pub const Cyan: PosPrinterColorCartridge = PosPrinterColorCartridge(8i32); pub const Magenta: PosPrinterColorCartridge = PosPrinterColorCartridge(9i32); pub const Yellow: PosPrinterColorCartridge = PosPrinterColorCartridge(10i32); } impl ::core::convert::From<i32> for PosPrinterColorCartridge { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterColorCartridge { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterColorCartridge { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterColorCartridge;i4)"); } impl ::windows::core::DefaultType for PosPrinterColorCartridge { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterFontProperty(pub ::windows::core::IInspectable); impl PosPrinterFontProperty { pub fn TypeFace(&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 IsScalableToAnySize(&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_Collections")] pub fn CharacterSizes(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<SizeUInt32>> { 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<SizeUInt32>>(result__) } } } unsafe impl ::windows::core::RuntimeType for PosPrinterFontProperty { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterFontProperty;{a7f4e93a-f8ac-5f04-84d2-29b16d8a633c})"); } unsafe impl ::windows::core::Interface for PosPrinterFontProperty { type Vtable = IPosPrinterFontProperty_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa7f4e93a_f8ac_5f04_84d2_29b16d8a633c); } impl ::windows::core::RuntimeName for PosPrinterFontProperty { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterFontProperty"; } impl ::core::convert::From<PosPrinterFontProperty> for ::windows::core::IUnknown { fn from(value: PosPrinterFontProperty) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterFontProperty> for ::windows::core::IUnknown { fn from(value: &PosPrinterFontProperty) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterFontProperty { 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 PosPrinterFontProperty { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterFontProperty> for ::windows::core::IInspectable { fn from(value: PosPrinterFontProperty) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterFontProperty> for ::windows::core::IInspectable { fn from(value: &PosPrinterFontProperty) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterFontProperty { 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 PosPrinterFontProperty { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterFontProperty {} unsafe impl ::core::marker::Sync for PosPrinterFontProperty {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterLineDirection(pub i32); impl PosPrinterLineDirection { pub const Horizontal: PosPrinterLineDirection = PosPrinterLineDirection(0i32); pub const Vertical: PosPrinterLineDirection = PosPrinterLineDirection(1i32); } impl ::core::convert::From<i32> for PosPrinterLineDirection { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterLineDirection { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterLineDirection { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterLineDirection;i4)"); } impl ::windows::core::DefaultType for PosPrinterLineDirection { 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 PosPrinterLineStyle(pub i32); impl PosPrinterLineStyle { pub const SingleSolid: PosPrinterLineStyle = PosPrinterLineStyle(0i32); pub const DoubleSolid: PosPrinterLineStyle = PosPrinterLineStyle(1i32); pub const Broken: PosPrinterLineStyle = PosPrinterLineStyle(2i32); pub const Chain: PosPrinterLineStyle = PosPrinterLineStyle(3i32); } impl ::core::convert::From<i32> for PosPrinterLineStyle { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterLineStyle { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterLineStyle { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterLineStyle;i4)"); } impl ::windows::core::DefaultType for PosPrinterLineStyle { 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 PosPrinterMapMode(pub i32); impl PosPrinterMapMode { pub const Dots: PosPrinterMapMode = PosPrinterMapMode(0i32); pub const Twips: PosPrinterMapMode = PosPrinterMapMode(1i32); pub const English: PosPrinterMapMode = PosPrinterMapMode(2i32); pub const Metric: PosPrinterMapMode = PosPrinterMapMode(3i32); } impl ::core::convert::From<i32> for PosPrinterMapMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterMapMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterMapMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterMapMode;i4)"); } impl ::windows::core::DefaultType for PosPrinterMapMode { 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 PosPrinterMarkFeedCapabilities(pub u32); impl PosPrinterMarkFeedCapabilities { pub const None: PosPrinterMarkFeedCapabilities = PosPrinterMarkFeedCapabilities(0u32); pub const ToTakeUp: PosPrinterMarkFeedCapabilities = PosPrinterMarkFeedCapabilities(1u32); pub const ToCutter: PosPrinterMarkFeedCapabilities = PosPrinterMarkFeedCapabilities(2u32); pub const ToCurrentTopOfForm: PosPrinterMarkFeedCapabilities = PosPrinterMarkFeedCapabilities(4u32); pub const ToNextTopOfForm: PosPrinterMarkFeedCapabilities = PosPrinterMarkFeedCapabilities(8u32); } impl ::core::convert::From<u32> for PosPrinterMarkFeedCapabilities { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterMarkFeedCapabilities { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterMarkFeedCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterMarkFeedCapabilities;u4)"); } impl ::windows::core::DefaultType for PosPrinterMarkFeedCapabilities { type DefaultType = Self; } impl ::core::ops::BitOr for PosPrinterMarkFeedCapabilities { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PosPrinterMarkFeedCapabilities { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PosPrinterMarkFeedCapabilities { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PosPrinterMarkFeedCapabilities { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PosPrinterMarkFeedCapabilities { 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 PosPrinterMarkFeedKind(pub i32); impl PosPrinterMarkFeedKind { pub const ToTakeUp: PosPrinterMarkFeedKind = PosPrinterMarkFeedKind(0i32); pub const ToCutter: PosPrinterMarkFeedKind = PosPrinterMarkFeedKind(1i32); pub const ToCurrentTopOfForm: PosPrinterMarkFeedKind = PosPrinterMarkFeedKind(2i32); pub const ToNextTopOfForm: PosPrinterMarkFeedKind = PosPrinterMarkFeedKind(3i32); } impl ::core::convert::From<i32> for PosPrinterMarkFeedKind { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterMarkFeedKind { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterMarkFeedKind { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterMarkFeedKind;i4)"); } impl ::windows::core::DefaultType for PosPrinterMarkFeedKind { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterPrintOptions(pub ::windows::core::IInspectable); impl PosPrinterPrintOptions { 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<PosPrinterPrintOptions, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn TypeFace(&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 SetTypeFace<'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() } } pub fn CharacterHeight(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetCharacterHeight(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn Bold(&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 SetBold(&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 Italic(&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 SetItalic(&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 Underline(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetUnderline(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn ReverseVideo(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetReverseVideo(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn Strikethrough(&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 SetStrikethrough(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } pub fn Superscript(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetSuperscript(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value).ok() } } pub fn Subscript(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetSubscript(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } pub fn DoubleWide(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetDoubleWide(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value).ok() } } pub fn DoubleHigh(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetDoubleHigh(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), value).ok() } } pub fn Alignment(&self) -> ::windows::core::Result<PosPrinterAlignment> { let this = self; unsafe { let mut result__: PosPrinterAlignment = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterAlignment>(result__) } } pub fn SetAlignment(&self, value: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), value).ok() } } pub fn CharacterSet(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetCharacterSet(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for PosPrinterPrintOptions { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterPrintOptions;{0a2e16fd-1d02-5a58-9d59-bfcde76fde86})"); } unsafe impl ::windows::core::Interface for PosPrinterPrintOptions { type Vtable = IPosPrinterPrintOptions_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a2e16fd_1d02_5a58_9d59_bfcde76fde86); } impl ::windows::core::RuntimeName for PosPrinterPrintOptions { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterPrintOptions"; } impl ::core::convert::From<PosPrinterPrintOptions> for ::windows::core::IUnknown { fn from(value: PosPrinterPrintOptions) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterPrintOptions> for ::windows::core::IUnknown { fn from(value: &PosPrinterPrintOptions) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterPrintOptions { 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 PosPrinterPrintOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterPrintOptions> for ::windows::core::IInspectable { fn from(value: PosPrinterPrintOptions) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterPrintOptions> for ::windows::core::IInspectable { fn from(value: &PosPrinterPrintOptions) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterPrintOptions { 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 PosPrinterPrintOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterPrintOptions {} unsafe impl ::core::marker::Sync for PosPrinterPrintOptions {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterPrintSide(pub i32); impl PosPrinterPrintSide { pub const Unknown: PosPrinterPrintSide = PosPrinterPrintSide(0i32); pub const Side1: PosPrinterPrintSide = PosPrinterPrintSide(1i32); pub const Side2: PosPrinterPrintSide = PosPrinterPrintSide(2i32); } impl ::core::convert::From<i32> for PosPrinterPrintSide { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterPrintSide { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterPrintSide { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterPrintSide;i4)"); } impl ::windows::core::DefaultType for PosPrinterPrintSide { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterReleaseDeviceRequestedEventArgs(pub ::windows::core::IInspectable); impl PosPrinterReleaseDeviceRequestedEventArgs {} unsafe impl ::windows::core::RuntimeType for PosPrinterReleaseDeviceRequestedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterReleaseDeviceRequestedEventArgs;{2bcba359-1cef-40b2-9ecb-f927f856ae3c})"); } unsafe impl ::windows::core::Interface for PosPrinterReleaseDeviceRequestedEventArgs { type Vtable = IPosPrinterReleaseDeviceRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2bcba359_1cef_40b2_9ecb_f927f856ae3c); } impl ::windows::core::RuntimeName for PosPrinterReleaseDeviceRequestedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterReleaseDeviceRequestedEventArgs"; } impl ::core::convert::From<PosPrinterReleaseDeviceRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: PosPrinterReleaseDeviceRequestedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterReleaseDeviceRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: &PosPrinterReleaseDeviceRequestedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterReleaseDeviceRequestedEventArgs { 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 PosPrinterReleaseDeviceRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterReleaseDeviceRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: PosPrinterReleaseDeviceRequestedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterReleaseDeviceRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: &PosPrinterReleaseDeviceRequestedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterReleaseDeviceRequestedEventArgs { 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 PosPrinterReleaseDeviceRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterReleaseDeviceRequestedEventArgs {} unsafe impl ::core::marker::Sync for PosPrinterReleaseDeviceRequestedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterRotation(pub i32); impl PosPrinterRotation { pub const Normal: PosPrinterRotation = PosPrinterRotation(0i32); pub const Right90: PosPrinterRotation = PosPrinterRotation(1i32); pub const Left90: PosPrinterRotation = PosPrinterRotation(2i32); pub const Rotate180: PosPrinterRotation = PosPrinterRotation(3i32); } impl ::core::convert::From<i32> for PosPrinterRotation { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterRotation { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterRotation { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterRotation;i4)"); } impl ::windows::core::DefaultType for PosPrinterRotation { 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 PosPrinterRuledLineCapabilities(pub u32); impl PosPrinterRuledLineCapabilities { pub const None: PosPrinterRuledLineCapabilities = PosPrinterRuledLineCapabilities(0u32); pub const Horizontal: PosPrinterRuledLineCapabilities = PosPrinterRuledLineCapabilities(1u32); pub const Vertical: PosPrinterRuledLineCapabilities = PosPrinterRuledLineCapabilities(2u32); } impl ::core::convert::From<u32> for PosPrinterRuledLineCapabilities { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterRuledLineCapabilities { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterRuledLineCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterRuledLineCapabilities;u4)"); } impl ::windows::core::DefaultType for PosPrinterRuledLineCapabilities { type DefaultType = Self; } impl ::core::ops::BitOr for PosPrinterRuledLineCapabilities { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PosPrinterRuledLineCapabilities { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PosPrinterRuledLineCapabilities { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PosPrinterRuledLineCapabilities { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PosPrinterRuledLineCapabilities { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterStatus(pub ::windows::core::IInspectable); impl PosPrinterStatus { pub fn StatusKind(&self) -> ::windows::core::Result<PosPrinterStatusKind> { let this = self; unsafe { let mut result__: PosPrinterStatusKind = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterStatusKind>(result__) } } pub fn ExtendedStatus(&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__) } } } unsafe impl ::windows::core::RuntimeType for PosPrinterStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterStatus;{d1f0c730-da40-4328-bf76-5156fa33b747})"); } unsafe impl ::windows::core::Interface for PosPrinterStatus { type Vtable = IPosPrinterStatus_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd1f0c730_da40_4328_bf76_5156fa33b747); } impl ::windows::core::RuntimeName for PosPrinterStatus { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterStatus"; } impl ::core::convert::From<PosPrinterStatus> for ::windows::core::IUnknown { fn from(value: PosPrinterStatus) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterStatus> for ::windows::core::IUnknown { fn from(value: &PosPrinterStatus) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterStatus { 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 PosPrinterStatus { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterStatus> for ::windows::core::IInspectable { fn from(value: PosPrinterStatus) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterStatus> for ::windows::core::IInspectable { fn from(value: &PosPrinterStatus) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterStatus { 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 PosPrinterStatus { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterStatus {} unsafe impl ::core::marker::Sync for PosPrinterStatus {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PosPrinterStatusKind(pub i32); impl PosPrinterStatusKind { pub const Online: PosPrinterStatusKind = PosPrinterStatusKind(0i32); pub const Off: PosPrinterStatusKind = PosPrinterStatusKind(1i32); pub const Offline: PosPrinterStatusKind = PosPrinterStatusKind(2i32); pub const OffOrOffline: PosPrinterStatusKind = PosPrinterStatusKind(3i32); pub const Extended: PosPrinterStatusKind = PosPrinterStatusKind(4i32); } impl ::core::convert::From<i32> for PosPrinterStatusKind { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PosPrinterStatusKind { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for PosPrinterStatusKind { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.PosPrinterStatusKind;i4)"); } impl ::windows::core::DefaultType for PosPrinterStatusKind { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PosPrinterStatusUpdatedEventArgs(pub ::windows::core::IInspectable); impl PosPrinterStatusUpdatedEventArgs { pub fn Status(&self) -> ::windows::core::Result<PosPrinterStatus> { 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::<PosPrinterStatus>(result__) } } } unsafe impl ::windows::core::RuntimeType for PosPrinterStatusUpdatedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.PosPrinterStatusUpdatedEventArgs;{2edb87df-13a6-428d-ba81-b0e7c3e5a3cd})"); } unsafe impl ::windows::core::Interface for PosPrinterStatusUpdatedEventArgs { type Vtable = IPosPrinterStatusUpdatedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2edb87df_13a6_428d_ba81_b0e7c3e5a3cd); } impl ::windows::core::RuntimeName for PosPrinterStatusUpdatedEventArgs { const NAME: &'static str = "Windows.Devices.PointOfService.PosPrinterStatusUpdatedEventArgs"; } impl ::core::convert::From<PosPrinterStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: PosPrinterStatusUpdatedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&PosPrinterStatusUpdatedEventArgs> for ::windows::core::IUnknown { fn from(value: &PosPrinterStatusUpdatedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PosPrinterStatusUpdatedEventArgs { 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 PosPrinterStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PosPrinterStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: PosPrinterStatusUpdatedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&PosPrinterStatusUpdatedEventArgs> for ::windows::core::IInspectable { fn from(value: &PosPrinterStatusUpdatedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PosPrinterStatusUpdatedEventArgs { 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 PosPrinterStatusUpdatedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PosPrinterStatusUpdatedEventArgs {} unsafe impl ::core::marker::Sync for PosPrinterStatusUpdatedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ReceiptPrintJob(pub ::windows::core::IInspectable); impl ReceiptPrintJob { pub fn MarkFeed(&self, kind: PosPrinterMarkFeedKind) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), kind).ok() } } pub fn CutPaper(&self, percentage: f64) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), percentage).ok() } } pub fn CutPaperDefault(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } pub fn Print<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintNewline(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ExecuteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(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::IAsyncOperation<bool>>(result__) } } pub fn SetBarcodeRotation(&self, value: PosPrinterRotation) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn SetPrintRotation(&self, value: PosPrinterRotation, includebitmaps: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value, includebitmaps).ok() } } #[cfg(feature = "Foundation")] pub fn SetPrintArea<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthStandardAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetCustomAlignedBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthCustomAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), bitmapnumber).ok() } } pub fn DrawRuledLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, positionlist: Param0, linedirection: PosPrinterLineDirection, linewidth: u32, linestyle: PosPrinterLineStyle, linecolor: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), positionlist.into_param().abi(), linedirection, linewidth, linestyle, linecolor).ok() } } pub fn PrintBarcode<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignment).ok() } } pub fn PrintBarcodeCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthStandardAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintCustomAlignedBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptOrSlipJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn StampPaper(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptPrintJob2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Print2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, PosPrinterPrintOptions>>(&self, data: Param0, printoptions: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptPrintJob2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi(), printoptions.into_param().abi()).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptPrintJob2>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), linecount).ok() } } pub fn FeedPaperByMapModeUnit(&self, distance: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IReceiptPrintJob2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), distance).ok() } } } unsafe impl ::windows::core::RuntimeType for ReceiptPrintJob { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ReceiptPrintJob;{aa96066e-acad-4b79-9d0f-c0cfc08dc77b})"); } unsafe impl ::windows::core::Interface for ReceiptPrintJob { type Vtable = IReceiptPrintJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa96066e_acad_4b79_9d0f_c0cfc08dc77b); } impl ::windows::core::RuntimeName for ReceiptPrintJob { const NAME: &'static str = "Windows.Devices.PointOfService.ReceiptPrintJob"; } impl ::core::convert::From<ReceiptPrintJob> for ::windows::core::IUnknown { fn from(value: ReceiptPrintJob) -> Self { value.0 .0 } } impl ::core::convert::From<&ReceiptPrintJob> for ::windows::core::IUnknown { fn from(value: &ReceiptPrintJob) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ReceiptPrintJob { 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 ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ReceiptPrintJob> for ::windows::core::IInspectable { fn from(value: ReceiptPrintJob) -> Self { value.0 } } impl ::core::convert::From<&ReceiptPrintJob> for ::windows::core::IInspectable { fn from(value: &ReceiptPrintJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ReceiptPrintJob { 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 ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ReceiptPrintJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: ReceiptPrintJob) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ReceiptPrintJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: &ReceiptPrintJob) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for &ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::core::convert::TryInto::<IPosPrinterJob>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ReceiptPrintJob> for IReceiptOrSlipJob { type Error = ::windows::core::Error; fn try_from(value: ReceiptPrintJob) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ReceiptPrintJob> for IReceiptOrSlipJob { type Error = ::windows::core::Error; fn try_from(value: &ReceiptPrintJob) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IReceiptOrSlipJob> for ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IReceiptOrSlipJob> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IReceiptOrSlipJob> for &ReceiptPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IReceiptOrSlipJob> { ::core::convert::TryInto::<IReceiptOrSlipJob>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for ReceiptPrintJob {} unsafe impl ::core::marker::Sync for ReceiptPrintJob {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ReceiptPrinterCapabilities(pub ::windows::core::IInspectable); impl ReceiptPrinterCapabilities { pub fn CanCutPaper(&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 IsStampSupported(&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 MarkFeedCapabilities(&self) -> ::windows::core::Result<PosPrinterMarkFeedCapabilities> { let this = self; unsafe { let mut result__: PosPrinterMarkFeedCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterMarkFeedCapabilities>(result__) } } pub fn IsPrinterPresent(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDualColorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 ColorCartridgeCapabilities(&self) -> ::windows::core::Result<PosPrinterColorCapabilities> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterColorCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCapabilities>(result__) } } pub fn CartridgeSensors(&self) -> ::windows::core::Result<PosPrinterCartridgeSensors> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterCartridgeSensors = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterCartridgeSensors>(result__) } } pub fn IsBoldSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsItalicSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDoubleHighPrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleHighDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmptySensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEndSensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharactersPerLine(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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::<super::super::Foundation::Collections::IVectorView<u32>>(result__) } } pub fn IsBarcodeSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsBitmapSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsLeft90RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsRight90RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn Is180RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsPrintAreaSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn RuledLineCapabilities(&self) -> ::windows::core::Result<PosPrinterRuledLineCapabilities> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: PosPrinterRuledLineCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterRuledLineCapabilities>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBarcodeRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBitmapRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } pub fn IsReverseVideoSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(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 IsStrikethroughSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(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 IsSuperscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsSubscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReversePaperFeedByLineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(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 IsReversePaperFeedByMapModeUnitSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IReceiptPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ReceiptPrinterCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.ReceiptPrinterCapabilities;{b8f0b58f-51a8-43fc-9bd5-8de272a6415b})"); } unsafe impl ::windows::core::Interface for ReceiptPrinterCapabilities { type Vtable = IReceiptPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8f0b58f_51a8_43fc_9bd5_8de272a6415b); } impl ::windows::core::RuntimeName for ReceiptPrinterCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.ReceiptPrinterCapabilities"; } impl ::core::convert::From<ReceiptPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: ReceiptPrinterCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&ReceiptPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: &ReceiptPrinterCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ReceiptPrinterCapabilities { 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 ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ReceiptPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: ReceiptPrinterCapabilities) -> Self { value.0 } } impl ::core::convert::From<&ReceiptPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: &ReceiptPrinterCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ReceiptPrinterCapabilities { 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 ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<ReceiptPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: ReceiptPrinterCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ReceiptPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: &ReceiptPrinterCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for &ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::core::convert::TryInto::<ICommonPosPrintStationCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<ReceiptPrinterCapabilities> for ICommonReceiptSlipCapabilities { type Error = ::windows::core::Error; fn try_from(value: ReceiptPrinterCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&ReceiptPrinterCapabilities> for ICommonReceiptSlipCapabilities { type Error = ::windows::core::Error; fn try_from(value: &ReceiptPrinterCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonReceiptSlipCapabilities> for ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonReceiptSlipCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonReceiptSlipCapabilities> for &ReceiptPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonReceiptSlipCapabilities> { ::core::convert::TryInto::<ICommonReceiptSlipCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for ReceiptPrinterCapabilities {} unsafe impl ::core::marker::Sync for ReceiptPrinterCapabilities {} #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SizeUInt32 { pub Width: u32, pub Height: u32, } impl SizeUInt32 {} impl ::core::default::Default for SizeUInt32 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SizeUInt32 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SizeUInt32").field("Width", &self.Width).field("Height", &self.Height).finish() } } impl ::core::cmp::PartialEq for SizeUInt32 { fn eq(&self, other: &Self) -> bool { self.Width == other.Width && self.Height == other.Height } } impl ::core::cmp::Eq for SizeUInt32 {} unsafe impl ::windows::core::Abi for SizeUInt32 { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SizeUInt32 { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"struct(Windows.Devices.PointOfService.SizeUInt32;u4;u4)"); } impl ::windows::core::DefaultType for SizeUInt32 { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SlipPrintJob(pub ::windows::core::IInspectable); impl SlipPrintJob { pub fn SetBarcodeRotation(&self, value: PosPrinterRotation) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value).ok() } } pub fn SetPrintRotation(&self, value: PosPrinterRotation, includebitmaps: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value, includebitmaps).ok() } } #[cfg(feature = "Foundation")] pub fn SetPrintArea<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&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 = "Graphics_Imaging")] pub fn SetBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthStandardAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetCustomAlignedBitmap<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn SetBitmapCustomWidthCustomAlign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmapnumber: u32, bitmap: Param1, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), bitmapnumber, bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn PrintSavedBitmap(&self, bitmapnumber: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), bitmapnumber).ok() } } pub fn DrawRuledLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, positionlist: Param0, linedirection: PosPrinterLineDirection, linewidth: u32, linestyle: PosPrinterLineStyle, linecolor: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), positionlist.into_param().abi(), linedirection, linewidth, linestyle, linecolor).ok() } } pub fn PrintBarcode<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignment).ok() } } pub fn PrintBarcodeCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), data.into_param().abi(), symbology, height, width, textposition, alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthStandardAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignment, width).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintCustomAlignedBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance).ok() } } #[cfg(feature = "Graphics_Imaging")] pub fn PrintBitmapCustomWidthCustomAlign<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::Imaging::BitmapFrame>>(&self, bitmap: Param0, alignmentdistance: u32, width: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), alignmentdistance, width).ok() } } pub fn Print<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintLine<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, data: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), data.into_param().abi()).ok() } } pub fn PrintNewline(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn ExecuteAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> { let this = &::windows::core::Interface::cast::<IPosPrinterJob>(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::IAsyncOperation<bool>>(result__) } } pub fn Print2<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, PosPrinterPrintOptions>>(&self, data: Param0, printoptions: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISlipPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), data.into_param().abi(), printoptions.into_param().abi()).ok() } } pub fn FeedPaperByLine(&self, linecount: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISlipPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), linecount).ok() } } pub fn FeedPaperByMapModeUnit(&self, distance: i32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISlipPrintJob>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), distance).ok() } } } unsafe impl ::windows::core::RuntimeType for SlipPrintJob { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.SlipPrintJob;{532199be-c8c3-4dc2-89e9-5c4a37b34ddc})"); } unsafe impl ::windows::core::Interface for SlipPrintJob { type Vtable = IReceiptOrSlipJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x532199be_c8c3_4dc2_89e9_5c4a37b34ddc); } impl ::windows::core::RuntimeName for SlipPrintJob { const NAME: &'static str = "Windows.Devices.PointOfService.SlipPrintJob"; } impl ::core::convert::From<SlipPrintJob> for ::windows::core::IUnknown { fn from(value: SlipPrintJob) -> Self { value.0 .0 } } impl ::core::convert::From<&SlipPrintJob> for ::windows::core::IUnknown { fn from(value: &SlipPrintJob) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SlipPrintJob { 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 SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SlipPrintJob> for ::windows::core::IInspectable { fn from(value: SlipPrintJob) -> Self { value.0 } } impl ::core::convert::From<&SlipPrintJob> for ::windows::core::IInspectable { fn from(value: &SlipPrintJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SlipPrintJob { 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 SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<SlipPrintJob> for IReceiptOrSlipJob { fn from(value: SlipPrintJob) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&SlipPrintJob> for IReceiptOrSlipJob { fn from(value: &SlipPrintJob) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IReceiptOrSlipJob> for SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IReceiptOrSlipJob> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IReceiptOrSlipJob> for &SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IReceiptOrSlipJob> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::TryFrom<SlipPrintJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: SlipPrintJob) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SlipPrintJob> for IPosPrinterJob { type Error = ::windows::core::Error; fn try_from(value: &SlipPrintJob) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IPosPrinterJob> for &SlipPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IPosPrinterJob> { ::core::convert::TryInto::<IPosPrinterJob>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for SlipPrintJob {} unsafe impl ::core::marker::Sync for SlipPrintJob {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SlipPrinterCapabilities(pub ::windows::core::IInspectable); impl SlipPrinterCapabilities { pub fn IsFullLengthSupported(&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 IsBothSidesPrintingSupported(&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 IsPrinterPresent(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDualColorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 ColorCartridgeCapabilities(&self) -> ::windows::core::Result<PosPrinterColorCapabilities> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterColorCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterColorCapabilities>(result__) } } pub fn CartridgeSensors(&self) -> ::windows::core::Result<PosPrinterCartridgeSensors> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: PosPrinterCartridgeSensors = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterCartridgeSensors>(result__) } } pub fn IsBoldSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsItalicSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsUnderlineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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 IsDoubleHighPrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsDoubleHighDoubleWidePrintSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperEmptySensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsPaperNearEndSensorSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedCharactersPerLine(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<u32>> { let this = &::windows::core::Interface::cast::<ICommonPosPrintStationCapabilities>(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::<super::super::Foundation::Collections::IVectorView<u32>>(result__) } } pub fn IsBarcodeSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsBitmapSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsLeft90RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsRight90RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn Is180RotationSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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 IsPrintAreaSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn RuledLineCapabilities(&self) -> ::windows::core::Result<PosPrinterRuledLineCapabilities> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(self)?; unsafe { let mut result__: PosPrinterRuledLineCapabilities = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PosPrinterRuledLineCapabilities>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBarcodeRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedBitmapRotations(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>> { let this = &::windows::core::Interface::cast::<ICommonReceiptSlipCapabilities>(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::<super::super::Foundation::Collections::IVectorView<PosPrinterRotation>>(result__) } } pub fn IsReverseVideoSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(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 IsStrikethroughSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(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 IsSuperscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsSubscriptSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn IsReversePaperFeedByLineSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(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 IsReversePaperFeedByMapModeUnitSupported(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISlipPrinterCapabilities2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for SlipPrinterCapabilities { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.SlipPrinterCapabilities;{99b16399-488c-4157-8ac2-9f57f708d3db})"); } unsafe impl ::windows::core::Interface for SlipPrinterCapabilities { type Vtable = ISlipPrinterCapabilities_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99b16399_488c_4157_8ac2_9f57f708d3db); } impl ::windows::core::RuntimeName for SlipPrinterCapabilities { const NAME: &'static str = "Windows.Devices.PointOfService.SlipPrinterCapabilities"; } impl ::core::convert::From<SlipPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: SlipPrinterCapabilities) -> Self { value.0 .0 } } impl ::core::convert::From<&SlipPrinterCapabilities> for ::windows::core::IUnknown { fn from(value: &SlipPrinterCapabilities) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SlipPrinterCapabilities { 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 SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SlipPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: SlipPrinterCapabilities) -> Self { value.0 } } impl ::core::convert::From<&SlipPrinterCapabilities> for ::windows::core::IInspectable { fn from(value: &SlipPrinterCapabilities) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SlipPrinterCapabilities { 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 SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::TryFrom<SlipPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: SlipPrinterCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SlipPrinterCapabilities> for ICommonPosPrintStationCapabilities { type Error = ::windows::core::Error; fn try_from(value: &SlipPrinterCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonPosPrintStationCapabilities> for &SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonPosPrintStationCapabilities> { ::core::convert::TryInto::<ICommonPosPrintStationCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<SlipPrinterCapabilities> for ICommonReceiptSlipCapabilities { type Error = ::windows::core::Error; fn try_from(value: SlipPrinterCapabilities) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&SlipPrinterCapabilities> for ICommonReceiptSlipCapabilities { type Error = ::windows::core::Error; fn try_from(value: &SlipPrinterCapabilities) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, ICommonReceiptSlipCapabilities> for SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonReceiptSlipCapabilities> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, ICommonReceiptSlipCapabilities> for &SlipPrinterCapabilities { fn into_param(self) -> ::windows::core::Param<'a, ICommonReceiptSlipCapabilities> { ::core::convert::TryInto::<ICommonReceiptSlipCapabilities>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for SlipPrinterCapabilities {} unsafe impl ::core::marker::Sync for SlipPrinterCapabilities {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct UnifiedPosErrorData(pub ::windows::core::IInspectable); impl UnifiedPosErrorData { pub fn Message(&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 Severity(&self) -> ::windows::core::Result<UnifiedPosErrorSeverity> { let this = self; unsafe { let mut result__: UnifiedPosErrorSeverity = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosErrorSeverity>(result__) } } pub fn Reason(&self) -> ::windows::core::Result<UnifiedPosErrorReason> { let this = self; unsafe { let mut result__: UnifiedPosErrorReason = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<UnifiedPosErrorReason>(result__) } } pub fn ExtendedReason(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(message: Param0, severity: UnifiedPosErrorSeverity, reason: UnifiedPosErrorReason, extendedreason: u32) -> ::windows::core::Result<UnifiedPosErrorData> { Self::IUnifiedPosErrorDataFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), message.into_param().abi(), severity, reason, extendedreason, &mut result__).from_abi::<UnifiedPosErrorData>(result__) }) } pub fn IUnifiedPosErrorDataFactory<R, F: FnOnce(&IUnifiedPosErrorDataFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<UnifiedPosErrorData, IUnifiedPosErrorDataFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for UnifiedPosErrorData { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.PointOfService.UnifiedPosErrorData;{2b998c3a-555c-4889-8ed8-c599bb3a712a})"); } unsafe impl ::windows::core::Interface for UnifiedPosErrorData { type Vtable = IUnifiedPosErrorData_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2b998c3a_555c_4889_8ed8_c599bb3a712a); } impl ::windows::core::RuntimeName for UnifiedPosErrorData { const NAME: &'static str = "Windows.Devices.PointOfService.UnifiedPosErrorData"; } impl ::core::convert::From<UnifiedPosErrorData> for ::windows::core::IUnknown { fn from(value: UnifiedPosErrorData) -> Self { value.0 .0 } } impl ::core::convert::From<&UnifiedPosErrorData> for ::windows::core::IUnknown { fn from(value: &UnifiedPosErrorData) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for UnifiedPosErrorData { 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 UnifiedPosErrorData { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<UnifiedPosErrorData> for ::windows::core::IInspectable { fn from(value: UnifiedPosErrorData) -> Self { value.0 } } impl ::core::convert::From<&UnifiedPosErrorData> for ::windows::core::IInspectable { fn from(value: &UnifiedPosErrorData) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for UnifiedPosErrorData { 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 UnifiedPosErrorData { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for UnifiedPosErrorData {} unsafe impl ::core::marker::Sync for UnifiedPosErrorData {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct UnifiedPosErrorReason(pub i32); impl UnifiedPosErrorReason { pub const UnknownErrorReason: UnifiedPosErrorReason = UnifiedPosErrorReason(0i32); pub const NoService: UnifiedPosErrorReason = UnifiedPosErrorReason(1i32); pub const Disabled: UnifiedPosErrorReason = UnifiedPosErrorReason(2i32); pub const Illegal: UnifiedPosErrorReason = UnifiedPosErrorReason(3i32); pub const NoHardware: UnifiedPosErrorReason = UnifiedPosErrorReason(4i32); pub const Closed: UnifiedPosErrorReason = UnifiedPosErrorReason(5i32); pub const Offline: UnifiedPosErrorReason = UnifiedPosErrorReason(6i32); pub const Failure: UnifiedPosErrorReason = UnifiedPosErrorReason(7i32); pub const Timeout: UnifiedPosErrorReason = UnifiedPosErrorReason(8i32); pub const Busy: UnifiedPosErrorReason = UnifiedPosErrorReason(9i32); pub const Extended: UnifiedPosErrorReason = UnifiedPosErrorReason(10i32); } impl ::core::convert::From<i32> for UnifiedPosErrorReason { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for UnifiedPosErrorReason { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for UnifiedPosErrorReason { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.UnifiedPosErrorReason;i4)"); } impl ::windows::core::DefaultType for UnifiedPosErrorReason { 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 UnifiedPosErrorSeverity(pub i32); impl UnifiedPosErrorSeverity { pub const UnknownErrorSeverity: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(0i32); pub const Warning: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(1i32); pub const Recoverable: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(2i32); pub const Unrecoverable: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(3i32); pub const AssistanceRequired: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(4i32); pub const Fatal: UnifiedPosErrorSeverity = UnifiedPosErrorSeverity(5i32); } impl ::core::convert::From<i32> for UnifiedPosErrorSeverity { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for UnifiedPosErrorSeverity { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for UnifiedPosErrorSeverity { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.UnifiedPosErrorSeverity;i4)"); } impl ::windows::core::DefaultType for UnifiedPosErrorSeverity { 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 UnifiedPosHealthCheckLevel(pub i32); impl UnifiedPosHealthCheckLevel { pub const UnknownHealthCheckLevel: UnifiedPosHealthCheckLevel = UnifiedPosHealthCheckLevel(0i32); pub const POSInternal: UnifiedPosHealthCheckLevel = UnifiedPosHealthCheckLevel(1i32); pub const External: UnifiedPosHealthCheckLevel = UnifiedPosHealthCheckLevel(2i32); pub const Interactive: UnifiedPosHealthCheckLevel = UnifiedPosHealthCheckLevel(3i32); } impl ::core::convert::From<i32> for UnifiedPosHealthCheckLevel { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for UnifiedPosHealthCheckLevel { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for UnifiedPosHealthCheckLevel { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.UnifiedPosHealthCheckLevel;i4)"); } impl ::windows::core::DefaultType for UnifiedPosHealthCheckLevel { 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 UnifiedPosPowerReportingType(pub i32); impl UnifiedPosPowerReportingType { pub const UnknownPowerReportingType: UnifiedPosPowerReportingType = UnifiedPosPowerReportingType(0i32); pub const Standard: UnifiedPosPowerReportingType = UnifiedPosPowerReportingType(1i32); pub const Advanced: UnifiedPosPowerReportingType = UnifiedPosPowerReportingType(2i32); } impl ::core::convert::From<i32> for UnifiedPosPowerReportingType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for UnifiedPosPowerReportingType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for UnifiedPosPowerReportingType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.PointOfService.UnifiedPosPowerReportingType;i4)"); } impl ::windows::core::DefaultType for UnifiedPosPowerReportingType { type DefaultType = Self; }
#![cfg(feature="inclnum")] extern crate num; use rand; // use num; // use self::num; use super::traits::*; impl Samplable for num::bigint::BigInt { fn sample_below(upper: &Self) -> Self { use self::num::bigint::{ToBigInt, RandBigInt}; let mut rng = rand::OsRng::new().unwrap(); rng.gen_biguint_below(&upper.to_biguint().unwrap()).to_bigint().unwrap() // TODO this is really ugly } fn sample(bitsize: usize) -> Self { use self::num::bigint::{ToBigInt, RandBigInt}; let mut rng = rand::OsRng::new().unwrap(); rng.gen_biguint(bitsize).to_bigint().unwrap() } fn sample_range(lower: &Self, upper: &Self) -> Self { use self::num::bigint::{ToBigInt, RandBigInt}; let mut rng = rand::OsRng::new().unwrap(); rng.gen_biguint_range(&lower.to_biguint().unwrap(), &upper.to_biguint().unwrap()).to_bigint().unwrap() } } use self::num::{Zero, Integer, Signed}; impl NumberTests for num::bigint::BigInt { fn is_zero(me: &Self) -> bool { me.is_zero() } fn is_even(me: &Self) -> bool { me.is_even() } fn is_negative(me: &Self) -> bool { me.is_negative() } } // impl DivRem for num::bigint::BigInt { // fn divmod(dividend: &Self, module: &Self) -> (Self, Self) { // dividend.div_rem(module) // } // } use self::num::ToPrimitive; impl ConvertFrom<num::bigint::BigInt> for u64 { fn _from(x: &num::bigint::BigInt) -> u64 { x.to_u64().unwrap() } } pub type BigInteger = num::bigint::BigInt;
fn main() { let mut vect: Vec<i32> = Vec::new(); vect.push(6); vect.push(124); println!("{:?}", vect); println!(); let mut vect_inferred = vec![1, 2, 3]; let third_element = &vect_inferred[2]; // gives reference -- you want it to crash if out of bounds let a = vect_inferred[2]; // copies value into a match vect_inferred.get(2) { // get gives Option wrapped around reference -- you dont want it to crash if out of bounds Some(third_element) => println!("The third element is {}", third_element), None => println!("There is no element there"), } for num in &mut vect_inferred { *num += 50; } for num in &mut vect_inferred { println!("{}", num); } // ------------------------------- let row = vec![ // using an enum wrapper to store dif types of values in a vector SpreadsheetCell::Int(3), SpreadsheetCell::Text(String::from("blue")), SpreadsheetCell::Float(10.12), ]; } enum SpreadsheetCell { Int(i32), Float(f64), Text(String), }
use ndarray::{arr1, Array1, Array2, ArrayBase, Data, Ix1, Ix2}; use crate::gradient::{sobel_x, sobel_y}; use crate::interpolation::Interpolation; pub struct ImageGradient { gx: Array2<f64>, gy: Array2<f64> } impl ImageGradient { pub fn new<S: Data<Elem = f64>>(image: &ArrayBase<S, Ix2>) -> Self { let gx = sobel_x(image); let gy = sobel_y(image); ImageGradient { gx: gx, gy: gy } } pub fn get<S: Data<Elem = f64>>( &self, coordinate: &ArrayBase<S, Ix1> ) -> Array1<f64> { let gx = self.gx.interpolate(coordinate); let gy = self.gy.interpolate(coordinate); arr1(&[gx, gy]) } } #[cfg(test)] mod tests { use super::*; use ndarray::arr2; fn run(grad: &ImageGradient, c: &Array1<f64>) { let expected = arr1(&[grad.gx.interpolate(c), grad.gy.interpolate(c)]); assert_eq!(grad.get(&c), expected); } #[test] fn test_get() { let gx = arr2( &[[0., 2., 1.], [0., 1., 1.], [1., 2., 0.]] ); let gy = arr2( &[[1., 1., 0.], [0., 2., 1.], [1., 0., 1.]] ); let c = arr1(&[0.3, 1.2]); let grad = ImageGradient { gx: gx, gy: gy }; run(&grad, &c); } }
use crate::label_slice::LabelSlice; use crate::name::{Name, NameRelation}; use std::{marker::PhantomData, mem}; use crate::domaintree::flag::Color; use crate::domaintree::node::{connect_child, get_sibling, Node, NodePtr}; use crate::domaintree::node_chain::NodeChain; #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum FindResultFlag { ExacatMatch, NotFound, PartialMatch, } pub struct FindResult<'a, T: 'a> { pub node: NodePtr<T>, pub flag: FindResultFlag, phantom: PhantomData<&'a T>, } impl<'a, T> FindResult<'a, T> { fn new(_tree: &'a DomainTree<T>) -> Self { FindResult { node: NodePtr::null(), flag: FindResultFlag::NotFound, phantom: PhantomData, } } pub fn get_value(&self) -> Option<&'a T> { if self.flag == FindResultFlag::NotFound { None } else { debug_assert!(!self.node.is_null()); unsafe { (*self.node.0).value.as_ref() } } } pub fn get_value_mut(&self) -> Option<&'a mut T> { if self.flag == FindResultFlag::NotFound { None } else { debug_assert!(!self.node.is_null()); unsafe { (*self.node.0).value.as_mut() } } } } pub struct DomainTree<T> { root: NodePtr<T>, len: usize, } impl<T> Default for DomainTree<T> { fn default() -> Self { Self::new() } } impl<T> Drop for DomainTree<T> { fn drop(&mut self) { self.clear(); } } impl<T: Clone> Clone for DomainTree<T> { fn clone(&self) -> DomainTree<T> { unsafe { let mut new = DomainTree::new(); new.root = self.root.deep_clone(); new.len = self.len; new } } } impl<T> DomainTree<T> { pub fn new() -> DomainTree<T> { DomainTree { root: NodePtr::null(), len: 0, } } pub fn len(&self) -> usize { self.len } pub fn is_empty(&self) -> bool { self.root.is_null() } unsafe fn left_rotate(&mut self, root: *mut *mut Node<T>, node: NodePtr<T>) { let right = node.right(); let rleft = right.left(); node.set_right(rleft); if !rleft.is_null() { rleft.set_parent(node); } let parent = node.parent(); right.set_parent(parent); if !node.is_subtree_root() { right.set_subtree_root(false); if node == parent.left() { parent.set_left(right); } else { parent.set_right(right); } } else { right.set_subtree_root(true); *root = right.get_pointer(); } right.set_left(node); node.set_parent(right); node.set_subtree_root(false); } unsafe fn right_rotate(&mut self, root: *mut *mut Node<T>, node: NodePtr<T>) { let left = node.left(); let lright = left.right(); node.set_left(lright); if !lright.is_null() { lright.set_parent(node); } let parent = node.parent(); left.set_parent(parent); if !node.is_subtree_root() { left.set_subtree_root(false); if node == parent.right() { parent.set_right(left); } else { parent.set_left(left); } } else { left.set_subtree_root(true); *root = left.get_pointer(); } left.set_right(node); node.set_parent(left); node.set_subtree_root(false); } unsafe fn insert_fixup(&mut self, root: *mut *mut Node<T>, node_: NodePtr<T>) { let mut node = node_; while node.get_pointer() != *root { let mut parent = node.parent(); if parent.is_black() { break; } let uncle = node.uncle(); let grand_parent = node.grand_parent(); if !uncle.is_null() && uncle.is_red() { parent.set_color(Color::Black); uncle.set_color(Color::Black); grand_parent.set_color(Color::Red); node = grand_parent; } else { if node == parent.right() && parent == grand_parent.left() { node = parent; self.left_rotate(root, parent); } else if node == parent.left() && parent == grand_parent.right() { node = parent; self.right_rotate(root, parent); } parent = node.parent(); parent.set_color(Color::Black); grand_parent.set_color(Color::Red); if node == parent.left() { self.right_rotate(root, grand_parent); } else { self.left_rotate(root, grand_parent); } break; } } (**root).flag.set_color(Color::Black); } //if old node exists, overwrite the value, and return old value pub fn insert(&mut self, target: Name, v: Option<T>) -> (NodePtr<T>, Option<Option<T>>) { let mut parent = NodePtr::null(); let mut up = NodePtr::null(); let mut current = self.root; let mut order = -1; let mut target_slice = LabelSlice::from_name(&target); while !current.is_null() { let current_name = LabelSlice::from_label_sequence(current.get_name()); let compare_result = target_slice.compare(&current_name, false); match compare_result.relation { NameRelation::Equal => unsafe { return (current, Some(mem::replace(&mut (*current.0).value, v))); }, NameRelation::None => { parent = current; order = compare_result.order; current = if order < 0 { current.left() } else { current.right() }; } NameRelation::SubDomain => { parent = NodePtr::null(); up = current; target_slice.strip_right(compare_result.common_label_count as usize); current = current.down(); } _ => { unsafe { self.node_fission(&mut current, compare_result.common_label_count as usize); } current = current.parent(); } } } let current_root = if !up.is_null() { up.get_double_pointer_of_down() } else { self.root.get_double_pointer() }; self.len += 1; let first_label = target_slice.first_label(); let last_label = target_slice.last_label(); let node = NodePtr::new(target.into_label_sequence(first_label, last_label), v); node.set_parent(parent); if parent.is_null() { unsafe { *current_root = node.get_pointer(); } node.set_color(Color::Black); node.set_subtree_root(true); node.set_parent(up); } else if order < 0 { node.set_subtree_root(false); parent.set_left(node); unsafe { self.insert_fixup(current_root, node); } } else { node.set_subtree_root(false); parent.set_right(node); unsafe { self.insert_fixup(current_root, node); } } (node, None) } unsafe fn node_fission(&mut self, node: &mut NodePtr<T>, parent_label_count: usize) { let up = node.split_to_parent(parent_label_count); up.set_parent(node.parent()); connect_child(self.root.get_double_pointer(), *node, *node, up); up.set_down(*node); node.set_parent(up); up.set_left(node.left()); if !node.left().is_null() { node.left().set_parent(up); } up.set_right(node.right()); if !node.right().is_null() { node.right().set_parent(up); } node.set_left(NodePtr::null()); node.set_right(NodePtr::null()); up.set_color(node.get_color()); node.set_color(Color::Black); up.set_subtree_root(node.is_subtree_root()); node.set_subtree_root(true); self.len += 1; } pub fn find(&self, target: &Name) -> FindResult<T> { let mut node_chain = NodeChain::new(self); self.find_node(target, &mut node_chain) } pub fn find_node<'a>(&'a self, target_: &Name, chain: &mut NodeChain<'a, T>) -> FindResult<T> { self.find_node_ext( target_, chain, &mut None::<fn(_, _, &mut Option<usize>) -> bool>, &mut None, ) } pub fn find_node_ext<'a, P, F: FnMut(NodePtr<T>, Name, &mut P) -> bool>( &'a self, target: &Name, chain: &mut NodeChain<'a, T>, callback: &mut Option<F>, param: &mut P, ) -> FindResult<T> { let mut node = self.root; let mut result = FindResult::new(self); let mut target_slice = LabelSlice::from_name(target); while !node.is_null() { let current_slice = LabelSlice::from_label_sequence(node.get_name()); chain.last_compared = node; chain.last_compared_result = target_slice.compare(&current_slice, false); match chain.last_compared_result.relation { NameRelation::Equal => { chain.push(node); result.flag = FindResultFlag::ExacatMatch; result.node = node; break; } NameRelation::None => { if chain.last_compared_result.order < 0 { node = node.left(); } else { node = node.right(); } } NameRelation::SubDomain => { result.flag = FindResultFlag::PartialMatch; result.node = node; if node.is_callback_enabled() && callback.is_some() && callback.as_mut().unwrap()( node, chain.get_absolute_name(node.get_name()), param, ) { break; } chain.push(node); target_slice .strip_right(chain.last_compared_result.common_label_count as usize); node = node.down(); } _ => { break; } } } result } pub fn remove(&mut self, name: &Name) -> Option<T> { let node = { let result = self.find(name); result.node }; if !node.is_null() { self.remove_node(node) } else { None } } pub fn remove_node(&mut self, mut node: NodePtr<T>) -> Option<T> { let old_value = node.set_value(None); if !node.down().is_null() { return old_value; } loop { let mut up = node.get_upper_node(); if !node.left().is_null() && !node.right().is_null() { let mut right_most = node.left(); while !right_most.right().is_null() { right_most = right_most.right(); } unsafe { node.exchange(right_most, self.root.get_double_pointer()); } } let child = if !node.right().is_null() { node.right() } else { node.left() }; unsafe { connect_child(self.root.get_double_pointer(), node, node, child); } if !child.is_null() { child.set_parent(node.parent()); if child.parent().is_null() || child.parent().down() == child { child.set_subtree_root(node.is_subtree_root()); } } if node.is_black() { if !child.is_null() && child.is_red() { child.set_color(Color::Black); } else { let current_root = if !up.is_null() { up.get_double_pointer_of_down() } else { self.root.get_double_pointer() }; unsafe { self.remove_fixup(current_root, child, node.parent()); } } } self.len -= 1; if up.is_null() || up.get_value().is_some() || !up.down().is_null() { break; } node = up; } old_value } unsafe fn remove_fixup( &mut self, root: *mut *mut Node<T>, mut child: NodePtr<T>, mut parent: NodePtr<T>, ) { while child.get_pointer() != *root && child.is_black() { if !parent.is_null() && parent.down().get_pointer() == *root { break; } let mut sibling = get_sibling(parent, child); if sibling.is_red() { parent.set_color(Color::Red); sibling.set_color(Color::Black); if parent.left() == child { self.left_rotate(root, parent); } else { self.right_rotate(root, parent); } sibling = get_sibling(parent, child); } if sibling.left().is_black() && sibling.right().is_black() { sibling.set_color(Color::Red); if parent.is_black() { child = parent; parent = parent.parent(); continue; } else { parent.set_color(Color::Black); break; } } let mut ss1 = sibling.left(); let mut ss2 = sibling.right(); if parent.left() != child { mem::swap(&mut ss1, &mut ss2); } if ss2.is_black() { sibling.set_color(Color::Red); ss1.set_color(Color::Black); if parent.left() == child { self.right_rotate(root, sibling); } else { self.left_rotate(root, sibling); } sibling = get_sibling(parent, child); } sibling.set_color(parent.get_color()); parent.set_color(Color::Black); ss1 = sibling.left(); ss2 = sibling.right(); if parent.left() != child { mem::swap(&mut ss1, &mut ss2); } ss2.set_color(Color::Black); if parent.left() == child { self.left_rotate(root, parent); } else { self.right_rotate(root, parent); } break; } } fn clear_recurse(&mut self, current: NodePtr<T>) { if !current.is_null() { unsafe { self.clear_recurse(current.left()); self.clear_recurse(current.right()); self.clear_recurse(current.down()); Box::from_raw(current.0); } } } pub fn clear(&mut self) { let root = self.root; self.root = NodePtr::null(); self.clear_recurse(root); } pub fn dump(&self, depth: usize) { indent(depth); println!("tree has {} node(s)", self.len); self.dump_helper(self.root, depth); } fn dump_helper(&self, node: NodePtr<T>, depth: usize) { if node.is_null() { indent(depth); println!("NULL"); return; } indent(depth); let parent = node.parent(); if !parent.is_null() { if parent.left() == node { print!("left>"); } else if parent.right() == node { print!("right>"); } } print!("{} ({:?})", node.get_name().to_string(), node.get_color()); if node.get_value().is_none() { print!("[invisible]"); } if node.is_subtree_root() { print!(" [subtreeroot]"); } println!(); let down = node.down(); if !down.is_null() { indent(depth + 1); println!("begin down from {}\n", down.get_name().to_string()); self.dump_helper(down, depth + 1); indent(depth + 1); println!("end down from {}", down.get_name().to_string()); } self.dump_helper(node.left(), depth + 1); self.dump_helper(node.right(), depth + 1); } } fn indent(depth: usize) { const INDENT_FOR_EACH_DEPTH: usize = 5; print!("{}", " ".repeat((depth * INDENT_FOR_EACH_DEPTH) as usize)); } #[cfg(test)] mod tests { use super::{DomainTree, FindResultFlag, NodeChain, NodePtr}; use crate::name::Name; fn sample_names() -> Vec<(&'static str, i32)> { vec![ "c", "b", "a", "x.d.e.f", "z.d.e.f", "g.h", "i.g.h", "o.w.y.d.e.f", "j.z.d.e.f", "p.w.y.d.e.f", "q.w.y.d.e.f", ] .iter() .zip(0..) .map(|(&s, v)| (s, v)) .collect() } fn build_tree(data: &Vec<(&'static str, i32)>) -> DomainTree<i32> { let mut tree = DomainTree::new(); for (k, v) in data { tree.insert(Name::new(k).unwrap(), Some(*v)); } tree } #[test] fn test_find() { let data = sample_names(); let tree = build_tree(&data); assert_eq!(tree.len(), 14); for (n, v) in sample_names() { let mut node_chain = NodeChain::new(&tree); let result = tree.find_node(&Name::new(n).unwrap(), &mut node_chain); assert_eq!(result.flag, FindResultFlag::ExacatMatch); assert_eq!(result.node.get_value(), &Some(v)); } let none_terminal = vec!["d.e.f", "w.y.d.e.f"]; for n in &none_terminal { let mut node_chain = NodeChain::new(&tree); let result = tree.find_node(&Name::new(n).unwrap(), &mut node_chain); assert_eq!(result.flag, FindResultFlag::ExacatMatch); assert_eq!(result.node.get_value(), &None); } } #[test] fn test_delete() { let data = sample_names(); let mut tree = build_tree(&data); assert_eq!(tree.len(), 14); for (n, v) in data { let result = tree.find(&Name::new(n).unwrap()); assert_eq!(result.flag, FindResultFlag::ExacatMatch); let node = result.node; assert_eq!(tree.remove_node(node), Some(v)); } assert_eq!(tree.len(), 0); } use std::cell::Cell; use std::rc::Rc; pub struct NumberWrapper(Rc<Cell<i32>>); impl NumberWrapper { fn new(c: Rc<Cell<i32>>) -> Self { c.set(c.get() + 1); NumberWrapper(c) } } impl Drop for NumberWrapper { fn drop(&mut self) { self.0.set(self.0.get() - 1); } } #[test] fn test_clean() { let num = Rc::new(Cell::new(0)); { let mut tree = DomainTree::new(); for name in vec!["a", "b", "c", "d"] { tree.insert( Name::new(name).unwrap(), Some(NumberWrapper::new(num.clone())), ); } assert_eq!(num.get(), 4); } assert_eq!(num.get(), 0); } #[test] fn test_callback() { let mut tree = DomainTree::new(); for name in vec!["a", "b", "c", "d"] { tree.insert(Name::new(name).unwrap(), Some(10)); } let (n, _) = tree.insert(Name::new("e").unwrap(), Some(20)); n.set_callback(true); tree.insert(Name::new("b.e").unwrap(), Some(30)); let mut num = 0; let callback = |n: NodePtr<u32>, name: Name, num: &mut u32| { assert_eq!(name.to_string(), "e."); *num = *num + n.get_value().unwrap(); false }; let mut node_chain = NodeChain::new(&tree); let result = tree.find_node_ext( &Name::new("b.e").unwrap(), &mut node_chain, &mut Some(callback), &mut num, ); assert_eq!(num, 20); assert_eq!(result.flag, FindResultFlag::ExacatMatch); assert_eq!(result.node.get_value(), &Some(30)); let mut node_chain = NodeChain::new(&tree); tree.find_node_ext( &Name::new("e").unwrap(), &mut node_chain, &mut Some(callback), &mut num, ); //only query sub domain, callback will be invoked assert_eq!(num, 20); //callback return true, skip travel let callback = |n: NodePtr<u32>, _, num: &mut u32| { *num = *num + n.get_value().unwrap(); true }; let mut node_chain = NodeChain::new(&tree); let result = tree.find_node_ext( &Name::new("b.e").unwrap(), &mut node_chain, &mut Some(callback), &mut num, ); assert_eq!(num, 40); assert_eq!(result.flag, FindResultFlag::PartialMatch); } #[test] fn test_rand_tree_insert_and_search() { use crate::rand_name_generator::RandNameGenerator; for _ in 0..20 { let gen = RandNameGenerator::new(); test_insert_delete_batch(gen.take(1000).collect::<Vec<Name>>()); } } pub fn test_insert_delete_batch(names: Vec<Name>) { use std::collections::HashSet; let mut tree = DomainTree::<usize>::new(); let mut duplicate_name_index = HashSet::new(); for (i, name) in names.iter().enumerate() { let (_, old) = tree.insert(name.clone(), Some(i)); //Some(None) == non-terminal node is created //None == new node if let Some(Some(v)) = old { assert!(name.eq(&names[v])); duplicate_name_index.insert(v); } } //duplicate insert should return old value for (i, name) in names.iter().enumerate() { if !duplicate_name_index.contains(&i) { let (_, old) = tree.insert(name.clone(), Some(i)); assert_eq!(old.unwrap(), Some(i)); } } for (i, name) in names.iter().enumerate() { if !duplicate_name_index.contains(&i) { let mut node_chain = NodeChain::new(&tree); let result = tree.find_node(name, &mut node_chain); assert_eq!(result.flag, FindResultFlag::ExacatMatch); assert_eq!(result.node.get_value(), &Some(i)); } } for (i, name) in names.iter().enumerate() { if !duplicate_name_index.contains(&i) { let mut node_chain = NodeChain::new(&tree); let result = tree.find_node(&name, &mut node_chain); let node = result.node; assert_eq!(tree.remove_node(node).unwrap(), i); } } assert_eq!(tree.len(), 0); } }
// error-pattern: expecting fn main() { let x.y[int].z foo; }
/// /// Module for parsing postgresql.conf file. /// /// NOTE: This doesn't implement the full, correct postgresql.conf syntax. Just /// enough to extract a few settings we need in Zenith, assuming you don't do /// funny stuff like include-directives or funny escaping. use anyhow::{anyhow, bail, Context, Result}; use lazy_static::lazy_static; use regex::Regex; use std::collections::HashMap; use std::fmt; use std::io::BufRead; use std::str::FromStr; /// In-memory representation of a postgresql.conf file #[derive(Default)] pub struct PostgresConf { lines: Vec<String>, hash: HashMap<String, String>, } lazy_static! { static ref CONF_LINE_RE: Regex = Regex::new(r"^((?:\w|\.)+)\s*=\s*(\S+)$").unwrap(); } impl PostgresConf { pub fn new() -> PostgresConf { PostgresConf::default() } /// Read file into memory pub fn read(read: impl std::io::Read) -> Result<PostgresConf> { let mut result = Self::new(); for line in std::io::BufReader::new(read).lines() { let line = line?; // Store each line in a vector, in original format result.lines.push(line.clone()); // Also parse each line and insert key=value lines into a hash map. // // FIXME: This doesn't match exactly the flex/bison grammar in PostgreSQL. // But it's close enough for our usage. let line = line.trim(); if line.starts_with('#') { // comment, ignore continue; } else if let Some(caps) = CONF_LINE_RE.captures(line) { let name = caps.get(1).unwrap().as_str(); let raw_val = caps.get(2).unwrap().as_str(); if let Ok(val) = deescape_str(raw_val) { // Note: if there's already an entry in the hash map for // this key, this will replace it. That's the behavior what // we want; when PostgreSQL reads the file, each line // overrides any previous value for the same setting. result.hash.insert(name.to_string(), val.to_string()); } } } Ok(result) } /// Return the current value of 'option' pub fn get(&self, option: &str) -> Option<&str> { self.hash.get(option).map(|x| x.as_ref()) } /// Return the current value of a field, parsed to the right datatype. /// /// This calls the FromStr::parse() function on the value of the field. If /// the field does not exist, or parsing fails, returns an error. /// pub fn parse_field<T>(&self, field_name: &str, context: &str) -> Result<T> where T: FromStr, <T as FromStr>::Err: std::error::Error + Send + Sync + 'static, { self.get(field_name) .ok_or_else(|| anyhow!("could not find '{}' option {}", field_name, context))? .parse::<T>() .with_context(|| format!("could not parse '{}' option {}", field_name, context)) } /// /// Note: if you call this multiple times for the same option, the config /// file will a line for each call. It would be nice to have a function /// to change an existing line, but that's a TODO. /// pub fn append(&mut self, option: &str, value: &str) { self.lines .push(format!("{}={}\n", option, escape_str(value))); self.hash.insert(option.to_string(), value.to_string()); } /// Append an arbitrary non-setting line to the config file pub fn append_line(&mut self, line: &str) { self.lines.push(line.to_string()); } } impl fmt::Display for PostgresConf { /// Return the whole configuration file as a string fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { for line in self.lines.iter() { f.write_str(line)?; } Ok(()) } } /// Escape a value for putting in postgresql.conf. fn escape_str(s: &str) -> String { // If the string doesn't contain anything that needs quoting or escaping, return it // as it is. // // The first part of the regex, before the '|', matches the INTEGER rule in the // PostgreSQL flex grammar (guc-file.l). It matches plain integers like "123" and // "-123", and also accepts units like "10MB". The second part of the regex matches // the UNQUOTED_STRING rule, and accepts strings that contain a single word, beginning // with a letter. That covers words like "off" or "posix". Everything else is quoted. // // This regex is a bit more conservative than the rules in guc-file.l, so we quote some // strings that PostgreSQL would accept without quoting, but that's OK. lazy_static! { static ref UNQUOTED_RE: Regex = Regex::new(r"(^[-+]?[0-9]+[a-zA-Z]*$)|(^[a-zA-Z][a-zA-Z0-9]*$)").unwrap(); } if UNQUOTED_RE.is_match(s) { s.to_string() } else { // Otherwise escape and quote it let s = s .replace('\\', "\\\\") .replace('\n', "\\n") .replace('\'', "''"); "\'".to_owned() + &s + "\'" } } /// De-escape a possibly-quoted value. /// /// See `DeescapeQuotedString` function in PostgreSQL sources for how PostgreSQL /// does this. fn deescape_str(s: &str) -> Result<String> { // If the string has a quote at the beginning and end, strip them out. if s.len() >= 2 && s.starts_with('\'') && s.ends_with('\'') { let mut result = String::new(); let mut iter = s[1..(s.len() - 1)].chars().peekable(); while let Some(c) = iter.next() { let newc = if c == '\\' { match iter.next() { Some('b') => '\x08', Some('f') => '\x0c', Some('n') => '\n', Some('r') => '\r', Some('t') => '\t', Some('0'..='7') => { // TODO bail!("octal escapes not supported"); } Some(n) => n, None => break, } } else if c == '\'' && iter.peek() == Some(&'\'') { // doubled quote becomes just one quote iter.next().unwrap() } else { c }; result.push(newc); } Ok(result) } else { Ok(s.to_string()) } } #[test] fn test_postgresql_conf_escapes() -> Result<()> { assert_eq!(escape_str("foo bar"), "'foo bar'"); // these don't need to be quoted assert_eq!(escape_str("foo"), "foo"); assert_eq!(escape_str("123"), "123"); assert_eq!(escape_str("+123"), "+123"); assert_eq!(escape_str("-10"), "-10"); assert_eq!(escape_str("1foo"), "1foo"); assert_eq!(escape_str("foo1"), "foo1"); assert_eq!(escape_str("10MB"), "10MB"); assert_eq!(escape_str("-10kB"), "-10kB"); // these need quoting and/or escaping assert_eq!(escape_str("foo bar"), "'foo bar'"); assert_eq!(escape_str("fo'o"), "'fo''o'"); assert_eq!(escape_str("fo\no"), "'fo\\no'"); assert_eq!(escape_str("fo\\o"), "'fo\\\\o'"); assert_eq!(escape_str("10 cats"), "'10 cats'"); // Test de-escaping assert_eq!(deescape_str(&escape_str("foo"))?, "foo"); assert_eq!(deescape_str(&escape_str("fo'o\nba\\r"))?, "fo'o\nba\\r"); assert_eq!(deescape_str("'\\b\\f\\n\\r\\t'")?, "\x08\x0c\n\r\t"); // octal-escapes are currently not supported assert!(deescape_str("'foo\\7\\07\\007'").is_err()); Ok(()) }
use signal_hook::iterator::Signals; use std::error::Error; use std::thread::{self, sleep}; use std::time::Duration; fn main() -> Result<(), Box<dyn Error>>{ let signals = Signals::new(&[ signal_hook::SIGINT, signal_hook::SIGTERM, ])?; thread::spawn(|| { loop { println!("child thread will sleep for 1 second"); sleep(Duration::from_secs(1)); } }); 'signal_loop: loop { for signal in signals.pending() { match signal { signal_hook::SIGINT => { println!("received SIGINT, but nothing special will happen.") }, signal_hook::SIGTERM => { println!("received SIGTERM, the program will be terminated."); break 'signal_loop; }, _ => unreachable!(), } } } Ok(()) }
#[doc = r"Value read from the register"] pub struct R { bits: u8, } #[doc = r"Value to write to the register"] pub struct W { bits: u8, } impl super::TXTYPE6 { #[doc = r"Modifies the contents of the register"] #[inline(always)] pub fn modify<F>(&self, f: F) where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, { let bits = self.register.get(); self.register.set(f(&R { bits }, &mut W { bits }).bits); } #[doc = r"Reads the contents of the register"] #[inline(always)] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r"Writes to the register"] #[inline(always)] pub fn write<F>(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { self.register.set( f(&mut W { bits: Self::reset_value(), }) .bits, ); } #[doc = r"Reset value of the register"] #[inline(always)] pub const fn reset_value() -> u8 { 0 } #[doc = r"Writes the reset value to the register"] #[inline(always)] pub fn reset(&self) { self.register.set(Self::reset_value()) } } #[doc = r"Value of the field"] pub struct USB_TXTYPE6_TEPR { bits: u8, } impl USB_TXTYPE6_TEPR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bits(&self) -> u8 { self.bits } } #[doc = r"Proxy"] pub struct _USB_TXTYPE6_TEPW<'a> { w: &'a mut W, } impl<'a> _USB_TXTYPE6_TEPW<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits &= !(15 << 0); self.w.bits |= ((value as u8) & 15) << 0; self.w } } #[doc = "Possible values of the field `USB_TXTYPE6_PROTO`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum USB_TXTYPE6_PROTOR { #[doc = "Control"] USB_TXTYPE6_PROTO_CTRL, #[doc = "Isochronous"] USB_TXTYPE6_PROTO_ISOC, #[doc = "Bulk"] USB_TXTYPE6_PROTO_BULK, #[doc = "Interrupt"] USB_TXTYPE6_PROTO_INT, } impl USB_TXTYPE6_PROTOR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bits(&self) -> u8 { match *self { USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_CTRL => 0, USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_ISOC => 1, USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_BULK => 2, USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_INT => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline(always)] pub fn _from(value: u8) -> USB_TXTYPE6_PROTOR { match value { 0 => USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_CTRL, 1 => USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_ISOC, 2 => USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_BULK, 3 => USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_INT, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `USB_TXTYPE6_PROTO_CTRL`"] #[inline(always)] pub fn is_usb_txtype6_proto_ctrl(&self) -> bool { *self == USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_CTRL } #[doc = "Checks if the value of the field is `USB_TXTYPE6_PROTO_ISOC`"] #[inline(always)] pub fn is_usb_txtype6_proto_isoc(&self) -> bool { *self == USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_ISOC } #[doc = "Checks if the value of the field is `USB_TXTYPE6_PROTO_BULK`"] #[inline(always)] pub fn is_usb_txtype6_proto_bulk(&self) -> bool { *self == USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_BULK } #[doc = "Checks if the value of the field is `USB_TXTYPE6_PROTO_INT`"] #[inline(always)] pub fn is_usb_txtype6_proto_int(&self) -> bool { *self == USB_TXTYPE6_PROTOR::USB_TXTYPE6_PROTO_INT } } #[doc = "Values that can be written to the field `USB_TXTYPE6_PROTO`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum USB_TXTYPE6_PROTOW { #[doc = "Control"] USB_TXTYPE6_PROTO_CTRL, #[doc = "Isochronous"] USB_TXTYPE6_PROTO_ISOC, #[doc = "Bulk"] USB_TXTYPE6_PROTO_BULK, #[doc = "Interrupt"] USB_TXTYPE6_PROTO_INT, } impl USB_TXTYPE6_PROTOW { #[allow(missing_docs)] #[doc(hidden)] #[inline(always)] pub fn _bits(&self) -> u8 { match *self { USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_CTRL => 0, USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_ISOC => 1, USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_BULK => 2, USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_INT => 3, } } } #[doc = r"Proxy"] pub struct _USB_TXTYPE6_PROTOW<'a> { w: &'a mut W, } impl<'a> _USB_TXTYPE6_PROTOW<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: USB_TXTYPE6_PROTOW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "Control"] #[inline(always)] pub fn usb_txtype6_proto_ctrl(self) -> &'a mut W { self.variant(USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_CTRL) } #[doc = "Isochronous"] #[inline(always)] pub fn usb_txtype6_proto_isoc(self) -> &'a mut W { self.variant(USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_ISOC) } #[doc = "Bulk"] #[inline(always)] pub fn usb_txtype6_proto_bulk(self) -> &'a mut W { self.variant(USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_BULK) } #[doc = "Interrupt"] #[inline(always)] pub fn usb_txtype6_proto_int(self) -> &'a mut W { self.variant(USB_TXTYPE6_PROTOW::USB_TXTYPE6_PROTO_INT) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bits(self, value: u8) -> &'a mut W { self.w.bits &= !(3 << 4); self.w.bits |= ((value as u8) & 3) << 4; self.w } } #[doc = "Possible values of the field `USB_TXTYPE6_SPEED`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum USB_TXTYPE6_SPEEDR { #[doc = "Default"] USB_TXTYPE6_SPEED_DFLT, #[doc = "High"] USB_TXTYPE6_SPEED_HIGH, #[doc = "Full"] USB_TXTYPE6_SPEED_FULL, #[doc = "Low"] USB_TXTYPE6_SPEED_LOW, } impl USB_TXTYPE6_SPEEDR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bits(&self) -> u8 { match *self { USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_DFLT => 0, USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_HIGH => 1, USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_FULL => 2, USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_LOW => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline(always)] pub fn _from(value: u8) -> USB_TXTYPE6_SPEEDR { match value { 0 => USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_DFLT, 1 => USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_HIGH, 2 => USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_FULL, 3 => USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_LOW, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `USB_TXTYPE6_SPEED_DFLT`"] #[inline(always)] pub fn is_usb_txtype6_speed_dflt(&self) -> bool { *self == USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_DFLT } #[doc = "Checks if the value of the field is `USB_TXTYPE6_SPEED_HIGH`"] #[inline(always)] pub fn is_usb_txtype6_speed_high(&self) -> bool { *self == USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_HIGH } #[doc = "Checks if the value of the field is `USB_TXTYPE6_SPEED_FULL`"] #[inline(always)] pub fn is_usb_txtype6_speed_full(&self) -> bool { *self == USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_FULL } #[doc = "Checks if the value of the field is `USB_TXTYPE6_SPEED_LOW`"] #[inline(always)] pub fn is_usb_txtype6_speed_low(&self) -> bool { *self == USB_TXTYPE6_SPEEDR::USB_TXTYPE6_SPEED_LOW } } #[doc = "Values that can be written to the field `USB_TXTYPE6_SPEED`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum USB_TXTYPE6_SPEEDW { #[doc = "Default"] USB_TXTYPE6_SPEED_DFLT, #[doc = "High"] USB_TXTYPE6_SPEED_HIGH, #[doc = "Full"] USB_TXTYPE6_SPEED_FULL, #[doc = "Low"] USB_TXTYPE6_SPEED_LOW, } impl USB_TXTYPE6_SPEEDW { #[allow(missing_docs)] #[doc(hidden)] #[inline(always)] pub fn _bits(&self) -> u8 { match *self { USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_DFLT => 0, USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_HIGH => 1, USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_FULL => 2, USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_LOW => 3, } } } #[doc = r"Proxy"] pub struct _USB_TXTYPE6_SPEEDW<'a> { w: &'a mut W, } impl<'a> _USB_TXTYPE6_SPEEDW<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: USB_TXTYPE6_SPEEDW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "Default"] #[inline(always)] pub fn usb_txtype6_speed_dflt(self) -> &'a mut W { self.variant(USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_DFLT) } #[doc = "High"] #[inline(always)] pub fn usb_txtype6_speed_high(self) -> &'a mut W { self.variant(USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_HIGH) } #[doc = "Full"] #[inline(always)] pub fn usb_txtype6_speed_full(self) -> &'a mut W { self.variant(USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_FULL) } #[doc = "Low"] #[inline(always)] pub fn usb_txtype6_speed_low(self) -> &'a mut W { self.variant(USB_TXTYPE6_SPEEDW::USB_TXTYPE6_SPEED_LOW) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bits(self, value: u8) -> &'a mut W { self.w.bits &= !(3 << 6); self.w.bits |= ((value as u8) & 3) << 6; self.w } } impl R { #[doc = r"Value of the register as raw bits"] #[inline(always)] pub fn bits(&self) -> u8 { self.bits } #[doc = "Bits 0:3 - Target Endpoint Number"] #[inline(always)] pub fn usb_txtype6_tep(&self) -> USB_TXTYPE6_TEPR { let bits = ((self.bits >> 0) & 15) as u8; USB_TXTYPE6_TEPR { bits } } #[doc = "Bits 4:5 - Protocol"] #[inline(always)] pub fn usb_txtype6_proto(&self) -> USB_TXTYPE6_PROTOR { USB_TXTYPE6_PROTOR::_from(((self.bits >> 4) & 3) as u8) } #[doc = "Bits 6:7 - Operating Speed"] #[inline(always)] pub fn usb_txtype6_speed(&self) -> USB_TXTYPE6_SPEEDR { USB_TXTYPE6_SPEEDR::_from(((self.bits >> 6) & 3) as u8) } } impl W { #[doc = r"Writes raw bits to the register"] #[inline(always)] pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { self.bits = bits; self } #[doc = "Bits 0:3 - Target Endpoint Number"] #[inline(always)] pub fn usb_txtype6_tep(&mut self) -> _USB_TXTYPE6_TEPW { _USB_TXTYPE6_TEPW { w: self } } #[doc = "Bits 4:5 - Protocol"] #[inline(always)] pub fn usb_txtype6_proto(&mut self) -> _USB_TXTYPE6_PROTOW { _USB_TXTYPE6_PROTOW { w: self } } #[doc = "Bits 6:7 - Operating Speed"] #[inline(always)] pub fn usb_txtype6_speed(&mut self) -> _USB_TXTYPE6_SPEEDW { _USB_TXTYPE6_SPEEDW { w: self } } }
extern crate serde; extern crate walkdir; use std::error::Error; use std::fs::File; use std::io; use std::io::prelude::*; use std::io::BufReader; use std::io::BufWriter; use std::path::Path; use std::path::PathBuf; use byteorder::*; use self::walkdir::WalkDir; // first few defs to deal with files generated from C version pub const FILE_IDENT_LEN: usize = 16; pub const MAX_CLASS_NAME_LEN: usize = 96; pub fn read_file_ident(br: &mut BufReader<File>) -> Result<String, Box<dyn Error>> { read_fixed_size_string(br, FILE_IDENT_LEN) } pub fn read_class_name(br: &mut BufReader<File>) -> Result<String, Box<dyn Error>> { read_fixed_size_string(br, MAX_CLASS_NAME_LEN) } fn read_fixed_size_string( br: &mut BufReader<File>, fixed_len: usize, ) -> Result<String, Box<dyn Error>> { let mut s = vec![0_u8; fixed_len]; br.read_exact(&mut s)?; let eol_pos = s.iter().position(|v| *v == 0_u8).unwrap_or(fixed_len - 1); // note: excluding the \0 byte itself: s.resize(eol_pos, 0); let s = String::from_utf8(s)?; Ok(s) } pub fn read_u32(br: &mut BufReader<File>) -> Result<u32, Box<dyn Error>> { match br.read_u32::<LittleEndian>() { Ok(v) => Ok(v), Err(e) => Err(e.into()), } } pub fn read_u16(br: &mut BufReader<File>) -> Result<u16, Box<dyn Error>> { match br.read_u16::<LittleEndian>() { Ok(v) => Ok(v), Err(e) => Err(e.into()), } } /// General "resolution" for a file listing including case with a single given /// `.csv` indicating such list plus some filtering (tt, class_name). /// /// * `filenames` - given list of files /// * `tt` - TRAIN or TEST if under `.csv` case /// * `class_name_opt` - desired class name if under `.csv` case /// * `subdir` - to compose names in returned list /// * `file_ext` - to compose names in returned list or for filtering /// pub fn resolve_files( filenames: Vec<PathBuf>, tt: &str, class_name_opt: Option<String>, subdir: String, file_ext: &str, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let subdir = subdir.as_str(); let is_tt_list = filenames.len() == 1 && filenames[0].to_str().unwrap().ends_with(".csv"); let filenames = if is_tt_list { get_files_from_csv(&filenames[0], tt, &class_name_opt, subdir, file_ext, &None)? } else { resolve_filenames(filenames, file_ext, subdir)? }; Ok(filenames) } // TODO some "unification" as variations of some methods were added rather hastily pub fn resolve_files2( filenames: &[PathBuf], tt: &str, class_name_opt: &Option<String>, subdir: String, file_ext: &str, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let subdir = subdir.as_str(); let is_tt_list = filenames.len() == 1 && filenames[0].to_str().unwrap().ends_with(".csv"); let filenames = if is_tt_list { get_files_from_csv(&filenames[0], tt, class_name_opt, subdir, file_ext, &None)? } else { resolve_filenames2(filenames, file_ext, subdir)? }; Ok(filenames) } pub fn resolve_files3( filenames: &[PathBuf], tt: &str, class_name_opt: &Option<String>, subdir: String, subdir_template: String, file_ext: &str, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let subdir = subdir.as_str(); let is_tt_list = filenames.len() == 1 && filenames[0].to_str().unwrap().ends_with(".csv"); let filenames = if is_tt_list { let subdir_template = Some(subdir_template); get_files_from_csv( &filenames[0], tt, class_name_opt, subdir, file_ext, &subdir_template, )? } else { resolve_filenames2(filenames, file_ext, subdir)? }; Ok(filenames) } /// A train/Test row #[derive(Debug, serde::Deserialize)] struct TTRow { pub tt: String, pub class: String, pub selection: String, } /// Returns the `tt` (TRAIN or TEST) category filenames from the given csv. pub fn get_files_from_csv( filename: &Path, tt: &str, class_name_opt: &Option<String>, subdir: &str, file_ext: &str, subdir_template_opt: &Option<String>, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let file = File::open(filename)?; let br = BufReader::new(file); let mut rdr = csv::ReaderBuilder::new() .comment(Some(b'#')) .delimiter(b',') .from_reader(br); let rows: Vec<TTRow> = rdr .deserialize() .map(|result| result.unwrap()) .collect::<Vec<_>>(); let mut list: Vec<PathBuf> = Vec::new(); let stuff = &"".to_string(); let class_string = class_name_opt.as_ref().unwrap_or(stuff); let class: &str = class_string.as_str(); for row in rows { if tt != row.tt { continue; } if !class.is_empty() && class != row.class { continue; } let filename = match subdir_template_opt { Some(subdir_template) => subdir_template .replace("{class}", &row.class) .replace("{selection}", &row.selection), None => format!( "data/{}/{}/{}{}", subdir, row.class, row.selection, file_ext ), }; list.push(PathBuf::from(filename)); } if list.is_empty() { return Err(format!("No {} given in given file", subdir).into()); } Ok(list) } // TODO unify the following with resolve_filenames2 // so use only one with more flexible parameter: `filenames: &[PathBuf]` /// Returns the list of files resulting from "resolving" the given list. /// This will contain the same regular files in the list (but having the /// given extension) plus files under any given directories. pub fn resolve_filenames( filenames: Vec<PathBuf>, file_ext: &str, subjects_msg_if_empty: &str, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let mut list: Vec<PathBuf> = Vec::new(); for filename in filenames { let path = Path::new(&filename); if path.is_dir() { let dir_files = list_files(path, file_ext)?; list.extend(dir_files); } else if path.is_file() && path.to_str().unwrap().ends_with(file_ext) { list.push(path.to_path_buf()); } } if !list.is_empty() { list.sort(); } else if !subjects_msg_if_empty.is_empty() { return Err(format!("No {} given", subjects_msg_if_empty).into()); } Ok(list) } pub fn resolve_filenames2( filenames: &[PathBuf], file_ext: &str, subjects_msg_if_empty: &str, ) -> Result<Vec<PathBuf>, Box<dyn Error>> { let mut list: Vec<PathBuf> = Vec::new(); for filename in filenames { let path = Path::new(&filename); if path.is_dir() { let dir_files = list_files(path, file_ext)?; list.extend(dir_files); } else if path.is_file() && path.to_str().unwrap().ends_with(file_ext) { list.push(path.to_path_buf()); } } if !list.is_empty() { list.sort(); } else if !subjects_msg_if_empty.is_empty() { return Err(format!("No {} given", subjects_msg_if_empty).into()); } Ok(list) } /// List all files under the given directory and having the given extension. /// pub fn list_files(directory: &Path, file_ext: &str) -> io::Result<Vec<PathBuf>> { let mut list: Vec<PathBuf> = Vec::new(); for entry in WalkDir::new(directory) { let entry = entry.unwrap(); let path = entry.path().to_path_buf(); if path.is_file() && path.to_str().unwrap().ends_with(file_ext) { //println!("list_files: {}", entry.path().display()); list.push(path); } } Ok(list) } pub fn save_ser<T: serde::Serialize>(model: &T, filename: &str) -> Result<(), Box<dyn Error>> { let f = File::create(filename)?; let bw = BufWriter::new(f); serde_cbor::to_writer(bw, &model)?; Ok(()) } pub fn save_json<T: serde::Serialize>(model: &T, filename: &str) -> Result<(), Box<dyn Error>> { let f = File::create(filename)?; let bw = BufWriter::new(f); serde_json::to_writer_pretty(bw, &model)?; Ok(()) } pub fn to_pickle<T: serde::Serialize>(obj: &T, filename: &Path) -> Result<(), Box<dyn Error>> { let serialized = serde_pickle::to_vec(&obj, true).unwrap(); let f = File::create(filename)?; let mut bw = BufWriter::new(f); bw.write_all(&serialized[..])?; Ok(()) }
//! Mii Selector applet. //! //! This applet opens a window which lets the player/user choose a Mii from the ones present on their console. //! The selected Mii is readable as a [`Mii`](crate::mii::Mii). use crate::mii::Mii; use bitflags::bitflags; use std::{ffi::CString, fmt}; /// Index of a Mii on the [`MiiSelector`] interface. /// /// See [`MiiSelector::whitelist_user_mii()`] and related functions for more information. #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum Index { /// Specific Mii index. /// /// # Notes /// /// Indexes start at 0. Index(u32), /// All Miis. All, } /// The type of a Mii. #[derive(Debug, Clone, Eq, PartialEq)] pub enum MiiType { /// Guest Mii. Guest { /// Guest Mii index. index: u32, /// Guest Mii name. name: String, }, /// User-made Mii. User, } bitflags! { /// Options to configure the [`MiiSelector`]. /// /// See [`MiiSelector::set_options()`] to learn how to use them. #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)] pub struct Options: u32 { /// Show the cancel button. const ENABLE_CANCEL = ctru_sys::MIISELECTOR_CANCEL; /// Make guest Miis available to select. const ENABLE_GUESTS = ctru_sys::MIISELECTOR_GUESTS; /// Show the [`MiiSelector`] window on the top screen. const USE_TOP_SCREEN = ctru_sys::MIISELECTOR_TOP; /// Start the [`MiiSelector`] on the guests' page. Requires [`Options::ENABLE_GUESTS`]. const START_WITH_GUESTS = ctru_sys::MIISELECTOR_GUESTSTART; } } /// Configuration structure to setup the Mii Selector applet. #[doc(alias = "MiiSelectorConf")] #[derive(Clone, Debug)] pub struct MiiSelector { config: Box<ctru_sys::MiiSelectorConf>, } /// Return value of a successful [`MiiSelector::launch()`]. #[non_exhaustive] #[derive(Clone, Debug)] pub struct Selection { /// Data of the selected Mii. pub mii_data: Mii, /// Type of the selected Mii. pub mii_type: MiiType, } /// Error returned by an unsuccessful [`MiiSelector::launch()`]. #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Error { /// The selected Mii's data is corrupt. InvalidChecksum, /// Either the user cancelled the selection (see [`Options::ENABLE_CANCEL`]) or no valid Miis were available to select. NoMiiSelected, } impl MiiSelector { /// Initialize a new configuration for the Mii Selector applet. #[doc(alias = "miiSelectorInit")] pub fn new() -> Self { let mut config = Box::<ctru_sys::MiiSelectorConf>::default(); unsafe { ctru_sys::miiSelectorInit(config.as_mut()); } Self { config } } /// Set the title of the Mii Selector window. /// /// # Panics /// This function will panic if the given `&str` contains NUL bytes. /// /// # Example /// /// ```no_run /// # fn main() { /// use ctru::applets::mii_selector::MiiSelector; /// /// let mut mii_selector = MiiSelector::new(); /// mii_selector.set_title("Select a Mii!"); /// # } /// ``` #[doc(alias = "miiSelectorSetTitle")] pub fn set_title(&mut self, text: &str) { // This can only fail if the text contains NUL bytes in the string... which seems // unlikely and is documented let c_text = CString::new(text).expect("Failed to convert the title text into a CString"); unsafe { ctru_sys::miiSelectorSetTitle(self.config.as_mut(), c_text.as_ptr()); } } /// Set the options of the Mii Selector. /// /// This will overwrite any previously saved options. Use bitwise operations to set all your wanted options at once. /// /// # Example /// /// ```no_run /// # fn main() { /// use ctru::applets::mii_selector::{MiiSelector, Options}; /// let mut mii_selector = MiiSelector::new(); /// /// // Setup a `MiiSelector` that can be cancelled and that makes Guest Miis available to select. /// let opts = Options::ENABLE_CANCEL & Options::ENABLE_GUESTS; /// mii_selector.set_options(opts); /// # } /// ``` #[doc(alias = "miiSelectorSetOptions")] pub fn set_options(&mut self, options: Options) { unsafe { ctru_sys::miiSelectorSetOptions(self.config.as_mut(), options.bits()) } } /// Whitelist a guest Mii based on its index. /// /// # Notes /// /// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. /// Look into [`MiiSelector::set_options()`] to see how to work with options. /// /// # Example /// /// ```no_run /// # fn main() { /// # /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// /// // Whitelist the guest Mii at index 2. /// mii_selector.whitelist_guest_mii(Index::Index(2)); /// # } /// ``` #[doc(alias = "miiSelectorWhitelistGuestMii")] pub fn whitelist_guest_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, }; unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), index) } } /// Blacklist a guest Mii based on its index. /// /// # Notes /// /// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. /// Look into [`MiiSelector::set_options()`] to see how to work with options. /// /// # Example /// /// ```no_run /// # fn main() { /// # /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// /// // Blacklist the guest Mii at index 1 so that it cannot be selected. /// mii_selector.blacklist_guest_mii(Index::Index(1)); /// # } /// ``` #[doc(alias = "miiSelectorBlacklistGuestMii")] pub fn blacklist_guest_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, }; unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), index) } } /// Whitelist a user-created Mii based on its index. /// /// # Example /// /// ```no_run /// # fn main() { /// # /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// /// // Whitelist the user-created Mii at index 0. /// mii_selector.whitelist_user_mii(Index::Index(0)); /// # } /// ``` #[doc(alias = "miiSelectorWhitelistUserMii")] pub fn whitelist_user_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_USERMII_SLOTS, }; unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), index) } } /// Blacklist a user-created Mii based on its index. /// /// # Example /// /// ```no_run /// # fn main() { /// # /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// /// // Blacklist all user-created Miis so that they cannot be selected. /// mii_selector.blacklist_user_mii(Index::All); /// # } /// ``` #[doc(alias = "miiSelectorBlacklistUserMii")] pub fn blacklist_user_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_USERMII_SLOTS, }; unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), index) } } /// Set where the GUI cursor will start at. /// /// If there's no Mii at that index, the cursor will start at the Mii with the index 0. #[doc(alias = "miiSelectorSetInitialIndex")] pub fn set_initial_index(&mut self, index: usize) { // This function is static inline in libctru // https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155 self.config.initial_index = index as u32; } /// Launch the Mii Selector. /// /// Depending on the configuration, the Mii Selector window will appear either on the bottom screen (default behaviour) or the top screen (see [`Options::USE_TOP_SCREEN`]). /// /// TODO: UNSAFE OPERATION, LAUNCHING APPLETS REQUIRES GRAPHICS, WITHOUT AN ACTIVE GFX THIS WILL CAUSE A SEGMENTATION FAULT. /// /// # Example /// /// ```no_run /// # use std::error::Error; /// # fn main() -> Result<(), Box<dyn Error>> { /// # /// use ctru::applets::mii_selector::{MiiSelector, Options}; /// /// let mut mii_selector = MiiSelector::new(); /// mii_selector.set_title("Select a Mii!"); /// /// let opts = Options::ENABLE_CANCEL & Options::ENABLE_GUESTS; /// mii_selector.set_options(opts); /// /// let result = mii_selector.launch()?; /// # /// # Ok(()) /// # } /// ``` #[doc(alias = "miiSelectorLaunch")] pub fn launch(&mut self) -> Result<Selection, Error> { let mut return_val = Box::<ctru_sys::MiiSelectorReturn>::default(); unsafe { ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) } if return_val.no_mii_selected != 0 { return Err(Error::NoMiiSelected); } if unsafe { ctru_sys::miiSelectorChecksumIsValid(return_val.as_mut()) } { Ok((*return_val).into()) } else { Err(Error::InvalidChecksum) } } } impl Default for MiiSelector { fn default() -> Self { Self::new() } } impl fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::InvalidChecksum => write!(f, "selected mii has invalid checksum"), Self::NoMiiSelected => write!(f, "no mii was selected"), } } } impl std::error::Error for Error {} impl From<ctru_sys::MiiSelectorReturn> for Selection { fn from(ret: ctru_sys::MiiSelectorReturn) -> Self { let raw_mii_data = ret.mii; let mut guest_mii_name = ret.guest_mii_name; Selection { mii_data: raw_mii_data.into(), mii_type: if ret.guest_mii_index != 0xFFFFFFFF { MiiType::Guest { index: ret.guest_mii_index, name: { let utf16_be = &mut guest_mii_name; utf16_be.reverse(); String::from_utf16(utf16_be.as_slice()).unwrap() }, } } else { MiiType::User }, } } } impl From<u32> for Index { fn from(v: u32) -> Self { Self::Index(v) } }
use crate::crawler::video_crawler::craw_video_splider; use rand::random; use rocket::http::Status; use rocket::Route; use rocket_contrib::json::JsonValue; #[get("/video/entries?<count>")] fn get_video_entries(count: usize) -> Result<JsonValue, Status> { match craw_video_splider() { Ok(video_list) => { let mut data: Vec<_> = video_list .iter() .map(|m| { let n_comment = random::<usize>() % 50; let n_good = n_comment * 5 + random::<usize>() % 100; json!({ "id": m.video_id.clone(), "title": m.video_title.clone(), "uploader": m.video_uploader.clone(), "video_preview": m.video_cover_link.clone(), "video_link": m.video_link.clone(), "n_good": n_good, "n_comment": n_comment, }) }) .collect(); loop { if data.len() <= count { break; } data.pop(); } Ok(json!({ "count": count, "data": data, })) } Err(_e) => Err(Status::InternalServerError), } } pub fn video_routes() -> Vec<Route> { routes![get_video_entries] }
// // deal/mod.rs // pub mod types; use accounts::types::{CurrentUser, CurrentUser::*}; use db::Conn; use deals::types::Deal; use deals::types::*; use diesel::prelude::*; use result::{Error, Payload, Response}; use validator::Validate; /// Get deals pub fn get_deals(query: Option<DealsQuery>, user: CurrentUser, conn: Conn) -> Response<Vec<Deal>> { // Currently only admins can create deals let user = match user { Admin(user) => user, _ => return Err(Error::AccessDenied), }; let Conn(conn) = conn; use schema::deals::dsl::*; let bid = match query { Some(q) => match q.buyer_id { Some(b) => b, None => user.id, }, None => user.id, }; let d = deals .filter(buyer_id.eq(bid)) .limit(30) .order_by(created.desc()) .load::<Deal>(&conn)?; Ok(Payload { data: d, success: true, ..Default::default() }) } /// Create deal pub fn create_deal( user: CurrentUser, conn: Conn, input: CreateDealAndHouseInput, ) -> Response<Deal> { use schema::deals::dsl::*; use schema::houses; // Currently only admins can create deals let _ = match user { Admin(user) => user, _ => return Err(Error::AccessDenied), }; let Conn(conn) = conn; let formatted_address = input.address.trim().to_owned(); println!("After formatted address"); input.validate()?; // Look for a house with address let hid = match houses::table .select(houses::dsl::id) .filter(houses::dsl::address.eq(&formatted_address)) .first::<i32>(&conn) { Ok(house) => house, Err(diesel::NotFound) => diesel::insert_into(houses::table) .values(&NewHouse { address: formatted_address.clone(), created: chrono::Utc::now().naive_utc(), updated: chrono::Utc::now().naive_utc(), google_address: Some(serde_json::to_value(input.google_address)?), }) .returning(houses::dsl::id) .get_result::<i32>(&conn)?, Err(e) => return Err(Error::from(e)), }; // Create a deal and link it to the house and buyer // Make sure one doesn't exist already let deal = match deals .filter(house_id.eq(&hid)) .filter(buyer_id.eq(&input.buyer_id)) .first::<Deal>(&conn) { Ok(_) => { return Err(Error::from_custom_validation( "deal_exists", "address", "Existing deal for address", )); } Err(diesel::NotFound) => diesel::insert_into(deals) .values(&NewDeal { buyer_id: Some(input.buyer_id), seller_id: None, house_id: Some(hid), access_code: "CODE".to_string(), status: DealStatus::Initialized, created: chrono::Utc::now().naive_utc(), updated: chrono::Utc::now().naive_utc(), title: formatted_address.clone(), }) .get_result::<Deal>(&conn)?, Err(e) => return Err(Error::from(e)), }; Ok(Payload { data: deal, success: true, error_message: None, validation_errors: None, page_info: None, }) } /// Update Deal pub fn update_deal( deal_id: i32, user: CurrentUser, conn: Conn, input: UpdateDeal, ) -> Response<Deal> { use schema::deals::dsl::*; // Currently only admins can create deals let _ = match user { Admin(user) => user, _ => return Err(Error::AccessDenied), }; let Conn(conn) = conn; let deal = deals.filter(id.eq(deal_id)).first::<Deal>(&conn)?; // If the field is set, use the value // If it is not set, ignore. let deal = diesel::update(&deal) .set(( status.eq(input.status.unwrap_or(deal.status)), updated.eq(chrono::Utc::now().naive_utc()), )) .get_result(&conn)?; Ok(Payload { data: deal, success: true, error_message: None, validation_errors: None, page_info: None, }) } // /// Deals with houses // pub fn deals_with_houses( // query: Option<ViewDealsWithHousesQuery>, // user: CurrentUser, // conn: Conn, // ) -> Response<Vec<DealWithHouse>> { // use schema::deals; // use schema::houses; // // let user = match user { // Admin(user) => user, // _ => return Err(Error::AccessDenied), // }; // let Conn(conn) = conn; // // let bid = match query { // Some(q) => match q.buyer_id { // Some(b) => b, // None => user.id, // }, // None => user.id, // }; // // let d = deals::table // .inner_join(houses::table) // .select(( // deals::id, // deals::buyer_id, // deals::seller_id, // deals::house_id, // deals::access_code, // deals::status, // houses::address, // houses::lat, // houses::lon, // )) // .filter(deals::dsl::buyer_id.eq(bid)) // .limit(10) // .order_by(deals::created.desc()) // .load::<DealWithHouse>(&conn)?; // // Ok(Payload { // data: d, // success: true, // error_message: None, // validation_errors: None, // page_info: None, // }) // }
/* * Copyright 2020 Fluence Labs Limited * * 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 super::wait_peer::WaitPeer; use super::FunctionRouter; use faas_api::{FunctionCall, Protocol}; use libp2p::{ swarm::{DialPeerCondition, NetworkBehaviour, NetworkBehaviourAction}, PeerId, }; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub(super) enum PeerStatus { Connected = 3000, // Connected is better than Routable Routable = 2000, // Router is better than None Unknown = 1000, // Unknown is bottom } // Contains methods related to searching for and connecting to peers impl FunctionRouter { /// Look for peer in Kademlia, enqueue call to wait for result pub(super) fn search_then_send(&mut self, peer_id: PeerId, call: FunctionCall) { self.query_closest(peer_id, WaitPeer::Routable(call)) } pub(super) fn send_to_neighborhood(&mut self, peer_id: PeerId, call: FunctionCall) { self.query_closest(peer_id, WaitPeer::Neighborhood(call)) } /// Query for peers closest to the `peer_id` as DHT key, enqueue call until response fn query_closest(&mut self, peer_id: PeerId, call: WaitPeer) { self.wait_peer.enqueue(peer_id.clone(), call); // TODO: don't call get_closest_peers if there are already some calls waiting for it self.kademlia.get_closest_peers(peer_id); } /// Send all calls waiting for this peer to be found pub(super) fn found_closest(&mut self, key: Vec<u8>, peers: Vec<PeerId>) { use PeerStatus as ExpectedStatus; let peer_id = match PeerId::from_bytes(key) { Err(err) => { log::warn!( "Found closest peers for invalid key {}: not a PeerId", bs58::encode(err).into_string() ); return; } Ok(peer_id) => peer_id, }; // Forward to `peer_id` let calls = self.wait_peer.remove_with(&peer_id, |wp| wp.found()); for call in calls { if peers.is_empty() { // No peers found, send error self.send_error_on_call(call.into(), "peer wasn't found via closest query".into()) } else { // Forward calls to `peer_id`, assuming it is now routable self.send_to(peer_id.clone(), ExpectedStatus::Routable, call.into()) } } // Forward to neighborhood let calls = self.wait_peer.remove_with(&peer_id, |wp| wp.neighborhood()); for call in calls { let call: FunctionCall = call.into(); // Check if any peers found, if not – send error if peers.is_empty() { self.send_error_on_call(call, "neighborhood was empty".into()); return; } // Forward calls to each peer in neighborhood for peer_id in peers.iter() { let mut call = call.clone(); // Modify target: prepend peer let target = Protocol::Peer(peer_id.clone()) / call.target.take().unwrap_or_default(); self.send_to( peer_id.clone(), ExpectedStatus::Routable, call.with_target(target), ) } } } pub(super) fn connect_then_send(&mut self, peer_id: PeerId, call: FunctionCall) { use DialPeerCondition::Disconnected as condition; // o_O you can do that?! use NetworkBehaviourAction::DialPeer; use WaitPeer::Connected; self.wait_peer.enqueue(peer_id.clone(), Connected(call)); log::info!("Dialing {}", peer_id); self.events.push_back(DialPeer { peer_id, condition }); } pub(super) fn connected(&mut self, peer_id: PeerId) { log::info!("Peer connected: {}", peer_id); self.connected_peers.insert(peer_id.clone()); let waiting = self.wait_peer.remove_with(&peer_id, |wp| wp.connected()); // TODO: leave move or remove move from closure? waiting.for_each(move |wp| match wp { WaitPeer::Connected(call) => self.send_to_connected(peer_id.clone(), call), _ => unreachable!("Can't happen. Just filtered WaitPeer::Connected"), }); } // TODO: clear connected_peers on inject_listener_closed? pub(super) fn disconnected(&mut self, peer_id: &PeerId) { log::info!( "Peer disconnected: {}. {} calls left waiting.", peer_id, self.wait_peer.count(&peer_id) ); self.connected_peers.remove(peer_id); self.remove_halted_names(peer_id); let waiting_calls = self.wait_peer.remove(peer_id); for waiting in waiting_calls.into_iter() { self.send_error_on_call(waiting.into(), format!("peer {} disconnected", peer_id)); } } pub(super) fn is_connected(&self, peer_id: &PeerId) -> bool { self.connected_peers.contains(peer_id) } /// Whether peer is in the routing table pub(super) fn is_routable(&mut self, peer_id: &PeerId) -> bool { // TODO: Checking `is_connected` inside `is_routable` smells... let connected = self.is_connected(peer_id); let kad = self.kademlia.addresses_of_peer(peer_id); let in_kad = !kad.is_empty(); log::debug!( "peer {} in routing table: Connected? {} Kademlia {:?}", peer_id, connected, kad ); connected || in_kad } /// Whether given peer id is equal to ours pub(super) fn is_local(&self, peer_id: &PeerId) -> bool { if self.config.peer_id.eq(peer_id) { log::debug!("{} is LOCAL", peer_id); true } else { log::debug!("{} is REMOTE", peer_id); false } } pub(super) fn search_for_client(&mut self, client: PeerId, call: FunctionCall) { self.find_service_provider(Protocol::Client(client).into(), call) } pub(super) fn peer_status(&mut self, peer: &PeerId) -> PeerStatus { use PeerStatus::*; if self.is_connected(peer) { Connected } else if self.is_routable(peer) { Routable } else { Unknown } } } #[cfg(test)] mod tests { use super::*; #[test] fn expected_status() { use PeerStatus::*; assert!(Connected > Unknown); assert!(Connected > Routable); assert_eq!(Connected, Connected); assert!(Routable > Unknown); assert!(Routable < Connected); assert_eq!(Routable, Routable); assert!(Unknown < Connected); assert!(Unknown < Routable); assert_eq!(Unknown, Unknown); } }
use crate::smb2::{header, requests}; pub const DEFAULT_BUFFER: &[u8; 42] = b"\x5c\x00\x5c\x00\x31\x00\x39\x00\x32\x00\x2e\x00\x31\x00\x36\x00\ \x38\x00\x2e\x00\x30\x00\x2e\x00\x31\x00\x37\x00\x31\x00\x5c\x00\ \x73\x00\x68\x00\x61\x00\x72\x00\x65\x00"; pub const DEFAULT_PATH_OFFSET: &[u8; 2] = b"\x48\x00"; pub const DEFAULT_PATH_LENGTH: &[u8; 2] = b"\x2a\x00"; /// Builds a working default tree connect request. pub fn build_default_tree_connect_request( session_id: Vec<u8>, ) -> ( Option<header::SyncHeader>, Option<requests::tree_connect::TreeConnect>, ) { ( Some(super::build_sync_header( header::Commands::TreeConnect, 1, 8064, None, Some(session_id), 3, )), Some(build_default_tree_connect_request_body()), ) } /// Builds a working default tree connect request body. pub fn build_default_tree_connect_request_body() -> requests::tree_connect::TreeConnect { let mut tree_connect = requests::tree_connect::TreeConnect::default(); tree_connect.flags = vec![0; 2]; tree_connect.path_offset = DEFAULT_PATH_OFFSET.to_vec(); tree_connect.path_length = DEFAULT_PATH_LENGTH.to_vec(); tree_connect.buffer = DEFAULT_BUFFER.to_vec(); tree_connect }
/* * Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. * * To flip an image horizontally means that each row of the image is reversed. * For example, flipping [1, 1, 0] horizontally results in [0, 1, 1]. * * To invert an image means that each 0 is replaced by 1, and each 1 is replaced by 0. * For example, inverting [0, 1, 1] results in [1, 0, 0]. * * Example 1: * ------------ * Input: [[1, 1, 0], [1, 0, 1], [0, 0, 0]] * Output: [[1, 0, 0], [0, 1, 0], [1, 1, 1]] * * Example 2: * ------------- * Input: [[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]] * Output: [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 0, 1], [1, 0, 1, 0]] */ pub fn flip_and_invert_image(a: Vec<Vec<i32>>) -> Vec<Vec<i32>> { let mut flipped: Vec<Vec<i32>> = vec![]; let mut res: Vec<Vec<i32>> = vec![]; for row in a { flipped.push(flip_row(row)) } for row in flipped { res.push(invert_row(row)) } return res } fn flip_row(mut row: Vec<i32>) -> Vec<i32> { row.reverse(); return row } fn invert_row(mut row: Vec<i32>) -> Vec<i32> { for (i, num) in row.clone().iter().enumerate() { row[i] = 1 - num } return row } #[cfg(test)] mod test { use super::flip_and_invert_image; #[test] fn example1() { let input = vec![vec![1, 1, 0], vec![1, 0, 1], vec![0, 0, 0]]; let res = flip_and_invert_image(input); let ans = vec![vec![1, 0, 0], vec![0, 1, 0], vec![1, 1, 1]]; assert_eq!(res, ans); } #[test] fn example2() { let input = vec![vec![1, 1, 0, 0], vec![1, 0, 0, 1], vec![0, 1, 1, 1], vec![1, 0, 1, 0]]; let res = flip_and_invert_image(input); let ans = vec![vec![1, 1, 0, 0], vec![0, 1, 1, 0], vec![0, 0, 0, 1], vec![1, 0, 1, 0]]; assert_eq!(res, ans); } }
use llvm_sys::*; use llvm_sys::prelude::*; use llvm_sys::core as llvm; use super::*; pub struct Builder { pub ptr: LLVMBuilderRef } impl_llvm_ref!(Builder, LLVMBuilderRef); impl Builder { pub fn position_at_end(&mut self, basic_block: LLVMBasicBlockRef) { unsafe { llvm::LLVMPositionBuilderAtEnd(self.ptr, basic_block); } } pub fn build_ret(&mut self, ret_val: LLVMValueRef) -> LLVMValueRef { unsafe { llvm::LLVMBuildRet(self.ptr, ret_val) } } pub fn build_ret_void(&self) -> LLVMValueRef { unsafe { llvm::LLVMBuildRetVoid(self.ptr) } } pub fn build_alloca(&mut self, ty: LLVMTypeRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildAlloca(self.ptr, ty, c_name.as_ptr()) } } pub fn build_store(&mut self, val: LLVMValueRef, ptr: LLVMValueRef) -> LLVMValueRef { unsafe { llvm::LLVMBuildStore(self.ptr, val, ptr) } } pub fn build_load(&mut self, ptr: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildLoad(self.ptr, ptr, c_name.as_ptr()) } } pub fn build_call(&mut self, func: Function, mut args: Vec<LLVMValueRef>, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildCall( self.ptr, func.ptr, args.as_mut_ptr(), args.len() as u32, c_name.as_ptr() ) } } pub fn build_add(&mut self, lhs: LLVMValueRef, rhs: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildAdd(self.ptr, lhs, rhs, c_name.as_ptr()) } } pub fn build_sub(&mut self, lhs: LLVMValueRef, rhs: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildSub(self.ptr, lhs, rhs, c_name.as_ptr()) } } pub fn build_mul(&mut self, lhs: LLVMValueRef, rhs: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildMul(self.ptr, lhs, rhs, c_name.as_ptr()) } } pub fn build_sdiv(&mut self, lhs: LLVMValueRef, rhs: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildSDiv(self.ptr, lhs, rhs, c_name.as_ptr()) } } pub fn build_icmp(&mut self, op: LLVMIntPredicate, lhs: LLVMValueRef, rhs: LLVMValueRef, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildICmp(self.ptr, op, lhs, rhs, c_name.as_ptr()) } } pub fn build_global_string(&self, s: &str, name: &str) -> LLVMValueRef { let c_s = CString::new(s).unwrap(); let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildGlobalString(self.ptr, c_s.as_ptr(), c_name.as_ptr()) } } pub fn build_in_bounds_gep(&self, ptr: LLVMValueRef, mut indices: Vec<LLVMValueRef>, name: &str) -> LLVMValueRef { let c_name = CString::new(name).unwrap(); unsafe { llvm::LLVMBuildInBoundsGEP(self.ptr, ptr, indices.as_mut_ptr(), indices.len() as u32, c_name.as_ptr()) } } pub fn build_cond_br(&self, cond: LLVMValueRef, then: LLVMBasicBlockRef, else_: LLVMBasicBlockRef) -> LLVMValueRef { unsafe { llvm::LLVMBuildCondBr(self.ptr, cond, then, else_) } } pub fn build_br(&self, dest: LLVMBasicBlockRef) -> LLVMValueRef { unsafe { llvm::LLVMBuildBr(self.ptr, dest) } } } impl Drop for Builder { fn drop(&mut self) { unsafe { llvm::LLVMDisposeBuilder(self.ptr); } } }
use euclid::*; use std::collections::HashMap; use std::fmt; use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::Path; enum AoC {} fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> { let file = File::open(filename).expect("no such file"); let buf = BufReader::new(file); buf.lines() .map(|l| l.expect("Could not parse line")) .collect() } fn rotate_left(v: Vector2D<i64, AoC>, deg: i64) -> Vector2D<i64, AoC> { match deg % 360 { 90 => vec2(-v.y, v.x), 180 => vec2(-v.x, -v.y), 270 => vec2(v.y, -v.x), _ => v.clone(), } } fn rotate_right(v: Vector2D<i64, AoC>, deg: i64) -> Vector2D<i64, AoC> { match deg % 360 { 90 => vec2(v.y, -v.x), 180 => vec2(-v.x, -v.y), 270 => vec2(-v.y, v.x), _ => v.clone(), } } fn main() { let lines = lines_from_file("input.txt"); // N // W e // S let N: Vector2D<i64, AoC> = vec2(0, 1); let S: Vector2D<i64, AoC> = vec2(0, -1); let E: Vector2D<i64, AoC> = vec2(1, 0); let W: Vector2D<i64, AoC> = vec2(-1, 0); let mut pos: Point2D<i64, AoC> = point2(0, 0); let mut dir: Vector2D<i64, AoC> = E.clone(); for line in &lines { let v = line[1..].parse::<i64>().unwrap(); match &line[0..1] { "N" => { pos += N * v; } "S" => { pos += S * v; } "E" => { pos += E * v; } "W" => { pos += W * v; } "L" => { dir = rotate_left(dir, v); } "R" => { dir = rotate_right(dir, v); } "F" => { pos += dir * v; } _ => {} } } dbg!(pos.x.abs() + pos.y.abs()); // part 2 let mut pos: Point2D<i64, AoC> = point2(0, 0); let mut way: Vector2D<i64, AoC> = vec2(10, 1); for line in &lines { let v = line[1..].parse::<i64>().unwrap(); match &line[0..1] { "N" => { way += vec2(0, v); } "S" => { way += vec2(0, -v); } "E" => { way += vec2(v, 0); } "W" => { way += vec2(-v, 0); } "L" => { way = rotate_left(way, v); } "R" => { way = rotate_right(way, v); } "F" => { pos += way * v; } _ => {} } } dbg!(pos.x.abs() + pos.y.abs()); }
use crate::{Module, Trait}; use crypto::types::ModuloOperations; use num_bigint::BigUint; use num_traits::{One, Zero}; use sp_std::vec::Vec; /// all functions related to zero-knowledge proofs in the offchain worker impl<T: Trait> Module<T> { /// zips vectors a and b. /// performs component-wise operation: x = a_i^b_i % modulus /// multiplies all component-wise operation results /// Π(x) % modulus pub fn zip_vectors_multiply_a_pow_b( a: &Vec<BigUint>, b: &Vec<BigUint>, modulus: &BigUint, ) -> BigUint { assert!(a.len() == b.len(), "vectors must have the same length!"); let iterator = a.iter().zip(b.iter()); iterator.fold(BigUint::one(), |prod, (a_i, b_i)| { // Π(a_i^b_i % modulus) % modulus prod.modmul(&a_i.modpow(b_i, modulus), modulus) }) } /// zips vectors a and b. /// performs component-wise operation: x = a_i * b_i % modulus /// sums all component-wise operation results /// Σ(x) % modulus pub fn zip_vectors_sum_products( a: &Vec<BigUint>, b: &Vec<BigUint>, modulus: &BigUint, ) -> BigUint { assert!(a.len() == b.len(), "vectors must have the same length!"); let iterator = a.iter().zip(b.iter()); // Σ(a_i * b_i) % modulus iterator.fold(BigUint::zero(), |sum, (a_i, b_i)| { sum.modadd(&a_i.modmul(b_i, modulus), modulus) }) } }
pub mod commands; pub mod config; pub mod error; pub mod read; pub mod stats; pub mod transform; pub type Result<T, E = error::Error> = std::result::Result<T, E>;
extern crate hex; extern crate openssl; mod utils; use std::io::prelude::*; use std::fs::File; use openssl::memcmp::eq; use utils::*; fn main() { let strings = lines_from_file("data.txt"); let mut hex = Vec::new(); for i in 0..strings.len(){ hex.push(hex::decode(&strings[i]).unwrap()); } let aes_guess = ecb_detect(hex); println!("guess: {}",hex::encode(aes_guess)); } fn ecb_detect(hex: Vec<Vec<u8>>) -> Vec<u8>{ let mut best = (Vec::new(),0); let mut round_score = 0; for i in 0..hex.len(){ round_score = duplicate_score(&hex[i]); if round_score > best.1{ best.1 = round_score; best.0 = hex[i].clone(); } } println!("score: {}",best.1); best.0 } fn duplicate_score(text: &[u8]) -> u32{ let mut score = 0; for i in 0..(text.len()/16){ for z in (i+1)..(text.len()/16){ if i*z*16 +16 < text.len() && eq(&text[16*i..i*16+16],&text[i*z*16..i*z*16+16]) == true{ score +=1; } } } score }
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)] #[link(name = "windows")] extern "system" {} pub type CurrencyFormatter = *mut ::core::ffi::c_void; #[repr(transparent)] pub struct CurrencyFormatterMode(pub i32); impl CurrencyFormatterMode { pub const UseSymbol: Self = Self(0i32); pub const UseCurrencyCode: Self = Self(1i32); } impl ::core::marker::Copy for CurrencyFormatterMode {} impl ::core::clone::Clone for CurrencyFormatterMode { fn clone(&self) -> Self { *self } } pub type DecimalFormatter = *mut ::core::ffi::c_void; pub type INumberFormatter = *mut ::core::ffi::c_void; pub type INumberFormatter2 = *mut ::core::ffi::c_void; pub type INumberFormatterOptions = *mut ::core::ffi::c_void; pub type INumberParser = *mut ::core::ffi::c_void; pub type INumberRounder = *mut ::core::ffi::c_void; pub type INumberRounderOption = *mut ::core::ffi::c_void; pub type ISignedZeroOption = *mut ::core::ffi::c_void; pub type ISignificantDigitsOption = *mut ::core::ffi::c_void; pub type IncrementNumberRounder = *mut ::core::ffi::c_void; pub type NumeralSystemTranslator = *mut ::core::ffi::c_void; pub type PercentFormatter = *mut ::core::ffi::c_void; pub type PermilleFormatter = *mut ::core::ffi::c_void; #[repr(transparent)] pub struct RoundingAlgorithm(pub i32); impl RoundingAlgorithm { pub const None: Self = Self(0i32); pub const RoundDown: Self = Self(1i32); pub const RoundUp: Self = Self(2i32); pub const RoundTowardsZero: Self = Self(3i32); pub const RoundAwayFromZero: Self = Self(4i32); pub const RoundHalfDown: Self = Self(5i32); pub const RoundHalfUp: Self = Self(6i32); pub const RoundHalfTowardsZero: Self = Self(7i32); pub const RoundHalfAwayFromZero: Self = Self(8i32); pub const RoundHalfToEven: Self = Self(9i32); pub const RoundHalfToOdd: Self = Self(10i32); } impl ::core::marker::Copy for RoundingAlgorithm {} impl ::core::clone::Clone for RoundingAlgorithm { fn clone(&self) -> Self { *self } } pub type SignificantDigitsNumberRounder = *mut ::core::ffi::c_void;
use crate::app::analysis::commit_analysis::ShortCommit; use crate::domain::git::coco_tag::CocoTag; #[allow(dead_code)] pub struct GitSuggest { tags: Vec<CocoTag>, commits: Vec<ShortCommit>, } impl GitSuggest { /// count git tag interval for insight of release /// also same to publish interval /// 平均发布间隔 pub fn git_tag_interval(&self) {} /// find multiple long branches working in process /// it will show the continuous delivery issue /// 最长分支 pub fn long_branch_count(&self) {} /// show the data of weekend works' hours /// it will show the detail of hours /// 周末编码时间 pub fn commits_in_weekend(&self) {} /// the time for max commits in days /// 最有效率时间 pub fn most_efficiency_time(&self) {} /// show the average team members commit time /// frequently member's change means project's not stable for business project /// more members stay in a long time, will help project stable. /// unstable member's change need more Rules /// 平均成员编码时间区别 pub fn average_members_coding_time_range(&self) {} /// the most active commits means the busy date /// 最活跃时间 pub fn most_active_commits_date_by_month(&self) {} }